[Qemu-devel] qemu in full emulation on win32

2012-07-18 Thread Alexey Kardashevskiy
Hi! Found 2 problems while I was debugging qemu/ppc64-softmmu/qemu-system-ppc64.exe WindowsXP SP3 Pro, 32bit, i686-pc-mingw32-gcc (GCC) 4.5.2. 1. The size of the following is 7 bytes on linux and 8 bytes on Windows: struct { uint32_t hi; uint64_t child; uint64_t parent; uint64_t

Re: [Qemu-devel] [PATCH v5 2/4] exynos4210: Added SD host controller model

2012-07-18 Thread Peter Crosthwaite
Will merge Igors corrections into v6 Regards, Peter On Wed, Jul 18, 2012 at 1:04 AM, Peter Maydell peter.mayd...@linaro.org wrote: On 17 July 2012 15:58, Igor Mitsyanko i.mitsya...@samsung.com wrote: On 07/17/2012 05:37 PM, Peter Maydell wrote: I would suggest two functions: int

Re: [Qemu-devel] qemu in full emulation on win32

2012-07-18 Thread Peter Maydell
On 18 July 2012 07:30, Alexey Kardashevskiy a...@ozlabs.ru wrote: 1. The size of the following is 7 bytes on linux and 8 bytes on Windows: struct { uint32_t hi; uint64_t child; uint64_t parent; uint64_t size; } __attribute__((packed)) ranges[]; The structure is used

[Qemu-devel] [PATCH] powerpc pci: fixed packing of ranges[]

2012-07-18 Thread Alexey Kardashevskiy
By default mingw-gcc is trying to pack structures the way to preserve binary compatibility with MS Visual C what leads to incorrect and unexpected padding in the PCI bus ranges property of the sPAPR PHB. The patch replaces __attribute__((packed)) with more strict QEMU_PACKED which actually is

Re: [Qemu-devel] [PATCH] eventfd: making it rhread safe

2012-07-18 Thread Alexey Kardashevskiy
Ping again? On 09/07/12 13:10, Alexey Kardashevskiy wrote: Ping? On 02/07/12 05:48, Alexey Kardashevskiy wrote: QEMU uses IO handlers to run select() in the main loop. The handlers list is managed by qemu_set_fd_handler() helper which works fine when called from the main thread as it is

Re: [Qemu-devel] [PATCH 1/4] QMP, Introduce set-global-dirty-log command.

2012-07-18 Thread Avi Kivity
On 07/17/2012 08:58 PM, Stefano Stabellini wrote: On Tue, 17 Jul 2012, Avi Kivity wrote: On 07/17/2012 04:30 PM, Anthony PERARD wrote: This command is used during a migration of a guest under Xen. It calls memory_global_dirty_log_start or memory_global_dirty_log_stop according to the

Re: [Qemu-devel] [PATCH 3/4] exec, memory: Call to xen_modified_memory.

2012-07-18 Thread Avi Kivity
On 07/17/2012 09:36 PM, Stefano Stabellini wrote: On Tue, 17 Jul 2012, Avi Kivity wrote: On 07/17/2012 04:59 PM, Anthony PERARD wrote: This is pretty ugly. An alternative is to set up a periodic bitmap scan that looks at the qemu dirty bitmap and calls xen_modified_memory() for dirty

Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API

2012-07-18 Thread Wenchao Xia
Hi, following is API draft, prototypes were taken from qemu/block.h, and the API prefix is changed frpm bdrv to qbdrvs, to declare related object is BlockDriverState, not BlockDriver. One issue here is it may require include block_int.h, which is not LGPL2 licensed yet. API format is kept

Re: [Qemu-devel] [PATCH v7 0/3] Simpletrace v2: Support multiple args, strings.

2012-07-18 Thread Stefan Hajnoczi
On Tue, Jul 17, 2012 at 8:51 PM, Harsh Bora ha...@linux.vnet.ibm.com wrote: On 07/17/2012 08:53 PM, Stefan Hajnoczi wrote: On Tue, Jul 3, 2012 at 10:20 AM, Harsh Prateek Bora ha...@linux.vnet.ibm.com wrote: Existing simpletrace backend allows to trace at max 6 args and does not support

Re: [Qemu-devel] [PATCH v7 2/3] Simpletrace v2: Support multiple arguments, strings.

2012-07-18 Thread Stefan Hajnoczi
On Tue, Jul 17, 2012 at 8:01 PM, Harsh Bora ha...@linux.vnet.ibm.com wrote: On 07/17/2012 08:51 PM, Stefan Hajnoczi wrote: On Tue, Jul 3, 2012 at 10:20 AM, Harsh Prateek Bora ha...@linux.vnet.ibm.com wrote: Existing simpletrace backend allows to trace at max 6 args and does not support

Re: [Qemu-devel] [PATCH v7 2/3] Simpletrace v2: Support multiple arguments, strings.

2012-07-18 Thread Stefan Hajnoczi
On Tue, Jul 17, 2012 at 9:08 PM, Harsh Bora ha...@linux.vnet.ibm.com wrote: On 07/18/2012 12:31 AM, Harsh Bora wrote: On 07/17/2012 08:51 PM, Stefan Hajnoczi wrote: On Tue, Jul 3, 2012 at 10:20 AM, Harsh Prateek Bora ha...@linux.vnet.ibm.com wrote: @@ -75,16 +96,31 @@ static char

Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API

2012-07-18 Thread Paolo Bonzini
Il 18/07/2012 10:51, Wenchao Xia ha scritto: Hi, following is API draft, prototypes were taken from qemu/block.h, and the API prefix is changed frpm bdrv to qbdrvs, to declare related object is BlockDriverState, not BlockDriver. One issue here is it may require include block_int.h, which is

Re: [Qemu-devel] [PATCH 5/7 v6] introduce a new qom device to deal with panicked event

2012-07-18 Thread Jan Kiszka
On 2012-07-18 03:54, Wen Congyang wrote: At 07/06/2012 07:05 PM, Jan Kiszka Wrote: On 2012-07-06 11:41, Wen Congyang wrote: If the target is x86/x86_64, the guest's kernel will write 0x01 to the port KVM_PV_PORT when it is panciked. This patch introduces a new qom device kvm_pv_ioport to

Re: [Qemu-devel] [PATCH 5/7 v6] introduce a new qom device to deal with panicked event

2012-07-18 Thread Jan Kiszka
On 2012-07-18 11:19, Jan Kiszka wrote: On 2012-07-18 03:54, Wen Congyang wrote: At 07/06/2012 07:05 PM, Jan Kiszka Wrote: On 2012-07-06 11:41, Wen Congyang wrote: If the target is x86/x86_64, the guest's kernel will write 0x01 to the port KVM_PV_PORT when it is panciked. This patch introduces

Re: [Qemu-devel] We need more reviewers/maintainers!!

2012-07-18 Thread Peter Maydell
On 12 March 2012 20:12, Stefan Weil s...@weilnetz.de wrote: We also need more resources for technical maintenance of the QEMU infrastructure. For example, the official mirror of the QEMU git repository (https://github.com/qemu/QEMU) is several months behind,

Re: [Qemu-devel] [PATCH] qemu kvm: Recognize PCID feature

2012-07-18 Thread Jan Kiszka
On 2012-07-18 10:44, Mao, Junjie wrote: Hi, Avi Any comments on this patch? :) Always include qemu-devel when your are changing QEMU, qemu-kvm is just staging for the latter. This patch can actually go into upstream directly, maybe even via qemu-trivial as it just makes that flag selectable.

Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API

2012-07-18 Thread Stefan Hajnoczi
On Wed, Jul 18, 2012 at 9:51 AM, Wenchao Xia xiaw...@linux.vnet.ibm.com wrote: /* sync access */ int qbdrvs_read(BlockDriverState *bs, int64_t sector_num, uint8_t *buf, int nb_sectors); int qbdrvs_write(BlockDriverState *bs, int64_t sector_num, const uint8_t *buf,

[Qemu-devel] [PATCH v8 0/3] Simpletrace v2: Support multiple args, strings.

2012-07-18 Thread Harsh Prateek Bora
Existing simpletrace backend allows to trace at max 6 args and does not support strings. This newer tracelog format gets rid of fixed size records and therefore allows to trace variable number of args including strings. Sample trace: v9fs_version 0.000 tag=0x id=0x64 msize=0x2000

[Qemu-devel] [PATCH v8 2/3] Simpletrace v2: Support multiple arguments, strings.

2012-07-18 Thread Harsh Prateek Bora
Existing simpletrace backend allows to trace at max 6 args and does not support strings. This newer tracelog format gets rid of fixed size records and therefore allows to trace variable number of args including strings. Sample trace with strings: v9fs_version 0.000 tag=0x id=0x64 msize=0x2000

[Qemu-devel] [PATCH v8 3/3] Update simpletrace.py for new log format

2012-07-18 Thread Harsh Prateek Bora
Support new tracelog format for multiple arguments and strings. Signed-off-by: Harsh Prateek Bora ha...@linux.vnet.ibm.com --- scripts/simpletrace.py | 116 +++- 1 file changed, 75 insertions(+), 41 deletions(-) diff --git a/scripts/simpletrace.py

[Qemu-devel] [PATCH v8 1/3] monitor: remove unused do_info_trace

2012-07-18 Thread Harsh Prateek Bora
Going forward with simpletrace v2 variable size trace records, we cannot have a generic function to print trace event info and therefore this interface becomes invalid. As per Stefan Hajnoczi: This command is only available from the human monitor. It's not very useful because it historically

[Qemu-devel] [PATCH] update-linux-headers.sh: Don't hard code list of architectures

2012-07-18 Thread Peter Maydell
Rather than hardcoding the list of architectures in the kernel header update script, just import headers for every architecture which supports KVM (with a blacklist exception for ia64 which has KVM headers but is dead). This reduces the number of QEMU files which need to be updated to add support

Re: [Qemu-devel] [PATCH] update-linux-headers.sh: Don't hard code list of architectures

2012-07-18 Thread Jan Kiszka
On 2012-07-18 12:11, Peter Maydell wrote: Rather than hardcoding the list of architectures in the kernel header update script, just import headers for every architecture which supports KVM (with a blacklist exception for ia64 which has KVM headers but is dead). This reduces the number of QEMU

Re: [Qemu-devel] [PATCH v2] qerror: Add QERR_PROPERTY_SET_AFTER_REALIZE

2012-07-18 Thread Andreas Färber
Am 16.07.2012 17:25, schrieb Peter Maydell: Add a new QError QERR_PROPERTY_SET_AFTER_REALIZE for attempts to set a QOM or qdev property after the object/device has been realized. This allows a slightly more informative diagnostic than the previous permission denied message. Signed-off-by:

Re: [Qemu-devel] [PATCH v2] qerror: Add QERR_PROPERTY_SET_AFTER_REALIZE

2012-07-18 Thread Peter Maydell
n 18 July 2012 11:20, Andreas Färber afaer...@suse.de wrote: Am 16.07.2012 17:25, schrieb Peter Maydell: Add a new QError QERR_PROPERTY_SET_AFTER_REALIZE for attempts to set a QOM or qdev property after the object/device has been realized. This allows a slightly more informative diagnostic

Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API

2012-07-18 Thread Paolo Bonzini
Whether to provide sync and/or async access is a key question. Indeed. Synchronous APIs are great for writing dedicated tools like dd, cp, convert, etc. Asynchronous APIs are essential for integrating image file I/O into event-driven programs like libvirt. Here, the ability to do other

[Qemu-devel] [PATCH] vfio-powerpc: added VFIO support (v4)

2012-07-18 Thread Alexey Kardashevskiy
It literally does the following: 1. POWERPC IOMMU support (the kernel counterpart is required) 2. The patch assumes that IOAPIC calls are going to be replaced with something generic. 3. Added sPAPRVFIOData (hw/spapr_iommu_vfio.h) which describes the interface between VFIO and sPAPR IOMMU. 4.

[Qemu-devel] [PATCH] configure: Don't implicitly hardcode list of KVM architectures

2012-07-18 Thread Peter Maydell
The code creating the symlink from linux-headers/asm to the architecture specific linux-headers/asm-$arch directory was implicitly hardcoding a list of KVM supporting architectures. Add a default case for the common Linux architecture name and QEMU CPU name match case, so future architectures will

Re: [Qemu-devel] [PATCH v2] qerror: Add QERR_PROPERTY_SET_AFTER_REALIZE

2012-07-18 Thread Markus Armbruster
Peter Maydell peter.mayd...@linaro.org writes: n 18 July 2012 11:20, Andreas Färber afaer...@suse.de wrote: Am 16.07.2012 17:25, schrieb Peter Maydell: Add a new QError QERR_PROPERTY_SET_AFTER_REALIZE for attempts to set a QOM or qdev property after the object/device has been realized. This

Re: [Qemu-devel] [PATCH v2] qerror: Add QERR_PROPERTY_SET_AFTER_REALIZE

2012-07-18 Thread Peter Maydell
On 18 July 2012 12:19, Markus Armbruster arm...@redhat.com wrote: Peter Maydell peter.mayd...@linaro.org writes: n 18 July 2012 11:20, Andreas Färber afaer...@suse.de wrote: Am 16.07.2012 17:25, schrieb Peter Maydell: Add a new QError QERR_PROPERTY_SET_AFTER_REALIZE for attempts to set a QOM

Re: [Qemu-devel] [PATCH v2] qerror: Add QERR_PROPERTY_SET_AFTER_REALIZE

2012-07-18 Thread Peter Maydell
On 18 July 2012 12:36, Peter Maydell peter.mayd...@linaro.org wrote: That's interesting but I'm not sure how it's relevant. We already have QERR_PROPERTY values just this new one, so I don't see why this is any worse than the ones we have. just like. -- PMM

Re: [Qemu-devel] [PATCH] eventfd: making it rhread safe

2012-07-18 Thread Michael S. Tsirkin
On Mon, Jul 02, 2012 at 05:48:16AM +1000, Alexey Kardashevskiy wrote: Subject: Re: [PATCH] eventfd: making it rhread safe typo in the subject QEMU uses IO handlers to run select() in the main loop. The handlers list is managed by qemu_set_fd_handler() helper which works fine when called from

Re: [Qemu-devel] [PATCH v2] qerror: Add QERR_PROPERTY_SET_AFTER_REALIZE

2012-07-18 Thread Markus Armbruster
Peter Maydell peter.mayd...@linaro.org writes: On 18 July 2012 12:19, Markus Armbruster arm...@redhat.com wrote: Peter Maydell peter.mayd...@linaro.org writes: n 18 July 2012 11:20, Andreas Färber afaer...@suse.de wrote: Am 16.07.2012 17:25, schrieb Peter Maydell: Add a new QError

[Qemu-devel] [PATCH] eventfd: making it thread safe

2012-07-18 Thread Alexey Kardashevskiy
QEMU uses IO handlers to run select() in the main loop. The handlers list is managed by qemu_set_fd_handler() helper which works fine when called from the main thread as it is called not when select() is waiting. However IO handlers list can be changed in the thread other than the main one doing

Re: [Qemu-devel] [PATCH] cpu-defs.h: pull in qemu-common.h for HOST_LONG_BITS

2012-07-18 Thread Mike Frysinger
On Monday 16 July 2012 01:26:50 Stefan Weil wrote: Am 15.07.2012 23:54, schrieb Mike Frysinger: On Sunday 15 July 2012 15:34:33 Stefan Weil wrote: Am 15.07.2012 22:25, schrieb Mike Frysinger: This file uses the define HOST_LONG_BITS, but doesn't explicitly include qemu-common.h for it

Re: [Qemu-devel] [PATCH] configure: do not quote $PKG_CONFIG

2012-07-18 Thread Mike Frysinger
On Monday 16 July 2012 11:58:55 Stefan Weil wrote: Am 16.07.2012 17:39, schrieb Eric Blake: On 07/15/2012 01:54 PM, Stefan Weil wrote: Am 15.07.2012 22:26, schrieb Mike Frysinger: We should not quote the PKG_CONFIG setting as this deviates from the canonical upstream behavior that gets

Re: [Qemu-devel] [PATCH] eventfd: making it thread safe

2012-07-18 Thread Michael S. Tsirkin
On Wed, Jul 18, 2012 at 10:08:53PM +1000, Alexey Kardashevskiy wrote: QEMU uses IO handlers to run select() in the main loop. The handlers list is managed by qemu_set_fd_handler() helper which works fine when called from the main thread as it is called not when select() is waiting. when

Re: [Qemu-devel] [PATCH v2 1/6] hw/arm_boot.c: Make ram_size a uint64_t

2012-07-18 Thread Peter Crosthwaite
On Mon, Jul 16, 2012 at 11:24 PM, Peter Maydell peter.mayd...@linaro.org wrote: Make the RAM size in arm_boot_info a uint64_t so it can express the larger RAM sizes that may be seen in LPAE systems. Signed-off-by: Peter Maydell peter.mayd...@linaro.org Reviewed-by: Peter A. G. Crosthwaite

Re: [Qemu-devel] [PATCH v2 3/6] hw/arm_boot.c: Check for RAM sizes exceeding ATAGS capacity

2012-07-18 Thread Peter Crosthwaite
On Mon, Jul 16, 2012 at 11:24 PM, Peter Maydell peter.mayd...@linaro.org wrote: The legacy ATAGS format for passing information to the kernel only allows RAM sizes which fit in 32 bits; enforce this restriction rather than silently doing something weird. Signed-off-by: Peter Maydell

Re: [Qemu-devel] [PATCH v2 4/6] device_tree: Add support for reading device tree properties

2012-07-18 Thread Peter Crosthwaite
On Mon, Jul 16, 2012 at 11:24 PM, Peter Maydell peter.mayd...@linaro.org wrote: Add support for reading device tree properties (both generic and single-cell ones) to QEMU's convenience wrapper layer. Signed-off-by: Peter Maydell peter.mayd...@linaro.org Reviewed-by: Peter A. G. Crosthwaite

Re: [Qemu-devel] [PATCH] msi/msix: added API to set MSI message address and data

2012-07-18 Thread Michael S. Tsirkin
On Thu, Jun 21, 2012 at 09:39:10PM +1000, Alexey Kardashevskiy wrote: Added (msi|msix)_set_message() functions. Currently msi_notify()/msix_notify() write to these vectors to signal the guest about an interrupt so the correct values have to written there by the guest or QEMU. For example,

Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API

2012-07-18 Thread Stefan Hajnoczi
On Wed, Jul 18, 2012 at 06:42:24AM -0400, Paolo Bonzini wrote: Synchronous APIs are great for writing dedicated tools like dd, cp, convert, etc. Asynchronous APIs are essential for integrating image file I/O into event-driven programs like libvirt. Here, the ability to do other

[Qemu-devel] [PATCH] eventfd: making it thread safe

2012-07-18 Thread Alexey Kardashevskiy
QEMU uses IO handlers to run select() in the main loop. The handlers list is managed by qemu_set_fd_handler() helper which works fine when called from the main thread as it is called when select() is not waiting. However IO handlers list can be changed in the thread other than the main one doing

Re: [Qemu-devel] [PATCH v4 5/6] qapi: convert sendkey

2012-07-18 Thread Amos Kong
On 12/07/12 23:09, Luiz Capitulino wrote: Hi Luiz, On Thu, 5 Jul 2012 20:48:44 +0800 Amos Kongak...@redhat.com wrote: Convert 'sendkey' to use QAPI. do_sendkey() depends on some variables/functions in monitor.c, so reserve qmp_sendkey() to monitor.c key_defs[] in console.h is the

Re: [Qemu-devel] [PATCH] eventfd: making it thread safe

2012-07-18 Thread Alexey Kardashevskiy
On 18/07/12 22:22, Michael S. Tsirkin wrote: On Wed, Jul 18, 2012 at 10:08:53PM +1000, Alexey Kardashevskiy wrote: QEMU uses IO handlers to run select() in the main loop. The handlers list is managed by qemu_set_fd_handler() helper which works fine when called from the main thread as it is

Re: [Qemu-devel] [PATCH v2] qerror: Add QERR_PROPERTY_SET_AFTER_REALIZE

2012-07-18 Thread Luiz Capitulino
On Wed, 18 Jul 2012 13:59:06 +0200 Markus Armbruster arm...@redhat.com wrote: Peter Maydell peter.mayd...@linaro.org writes: On 18 July 2012 12:19, Markus Armbruster arm...@redhat.com wrote: Peter Maydell peter.mayd...@linaro.org writes: n 18 July 2012 11:20, Andreas Färber

Re: [Qemu-devel] [PATCH] cpu-defs.h: pull in qemu-common.h for HOST_LONG_BITS

2012-07-18 Thread Andreas Färber
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 18.07.2012 14:13, schrieb Mike Frysinger: On Monday 16 July 2012 01:26:50 Stefan Weil wrote: Am 15.07.2012 23:54, schrieb Mike Frysinger: On Sunday 15 July 2012 15:34:33 Stefan Weil wrote: Am 15.07.2012 22:25, schrieb Mike Frysinger: This file

Re: [Qemu-devel] [PATCH] msi/msix: added API to set MSI message address and data

2012-07-18 Thread Alexey Kardashevskiy
On 18/07/12 22:43, Michael S. Tsirkin wrote: On Thu, Jun 21, 2012 at 09:39:10PM +1000, Alexey Kardashevskiy wrote: Added (msi|msix)_set_message() functions. Currently msi_notify()/msix_notify() write to these vectors to signal the guest about an interrupt so the correct values have to

[Qemu-devel] [PATCH 1/2] qemu-nbd: reorganize help message

2012-07-18 Thread Paolo Bonzini
This patch separates qemu-nbd's options in logical groups, thus making the help message easier to read. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- qemu-nbd.c | 33 ++--- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/qemu-nbd.c

[Qemu-devel] [PATCH 0/2] qemu-nbd: add --cache and --aio options

2012-07-18 Thread Paolo Bonzini
Two simple patches that let qemu-nbd use native AIO and --cache=unsafe mode. Paolo Bonzini (2): qemu-nbd: reorganize help message qemu-nbd: add --cache and --aio options qemu-nbd.c | 75 +--- 1 file changed, 62 insertions(+), 13

[Qemu-devel] [PATCH 2/2] qemu-nbd: add --cache and --aio options

2012-07-18 Thread Paolo Bonzini
Add two options to tune the I/O implementation of qemu-nbd, matching the possibilities given by the QEMU -drive option. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- qemu-nbd.c | 42 -- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [PATCH v4 3/5] convert pci-host to QOM

2012-07-18 Thread Wanpeng Li
[CCing ML] From: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Wanpeng Li liw...@linux.vnet.ibm.com --- hw/pci_host.c | 26 ++ hw/pci_host.h |5 + 2 files changed, 31 insertions(+), 0 deletions(-) diff

[Qemu-devel] [PATCH v4 2/5] convert MemoryRegion to QOM

2012-07-18 Thread Wanpeng Li
[CCing ML] From: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Wanpeng Li liw...@linux.vnet.ibm.com --- memory.c | 94 ++ memory.h |8 + 2 files changed, 78

[Qemu-devel] [PATCH v4 4/5] prepare to create HPET, RTC and i8254 through composition

2012-07-18 Thread Wanpeng Li
[CCing ML] From: Anthony Liguori aligu...@us.ibm.com The HPET usually sits on the LPC bus (which replaces ISA in modern systems). It's sometimes a dedicated chip but can certain co-exist in a Super IO chip. I think in terms of where it would live in this hypothetical device model, putting it

[Qemu-devel] [PATCH v4 1/5] eliminate piix_pci.c and module i440fx and piix3

2012-07-18 Thread Wanpeng Li
[CCing ML] From: Anthony Liguori aligu...@us.ibm.com The big picture about the patch is shown as follows: 1) pc_init creates an I440FX, any bus devices (ISA serial port, PCI vga and nics, etc.), sets properties appropriately, and realizes the devices. 2) I440FX is-a PCIHost, has-a I440FX-PMC,

