Re: [Qemu-devel] [RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-06-24 Thread Paolo Bonzini
Il 22/06/2014 10:25, Chen, Tiejun ha scritto: In qemu-upstream, as you commented we can't create this as a ISA class type explicitly. Note I didn't say that QEMU doesn't like having two ISA bridges. I commented that the firmware will see two ISA bridges and will try to initialize both of them

Re: [Qemu-devel] [PATCH 3/4] machine: Introduce QEMU_COMPAT_* macros

2014-06-24 Thread Marcel Apfelbaum
On Wed, 2014-06-25 at 08:20 +0300, Michael S. Tsirkin wrote: > On Tue, Jun 24, 2014 at 03:02:03PM -0300, Eduardo Habkost wrote: > > The QEMU_COMPAT_* macros will contain compat properties that are not > > specific to PC, and may be reused by other machine-types. > > > > PC-specific properties were

Re: [Qemu-devel] [v5][PATCH 2/5] xen, gfx passthrough: create pseudo intel isa bridge

2014-06-24 Thread Michael S. Tsirkin
On Wed, Jun 25, 2014 at 10:17:18AM +0800, Tiejun Chen wrote: > ISA bridge is needed since Intel gfx drive will probe with Dev31:Fun0 > to make graphics device passthrough work well for VMM, that only need > to expose this pseudo ISA bridge to let driver know the real hardware > underneath. > > The

[Qemu-devel] vmstate: struct (VMS_STRUCT) migration

2014-06-24 Thread Alexey Kardashevskiy
Hi! VMStateDescription supports enclosed VMStateDescription's via .vmsd. This is used in multiple places and VMStateDescription definitions look the same way - name, version_id, minimum_version_id, etc. QEMU handles first level VMStateDescription and enclosed VMStateDescription slightly different

Re: [Qemu-devel] [v5][PATCH 1/5] xen, gfx passthrough: basic graphics passthrough support

2014-06-24 Thread Michael S. Tsirkin
On Wed, Jun 25, 2014 at 10:17:17AM +0800, Tiejun Chen wrote: > basic gfx passthrough support: > - add a vga type for gfx passthrough > - retrieve VGA bios from sysfs, then load it to guest at 0xC > - register/unregister legacy VGA I/O ports and MMIOs for passthrough GFX > > The original patch

Re: [Qemu-devel] [v5][PATCH 3/5] xen, gfx passthrough: support Intel IGD passthrough with VT-D

2014-06-24 Thread Paolo Bonzini
Il 25/06/2014 04:17, Tiejun Chen ha scritto: +int pci_create_pch(PCIBus *bus) +{ +XenHostPCIDevice hdev; +int r = 0; + +if (!xen_has_gfx_passthru) { +return r; +} + You could make this an assertion, since the function is never called with xen_has_gfx_passthru == 0. Or

Re: [Qemu-devel] [v5][PATCH 4/5] xen, gfx passthrough: create host bridge to passthrough

2014-06-24 Thread Paolo Bonzini
Il 25/06/2014 04:17, Tiejun Chen ha scritto: +if (xen_enabled() && xen_has_gfx_passthru) { +d = pci_create_simple(b, 0, TYPE_I440FX_XEN_PCI_DEVICE); +*pi440fx_state = I440FX_XEN_PCI_DEVICE(d); +pci_create_pch(b); +} else { +d = pci_create_simple(b, 0, TYPE_

Re: [Qemu-devel] [v5][PATCH 2/5] xen, gfx passthrough: create pseudo intel isa bridge

2014-06-24 Thread Paolo Bonzini
Il 25/06/2014 04:17, Tiejun Chen ha scritto: +static int create_pseudo_pch_isa_bridge(PCIBus *bus, XenHostPCIDevice *hdev) +{ +struct PCIDevice *dev; + +char rid; + +/* We havt to use a simple PCI device to fake this ISA bridge + * to avoid making some confusion to BIOS and ACPI.

Re: [Qemu-devel] [v5][PATCH 1/5] xen, gfx passthrough: basic graphics passthrough support

2014-06-24 Thread Paolo Bonzini
Il 25/06/2014 04:17, Tiejun Chen ha scritto: +static int get_vgabios(unsigned char *buf, XenHostPCIDevice *dev) +{ +char rom_file[64]; +FILE *fp; +uint8_t val; +struct stat st; +uint16_t magic = 0; +int ret = 0; + +snprintf(rom_file, sizeof(rom_file), + "/s

Re: [Qemu-devel] [PATCH 3/4] machine: Introduce QEMU_COMPAT_* macros

2014-06-24 Thread Igor Mammedov
On Tue, 24 Jun 2014 22:20:50 +0300 Marcel Apfelbaum wrote: > On Tue, 2014-06-24 at 15:02 -0300, Eduardo Habkost wrote: > > The QEMU_COMPAT_* macros will contain compat properties that are not > > specific to PC, and may be reused by other machine-types. > > > > PC-specific properties were left o

Re: [Qemu-devel] [v5][PATCH 0/5] xen: add Intel IGD passthrough support

2014-06-24 Thread Paolo Bonzini
Il 25/06/2014 04:17, Tiejun Chen ha scritto: * Don't set that ISA class property, instead, just fake this ISA bridge with 00:1f.0. How are you going to make this work for Q35 or another PCIe machine that already has an ISA bridge at 00:1f.0? Paolo

Re: [Qemu-devel] Live Migration with different block devices

2014-06-24 Thread Paolo Bonzini
Il 25/06/2014 02:08, Xiongzi Ge ha scritto: Will the cache data in the guest be migrated to the other host? Again, cache data is _not_ managed by QEMU. It is managed by the guest kernel. Its content and state is migrated together with the rest of RAM. Paolo

Re: [Qemu-devel] [PATCH v10 5/6] raw-posix: Add full image preallocation option

2014-06-24 Thread Hu Tao
On Sat, Jun 14, 2014 at 09:38:30PM +0200, Max Reitz wrote: > On 12.06.2014 05:54, Hu Tao wrote: > >This patch adds a new option preallocation for raw format, and implements > >full preallocation. > > > >Signed-off-by: Hu Tao > >--- > > block/raw-posix.c | 59 > > +

Re: [Qemu-devel] [PATCH 2.1 34/36] qemu-char: make writes thread-safe

2014-06-24 Thread Stefan Weil
Am 18.06.2014 08:43, schrieb Paolo Bonzini: > This will let threads other than the I/O thread raise QMP events. > > GIOChannel is thread-safe, and send and receive state is usually > well-separated. The only driver that requires some care is the > pty driver, where some of the state is shared by

Re: [Qemu-devel] [PATCH] pc: Fix "prog_if" typo on PC_COMPAT_2_0

2014-06-24 Thread Michael S. Tsirkin
On Tue, Jun 24, 2014 at 07:57:55PM -0300, Eduardo Habkost wrote: > The property name is "prog_if", not "prof_if". > > Signed-off-by: Eduardo Habkost > Cc: BALATON Zoltan Should be reported-by, by the way. Cc: means "I have notified this person just in case". > --- > include/hw/i386/pc.h | 2 +

Re: [Qemu-devel] [PATCH] pc: Fix "prog_if" typo on PC_COMPAT_2_0

2014-06-24 Thread Michael S. Tsirkin
On Wed, Jun 25, 2014 at 09:00:59AM +0300, Michael S. Tsirkin wrote: > On Tue, Jun 24, 2014 at 07:57:55PM -0300, Eduardo Habkost wrote: > > The property name is "prog_if", not "prof_if". > > > > Signed-off-by: Eduardo Habkost > > Cc: BALATON Zoltan > > Should be reported-by, by the way. > Cc: me

Re: [Qemu-devel] [PATCH] pc: Fix "prog_if" typo on PC_COMPAT_2_0

2014-06-24 Thread Michael S. Tsirkin
On Tue, Jun 24, 2014 at 07:57:55PM -0300, Eduardo Habkost wrote: > The property name is "prog_if", not "prof_if". > > Signed-off-by: Eduardo Habkost > Cc: BALATON Zoltan Applied, thanks! > --- > include/hw/i386/pc.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/inc

Re: [Qemu-devel] [PATCH v2 0/2] Introduce common QEMU_COMPAT_* macros

2014-06-24 Thread Michael S. Tsirkin
On Tue, Jun 24, 2014 at 11:04:43PM -0300, Eduardo Habkost wrote: > This series is an attempt to make the compat_props lists from the PC code > reusable by other machine-types. All the compat bits that are on those lists > are > not tied to a specific machine-type, but instead to the device code th

Re: [Qemu-devel] [PATCH v2 2/2] machine: Introduce QEMU_COMPAT_* macros

2014-06-24 Thread Michael S. Tsirkin
On Tue, Jun 24, 2014 at 11:04:45PM -0300, Eduardo Habkost wrote: > The QEMU_COMPAT_* macros will contain compat properties that are not > specific to PC, and may be reused by other machine-types. > > The compat properties for PC-specific devices were moved to > QEMU_COMPAT_* too, because they are

Re: [Qemu-devel] [PATCH v2 1/2] pc: Move q35 compat props to PC_COMPAT_*

2014-06-24 Thread Michael S. Tsirkin
On Tue, Jun 24, 2014 at 11:04:44PM -0300, Eduardo Habkost wrote: > For each compat property on PC_Q35_COMPAT_*, there are only two > possibilities: > > * If the device is never instantiated when using a machine other than >pc-q35, then the compat property can be safely added to >PC_COMPAT

Re: [Qemu-devel] [PATCH v10 4/6] qapi: introduce PreallocMode and a new PreallocMode full.

2014-06-24 Thread Hu Tao
On Sat, Jun 14, 2014 at 09:17:02PM +0200, Max Reitz wrote: > On 12.06.2014 05:54, Hu Tao wrote: > >This patch prepares for the subsequent patches. > > > >Reviewed-by: Fam Zheng > >Reviewed-by: Eric Blake > >Signed-off-by: Hu Tao > >--- > > block/qcow2.c| 8 > > qapi-schema.json |

Re: [Qemu-devel] [PATCH v10 6/6] qcow2: Add full image preallocation option

2014-06-24 Thread Hu Tao
On Fri, Jun 20, 2014 at 08:37:51PM +0200, Max Reitz wrote: > On 20.06.2014 10:25, Hu Tao wrote: > >On Sat, Jun 14, 2014 at 10:37:33PM +0200, Max Reitz wrote: > >>On 12.06.2014 05:54, Hu Tao wrote: > >>>This adds a preallocation=full mode to qcow2 image creation, which > >>>creates a non-sparse imag

Re: [Qemu-devel] [PATCH 0/4] Introduce common QEMU_COMPAT_* macros

2014-06-24 Thread Michael S. Tsirkin
On Wed, Jun 25, 2014 at 12:39:39PM +1000, Alexey Kardashevskiy wrote: > On 06/25/2014 04:02 AM, Eduardo Habkost wrote: > > This series is an attempt to make the compat_props lists from the PC code > > reusable by other machine-types. All the compat bits that are on those > > lists are > > not tied

Re: [Qemu-devel] [PATCH v3 19/32] target-arm: insert Aarch32 cpregs twice into hashtable

2014-06-24 Thread Edgar E. Iglesias
On Wed, Jun 11, 2014 at 01:55:01AM +0200, Fabian Aggeler wrote: > Prepare for cp register banking by inserting every cp register twice, > once for secure world and once for non-secure world. Hi, A question regarding the migration issue that Sergey raised. Do we need to do anything about it or can

Re: [Qemu-devel] [PATCH 3/4] machine: Introduce QEMU_COMPAT_* macros

2014-06-24 Thread Michael S. Tsirkin
On Tue, Jun 24, 2014 at 03:02:03PM -0300, Eduardo Habkost wrote: > The QEMU_COMPAT_* macros will contain compat properties that are not > specific to PC, and may be reused by other machine-types. > > PC-specific properties were left on the PC_COMPAT_* macros. > > Signed-off-by: Eduardo Habkost >

Re: [Qemu-devel] [PATCH 2/4] pc: Eliminate nesting of common PC_COMPAT_* macros

2014-06-24 Thread Michael S. Tsirkin
On Tue, Jun 24, 2014 at 03:02:02PM -0300, Eduardo Habkost wrote: > The PC_COMPAT_* macros include each other, and the PC_Q35_COMPAT_* > macros _also_ included each other. That caused lots of properties to > appear multiple times on PC_Q35_COMPAT_*. > > For example, PC_Q35_COMPAT_1_4 expanded to th

Re: [Qemu-devel] [PATCH 0/4] Introduce common QEMU_COMPAT_* macros

2014-06-24 Thread Michael S. Tsirkin
On Tue, Jun 24, 2014 at 03:02:00PM -0300, Eduardo Habkost wrote: > This series is an attempt to make the compat_props lists from the PC code > reusable by other machine-types. All the compat bits that are on those lists > are > not tied to a specific machine-type, but instead to the device code th

Re: [Qemu-devel] [PATCH 4/4] [RFC] Eliminate PC-specific compat_props

2014-06-24 Thread Michael S. Tsirkin
On Tue, Jun 24, 2014 at 03:02:04PM -0300, Eduardo Habkost wrote: > All compat properties are only applied if a device of an specific type > is instantiated. There's no need to keep a PC-specific list of compat > properties, as properties for PC-specific devices won't affect other > machine-types an

Re: [Qemu-devel] [PATCH v2] ppc: spapr-rtas - implement os-term rtas call

2014-06-24 Thread Nikunj A Dadhania
Nikunj A Dadhania writes: > Alexander Graf writes: > >> On 17.06.14 11:59, Nikunj A Dadhania wrote: >>> Alexander Graf writes: On 17.06.14 11:30, Nikunj A Dadhania wrote: > Alexander Graf writes: > >>> +spapr_rtas_register("ibm,os-term", rtas_ibm_os_term); >>> +spapr_r

Re: [Qemu-devel] [PATCH v3 07/32] target-arm: add non-secure Translation Block flag

2014-06-24 Thread Edgar E. Iglesias
On Wed, Jun 11, 2014 at 01:54:49AM +0200, Fabian Aggeler wrote: > From: Sergey Fedorov > > This patch is based on idea found in patch at > git://github.com/jowinter/qemu-trustzone.git > f3d955c6c0ed8c46bc0eb10b634201032a651dd2 by > Johannes Winter . > > This flag prevents QEMU from executing TCG

[Qemu-devel] [PATCH] spapr: Fix code design style (s/SPAPRMachine/sPAPRMachineState)

2014-06-24 Thread Alexey Kardashevskiy
Every single sPAPR QOM object has small first "s". Most (not all yet) QOM objects have "State" suffix. This replaces SPAPRMachine with sPAPRMachineState to conform with QEMU code style and removes redundant empty line. Signed-off-by: Alexey Kardashevskiy --- hw/ppc/spapr.c | 15 +++

[Qemu-devel] [PATCH] linux-user: Handle new ARM breakpoint instruction

2014-06-24 Thread Hunter Laux
This instruction space is guaranteed to be undefined. ARM: 0111 Thumb: 1101 1110 The breakpoint instructions were selected from this instruction space. Linux traps the illegal instruction and sends a SIGTRAP if it is a breakpoint. Here is the Linux i

[Qemu-devel] [PATCH v2] spapr: Define a 2.1 pseries machine

2014-06-24 Thread Alexey Kardashevskiy
This adds a v2.1 machine to support backward compatibility for newer macines in the case if they ever be implemented. This adds a "pseries-2.1" machine as a child of the "pseries" machine and only changes visible machine name. Signed-off-by: Alexey Kardashevskiy --- Changes: v2: * removed .insta

[Qemu-devel] [PATCH v2 4/4] spapr: Add RTAS sysparm SPLPAR Characteristics

2014-06-24 Thread Sam Bobroff
Add support for the SPLPAR Characteristics parameter to the emulated RTAS call ibm,get-system-parameter. The support provides just enough information to allow "cat /proc/powerpc/lparcfg" to succeed without generating a kernel error message. Without this patch the above command will produce the fo

[Qemu-devel] [PATCH v2 0/4] spapr: improve RTAS get_system_parameter

2014-06-24 Thread Sam Bobroff
This series of patches improves QEMU's emulation of the RTAS call "ibm,get-system-parameter" by adding support for the "UUID" and "SPLPAR Characteristics" parameters as well as fixing a problem in the the implementation of the "Platform Processor Diagnostics Run Mode" parameter. It also improves

[Qemu-devel] [PATCH v2 2/4] spapr: Fix RTAS sysparm DIAGNOSTICS_RUN_MODE

2014-06-24 Thread Sam Bobroff
This allows the ibm,get-system-parameter RTAS call to succeed for the DIAGNOSTICS_RUN_MODE system parameter. The problem can be seen with "ppc64_cpu --run-mode" from the powerpc-utils package which fails before this patch with "Machine does not support diagnostic run mode". This is corrected by u

[Qemu-devel] [PATCH v2 1/4] spapr: Add rtas_st_buffer utility function

2014-06-24 Thread Sam Bobroff
Add a function to write lengh + data into a buffer as required for the emulation of the RTAS ibm,get-system-parameter call. If the destination is smaller than the source, the write is truncated and success is returned. This matches the behaviour of pHyp. This will be used in following patches. S

[Qemu-devel] [PATCH v2 3/4] spapr: Add RTAS sysparm UUID

2014-06-24 Thread Sam Bobroff
Add support for the UUID parameter to the emulated RTAS call ibm,get-system-parameter. Return the guest's UUID as the value for the RTAS UUID system parameter, or null (a zero length result) if it is not set. Signed-off-by: Sam Bobroff --- hw/ppc/spapr_rtas.c| 4 include/hw/ppc/spapr.h

[Qemu-devel] [PATCH v2] vfio: Make BARs native endian

2014-06-24 Thread Alexey Kardashevskiy
Slow BAR access path is used when VFIO fails to mmap() BAR. Since this is just a transport between the guest and a device, there is no need to do endianness swapping. This changes BARs to use native endianness. Since non-ROM BARs were doing byte swapping, we need to remove it so does the patch. As

Re: [Qemu-devel] [Qemu-ppc] [PATCH 0/4] spapr: improve RTAS get_system_parameter

2014-06-24 Thread Sam Bobroff
On 24/06/14 22:06, Alexander Graf wrote: > > On 24.06.14 02:22, Sam Bobroff wrote: >> This series of patches improves QEMU's emulation of the RTAS call >> "ibm,get-system-parameter" by adding support for the "UUID" and "SPLPAR >> Characteristics" parameters as well as fixing a problem in the the >

Re: [Qemu-devel] [PATCH FOR 2.1 5/5] qapi event: clean up in callers

2014-06-24 Thread Eric Blake
On 06/24/2014 05:34 PM, Wenchao Xia wrote: > This patch improves docs and address small issues in event > callers. > > Signed-off-by: Wenchao Xia > --- > hw/watchdog/watchdog.c |2 +- > include/block/blockjob.h |2 +- > monitor.c|2 +- > qapi-schema.json |

Re: [Qemu-devel] [v2][PATCH 4/8] xen, gfx passthrough: reserve 00:02.0 for INTEL IGD

2014-06-24 Thread Chen, Tiejun
On 2014/5/19 19:22, Gerd Hoffmann wrote: Hi, I think '-vga none' just guarantees the qemu vga cards doesn't occupy 00:02.0, but this doesn't mean others use this specific slot since in qemu internal, we always pass -1 to assign a slot automatically to register a PCI device. So in some cases,

Re: [Qemu-devel] [PATCH 0/4] Introduce common QEMU_COMPAT_* macros

2014-06-24 Thread Alexey Kardashevskiy
On 06/25/2014 04:02 AM, Eduardo Habkost wrote: > This series is an attempt to make the compat_props lists from the PC code > reusable by other machine-types. All the compat bits that are on those lists > are > not tied to a specific machine-type, but instead to the device code that was > present o

Re: [Qemu-devel] [PATCH FOR 2.1 4/5] qapi script: clean up in scripts

2014-06-24 Thread Eric Blake
On 06/24/2014 05:33 PM, Wenchao Xia wrote: > This patch improve docs and uses c_type(argentry, is_param=True) > in script. > > Signed-off-by: Wenchao Xia > --- > docs/qapi-code-gen.txt |8 > scripts/qapi-event.py |5 ++--- > scripts/qapi.py

Re: [Qemu-devel] [Intel-gfx] [RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-06-24 Thread Chen, Tiejun
On 2014/6/24 10:59, Zhenyu Wang wrote: On 2014.06.19 17:53:51 +0800, Tiejun Chen wrote: Originally the reason to probe ISA bridge instead of Dev31:Fun0 is to make graphics device passthrough work easy for VMM, that only need to expose ISA bridge to let driver know the real hardware underneath. T

[Qemu-devel] [v5][PATCH 4/5] xen, gfx passthrough: create host bridge to passthrough

2014-06-24 Thread Tiejun Chen
Implement that pci host bridge to specific to passthrough. Actually this just inherit the standard one. Signed-off-by: Tiejun Chen --- v5: * Nothing is changed. v4: * Fix one typo in the patch head description. * Use (xen_enabled() && xen_has_gfx_passthru) to make sure we only work in this s

[Qemu-devel] [v5][PATCH 2/5] xen, gfx passthrough: create pseudo intel isa bridge

2014-06-24 Thread Tiejun Chen
ISA bridge is needed since Intel gfx drive will probe with Dev31:Fun0 to make graphics device passthrough work well for VMM, that only need to expose this pseudo ISA bridge to let driver know the real hardware underneath. The original patch is from Allen Kay Signed-off-by: Yang Zhang Signed-off

Re: [Qemu-devel] [PATCH FOR 2.1 3/5] qapi: ignore generated event files

2014-06-24 Thread Eric Blake
On 06/24/2014 05:33 PM, Wenchao Xia wrote: > Signed-off-by: Wenchao Xia > --- > .gitignore |1 + > 1 files changed, 1 insertions(+), 0 deletions(-) Reviewed-by: Eric Blake > > diff --git a/.gitignore b/.gitignore > index c658613..2286d0a 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -

[Qemu-devel] [v5][PATCH 3/5] xen, gfx passthrough: support Intel IGD passthrough with VT-D

2014-06-24 Thread Tiejun Chen
Some registers of Intel IGD are mapped in host bridge, so it needs to passthrough these registers of physical host bridge to guest because emulated host bridge in guest doesn't have these mappings. The original patch is from Weidong Han Signed-off-by: Yang Zhang Signed-off-by: Tiejun Chen Cc:

[Qemu-devel] [v5][PATCH 5/5] xen, gfx passthrough: add opregion mapping

2014-06-24 Thread Tiejun Chen
The OpRegion shouldn't be mapped 1:1 because the address in the host can't be used in the guest directly. This patch traps read and write access to the opregion of the Intel GPU config space (offset 0xfc). The original patch is from Jean Guyader Signed-off-by: Yang Zhang Signed-off-by: Tiejun

[Qemu-devel] [v5][PATCH 1/5] xen, gfx passthrough: basic graphics passthrough support

2014-06-24 Thread Tiejun Chen
basic gfx passthrough support: - add a vga type for gfx passthrough - retrieve VGA bios from sysfs, then load it to guest at 0xC - register/unregister legacy VGA I/O ports and MMIOs for passthrough GFX The original patch is from Weidong Han Signed-off-by: Yang Zhang Signed-off-by: Tiejun Ch

[Qemu-devel] [v5][PATCH 0/5] xen: add Intel IGD passthrough support

2014-06-24 Thread Tiejun Chen
V5 is generated just based on Paolo's some comments. v5: * Don't set that ISA class property, instead, just fake this ISA bridge with 00:1f.0. * Don't pass vendor/device ids in igd_pci_read(). * Add to support offset 0x44/0x48. * Just rebase. v4: * Fix some typos in the patch head description

Re: [Qemu-devel] [PATCH FOR 2.1 2/5] qapi: move event defines

2014-06-24 Thread Eric Blake
On 06/24/2014 05:33 PM, Wenchao Xia wrote: > Signed-off-by: Wenchao Xia > --- > Makefile |2 +- > qapi-event.json | 318 > -- > qapi-schema.json |5 +- > qapi/event.json | 318 > +

Re: [Qemu-devel] Live Migration with different block devices

2014-06-24 Thread Eric Blake
On 06/24/2014 06:08 PM, Xiongzi Ge wrote: > Hi Eric, [we tend to avoid top-posting on technical lists] > > This really works if I set up the same configuration (/dev/vda in the > guest) but the physical block devices are not the same after migration.The > ABI is the same. When the guest cache s

[Qemu-devel] [PATCH v2 0/2] Introduce common QEMU_COMPAT_* macros

2014-06-24 Thread Eduardo Habkost
This series is an attempt to make the compat_props lists from the PC code reusable by other machine-types. All the compat bits that are on those lists are not tied to a specific machine-type, but instead to the device code that was present on a given QEMU version. This series is based on Michael's

[Qemu-devel] [PATCH v2 2/2] machine: Introduce QEMU_COMPAT_* macros

2014-06-24 Thread Eduardo Habkost
The QEMU_COMPAT_* macros will contain compat properties that are not specific to PC, and may be reused by other machine-types. The compat properties for PC-specific devices were moved to QEMU_COMPAT_* too, because they are simply not going to be applied to any device if they are not instantiated.

[Qemu-devel] [PATCH v2 1/2] pc: Move q35 compat props to PC_COMPAT_*

2014-06-24 Thread Eduardo Habkost
For each compat property on PC_Q35_COMPAT_*, there are only two possibilities: * If the device is never instantiated when using a machine other than pc-q35, then the compat property can be safely added to PC_COMPAT_*; * If the device can be instantiated when using a machine other than p

Re: [Qemu-devel] per-machine vs per-qemu-version compat_props macros (was Re: acpi:ich9: add memory hotplug handling)

2014-06-24 Thread Eduardo Habkost
On Tue, Jun 24, 2014 at 02:55:20PM -0300, Eduardo Habkost wrote: > On Tue, Jun 24, 2014 at 05:47:53PM +0100, Peter Maydell wrote: > > On 24 June 2014 17:44, Eduardo Habkost wrote: > > > (I would go even further and say that no compat_props bit need to be > > > specific to a machine-type family, an

[Qemu-devel] [PATCH v6 4/4] virtio-blk-test: add hotplug subtest

2014-06-24 Thread Amos Kong
This patch adds a new subtest, it hotplugs 29 * 8 = 232 virtio-blk devices to guest, and try to hot-unplug them. Note: the hot-unplug can't work without cooperation of guest OS. Signed-off-by: Amos Kong --- tests/virtio-blk-test.c | 68 + 1 file c

[Qemu-devel] [PATCH v6 3/4] virtio-blk-test: change pci_nop() to virtblk_init()

2014-06-24 Thread Amos Kong
I want to add a new subtest in virtio-blk-test, it will start guest without network. The original pci_init() did nothing, but it's good to reserve a very simple initialization testing. Signed-off-by: Amos Kong Reviewed-by: Stefan Hajnoczi --- tests/virtio-blk-test.c | 13 ++--- 1 file c

[Qemu-devel] [PATCH v6 0/4] test virtio-blk hotplug

2014-06-24 Thread Amos Kong
It's worth to add a hotplug test to qtest, but without cooperation of guest OS, new devices can't be initialized by guest, and hot-unplug doesn't work. However, the new test can cover some part of code of hotplug/unplug. I will write another subtest to test hotplug with pci support. V2: move qmp

[Qemu-devel] [PATCH v6 1/4] qtest: introduce qmp_exec_hmp_cmd()

2014-06-24 Thread Amos Kong
This patch wraps a helper function to execute human command by one QMP command (human-monitor-command). It also checks the return string. Signed-off-by: Amos Kong --- tests/libqtest.c | 23 +++ tests/libqtest.h | 9 + 2 files changed, 32 insertions(+) diff --git a/t

[Qemu-devel] [PATCH v6 2/4] qtest: use qmp_exec_hmp_cmd() in blockdev-test

2014-06-24 Thread Amos Kong
Signed-off-by: Amos Kong Reviewed-by: Stefan Hajnoczi Reviewed-by: Andreas Färber --- tests/blockdev-test.c | 23 ++- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/tests/blockdev-test.c b/tests/blockdev-test.c index c940e00..c9127c0 100644 --- a/tests/blockd

Re: [Qemu-devel] [PATCH] libqtest: escape strings in QMP commands, fix leak

2014-06-24 Thread Amos Kong
On Fri, Jun 13, 2014 at 10:15:00AM +0200, Paolo Bonzini wrote: > libqtest is using g_strdup_printf to format QMP commands, but > this does not work if the argument strings need to be escaped. > Instead, use the fancy %-formatting functionality of QObject. > The only change required in tests is that

Re: [Qemu-devel] [PATCH v3 9/9] spapr_pci: Use XICS interrupt allocator and do not cache interrupts in PHB

2014-06-24 Thread Alexey Kardashevskiy
On 05/30/2014 11:45 PM, Alexander Graf wrote: > > On 30.05.14 15:36, Alexey Kardashevskiy wrote: >> On 05/30/2014 08:08 PM, Alexander Graf wrote: >>> On 30.05.14 11:34, Alexey Kardashevskiy wrote: Currently SPAPR PHB keeps track of all allocated MSI (here and below MSI stands for both MS

Re: [Qemu-devel] per-machine vs per-qemu-version compat_props macros (was Re: acpi:ich9: add memory hotplug handling)

2014-06-24 Thread Eduardo Habkost
On Tue, Jun 24, 2014 at 11:30:04PM +0100, Peter Maydell wrote: > On 24 June 2014 18:55, Eduardo Habkost wrote: > > On Tue, Jun 24, 2014 at 05:47:53PM +0100, Peter Maydell wrote: > >> What if different machines in a particular release had the > >> property set to different defaults? > > > > I never

Re: [Qemu-devel] Live Migration with different block devices

2014-06-24 Thread Xiongzi Ge
Hi Eric, This really works if I set up the same configuration (/dev/vda in the guest) but the physical block devices are not the same after migration.The ABI is the same. When the guest cache stores a page like 'aaa' which is in the block device of Host A. If the cache in the guest is also migrat

Re: [Qemu-devel] [PATCH v10 1/3] sPAPR: Implement EEH RTAS calls

2014-06-24 Thread Gavin Shan
On Tue, Jun 24, 2014 at 04:43:23PM +0200, Alexander Graf wrote: > >On 10.06.14 04:03, Gavin Shan wrote: >>The emulation for EEH RTAS requests from guest isn't covered >>by QEMU yet and the patch implements them. >> >>The patch defines constants used by EEH RTAS calls and adds >>callback sPAPRPHBCla

[Qemu-devel] [PATCH FOR 2.1 3/5] qapi: ignore generated event files

2014-06-24 Thread Wenchao Xia
Signed-off-by: Wenchao Xia --- .gitignore |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/.gitignore b/.gitignore index c658613..2286d0a 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,7 @@ /qapi-generated /qapi-types.[ch] /qapi-visit.[ch] +/qapi-event.[ch] /qmp

[Qemu-devel] [PATCH FOR 2.1 5/5] qapi event: clean up in callers

2014-06-24 Thread Wenchao Xia
This patch improves docs and address small issues in event callers. Signed-off-by: Wenchao Xia --- hw/watchdog/watchdog.c |2 +- include/block/blockjob.h |2 +- monitor.c|2 +- qapi-schema.json |7 --- qapi/block-core.json |3 ++- qapi/event.

[Qemu-devel] [PATCH FOR 2.1 0/5] clean up for qapi event

2014-06-24 Thread Wenchao Xia
Paolo Bonzini (1): tests/test-qmp-event: fix for GLib < 2.31 Wenchao Xia (4): qapi: move event defines qapi: ignore generated event files qapi script: clean up in scripts qapi event: clean up in callers .gitignore |1 + Makefile

[Qemu-devel] [PATCH FOR 2.1 1/5] tests/test-qmp-event: fix for GLib < 2.31

2014-06-24 Thread Wenchao Xia
From: Paolo Bonzini On old GLib, the test needs a g_thread_init call. Reported-by: Wenchao Xia Signed-off-by: Paolo Bonzini Tested-by: Wenchao Xia Signed-off-by: Wenchao Xia --- tests/test-qmp-event.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/tests/test-qmp-ev

[Qemu-devel] [PATCH FOR 2.1 2/5] qapi: move event defines

2014-06-24 Thread Wenchao Xia
Signed-off-by: Wenchao Xia --- Makefile |2 +- qapi-event.json | 318 -- qapi-schema.json |5 +- qapi/event.json | 318 ++ 4 files changed, 322 insertions(+), 321 deletions(

[Qemu-devel] [PATCH FOR 2.1 4/5] qapi script: clean up in scripts

2014-06-24 Thread Wenchao Xia
This patch improve docs and uses c_type(argentry, is_param=True) in script. Signed-off-by: Wenchao Xia --- docs/qapi-code-gen.txt |8 scripts/qapi-event.py |5 ++--- scripts/qapi.py |2 +- tests/qapi-schema/event-nes

Re: [Qemu-devel] [PATCHv3 2/2] block/nfs: add knob to set readahead

2014-06-24 Thread Eric Blake
On 06/24/2014 04:06 PM, Peter Lieven wrote: > upcoming libnfs will feature internal readahead support. > Add a knob to pass the optional readahead value as a URL > parameter. > > Signed-off-by: Peter Lieven > --- > block/nfs.c |4 > 1 file changed, 4 insertions(+) Reviewed-by: Eric Bla

Re: [Qemu-devel] [PATCHv3 1/2] block/nfs: fix url parameter checking

2014-06-24 Thread Eric Blake
On 06/24/2014 04:06 PM, Peter Lieven wrote: > this patch fixes the incorrect usage of strncmp and > adds simple error checking by means of parse_uint_full > instead of atoi for the supplied URL parameters. > > Signed-off-by: Peter Lieven > --- > block/nfs.c | 18 -- > 1 file ch

Re: [Qemu-devel] [PATCH v3] mc146818rtc: add rtc-reset-reinjection QMP command

2014-06-24 Thread Eric Blake
On 06/24/2014 03:55 PM, Marcelo Tosatti wrote: > > It is necessary to reset RTC interrupt reinjection backlog if > guest time is synchronized via a different mechanism, such as > QGA's guest-set-time command. > > Failing to do so causes both corrections to be applied (summed), > resulting in an i

Re: [Qemu-devel] Live Migration with different block devices

2014-06-24 Thread Eric Blake
On 06/24/2014 03:29 PM, Brian Jackson wrote: > > > On 6/24/2014 2:22 PM, Xiongzi Ge wrote: >> Hi, >> >> >> When I do live migration, in the source and destination host, there are >> different block devices, but qemu can not detect this. I used virtio >> as the >> driver in kvm and in the vdi devi

Re: [Qemu-devel] [PATCH v1 7/7] target-arm: Call the pmccntr_sync function when swapping ELs

2014-06-24 Thread Peter Crosthwaite
On Wed, Jun 25, 2014 at 8:39 AM, Alistair Francis wrote: > On Wed, Jun 25, 2014 at 1:55 AM, Christopher Covington > wrote: >> On 06/23/2014 09:12 PM, Alistair Francis wrote: >>> Call the new pmccntr_sync() function when there is a possibility >>> of swapping ELs (I.E. when there is an exception)

Re: [Qemu-devel] [PATCH 3/4] machine: Introduce QEMU_COMPAT_* macros

2014-06-24 Thread Eduardo Habkost
On Tue, Jun 24, 2014 at 10:58:29PM +0200, BALATON Zoltan wrote: > On Tue, 24 Jun 2014, Eduardo Habkost wrote: [...] > >+.driver = "pci-serial",\ > >+.property = "prog_if",\ > >+.value= stringify(0),\ > >+},\ > >+{\ > >+.driver = "pci-serial-2x",\ > >+

[Qemu-devel] [PATCH] pc: Fix "prog_if" typo on PC_COMPAT_2_0

2014-06-24 Thread Eduardo Habkost
The property name is "prog_if", not "prof_if". Signed-off-by: Eduardo Habkost Cc: BALATON Zoltan --- include/hw/i386/pc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 486e98f..1331d5a 100644 --- a/include/hw/i386/pc.h +++

Re: [Qemu-devel] [PATCH 4/5 v3][RESEND] ppc: Add software breakpoint support

2014-06-24 Thread Alexander Graf
On 24.06.14 19:59, Madhavan Srinivasan wrote: On Tuesday 24 June 2014 10:36 PM, bharat.bhus...@freescale.com wrote: -Original Message- From: Madhavan Srinivasan [mailto:ma...@linux.vnet.ibm.com] Sent: Tuesday, June 24, 2014 8:59 PM To: Bhushan Bharat-R65777; ag...@suse.de Cc: qemu-...

Re: [Qemu-devel] [PATCH 5/5 v3][RESEND] ppc: Add hw breakpoint watchpoint support

2014-06-24 Thread Alexander Graf
On 24.06.14 18:57, bharat.bhus...@freescale.com wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Tuesday, June 24, 2014 8:21 PM To: Bhushan Bharat-R65777 Cc: qemu-...@nongnu.org; qemu-devel@nongnu.org; ma...@linux.vnet.ibm.com Subject: Re: [PATCH 5/5 v3][RESE

Re: [Qemu-devel] [PATCH v1 3/7] target-arm: Add helper macros and defines for CCNT register

2014-06-24 Thread Alistair Francis
On Wed, Jun 25, 2014 at 1:56 AM, Peter Maydell wrote: > On 24 June 2014 02:12, Alistair Francis wrote: >> +/* This implements the PMCCFILTR_EL0:P and U bits; the PMXEVTYPER:P and >> U >> + * bits and the c9_pmcr:E bit. >> + * >> + * It does not suppor the secure/non-secure compon

Re: [Qemu-devel] [PATCH v1 3/7] target-arm: Add helper macros and defines for CCNT register

2014-06-24 Thread Alistair Francis
On Wed, Jun 25, 2014 at 1:31 AM, Christopher Covington wrote: > Hi Alistair, > > On 06/23/2014 09:12 PM, Alistair Francis wrote: >> Include a helper function to determine if the CCNT counter >> is enabled as well as the constants used to mask the pmccfiltr_el0 >> register. >> >> Signed-off-by: Ali

Re: [Qemu-devel] [PATCH v1 7/7] target-arm: Call the pmccntr_sync function when swapping ELs

2014-06-24 Thread Alistair Francis
On Wed, Jun 25, 2014 at 1:55 AM, Christopher Covington wrote: > On 06/23/2014 09:12 PM, Alistair Francis wrote: >> Call the new pmccntr_sync() function when there is a possibility >> of swapping ELs (I.E. when there is an exception) >> >> Signed-off-by: Alistair Francis >> --- >> >> target-arm/h

Re: [Qemu-devel] [PATCH v1 4/7] target-arm: Implement pmccntr_sync function

2014-06-24 Thread Alistair Francis
On Wed, Jun 25, 2014 at 1:35 AM, Christopher Covington wrote: > On 06/23/2014 09:12 PM, Alistair Francis wrote: >> This is used to synchronise the PMCCNTR counter and swap its >> state between enabled and disabled if required. It must always >> be called twice, both before and after any logic that

Re: [Qemu-devel] per-machine vs per-qemu-version compat_props macros (was Re: acpi:ich9: add memory hotplug handling)

2014-06-24 Thread Peter Maydell
On 24 June 2014 18:55, Eduardo Habkost wrote: > On Tue, Jun 24, 2014 at 05:47:53PM +0100, Peter Maydell wrote: >> What if different machines in a particular release had the >> property set to different defaults? > > I never saw that happen, and I don't think it is even likely: default > values set

Re: [Qemu-devel] [PATCH build-fix] tests/test-qmp-event: fix for GLib < 2.31

2014-06-24 Thread Wenchao Xia
Tested-by: Wenchao Xia

[Qemu-devel] [PATCHv3 2/2] block/nfs: add knob to set readahead

2014-06-24 Thread Peter Lieven
upcoming libnfs will feature internal readahead support. Add a knob to pass the optional readahead value as a URL parameter. Signed-off-by: Peter Lieven --- block/nfs.c |4 1 file changed, 4 insertions(+) diff --git a/block/nfs.c b/block/nfs.c index 0b44483..8439e0d 100644 --- a/block/

[Qemu-devel] [PATCHv3 0/2] block/nfs: add knob to set readahead

2014-06-24 Thread Peter Lieven
upcoming libnfs will feature internal readahead support. Add a knob to pass the optional readahead value as a URL parameter. This series fixes also the incorrect usage of strncmp and atoi. v2->v3: - use parse_uint_full [Eric] - split patch [Eric] v1->v2: use strtol instead of atoi [Eric]

[Qemu-devel] [PATCHv3 1/2] block/nfs: fix url parameter checking

2014-06-24 Thread Peter Lieven
this patch fixes the incorrect usage of strncmp and adds simple error checking by means of parse_uint_full instead of atoi for the supplied URL parameters. Signed-off-by: Peter Lieven --- block/nfs.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/block/

[Qemu-devel] [PATCH v3] mc146818rtc: add rtc-reset-reinjection QMP command

2014-06-24 Thread Marcelo Tosatti
It is necessary to reset RTC interrupt reinjection backlog if guest time is synchronized via a different mechanism, such as QGA's guest-set-time command. Failing to do so causes both corrections to be applied (summed), resulting in an incorrect guest time. Signed-off-by: Marcelo Tosatti diff -

Re: [Qemu-devel] [PATCHv2] block/nfs: add knob to set readahead

2014-06-24 Thread Peter Lieven
Am 24.06.2014 18:04, schrieb Eric Blake: > On 06/24/2014 02:52 AM, Peter Lieven wrote: >> upcoming libnfs will feature internal readahead support. >> Add a knob to pass the optional readahead value as a URL >> parameter. >> >> This patch fixes also the incorrect usage of strncmp and >> atoi. >> >>

Re: [Qemu-devel] Live Migration with different block devices

2014-06-24 Thread Christopher Covington
On 06/24/2014 05:26 PM, Xiongzi Ge wrote: > Hi , > > This is just related to migration, but it may be not in the standard > migration. The cache device in different hosts can only be accessed by the vm > running in the host. The problem for me is to find the interface of the cache > in the guest

Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions

2014-06-24 Thread Richard Henderson
On 06/24/2014 02:24 PM, Al Viro wrote: > Al, off to figure out the black magic TCG is using to generate calls... If you've a helper DEF_HELPER_1(halt, void, i64) then gen_helper_halt(...) will generate the tcg ops that result in the call. r~

[Qemu-devel] [Bug 1323758] Re: Mouse stops working when connected usb-storage-device

2014-06-24 Thread Ruben Portier
Any news on this? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1323758 Title: Mouse stops working when connected usb-storage-device Status in QEMU: New Status in “qemu” package in Ubuntu: New

Re: [Qemu-devel] Live Migration with different block devices

2014-06-24 Thread Brian Jackson
On 6/24/2014 2:22 PM, Xiongzi Ge wrote: Hi, When I do live migration, in the source and destination host, there are different block devices, but qemu can not detect this. I used virtio as the driver in kvm and in the vdi device in the guest is /dev/vda. So, the vm guest can read different d

Re: [Qemu-devel] Live Migration with different block devices

2014-06-24 Thread Xiongzi Ge
Hi , This is just related to migration, but it may be not in the standard migration. The cache device in different hosts can only be accessed by the vm running in the host. The problem for me is to find the interface of the cache in the guest or like first doing it in the qemu, after migration,

Re: [Qemu-devel] [RFC] alpha qemu arithmetic exceptions

2014-06-24 Thread Al Viro
On Tue, Jun 24, 2014 at 01:57:52PM -0700, Richard Henderson wrote: > On 06/24/2014 01:32 PM, Al Viro wrote: > > If you have any ideas for testing, I do have working hw (the box that is > > currently alive is ev45, though; I _can_ try to boot a UP1000 one, but > > I make no promises regarding its fa

  1   2   3   4   >