[Qemu-devel] [PATCH 08/11] qdev: inline object_delete into qbus_free/qdev_free

2012-12-05 Thread Paolo Bonzini
We want object_delete to disappear, and we will do this one class at a time. Inline it for the qdev case, which we will tackle first. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/qdev.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c

[Qemu-devel] [PATCH 06/11] qdev: move unrealization of devices from finalize to unparent

2012-12-05 Thread Paolo Bonzini
Similarly, a bus holds a reference back to the device, and this will prevent the device from going away as soon as this reference is counted properly. To avoid this, move the unrealization of devices to the unparent callback. This includes recursively unparenting all the buses and (after the

[Qemu-devel] [PATCH v5 03/11] dataplane: add host memory mapping code

2012-12-05 Thread Stefan Hajnoczi
The data plane thread needs to map guest physical addresses to host pointers. Normally this is done with cpu_physical_memory_map() but the function assumes the global mutex is held. The data plane thread does not touch the global mutex and therefore needs a thread-safe memory mapping mechanism.

[Qemu-devel] [PATCH v5 04/11] dataplane: add virtqueue vring code

2012-12-05 Thread Stefan Hajnoczi
The virtio-blk-data-plane cannot access memory using the usual QEMU functions since it executes outside the global mutex and the memory APIs are this time are not thread-safe. This patch introduces a virtqueue module based on the kernel's vhost vring code. The trick is that we map guest memory

[Qemu-devel] [PATCH v5 10/11] dataplane: add virtio-blk data plane code

2012-12-05 Thread Stefan Hajnoczi
virtio-blk-data-plane is a subset implementation of virtio-blk. It only handles read, write, and flush requests. It does this using a dedicated thread that executes an epoll(2)-based event loop and processes I/O using Linux AIO. This approach performs very well but can be used for raw image

[Qemu-devel] [PATCH v5 09/11] iov: add qemu_iovec_concat_iov()

2012-12-05 Thread Stefan Hajnoczi
The qemu_iovec_concat() function copies a subset of a QEMUIOVector. The new qemu_iovec_concat_iov() function does the same for a iov/cnt pair. It is easy to define qemu_iovec_concat() in terms of qemu_iovec_concat_iov(). The existing code is mostly unchanged, except for the assertion src-size =

[Qemu-devel] [PATCH v5 11/11] virtio-blk: add x-data-plane=on|off performance feature

2012-12-05 Thread Stefan Hajnoczi
The virtio-blk-data-plane feature is easy to integrate into hw/virtio-blk.c. The data plane can be started and stopped similar to vhost-net. Users can take advantage of the virtio-blk-data-plane feature using the new -device virtio-blk-pci,x-data-plane=on property. The x-data-plane name was

Re: [Qemu-devel] [PATCH 5/6] add visitor for parsing hz[KMG] input string

2012-12-05 Thread mdroth
On Wed, Dec 05, 2012 at 05:21:50PM -0200, Eduardo Habkost wrote: On Wed, Dec 05, 2012 at 11:52:29AM -0600, mdroth wrote: On Tue, Dec 04, 2012 at 05:34:42PM -0200, Eduardo Habkost wrote: [...] diff --git a/qapi/string-input-visitor.c b/qapi/string-input-visitor.c index 497eb9a..74fe395

[Qemu-devel] [PATCH v5 07/11] iov: add iov_discard() to remove data

2012-12-05 Thread Stefan Hajnoczi
The iov_discard() function removes data from the front or back of the vector. This is useful when peeling off header/footer structs. Signed-off-by: Stefan Hajnoczi stefa...@redhat.com --- iov.c | 41 + iov.h | 13 + 2 files changed, 54

[Qemu-devel] [PATCH 07/11] qdev: add reference for the bus while it is referred to by the DeviceState

2012-12-05 Thread Paolo Bonzini
Now that the unparent callbacks are complete, we can correctly account more missing references. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/qdev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/qdev.c b/hw/qdev.c index d7f1545..62b6c14 100644 --- a/hw/qdev.c +++

[Qemu-devel] [PATCH v5 05/11] dataplane: add event loop

2012-12-05 Thread Stefan Hajnoczi
Outside the safety of the global mutex we need to poll on file descriptors. I found epoll(2) is a convenient way to do that, although other options could replace this module in the future (such as an AioContext-based loop or glib's GMainLoop). One important feature of this small event loop

[Qemu-devel] [PATCH 04/11] qdev: add reference count to a device for the BusChild

2012-12-05 Thread Paolo Bonzini
Each device has a reference through the BusChild. This reference was not accounted for, add it now. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/qdev.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/qdev.c b/hw/qdev.c index e758131..87dfcb5 100644 --- a/hw/qdev.c +++

[Qemu-devel] [PATCH v5 02/11] configure: add CONFIG_VIRTIO_BLK_DATA_PLANE

2012-12-05 Thread Stefan Hajnoczi
The virtio-blk-data-plane feature only works with Linux AIO. Therefore add a ./configure option and necessary checks to implement this dependency. Signed-off-by: Stefan Hajnoczi stefa...@redhat.com --- configure | 21 + 1 file changed, 21 insertions(+) diff --git

Re: [Qemu-devel] [PATCH v2] target-mips: Fix incorrect shift for SHILO and SHILOV

2012-12-05 Thread Johnson, Eric
Oops, I forgot. The contents are OK but 'git am' didn't like the patch. patch had to use fuzz. This may need to be rebased to latest master. -Eric -Original Message- From: qemu-devel-bounces+ericj=mips@nongnu.org [mailto:qemu-devel- bounces+ericj=mips@nongnu.org] On Behalf

[Qemu-devel] [PATCH v5 08/11] test-iov: add iov_discard() testcase

2012-12-05 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi stefa...@redhat.com --- tests/test-iov.c | 129 +++ 1 file changed, 129 insertions(+) diff --git a/tests/test-iov.c b/tests/test-iov.c index cbe7a89..7997fb5 100644 --- a/tests/test-iov.c +++ b/tests/test-iov.c @@

[Qemu-devel] [PATCH 09/11] qdev: drop extra references at creation time

2012-12-05 Thread Paolo Bonzini
qdev_free and qbus_free have to do unparent+unref, because nobody else drops the initial reference (the one included by object_initialize) before them. For device_init_func and do_device_add, this is trivially correct, since the DeviceState goes out of scope. For qdev_create, qdev_try_create and

[Qemu-devel] [PATCH 00/11] qdev: correct reference counting

2012-12-05 Thread Paolo Bonzini
This series makes the ref_count field of device and bus objects actually match the number of references that the objects have. Once this is done, qdev_free and qbus_free are equivalent to simply object_unparent, and object_delete can go. Patches 1-3 fix some warts in the last minute patches that

[Qemu-devel] [PATCH 11/11] qom: remove object_delete

2012-12-05 Thread Paolo Bonzini
This is now unused. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- include/qemu/object.h | 17 ++--- qom/object.c | 7 --- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/include/qemu/object.h b/include/qemu/object.h index ed1f47f..c5169ee 100644

[Qemu-devel] [PATCH v5 00/11] virtio: virtio-blk data plane

2012-12-05 Thread Stefan Hajnoczi
This series adds the -device virtio-blk-pci,x-data-plane=on property that enables a high performance I/O codepath. A dedicated thread is used to process virtio-blk requests outside the global mutex and without going through the QEMU block layer. Khoa Huynh k...@us.ibm.com reported an increase

[Qemu-devel] [PATCH 05/11] qdev: move deletion of children from finalize to unparent

2012-12-05 Thread Paolo Bonzini
A device will never be finalized as long as it has a reference from other devices that sit on its buses. To ensure that the references go away, deassociate a bus from its children in the unparent callback for the bus. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/qdev.c | 37

[Qemu-devel] [PATCH v5 06/11] dataplane: add Linux AIO request queue

2012-12-05 Thread Stefan Hajnoczi
The IOQueue has a pool of iocb structs and a function to add new read/write requests. Multiple requests can be added before calling the submit function to actually tell the host kernel to begin I/O. This allows callers to batch requests and submit them in one go. The actual I/O is performed

[Qemu-devel] [PATCH v5 01/11] raw-posix: add raw_get_aio_fd() for virtio-blk-data-plane

2012-12-05 Thread Stefan Hajnoczi
The raw_get_aio_fd() function allows virtio-blk-data-plane to get the file descriptor of a raw image file with Linux AIO enabled. This interface is really a layering violation that can be resolved once the block layer is able to run outside the global mutex - at that point virtio-blk-data-plane

[Qemu-devel] [PATCH 02/11] qdev: use object_new, not g_malloc to create buses

2012-12-05 Thread Paolo Bonzini
After the previous patch, creation of heap-allocated buses can use qbus_init and does not need to hack the free callback. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/pci.c| 11 +-- hw/pci.h| 5 - hw/sysbus.c | 6 ++ 3 files changed, 7 insertions(+), 15

[Qemu-devel] [PATCH 10/11] cpu: do not use object_delete

2012-12-05 Thread Paolo Bonzini
CPUs are never added to the composition tree, so delete is achieved simply by removing the last references to them. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- linux-user/syscall.c | 2 +- target-i386/helper.c | 4 ++-- target-sparc/cpu.c | 2 +- 3 files changed, 4 insertions(+), 4

[Qemu-devel] [PATCH 03/11] qom: preserve object while unparenting it

2012-12-05 Thread Paolo Bonzini
Avoid that the object disappears after it's deleted from the QOM composition tree, in case that was the only reference to it. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- qom/object.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qom/object.c b/qom/object.c index 0739aa2..ecdf164

Re: [Qemu-devel] [PATCH v2] target-mips: Fix incorrect shift for SHILO and SHILOV

2012-12-05 Thread Richard Henderson
On 2012-12-05 10:38, Peter Maydell wrote: I don't think we should block this patch on that general cleanup, though. All the sign extensions in target-mips/translate.c are done in the double-shift way, so this is consistent with the existing code. Fair enough. The original can have my

[Qemu-devel] [PULL] target-s390x reorg, v4

2012-12-05 Thread Richard Henderson
Rebased to commit 16c6c80ac3a772b42a87b77dfdf0fdac7c607b0e pull from git://repo.or.cz/qemu/rth.git s390-reorg The only substantive change from the last ping is to put my name in the maintainer slot for the code. r~ Richard Henderson (152): tcg: Add TCGV_IS_UNUSED_* target-s390:

Re: [Qemu-devel] [PATCH v2] target-mips: Fix incorrect shift for SHILO and SHILOV

2012-12-05 Thread Jovanovic, Petar
hey Eric, the patch does not have to be rebased since no changes have been made to these files since I created the patch. You can try it on clean master with: wget -O shilo.diff http://patchwork.ozlabs.org/patch/203744/mbox git am ./shilo.diff You probably have the previous (not yet committed)

Re: [Qemu-devel] [PULL] target-s390x reorg, v4

2012-12-05 Thread Alexander Graf
On 06.12.2012, at 00:11, Richard Henderson wrote: Rebased to commit 16c6c80ac3a772b42a87b77dfdf0fdac7c607b0e pull from git://repo.or.cz/qemu/rth.git s390-reorg The only substantive change from the last ping is to put my name in the maintainer slot for the code. Acked-by: Alexander Graf

Re: [Qemu-devel] [PATCH v2] target-mips: Fix incorrect shift for SHILO and SHILOV

2012-12-05 Thread Johnson, Eric
Sorry mail wrap issue. -Original Message- From: Jovanovic, Petar Sent: Wednesday, December 05, 2012 3:31 PM To: Johnson, Eric; qemu-devel@nongnu.org Cc: blauwir...@gmail.com; rth7...@gmail.com; afaer...@suse.de; aurel...@aurel32.net Subject: RE: [Qemu-devel] [PATCH v2] target-mips:

Re: [Qemu-devel] main-loop.c: About Select handling

2012-12-05 Thread Furukawa, Eiji
The select() do not masked signal in os_host_main_loop_wait. For example, qemu-timer.c gives SIGALRM regularly. Even if a buffer of select is empty, I think that it is a problem that this select() does exit by this SIGALRM. -- E.Furukawa -Original Message- From: Stefan Hajnoczi

Re: [Qemu-devel] [PATCH 2/3] target-i386:make hw_breakpoint_enabled return bool type

2012-12-05 Thread li guang
在 2012-12-05三的 09:53 +0100,Jan Kiszka写道: On 2012-12-05 01:51, li guang wrote: 在 2012-12-04二的 11:26 +,Peter Maydell写道: On 4 December 2012 11:11, Jan Kiszka jan.kis...@siemens.com wrote: On 2012-12-04 11:23, Peter Maydell wrote: Doesn't this break the use of this function in

Re: [Qemu-devel] [PATCH 2/3] target-i386:make hw_breakpoint_enabled return bool type

2012-12-05 Thread li guang
在 2012-12-06四的 10:08 +0800,li guang写道: 在 2012-12-05三的 09:53 +0100,Jan Kiszka写道: On 2012-12-05 01:51, li guang wrote: 在 2012-12-04二的 11:26 +,Peter Maydell写道: On 4 December 2012 11:11, Jan Kiszka jan.kis...@siemens.com wrote: On 2012-12-04 11:23, Peter Maydell wrote: Doesn't this

[Qemu-devel] [Bug 1087035] [NEW] qemu plumbs virtual to wrong backing devices

2012-12-05 Thread Adam Jacob Muller
Public bug reported: This seems inexplicable but has been verified in a number of ways. Given the following domain XML (from libvirt): devices emulator/usr/bin/kvm/emulator disk type='block' device='disk' driver name='qemu' type='raw' cache='none'/ source

[Qemu-devel] [PATCH v2 0/3] target-i386:make breakpoint more cleaner

2012-12-05 Thread li guang
try to make breakpoint related functions more cleaner. originally, these functions implicit use 0,1,2,3 as name of breakpoint, really hard to understand, so name them readable, and also refactor the statement to check these types for clean reason. v2 changes: 1. split 'breakpoint_enabled' into

[Qemu-devel] [PATCH 1/3] target-i386:define name of breakpoint bit in dr7

2012-12-05 Thread liguang
Signed-off-by: liguang lig.f...@cn.fujitsu.com --- target-i386/cpu.h |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/target-i386/cpu.h b/target-i386/cpu.h index 90ef1ff..29245d1 100644 --- a/target-i386/cpu.h +++ b/target-i386/cpu.h @@ -231,6 +231,13 @@ #define

[Qemu-devel] [PATCH 2/3] target-i386:make hw_breakpoint_enabled return bool type

2012-12-05 Thread liguang
Signed-off-by: liguang lig.f...@cn.fujitsu.com --- target-i386/cpu.h | 15 +-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/target-i386/cpu.h b/target-i386/cpu.h index 29245d1..3646128 100644 --- a/target-i386/cpu.h +++ b/target-i386/cpu.h @@ -996,9 +996,20 @@ int

[Qemu-devel] [PATCH 3/3] target-i386:slightly refactor dr7 related function

2012-12-05 Thread liguang
Signed-off-by: liguang lig.f...@cn.fujitsu.com --- target-i386/helper.c | 74 +--- target-i386/machine.c |5 ++- target-i386/misc_helper.c |4 +- target-i386/seg_helper.c |6 ++-- 4 files changed, 57 insertions(+), 32 deletions(-)

Re: [Qemu-devel] [PATCH v6 2/2] qemu-ga: sample fsfreeze hooks

2012-12-05 Thread Tomoki Sekiyama
On 2012/12/05 20:49, Luiz Capitulino wrote: On Wed, 05 Dec 2012 17:41:08 +0900 Tomoki Sekiyama tomoki.sekiyama...@hitachi.com wrote: On 2012/12/05 1:51, Luiz Capitulino wrote: On Fri, 30 Nov 2012 22:33:57 +0900 Tomoki Sekiyama tomoki.sekiyama...@hitachi.com wrote: Adds sample hook scripts

Re: [Qemu-devel] [BUG] QEMU crashes when 64bit BAR is present

2012-12-05 Thread Alexey Korolev
I tried the head today. Qemu crashes in the same way as before. Hi, And qemu error output is: qemu: /home/akorolev/qemu-kvm/exec.c:2255: register_subpage: Assertion `existing-mr-subpage || existing-mr == io_mem_unassigned' failed. Guest OS is Centos 5.5 and log is pretty boring, as qemu

Re: [Qemu-devel] [Qemu-ppc] [RFC PATCH v7 1/4] use image_file_reset to reload initrd

2012-12-05 Thread Yin Olivia-R63875
-Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Sunday, December 02, 2012 7:20 PM To: Yin Olivia-R63875 Cc: qemu-devel@nongnu.org; qemu-...@nongnu.org Subject: Re: [Qemu-ppc] [RFC PATCH v7 1/4] use image_file_reset to reload initrd Missing patch description

[Qemu-devel] [RFC PATCH v8 0/4] reload images from host rootfs on reset to save footprint

2012-12-05 Thread Olivia Yin
The current model of loader copy rom blobs and kept in memory until a reset occurs and waste host memory. This serial of patches uses private reset handlers to load uimage/initrd/vmlinux from hard disk on reset, which could make loader framework more dynamic and reduce the memory consumption of

[Qemu-devel] [RFC PATCH v8 1/4] use image_file_reset to reload initrd

2012-12-05 Thread Olivia Yin
Signed-off-by: Olivia Yin hong-hua@freescale.com --- hw/loader.c | 24 hw/loader.h |6 ++ 2 files changed, 30 insertions(+), 0 deletions(-) diff --git a/hw/loader.c b/hw/loader.c index ba01ca6..f62aa7c 100644 --- a/hw/loader.c +++ b/hw/loader.c @@ -86,6

[Qemu-devel] [RFC PATCH v8 2/4] use uimage_reset to reload uimage

2012-12-05 Thread Olivia Yin
--- hw/loader.c | 57 + hw/loader.h |8 2 files changed, 53 insertions(+), 12 deletions(-) diff --git a/hw/loader.c b/hw/loader.c index f62aa7c..9a65ed3 100644 --- a/hw/loader.c +++ b/hw/loader.c @@ -457,15 +457,15 @@ static

[Qemu-devel] [RFC PATCH v8 3/4] use elf_reset to reload elf image

2012-12-05 Thread Olivia Yin
--- hw/elf_ops.h | 45 - hw/loader.c | 11 +++ hw/loader.h |9 + 3 files changed, 60 insertions(+), 5 deletions(-) diff --git a/hw/elf_ops.h b/hw/elf_ops.h index 531a425..eddaa5a 100644 --- a/hw/elf_ops.h +++ b/hw/elf_ops.h @@

[Qemu-devel] [RFC PATCH v8 4/4] remove rom_reset()

2012-12-05 Thread Olivia Yin
The previous patches reload uimage/initrd/vmlinux reset. Other firmware images stay in the memory and don't need reload on reset. So rom_reset() could be removed. Signed-off-by: Olivia Yin hong-hua@freescale.com --- hw/loader.c | 24 +++- 1 files changed, 3

Re: [Qemu-devel] [PATCH v2 2/2] ivshmem: use irqfd to interrupt among VMs

2012-12-05 Thread Cam Macdonell
On Wed, Dec 5, 2012 at 1:50 AM, Jan Kiszka jan.kis...@siemens.com wrote: On 2012-12-05 06:34, Cam Macdonell wrote: static void ivshmem_write_config(PCIDevice *pci_dev, uint32_t address, uint32_t val, int len) { +bool is_enabled, was_enabled =

Re: [Qemu-devel] [PATCH] virtio: verify that all outstanding buffers are flushed (was Re: vmstate conversion for virtio?)

2012-12-05 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: Add sanity check to address the following concern: On Wed, Dec 05, 2012 at 09:47:22AM +1030, Rusty Russell wrote: All we need is the index of the request; the rest can be re-read from the ring. The terminology I used here was loose, indeed. We need

Re: [Qemu-devel] [PATCH v2 2/2] ivshmem: use irqfd to interrupt among VMs

2012-12-05 Thread liu ping fan
On Thu, Dec 6, 2012 at 1:10 PM, Cam Macdonell c...@cs.ualberta.ca wrote: On Wed, Dec 5, 2012 at 1:50 AM, Jan Kiszka jan.kis...@siemens.com wrote: On 2012-12-05 06:34, Cam Macdonell wrote: static void ivshmem_write_config(PCIDevice *pci_dev, uint32_t address,

[Qemu-devel] [PATCH v2 1/2] ivshmem: remove msix_write_config

2012-12-05 Thread Liu Ping Fan
From: Liu Ping Fan pingf...@linux.vnet.ibm.com This logic has been integrated into pci core, so remove it. Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com Signed-off-by: Cam Macdonell c...@cs.ualberta.ca --- hw/ivshmem.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff

[Qemu-devel] [PATCH v2 2/2] ivshmem: use irqfd to interrupt among VMs

2012-12-05 Thread Liu Ping Fan
From: Liu Ping Fan pingf...@linux.vnet.ibm.com Using irqfd, so we can avoid switch between kernel and user when VMs interrupts each other. Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com Signed-off-by: Cam Macdonell c...@cs.ualberta.ca --- hw/ivshmem.c | 54

[Qemu-devel] [PATCH V7 01/10] qemu-option: opt_set(): split it up into more functions

2012-12-05 Thread Dong Xu Wang
The new functions are opts_accepts_any() and find_desc_by_name(), which are also going to be used by qemu_opts_validate() (see next commit). This also makes opt_set() slightly more readable. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com Signed-off-by: Dong Xu Wang

[Qemu-devel] [PATCH V7 04/10] introduce qemu_opts_create_nofail function

2012-12-05 Thread Dong Xu Wang
While id is NULL, qemu_opts_create can not fail, so ignore errors is fine. Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com --- qemu-option.c |9 + qemu-option.h |1 + 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/qemu-option.c b/qemu-option.c index

[Qemu-devel] [PATCH V7 02/10] qemu-option: qemu_opts_validate(): fix duplicated code

2012-12-05 Thread Dong Xu Wang
Use opts_accepts_any() and find_desc_by_name(). Signed-off-by: Luiz Capitulino lcapitul...@redhat.com Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com --- qemu-option.c | 14 +++--- 1 files changed, 3 insertions(+), 11 deletions(-) diff --git a/qemu-option.c b/qemu-option.c

[Qemu-devel] [PATCH V7 00/10] replace QEMUOptionParameter with QemuOpts parser

2012-12-05 Thread Dong Xu Wang
Patch 1-3 are from Luiz, added Markus's comments, discussion could be found here: http://lists.nongnu.org/archive/html/qemu-devel/2012-07/msg02716.html Patch 3 was changed according Paolo's comments. Patch 4-5: because qemu_opts_create can not fail while id is null, so create function

[Qemu-devel] [PATCH V7 05/10] use qemu_opts_create_nofail

2012-12-05 Thread Dong Xu Wang
We will use qemu_opts_create_nofail function, it can make code more readable. Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com --- blockdev.c |2 +- hw/watchdog.c |2 +- qemu-config.c |4 ++-- qemu-img.c |2 +- qemu-sockets.c | 16 vl.c

[Qemu-devel] [PATCH V7 07/10] add def_print_str and use it in qemu_opts_print.

2012-12-05 Thread Dong Xu Wang
qemu_opts_print has no user now, so can re-write the function safely. qemu_opts_print will be used while using qemu-img create, it will produce the same output as previous code. The behavior of this function has changed: 1. Print every possible option, whether a value has been set or not. 2.

[Qemu-devel] [PATCH V7 03/10] qemu-option: qemu_opt_set_bool(): fix code duplication

2012-12-05 Thread Dong Xu Wang
It will set opt-str in qemu_opt_set_bool, without opt-str, there will be some potential bugs. These are uses of opt-str, and what happens when it isn't set: * qemu_opt_get(): returns NULL, which means not set. Bug can bite when value isn't the default value. * qemu_opt_parse(): passes NULL

[Qemu-devel] [PATCH V17 0/6] add-cow file format

2012-12-05 Thread Dong Xu Wang
It will introduce a new file format: add-cow. The add-cow file format makes it possible to perform copy-on-write on top of a raw disk image. When we know that no backing file clusters remain visible (e.g. we have streamed the entire image and copied all data from the backing file), then it is

[Qemu-devel] [PATCH V17 6/6] qemu-iotests: add add-cow iotests support.

2012-12-05 Thread Dong Xu Wang
This patch will use qemu-iotests to test add-cow file format. Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com --- tests/qemu-iotests/017 |2 +- tests/qemu-iotests/020 |2 +- tests/qemu-iotests/common|6 ++ tests/qemu-iotests/common.rc | 15 ++-

[Qemu-devel] [PATCH V17 5/6] add-cow file format core code.

2012-12-05 Thread Dong Xu Wang
add-cow file format core code. It use block-cache.c as cache code. It lacks of snapshot_blkdev support. v16-v17: 1) Use stringify. v15-v16: 1) Judge if opts is null in add_cow_create function. Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com --- block/Makefile.objs |1 +

[Qemu-devel] [PATCH V17 4/6] rename qcow2-cache.c to block-cache.c

2012-12-05 Thread Dong Xu Wang
We will re-use qcow2-cache as block layer common cache code, so change its name and made some changes, define a struct named BlockTableType, pass BlockTableType and table size parameters to block cache initialization function. Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com ---

[Qemu-devel] [Bug 1087114] [NEW] assertion QLIST_EMPTY(bs-tracked_requests) failed

2012-12-05 Thread Brad Smith
Public bug reported: QEMU 1.3.0 on OpenBSD now crashes with an error as shown below and the command line params do not seem to matter. assertion QLIST_EMPTY(bs-tracked_requests) failed: file block.c, line 1220, function bdrv_drain_all #1 0x030d1bce24aa in abort () at

[Qemu-devel] [PATCH V7 06/10] create new function: qemu_opt_set_number

2012-12-05 Thread Dong Xu Wang
Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com --- qemu-option.c | 22 ++ qemu-option.h |1 + 2 files changed, 23 insertions(+), 0 deletions(-) diff --git a/qemu-option.c b/qemu-option.c index 1303188..94557cf 100644 --- a/qemu-option.c +++ b/qemu-option.c @@

[Qemu-devel] [PATCH V7 08/10] Create four opts list related functions

2012-12-05 Thread Dong Xu Wang
This patch will create 4 functions, count_opts_list, append_opts_list, free_opts_list and print_opts_list, they will used in following commits. v6-v7): 1) Fix typo: enouth-enough. v5-v6): 1) allocate enough space in append_opts_list function. Signed-off-by: Dong Xu Wang

[Qemu-devel] [PATCH V7 10/10] remove QEMUOptionParameter related functions and struct

2012-12-05 Thread Dong Xu Wang
Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com --- qemu-option.c | 285 - qemu-option.h | 32 --- 2 files changed, 0 insertions(+), 317 deletions(-) diff --git a/qemu-option.c b/qemu-option.c index fb912c1..250a094 100644 ---

Re: [Qemu-devel] [PATCH v7 0/7] push mmio dispatch out of big lock

2012-12-05 Thread liu ping fan
Any suggestion? Or new design idea for this? Thanks Pingfan On Sun, Nov 25, 2012 at 10:02 AM, Liu Ping Fan qemul...@gmail.com wrote: From: Liu Ping Fan pingf...@linux.vnet.ibm.com v1: https://lists.gnu.org/archive/html/qemu-devel/2012-07/msg03312.html v2:

[Qemu-devel] [PATCH V17 2/6] make path_has_protocol non static

2012-12-05 Thread Dong Xu Wang
We will use path_has_protocol outside block.c, so just make it public. Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com Reviewed-by: Michael Roth mdr...@linux.vnet.ibm.com --- block.c |2 +- block.h |1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/block.c

Re: [Qemu-devel] [PATCH v5 10/11] dataplane: add virtio-blk data plane code

2012-12-05 Thread Paolo Bonzini
Il 05/12/2012 21:47, Stefan Hajnoczi ha scritto: + +/* Block until pending requests have completed + * + * The vring continues to be serviced so ensure no new requests will be added + * to avoid races. + */ +void virtio_blk_data_plane_drain(VirtIOBlockDataPlane *s) +{ +

[Qemu-devel] [PATCH V7 09/10] Use QemuOpts support in block layer

2012-12-05 Thread Dong Xu Wang
This patch will use QemuOpts related functions in block layer, add a member bdrv_create_options to BlockDriver struct, it will return a QemuOptsList pointer, which includes the image format's create options. And create options's primary consumer is block creating related functions, so modify them

[Qemu-devel] [PATCH V17 1/6] docs: document for add-cow file format

2012-12-05 Thread Dong Xu Wang
Document for add-cow format, the usage and spec of add-cow are introduced. Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com --- docs/specs/add-cow.txt | 154 1 files changed, 154 insertions(+), 0 deletions(-) create mode 100644

[Qemu-devel] [PATCH V17 3/6] qed_read_string to bdrv_read_string

2012-12-05 Thread Dong Xu Wang
Make qed_read_string function to a common interface, so move it to block.c. Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com --- block.c | 27 +++ block.h |2 ++ block/qed.c | 34 -- 3 files changed, 33 insertions(+),

[Qemu-devel] removing on-demand msix vector allocation

2012-12-05 Thread Michael S. Tsirkin
I've been looking at handling of msix masking in qemu. It looks like all of virtio,vfio and device assignment implemented their own similar but slightly different thing. So I am inclined to move this handling to common code in msix.c, adding irqfd support right there. While doing this rework, one

Re: [Qemu-devel] [PATCH] virtio: verify that all outstanding buffers are flushed (was Re: vmstate conversion for virtio?)

2012-12-05 Thread Michael S. Tsirkin
On Thu, Dec 06, 2012 at 04:33:06PM +1030, Rusty Russell wrote: Michael S. Tsirkin m...@redhat.com writes: Add sanity check to address the following concern: On Wed, Dec 05, 2012 at 09:47:22AM +1030, Rusty Russell wrote: All we need is the index of the request; the rest can be re-read from

<    1   2