[Qemu-devel] [PATCH v3] qemu-img: correct size parsers and help message

2012-07-18 Thread Dong Xu Wang
qemu-img not only suports k/K/M/G/T/b, but also supports m/g/t/B. So correct it in help message. Also use the same parser in parse_option_size function. Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com CC: riegama...@gmail.com --- v1-v2: also correct error reporting. v2-v3: use the same

Re: [Qemu-devel] [PATCH v3] qemu-img: correct size parsers and help message

2012-07-18 Thread Kevin Wolf
Am 18.07.2012 15:23, schrieb Dong Xu Wang: qemu-img not only suports k/K/M/G/T/b, but also supports m/g/t/B. So correct it in help message. Also use the same parser in parse_option_size function. This is not what the patch does. It uses a parser that seems slightly more compatible with

Re: [Qemu-devel] q35 and ahci

2012-07-18 Thread Gerd Hoffmann
The current command line I'm using something such as: $ /usr/local/bin/qemu-system-x86_64 -name f16 -M pc_q35 -m 1G -smp 4 -hda ./f16.img --enable-kvm -bios path/q35-seabios/out/bios.bin -acpitable file=path/q35-seabios/out/q35-acpi-dsdt.aml -monitor stdio So it might be nice to avoid

[Qemu-devel] [PATCH v4 0/5] refactor PC machine, i440fx and piix3 to take advantage of QOM

2012-07-18 Thread Wanpeng Li
[CCing ML] This series aggressively refactors the PC machine initialization to be more modelled and less ad-hoc. The highlights of this series are: 1) Things like -m and -bios-name are now device model properties 2) The i440fx and piix3 are now modelled in a thorough fashion 3) Most of the

Re: [Qemu-devel] [PATCH v3] qemu-img: correct size parsers and help message

2012-07-18 Thread Eric Blake
On 07/18/2012 07:23 AM, Dong Xu Wang wrote: qemu-img not only suports k/K/M/G/T/b, but also supports m/g/t/B. So correct it in help message. +++ b/qemu-img.c @@ -69,8 +69,9 @@ static void help(void) options are: 'none', 'writeback' (default, except for convert),

Re: [Qemu-devel] [PATCH] build: add make dist target (v2)

2012-07-18 Thread Gerd Hoffmann
On 07/17/12 21:12, Michael Roth wrote: On Tue, Jul 17, 2012 at 01:33:32PM -0500, Anthony Liguori wrote: Let's stop screwing up releases by having a script do the work that Anthony's fat fingers can't seem to get right. Cc: Michael Roth mdr...@linux.vnet.ibm.com Signed-off-by: Anthony Liguori

Re: [Qemu-devel] [PATCH v4 5/6] qapi: convert sendkey

2012-07-18 Thread Luiz Capitulino
On Wed, 18 Jul 2012 20:56:54 +0800 Amos Kong ak...@redhat.com wrote: +} KeyDef; + +static const KeyDef key_defs[] = { We can't have an array defined in a header file because it will be defined in each .c file that includes it. Please, define it in input.c (along with

Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API

2012-07-18 Thread Andreas Färber
Am 18.07.2012 10:51, schrieb Wenchao Xia: Hi, following is API draft, prototypes were taken from qemu/block.h, and the API prefix is changed frpm bdrv to qbdrvs, to declare related object is BlockDriverState, not BlockDriver. [...] So let the bikeshedding begin: ;) What about qbds_ prefix

[Qemu-devel] [PATCH v4 5/5] merge pc_piix.c to pc.c

2012-07-18 Thread Wanpeng Li
[CCing ML] From: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Wanpeng Li liw...@linux.vnet.ibm.com --- hw/i386/Makefile.objs |1 - hw/pc.c | 753 +++-- hw/pc.h |

Re: [Qemu-devel] [PATCH] build: add make dist target (v2)

2012-07-18 Thread Anthony Liguori
Gerd Hoffmann kra...@redhat.com writes: On 07/17/12 21:12, Michael Roth wrote: On Tue, Jul 17, 2012 at 01:33:32PM -0500, Anthony Liguori wrote: Let's stop screwing up releases by having a script do the work that Anthony's fat fingers can't seem to get right. Cc: Michael Roth

Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API

2012-07-18 Thread Kevin Wolf
Am 18.07.2012 15:51, schrieb Andreas Färber: Am 18.07.2012 10:51, schrieb Wenchao Xia: Hi, following is API draft, prototypes were taken from qemu/block.h, and the API prefix is changed frpm bdrv to qbdrvs, to declare related object is BlockDriverState, not BlockDriver. [...] After the

Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API

2012-07-18 Thread Daniel P. Berrange
On Wed, Jul 18, 2012 at 04:51:03PM +0800, Wenchao Xia wrote: Hi, following is API draft, prototypes were taken from qemu/block.h, and the API prefix is changed frpm bdrv to qbdrvs, to declare related object is BlockDriverState, not BlockDriver. One issue here is it may require include

[Qemu-devel] QMP event for suspend to disk

2012-07-18 Thread Luiz Capitulino
Hi, QEMU can now distinguish between S4 and power off for the guest OSes that suspends to disk through S4. This means that we can have a QMP event for S4 (so that QMP clients can distinguish between S3 and S4). However, as we already emit the SHUTDOWN event for this, it turns out that there are

Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API

2012-07-18 Thread Paolo Bonzini
Il 18/07/2012 15:58, Daniel P. Berrange ha scritto: How is error reporting dealt with These APIs just return errno values. , and what is the intent around thread safety of the APIs ? I'd like to see a fully thread safe API - multiple threads can use the same 'BlockDriverState *'

Re: [Qemu-devel] [PATCH v4 3/5] convert pci-host to QOM

2012-07-18 Thread Andreas Färber
Am 18.07.2012 15:19, schrieb Wanpeng Li: [CCing ML] From: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Wanpeng Li liw...@linux.vnet.ibm.com --- hw/pci_host.c | 26 ++ hw/pci_host.h |5 + 2 files

[Qemu-devel] [PATCH 00/11] configure: Fix -Werror issues

2012-07-18 Thread Peter Maydell
This patch series: 1. turns off -Werror for configure tests 2. fixes a large pile of warnings in various configure tests 3. turns on -Werror for configure tests again, but in a way that means that errors mean configure stops so the warnings are as obvious to developers as they would be

[Qemu-devel] [PATCH 04/11] configure: Replace bash code by standard shell code

2012-07-18 Thread Peter Maydell
From: Stefan Weil s...@weilnetz.de += does not work with dash and other simple /bin/sh implementations. The new code prepends the flag while the old code either did not work (it continued after an error message which typically was not read) or appended the flag. That difference should not matter

Re: [Qemu-devel] [PATCH] build: add make dist target (v2)

2012-07-18 Thread Daniel P. Berrange
On Tue, Jul 17, 2012 at 01:33:32PM -0500, Anthony Liguori wrote: Let's stop screwing up releases by having a script do the work that Anthony's fat fingers can't seem to get right. Cc: Michael Roth mdr...@linux.vnet.ibm.com Signed-off-by: Anthony Liguori aligu...@us.ibm.com --- v1 - v2 -

Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API

2012-07-18 Thread Daniel P. Berrange
On Wed, Jul 18, 2012 at 04:02:15PM +0200, Paolo Bonzini wrote: Il 18/07/2012 15:58, Daniel P. Berrange ha scritto: How is error reporting dealt with These APIs just return errno values. Which has led to somewhat unhelpful error reporting in the past. If we're designing a library API it'd be

[Qemu-devel] [PATCH 11/11] configure: Check for -Werror causing failures when compiling tests

2012-07-18 Thread Peter Maydell
Add support for checking whether test case code can compile without warnings, by recompiling each successful test with -Werror. If the -Werror version doesn't pass, we bail out. This gives us the same level of visibility of warnings in test code as --enable-werror provides for the main compile.

Re: [Qemu-devel] QMP event for suspend to disk

2012-07-18 Thread Eric Blake
On 07/18/2012 08:02 AM, Luiz Capitulino wrote: Hi, QEMU can now distinguish between S4 and power off for the guest OSes that suspends to disk through S4. This means that we can have a QMP event for S4 (so that QMP clients can distinguish between S3 and S4). However, as we already emit the

Re: [Qemu-devel] [PATCH] vfio-powerpc: added VFIO support (v4)

2012-07-18 Thread Alex Williamson
On Wed, 2012-07-18 at 21:09 +1000, Alexey Kardashevskiy wrote: It literally does the following: 1. POWERPC IOMMU support (the kernel counterpart is required) 2. The patch assumes that IOAPIC calls are going to be replaced with something generic. 3. Added sPAPRVFIOData

[Qemu-devel] [PATCH 09/11] configure: Fix compile warning in utimensat/futimens test

2012-07-18 Thread Peter Maydell
Fix compile warning in the utimensat/futimens test (implicit declaration of function 'utimensat', ditto futimens) by adding a missing include. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- configure |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/configure

[Qemu-devel] [PATCH 08/11] configure: Fix warnings in VDE library probe

2012-07-18 Thread Peter Maydell
Fix compile warnings in the VDE library probe (passing argument 1 of 'vde_open_real' discards 'const' qualifier from pointer target type, ditto argument 2). Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- configure |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff

[Qemu-devel] [PATCH v4] add -machine mem-merge=on|off option

2012-07-18 Thread Luiz Capitulino
It allows to disable memory merge support (KSM on Linux), which is enabled by default otherwise. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- IMPORTANT: this is on top of this series: http://lists.gnu.org/archive/html/qemu-devel/2012-07/msg01798.html o v4 - rename option to

[Qemu-devel] [PATCH] improve scripts/make-release

2012-07-18 Thread Gerd Hoffmann
'make dist' creates a tarball for the current checkout. 'make qemu-${version}.tar.bz2' creates a tarball for git tag v${version}. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- Makefile |5 ++--- scripts/make-release |8 +++- 2 files changed, 9 insertions(+), 4

[Qemu-devel] [PATCH 03/11] configure: Fix build with capabilities

2012-07-18 Thread Peter Maydell
From: Stefan Weil s...@weilnetz.de Since commit 417c9d72d48275d19c60861896efd4962d21aca2 all configure tests normally run with -Werror. Some of these tests now fail because they raised a compiler warning. This patch fixes support for capabilities. Signed-off-by: Stefan Weil s...@weilnetz.de

[Qemu-devel] [PATCH 06/11] configure: Fix errors in test for__sync_fetch_and_and

2012-07-18 Thread Peter Maydell
From: Stefan Weil s...@weilnetz.de The old test code raises two compiler warnings which are errors since commit 417c9d72d48275d19c60861896efd4962d21aca2. These errors could result in compilations with compiler flag -march486 (so all nice features of newer processors got lost). Signed-off-by:

[Qemu-devel] [PATCH 05/11] configure: -march=i486 belongs in QEMU_CFLAGS, not CFLAGS

2012-07-18 Thread Peter Maydell
The distinction between QEMU_CFLAGS and CFLAGS is that the former is for flags without which QEMU can't compile, whereas the latter is for flags like -g -O2 which the user can safely override. -march=i486 is in the former category, and so belongs in QEMU_CFLAGS. Signed-off-by: Peter Maydell

Re: [Qemu-devel] [PATCH v4 4/5] prepare to create HPET, RTC and i8254 through composition

2012-07-18 Thread Markus Armbruster
Wanpeng Li liw...@linux.vnet.ibm.com writes: [CCing ML] From: Anthony Liguori aligu...@us.ibm.com The HPET usually sits on the LPC bus (which replaces ISA in modern systems). It's sometimes a dedicated chip but can certain co-exist in a Super IO chip. I think in terms of where it would

Re: [Qemu-devel] [PATCH] improve scripts/make-release

2012-07-18 Thread Eric Blake
On 07/18/2012 08:31 AM, Gerd Hoffmann wrote: 'make dist' creates a tarball for the current checkout. 'make qemu-${version}.tar.bz2' creates a tarball for git tag v${version}. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- Makefile |5 ++--- scripts/make-release |8

[Qemu-devel] [PATCH 01/11] configure: Don't run configure tests with -Werror enabled

2012-07-18 Thread Peter Maydell
Don't run configure tests with -Werror in the compiler flags. The idea of -Werror is that it makes problems very obvious to developers, so they get fixed quickly. However, when running configure tests, failures due to -Werror are far from obvious -- they simply result in the test quietly failing

[Qemu-devel] [PATCH 02/11] configure: Fix build with ALSA audio driver

2012-07-18 Thread Peter Maydell
From: Stefan Weil s...@weilnetz.de Since commit 417c9d72d48275d19c60861896efd4962d21aca2, all configure tests normally run with -Werror. Some of these tests now fail because they raised a compiler warning. Here a build breakage for ALSA (configure --audio-drv-list=alsa) is fixed.

Re: [Qemu-devel] Can't Build i386-bsd-user on Freebsd

2012-07-18 Thread Wei-Ren Chen
CC'ed to Blue, since he is bsd-user maintainer as MAINTAINER said. On Mon, Jul 16, 2012 at 07:07:38PM -0700, Paramjot Oberoi wrote: Hey all, I'm having trouble building user mode BSD emulation on FreeBSD. I've tried 1.0.1, 1.1.1, and stable from GIT. I build by doing a: ./configure

[Qemu-devel] [RFC v9 02/27] virtio-blk: Set up host notifier for data plane

2012-07-18 Thread Stefan Hajnoczi
Set up the virtqueue notify ioeventfd that the data plane will monitor. Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com --- hw/virtio-blk.c | 37 + 1 file changed, 37 insertions(+) diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index

[Qemu-devel] [RFC v9 20/27] virtio-blk: Add ioscheduler to detect mergable requests

2012-07-18 Thread Stefan Hajnoczi
--- hw/dataplane/iosched.h | 78 hw/virtio-blk.c|5 2 files changed, 83 insertions(+) create mode 100644 hw/dataplane/iosched.h diff --git a/hw/dataplane/iosched.h b/hw/dataplane/iosched.h new file mode 100644 index

[Qemu-devel] [RFC v9 26/27] msix: use upstream kvm_irqchip_set_irq()

2012-07-18 Thread Stefan Hajnoczi
Commit 9507e305ec54062fccc88fcf6fccf1898a7e7141 changed the kvm_set_irq() function to kvm_irqchip_set_irq(). Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com --- hw/msix.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/msix.c b/hw/msix.c index

[Qemu-devel] [RFC v9 24/27] virtio-blk: fix incorrect length

2012-07-18 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com --- hw/virtio-blk.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index 8734029..cff2298 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -131,7 +131,7 @@ static void

[Qemu-devel] [RFC v9 00/27] virtio: virtio-blk data plane

2012-07-18 Thread Stefan Hajnoczi
This series implements a dedicated thread for virtio-blk processing using Linux AIO for raw image files only. It is based on qemu-kvm.git a0bc8c3 and somewhat old but I wanted to share it on the list since it has been mentioned on mailing lists and IRC recently. These patches can be used for

[Qemu-devel] [RFC v9 17/27] virtio-blk: Use guest notifier to raise interrupts

2012-07-18 Thread Stefan Hajnoczi
The data plane thread isn't allowed to call virtio_irq() directly because that function is not thread-safe. Use the guest notifier just like virtio-net to handle IRQs. When MSI-X is in use and the vector is unmasked, the guest notifier directly sets the IRQ inside the host kernel. If the vector

[Qemu-devel] [RFC v9 22/27] virtio-blk: Fix request merging

2012-07-18 Thread Stefan Hajnoczi
Khoa Huynh k...@us.ibm.com discovered that request merging is broken. The merged iocb is not updated to reflect the total number of iovecs and the offset is also outdated. This patch fixes request merging. Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com --- hw/virtio-blk.c | 10

[Qemu-devel] [PATCH 10/11] configure: -I\$(SRC_PATH) goes in QEMU_INCLUDES not QEMU_CFLAGS

2012-07-18 Thread Peter Maydell
If the smartcard configure check passes, add '-I\$(SRC_PATH)/libcacard' to QEMU_INCLUDES, not QEMU_CFLAGS. Otherwise the unexpanded SRC_PATH will cause a warning in every following configure test. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- configure |5 +++-- 1 files changed,

[Qemu-devel] [RFC v9 19/27] virtio-blk: Disable guest-host notifies while processing vring

2012-07-18 Thread Stefan Hajnoczi
--- hw/dataplane/vring.h | 28 +++- hw/virtio-blk.c | 47 +++ 2 files changed, 58 insertions(+), 17 deletions(-) diff --git a/hw/dataplane/vring.h b/hw/dataplane/vring.h index 44ef4a9..cdd4d4a 100644 ---

[Qemu-devel] [PATCH 07/11] configure: Fix compile warning in PNG test

2012-07-18 Thread Peter Maydell
Fix compile warning (variable 'png_ptr' set but not used) in the PNG detection test code. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- configure |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/configure b/configure index aced52e..784325a 100755 ---

[Qemu-devel] [RFC v9 16/27] virtio-blk: Kick data plane thread using event notifier set

2012-07-18 Thread Stefan Hajnoczi
--- hw/virtio-blk.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index 1616be5..d75c187 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -339,8 +339,7 @@ static void virtio_blk_handle_output(VirtIODevice *vdev, VirtQueue *vq)

  1   2   >