Re: [Qemu-devel] [PATCH 15/19] [fixup] vc

2013-03-12 Thread Gerd Hoffmann
On 03/12/13 18:42, Eric Blake wrote: > On 03/12/2013 02:56 AM, Gerd Hoffmann wrote: >> Signed-off-by: Gerd Hoffmann --- qemu-char.c >> |3 +++ 1 file changed, 3 insertions(+) > > Did something go wrong in your rebase? The subject line suggest > you intended to squash this to another patch. Y

[Qemu-devel] [RFC PATCH 2/2] net: port hub onto glib

2013-03-12 Thread Liu Ping Fan
From: Liu Ping Fan Attach each hubport with a GSource. Currently the GSource is attached to default main context, and the hub still run on iothread, but in future, after making the whole layer thread-safe, we will admit ports to run on different thread(GMainContext). Signed-off-by: Liu Ping Fan

[Qemu-devel] [RFC PATCH 1/2] net: port tap onto glib

2013-03-12 Thread Liu Ping Fan
Bind each NetClientState with a GSource(ie,NetClientSource). Currently, these GSource attached with default context, but in future, after resolving the race between handlers and the interface exposed by NetClientInfo and other re-entrant issue, we can run NetClientState on different GMainContext

[Qemu-devel] [RFC PATCH 0/2] port network layer onto glib

2013-03-12 Thread Liu Ping Fan
These series aim to port network backend onto glib, and prepare for moving towards making network layer mutlit-thread. The brief of the whole aim and plan is documented on http://wiki.qemu.org/Features/network_reentrant In these series, attach each NetClientState with a GSource At the first, I us

[Qemu-devel] [PATCH 8/9] asn1_test_visitor_serialization.diff

2013-03-12 Thread Joel Schopp
Add BER Visitor hooks to test-visitor-serialization Cc: Michael Tsirkin Cc: Stefan Berger Signed-off-by: Joel Schopp --- tests/Makefile |2 +- tests/test-visitor-serialization.c | 72 2 files changed, 73 insertions(+), 1 deletion(-

[Qemu-devel] [PATCH 6/9] asn1_output-visitor.diff

2013-03-12 Thread Joel Schopp
Implement an output visitor for ASN.1 BER encoding. Cc: Michael Tsirkin Signed-off-by: Stefan Berger Signed-off-by: Joel Schopp --- configure |2 +- include/qapi/ber-output-visitor.h | 28 ++ include/qapi/ber.h| 107 +++ qapi/Makefile.objs

[Qemu-devel] [PATCH 7/9] asn1_input-visitor.diff

2013-03-12 Thread Joel Schopp
Implement an input visitor for ASN.1 BER encoding. Cc: Michael Tsirkin Signed-off-by: Stefan Berger Signed-off-by: Joel Schopp --- include/qapi/ber-input-visitor.h | 30 ++ qapi/Makefile.objs |2 +- qapi/ber-input-visitor.c | 1073 +++

[Qemu-devel] [PATCH 4/9] qemu_qsb.diff

2013-03-12 Thread Joel Schopp
This patch adds support functions for operating on in memory sized file buffers. Signed-off-by: Stefan Berger Signed-off-by: Joel Schopp --- include/migration/qemu-file.h | 12 +++ include/qemu-common.h | 15 qemu-file.c | 184

[Qemu-devel] [PATCH 9/9] update_maintainers.diff

2013-03-12 Thread Joel Schopp
Since I'm throwing all this code out there I'm also signing up to maintain it. Send me your bug reports. Cc: Michael Tsirkin Cc: Stefan Berger Signed-off-by: Joel Schopp --- MAINTAINERS |8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0ca7e1d..8a2f

[Qemu-devel] [PATCH 2/9] qapi_c_arrays.diff

2013-03-12 Thread Joel Schopp
Forward ported Mike's previously sent patch (see http://lists.gnu.org/archive/html/qemu-devel/2012-10/msg05782.html ) in my series since it impelments a qapi array interface the ASN.1 BER visitor needs. Generally these will be serialized into lists, but the representation can be of any form so lon

[Qemu-devel] [PATCH 1/9] qemu-file

2013-03-12 Thread Joel Schopp
This patch reorganizes qemu file operations to be in their own source file instead of being lumped in savevm.c. Besides being more logical for maintenance it also makes it easier for future users of the file functions to add tests. Cc: Michael Tsirkin Signed-off-by: Stefan Berger Signed-off-by:

[Qemu-devel] [PATCH 3/9] two new file wrappers

2013-03-12 Thread Joel Schopp
Add a 3 very short file wrapper functions to make code that follows more readable. Also export an existing function that is currently static. Cc: Michael Tsirkin Signed-off-by: Stefan Berger Signed-off-by: Joel Schopp --- include/migration/qemu-file.h |3 +++ qemu-file.c

[Qemu-devel] [PATCH 5/9] qapi_sized_buffer

2013-03-12 Thread Joel Schopp
Add a sized buffer interface to qapi. Cc: Michael Tsirkin Signed-off-by: Stefan Berger Signed-off-by: Joel Schopp --- include/qapi/visitor-impl.h |2 ++ include/qapi/visitor.h |2 ++ qapi/qapi-visit-core.c |8 3 files changed, 12 insertions(+) diff --git a/inclu

[Qemu-devel] [PATCH 0/9 v2] Implement and test asn1 ber visitors

2013-03-12 Thread Joel Schopp
These patches implement asn1 ber visitors for encoding and decoding data. changed since v1: Moved .c files into qapi directory Moved .h files into include/qapi Added sized buffer code cleaned up Makefile changes to play nicer Broke out patches for output/input visitors New tests in tests/test-vis

Re: [Qemu-devel] [PATCH V9 00/14] qmp/hmp interfaces for internal snapshot info

2013-03-12 Thread Wenchao Xia
于 2013-3-13 0:16, Eric Blake 写道: On 03/12/2013 04:07 AM, Stefan Hajnoczi wrote: On Mon, Mar 11, 2013 at 07:23:02PM +0800, Wenchao Xia wrote: In the use of snapshot a way to retrieve related info at runtime is needed, so this serial of patches will merge some code for qemu and qemu-img, and a

Re: [Qemu-devel] [PATCH V2 WIP 2/2] vhost-scsi: new device supporting the tcm_vhost Linux kernel module

2013-03-12 Thread Asias He
On Tue, Mar 12, 2013 at 09:20:24AM +0100, Stefan Hajnoczi wrote: > On Tue, Mar 12, 2013 at 02:29:42PM +0800, Asias He wrote: > > diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c > > index 39c1966..4a97ca1 100644 > > --- a/hw/virtio-pci.c > > +++ b/hw/virtio-pci.c > > These changes break the build fo

Re: [Qemu-devel] [PATCH v2 1/5] net: spread hub on AioContexts

2013-03-12 Thread liu ping fan
On Tue, Mar 12, 2013 at 4:50 PM, Paolo Bonzini wrote: > Il 07/03/2013 03:53, Liu Ping Fan ha scritto: >> From: Liu Ping Fan >> >> Forward packet to other hub ports by their AioContext. >> >> Signed-off-by: Liu Ping Fan >> --- >> hw/qdev-properties-system.c |1 + >> include/block/aio.h

Re: [Qemu-devel] [PATCH V9 01/14] block: move bdrv_snapshot_find() to block/snapshot.c

2013-03-12 Thread Wenchao Xia
于 2013-3-13 0:22, Eric Blake 写道: On 03/12/2013 10:15 AM, Eric Blake wrote: As far as I can tell, there is nothing wrong with leaving the file as BSD licensed instead of trying to insist that it be LGPL. The block layer will still be [L]GPL because of other files linked together, but there is no

Re: [Qemu-devel] [PATCH V2 07/10] snapshot: qmp use new internal API for external snapshot transaction

2013-03-12 Thread Wenchao Xia
于 2013-3-12 23:43, Stefan Hajnoczi 写道: > On Tue, Mar 12, 2013 at 04:30:41PM +0800, Wenchao Xia wrote: >> 于 2013-1-15 15:03, Wenchao Xia 写道: >>> 于 2013-1-14 18:06, Stefan Hajnoczi 写道: On Mon, Jan 14, 2013 at 10:56:30AM +0800, Wenchao Xia wrote: > 于 2013-1-11 17:12, Stefan Hajnoczi 写道: >

Re: [Qemu-devel] [PATCH v2 4/5] net: introduce lock to protect NetClientState's peer's access

2013-03-12 Thread liu ping fan
On Tue, Mar 12, 2013 at 4:55 PM, Paolo Bonzini wrote: > Il 07/03/2013 03:53, Liu Ping Fan ha scritto: >> From: Liu Ping Fan >> >> Introduce nc->send_lock, it shield off the race of nc->peer's reader and >> deleter. With it, after deleter finish, no new qemu_send_packet_xx() >> can reach ->send_qu

Re: [Qemu-devel] [Qemu-ppc] [PATCH 48/48] target-ppc: Use QOM method dispatch for MMU fault handling

2013-03-12 Thread David Gibson
Oops. Screwed this one up so as to break compile for CONFIG_USER_ONLY. Fixed version below. From 0fd64364fcc0af95b23e17fa8ba58c28685a3a02 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Wed, 13 Mar 2013 11:40:33 +1100 Subject: [PATCH] target-ppc: Use QOM method dispatch for MMU fault handling

Re: [Qemu-devel] [cloudxy] Re: [RFC]HLFS driver for QEMU

2013-03-12 Thread harryxiyou
On Tue, Mar 12, 2013 at 11:16 PM, Stefan Hajnoczi wrote: > On Tue, Mar 12, 2013 at 09:47:57PM +0800, harryxiyou wrote: >> Could anyone give me some suggestions to submit HLFS driver patches for >> QEMU to our QEMU community. Thanks a lot in advance ;-) > > http://wiki.qemu.org/Contribute/SubmitAPa

[Qemu-devel] [PATCH] Introduce query-cpu-max QMP command and cpu_max HMP counterpart

2013-03-12 Thread Michal Novotny
This is the patch to introduce the query-cpu-max QMP command to get the maximum number of CPUs supported by the currently running emulator instance. This may differ machine from machine as defined by -machine settings and max_cpus member of QEMUMachine structure. It's been tested both using QMP/qm

[Qemu-devel] [PATCH v3] Move File operations to qemu-file.c

2013-03-12 Thread Joel Schopp
This patch reorganizes qemu file operations to be in their own source file instead of being lumped in savevm.c. Besides being more logical for maintenance it also makes it easier for future users of the file functions to add tests. v3 forward port to resolve conflicts v2 forward port to resolve c

Re: [Qemu-devel] About the Thread model in Qemu【 Is it one thread per vcpu?】

2013-03-12 Thread Laszlo Ersek
On 03/12/13 10:34, 解壁伟 wrote: > Hi there: > > I've read this an article discribe the thread model in Qemu. > http://blog.vmsplice.net/2011/03/qemu-internals-overall-architecture-and.html > Is there really one thread per vcpu in qemu? > > When I run the qemu using "-smp 16", I can see only two thr

Re: [Qemu-devel] [PATCH v3] exec: make -mem-path filenames deterministic

2013-03-12 Thread Anthony Liguori
Applied. Thanks. Regards, Anthony Liguori

Re: [Qemu-devel] [PATCH] Add search path support for qemu data files.

2013-03-12 Thread Anthony Liguori
Applied. Thanks. Regards, Anthony Liguori

[Qemu-devel] [Bug 1154328] [NEW] qemu locks up on typing 41 characters at once into serial console

2013-03-12 Thread Andreas Gustafsson
Public bug reported: I am running daily automated tests that involve booting a NetBSD 6.0.1 guest in qemu freshly built from git. The tests are scripted using pexpect, which interacts with the NetBSD guest over the emulated serial console. Recently, the tests stopped working; the guest boots and

Re: [Qemu-devel] [PATCH V27 0/7] QEMU Trusted Platform Module (TPM) integration

2013-03-12 Thread Anthony Liguori
Applied. Thanks. Regards, Anthony Liguori

Re: [Qemu-devel] [PATCH V9 09/14] qmp: add interface query-images

2013-03-12 Thread Eric Blake
On 03/11/2013 05:23 AM, Wenchao Xia wrote: > This mirror function will return image info including snapshots, > and if specified backing image's info will also be returned. Now > Qemu have both query-images and query-block interfaces. In the middle of a sentence, we prefer QEMU or qemu, not Qemu

Re: [Qemu-devel] [PATCH V9 08/14] qmp: add interface query-snapshots

2013-03-12 Thread Eric Blake
On 03/11/2013 05:23 AM, Wenchao Xia wrote: > This interface returns info of valid internal snapshots for whole vm. > > Signed-off-by: Wenchao Xia > --- > block/qapi.c | 18 + > qapi-schema.json | 14 + > qmp-commands.hx | 55 > +++

Re: [Qemu-devel] [PATCH v7 0/3] AER-KVM: Error containment of VFIO devices assigned to KVM guests

2013-03-12 Thread Alex Williamson
On Sat, 2013-03-09 at 01:52 -0600, Vijay Mohan Pandarathil wrote: > Add support for error containment when a VFIO device assigned to a KVM > guest encounters an error. This is for PCIe devices/drivers that support AER > functionality. When the host OS is notified of an error in a device either > th

Re: [Qemu-devel] [PATCH V9 06/14] block: add check for VM snapshot in bdrv_query_snapshot_info_list()

2013-03-12 Thread Eric Blake
On 03/11/2013 05:23 AM, Wenchao Xia wrote: > This patch adds a parameter to tell whether return valid snapshots > for whole VM only. > > Signed-off-by: Wenchao Xia > --- > block/qapi.c | 42 -- > include/block/qapi.h |1 + > qemu-img.c

Re: [Qemu-devel] [RFC][PATCH 8/9] migration: do not sent zero_pages in bulk stage

2013-03-12 Thread Eric Blake
On 03/12/2013 09:54 AM, Peter Lieven wrote: > if the dup_page is a zero_page do not send it at all. > the memory at the destination reads as zero anyway. It might help to comment that this is only true for the bulk migration stage. If the guest is actively zeroing pages, then later stages might e

Re: [Qemu-devel] [RFC] optimize is_dup_page for zero pages

2013-03-12 Thread Peter Lieven
Am 12.03.2013 um 13:02 schrieb Paolo Bonzini : > Il 12/03/2013 12:51, Peter Lieven ha scritto: buffer_is_zero is used in somewhat special cases (block streaming/copy-on-read) where throughput doesn't really matter, unlike is_dup_page/find_zero_bit which are used in migration. But

Re: [Qemu-devel] [PATCH V9 04/14] block: move collect_snapshots() and collect_image_info() to block/qapi.c

2013-03-12 Thread Eric Blake
On 03/11/2013 05:23 AM, Wenchao Xia wrote: > This patch adds block/qapi.c and moves the functions there. To avoid > conflict and tip better, macro in header file is BLOCK_QAPI_H instead > of QAPI_H. The moving is for making review easier, those functions > will be modified and renamed later. > >

[Qemu-devel] [PATCH V3 1/3] Add GDB qAttached support

2013-03-12 Thread Fabien Chouteau
With this patch QEMU handles qAttached request from gdb. When QEMU replies 1, GDB sends a "detach" command at the end of a debugging session otherwise GDB sends "kill". The default value for qAttached is 1 on system emulation and 0 on user emulation. This patch implements the requirement describe

Re: [Qemu-devel] [PATCH 15/19] [fixup] vc

2013-03-12 Thread Eric Blake
On 03/12/2013 02:56 AM, Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann > --- > qemu-char.c |3 +++ > 1 file changed, 3 insertions(+) Did something go wrong in your rebase? The subject line suggest you intended to squash this to another patch. > > diff --git a/qemu-char.c b/qemu-char.

[Qemu-devel] [PATCH V3 3/3] New option -gdb-opts

2013-03-12 Thread Fabien Chouteau
We introduce a new command line option. It's a generic option to customize the gdb server: -gdb-opts [attached=on|off] The only parameter for now is "attached". Signed-off-by: Fabien Chouteau --- gdbstub.c | 28 +++- include/exec/gdbstub.h |2 ++ qemu

[Qemu-devel] [PATCH V3 2/3] Revert "gdbstub: Do not kill target in system emulation mode"

2013-03-12 Thread Fabien Chouteau
The requirements described in this patch are implemented by "Add GDB qAttached support". This reverts commit 00e94dbc7fd0110b0555d59592b004333adfb4b8. Signed-off-by: Fabien Chouteau --- gdbstub.c |2 -- 1 file changed, 2 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 70d54ce..0e9431

[Qemu-devel] [PATCH V3 0/3] Add GDB qAttached support

2013-03-12 Thread Fabien Chouteau
v3: - split 'Add GDB qAttached support' and 'New option -gdb-opts' Fabien Chouteau (3): Add GDB qAttached support Revert "gdbstub: Do not kill target in system emulation mode" New option -gdb-opts gdbstub.c | 40 +--- include/exec/gdbstu

[Qemu-devel] About the Thread model in Qemu【 Is it one thread per vcpu?】

2013-03-12 Thread 解壁伟
Hi there: I've read this an article discribe the thread model in Qemu. http://blog.vmsplice.net/2011/03/qemu-internals-overall-architecture-and.html Is there really one thread per vcpu in qemu? When I run the qemu using "-smp 16", I can see only two threads using "ps -xH". So I want to know that

Re: [Qemu-devel] [PATCH v6 2/8] virtio-blk: add the virtio-blk device.

2013-03-12 Thread Cornelia Huck
On Tue, 12 Mar 2013 16:22:22 +0100 KONRAD Frédéric wrote: > On 12/03/2013 16:12, Peter Maydell wrote: > > On 12 March 2013 15:08, KONRAD Frédéric wrote: > >> On 12/03/2013 15:42, Peter Maydell wrote: > >>> Yes, I see your problem there, but DEFINE_VIRTIO_BLK_SCSI_PROPERTY > >>> and DEFINE_DATA_P

Re: [Qemu-devel] [RFC PATCH] pci: Differentiate PCI Express bus

2013-03-12 Thread Michael S. Tsirkin
On Tue, Mar 12, 2013 at 10:25:20AM -0600, Alex Williamson wrote: > On Tue, 2013-03-12 at 17:50 +0200, Michael S. Tsirkin wrote: > > On Tue, Mar 12, 2013 at 09:36:49AM -0600, Alex Williamson wrote: > > > On Tue, 2013-03-12 at 16:46 +0200, Michael S. Tsirkin wrote: > > > > On Mon, Mar 11, 2013 at 03:

Re: [Qemu-devel] [RFC PATCH] pci: Differentiate PCI Express bus

2013-03-12 Thread Alex Williamson
On Tue, 2013-03-12 at 17:50 +0200, Michael S. Tsirkin wrote: > On Tue, Mar 12, 2013 at 09:36:49AM -0600, Alex Williamson wrote: > > On Tue, 2013-03-12 at 16:46 +0200, Michael S. Tsirkin wrote: > > > On Mon, Mar 11, 2013 at 03:18:49PM -0600, Alex Williamson wrote: > > > > When creating capabilities

Re: [Qemu-devel] [PATCH V9 01/14] block: move bdrv_snapshot_find() to block/snapshot.c

2013-03-12 Thread Eric Blake
On 03/12/2013 10:15 AM, Eric Blake wrote: > As far as I can tell, there is nothing wrong with leaving the file as > BSD licensed instead of trying to insist that it be LGPL. The block > layer will still be [L]GPL because of other files linked together, but > there is nothing inherently wrong with

Re: [Qemu-devel] [PATCH V9 00/14] qmp/hmp interfaces for internal snapshot info

2013-03-12 Thread Eric Blake
On 03/12/2013 04:07 AM, Stefan Hajnoczi wrote: > On Mon, Mar 11, 2013 at 07:23:02PM +0800, Wenchao Xia wrote: >> In the use of snapshot a way to retrieve related info at runtime is needed, >> so this serial of patches will merge some code for qemu and qemu-img, and add >> following interfaces for

Re: [Qemu-devel] [PATCH V9 01/14] block: move bdrv_snapshot_find() to block/snapshot.c

2013-03-12 Thread Eric Blake
On 03/11/2013 11:01 PM, Wenchao Xia wrote: > 于 2013-3-12 1:49, Eric Blake 写道: >> On 03/11/2013 05:23 AM, Wenchao Xia wrote: >>>This patch adds block/snapshot.c and then moves the function >>> there. It also fixes small code style errors reported by check script. >>> >>> + * This work is licens

Re: [Qemu-devel] [RFC][PATCH 0/9] live migration/buffer_is_zero optimizations

2013-03-12 Thread Markus Armbruster
Your patch series is not properly threaded. Please use git-send-email.

Re: [Qemu-devel] [RFC][PATCH 4/9] buffer_is_zero: use vector optimizations if possible

2013-03-12 Thread Eric Blake
On 03/12/2013 10:03 AM, Peter Lieven wrote: >>> +if (((uintptr_t) buf) % sizeof(VECTYPE) == 0 >>> + && len % 8*sizeof(VECTYPE) == 0) { >> >> Space around binary operators. Use CHAR_BITS instead of a magic number >> 8. > the 8 is not BITS_PER_BYTE or CHAR_BITS its the number of > vec

Re: [Qemu-devel] [RFC][PATCH 0/9] live migration/buffer_is_zero optimizations

2013-03-12 Thread Peter Lieven
Am 12.03.2013 um 16:56 schrieb Eric Blake : > On 03/12/2013 09:47 AM, Peter Lieven wrote: >> I will sent a list of optimizations that have been developed during >> the last days. Your feedback is much appreciated. >> >> @Paolo: Can you run your tests that you have made for your migration >> opti

Re: [Qemu-devel] [RFC][PATCH 0/9] live migration/buffer_is_zero optimizations

2013-03-12 Thread Eric Blake
On 03/12/2013 09:47 AM, Peter Lieven wrote: > I will sent a list of optimizations that have been developed during > the last days. Your feedback is much appreciated. > > @Paolo: Can you run your tests that you have made for your migration > optimzations that are now upstream against these patches.

Re: [Qemu-devel] [RFC][PATCH 7/9] bitops: use vector algorithm to optimize find_next_bit()

2013-03-12 Thread Eric Blake
On 03/12/2013 09:52 AM, Peter Lieven wrote: > this patch adds the usage of buffer_find_nonzero_offset() > to skip large areas of zeroes. > > compared to loop unrolling this adds another 50% performance > benefit for skipping large areas of zeroes. > > Signed-off-by: Peter Lieven > --- > util/bi

Re: [Qemu-devel] [RFC][PATCH 6/9] migration: use XBZRLE only after bulk stage

2013-03-12 Thread Eric Blake
On 03/12/2013 09:51 AM, Peter Lieven wrote: > at the beginning of migration all pages are marked dirty and > in the first round a bulk migration of all pages is performed. > > currently all these pages are copied to the page cache regardless > if there are frequently updated or not. this doesn't m

Re: [Qemu-devel] [RFC][PATCH 4/9] buffer_is_zero: use vector optimizations if possible

2013-03-12 Thread Peter Lieven
Am 12.03.2013 um 17:01 schrieb Eric Blake : > On 03/12/2013 09:50 AM, Peter Lieven wrote: >> performance gain on SSE2 is approx. 20-25%. altivec >> is not tested. performance for unsigned long arithmetic >> is unchanged. >> >> Signed-off-by: Peter Lieven >> --- >> util/cutils.c |5 + >>

Re: [Qemu-devel] [RFC][PATCH 4/9] buffer_is_zero: use vector optimizations if possible

2013-03-12 Thread Eric Blake
On 03/12/2013 09:50 AM, Peter Lieven wrote: > performance gain on SSE2 is approx. 20-25%. altivec > is not tested. performance for unsigned long arithmetic > is unchanged. > > Signed-off-by: Peter Lieven > --- > util/cutils.c |5 + > 1 file changed, 5 insertions(+) > > diff --git a/util

Re: [Qemu-devel] [RFC][PATCH 2/9] add a function to find non-zero content in a buffer

2013-03-12 Thread Eric Blake
On 03/12/2013 09:48 AM, Peter Lieven wrote: > Signed-off-by: Peter Lieven > --- > include/qemu-common.h |1 + > util/cutils.c | 30 ++ > 2 files changed, 31 insertions(+) > > > /* > + * Searches for an area with non-zero content in a buffer > + * > +

[Qemu-devel] [RFC][PATCH 5/9] migration: check for dup pages only in bulk stage

2013-03-12 Thread Peter Lieven
pages are dup (most likely zero) from the very beginning. unless there is an application running inside the VM zeroing out large areas of memory its wasted time for checking for dup pages after the bulk stage. Signed-off-by: Peter Lieven --- arch_init.c |2 +- 1 file changed, 1 insertion(+)

[Qemu-devel] [RFC][PATCH 4/9] buffer_is_zero: use vector optimizations if possible

2013-03-12 Thread Peter Lieven
performance gain on SSE2 is approx. 20-25%. altivec is not tested. performance for unsigned long arithmetic is unchanged. Signed-off-by: Peter Lieven --- util/cutils.c |5 + 1 file changed, 5 insertions(+) diff --git a/util/cutils.c b/util/cutils.c index a09d8e8..23f0cd6 100644 --- a/u

[Qemu-devel] [RFC][PATCH 9/9] migration: do not search dirty pages in bulk stage

2013-03-12 Thread Peter Lieven
avoid searching for dirty pages just increment the page offset. all pages are dirty anyway. Signed-off-by: Peter Lieven --- arch_init.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch_init.c b/arch_init.c index abd54a7..45fcf4d 100644 --- a/arch_init.c +++

[Qemu-devel] [RFC][PATCH 8/9] migration: do not sent zero_pages in bulk stage

2013-03-12 Thread Peter Lieven
if the dup_page is a zero_page do not send it at all. the memory at the destination reads as zero anyway. Signed-off-by: Peter Lieven --- arch_init.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch_init.c b/arch_init.c index 04c82e4..abd54a7 100644 --- a/arch_i

[Qemu-devel] [RFC][PATCH 7/9] bitops: use vector algorithm to optimize find_next_bit()

2013-03-12 Thread Peter Lieven
this patch adds the usage of buffer_find_nonzero_offset() to skip large areas of zeroes. compared to loop unrolling this adds another 50% performance benefit for skipping large areas of zeroes. Signed-off-by: Peter Lieven --- util/bitops.c | 23 --- 1 file changed, 20 ins

[Qemu-devel] [RFC][PATCH 6/9] migration: use XBZRLE only after bulk stage

2013-03-12 Thread Peter Lieven
at the beginning of migration all pages are marked dirty and in the first round a bulk migration of all pages is performed. currently all these pages are copied to the page cache regardless if there are frequently updated or not. this doesn't make sense since most of these pages are never transfe

Re: [Qemu-devel] [RFC PATCH] pci: Differentiate PCI Express bus

2013-03-12 Thread Michael S. Tsirkin
On Tue, Mar 12, 2013 at 09:36:49AM -0600, Alex Williamson wrote: > On Tue, 2013-03-12 at 16:46 +0200, Michael S. Tsirkin wrote: > > On Mon, Mar 11, 2013 at 03:18:49PM -0600, Alex Williamson wrote: > > > When creating capabilities devices need to know what kind of bus > > > they're on. If we're on

[Qemu-devel] [RFC][PATCH 3/9] migration: add an indicator for bulk state of ram migration

2013-03-12 Thread Peter Lieven
Signed-off-by: Peter Lieven --- arch_init.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/arch_init.c b/arch_init.c index 1b71912..d48b914 100644 --- a/arch_init.c +++ b/arch_init.c @@ -326,6 +326,7 @@ static ram_addr_t last_offset; static unsigned long *migration_bitmap; static ui

[Qemu-devel] [RFC][PATCH 2/9] add a function to find non-zero content in a buffer

2013-03-12 Thread Peter Lieven
Signed-off-by: Peter Lieven --- include/qemu-common.h |1 + util/cutils.c | 30 ++ 2 files changed, 31 insertions(+) diff --git a/include/qemu-common.h b/include/qemu-common.h index a3555d0..c22c41e 100644 --- a/include/qemu-common.h +++ b/include/qemu-

[Qemu-devel] [RFC][PATCH 1/9] move vector definitions to qemu-common.h

2013-03-12 Thread Peter Lieven
vector optimizations will now be used outside is_dup_page() in arch_init.c Signed-off-by: Peter Lieven --- arch_init.c | 20 include/qemu-common.h | 23 +++ 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/arch_init.c b/arch

[Qemu-devel] [RFC][PATCH 0/9] live migration/buffer_is_zero optimizations

2013-03-12 Thread Peter Lieven
I will sent a list of optimizations that have been developed during the last days. Your feedback is much appreciated. @Paolo: Can you run your tests that you have made for your migration optimzations that are now upstream against these patches. Thanks, Peter Peter Lieven (9): move vector defi

Re: [Qemu-devel] [PATCH V2 07/10] snapshot: qmp use new internal API for external snapshot transaction

2013-03-12 Thread Stefan Hajnoczi
On Tue, Mar 12, 2013 at 04:30:41PM +0800, Wenchao Xia wrote: > 于 2013-1-15 15:03, Wenchao Xia 写道: > >于 2013-1-14 18:06, Stefan Hajnoczi 写道: > >>On Mon, Jan 14, 2013 at 10:56:30AM +0800, Wenchao Xia wrote: > >>>于 2013-1-11 17:12, Stefan Hajnoczi 写道: > On Fri, Jan 11, 2013 at 02:22:28PM +0800, We

[Qemu-devel] [PATCH 10/13] qcow2: set L2 cache dependency in qcow2_alloc_bytes()

2013-03-12 Thread Kevin Wolf
From: Stefan Hajnoczi Compressed writes use qcow2_alloc_bytes() to allocate space with byte granularity. The affected clusters' refcounts will be incremented but we do not need to flush yet. Set a L2 cache dependency on the refcount block cache, so that the refcounts get written out before the

Re: [Qemu-devel] [RFC PATCH] pci: Differentiate PCI Express bus

2013-03-12 Thread Alex Williamson
On Tue, 2013-03-12 at 16:46 +0200, Michael S. Tsirkin wrote: > On Mon, Mar 11, 2013 at 03:18:49PM -0600, Alex Williamson wrote: > > When creating capabilities devices need to know what kind of bus > > they're on. If we're on an express bus without a parent_dev, then > > we're on the root complex a

[Qemu-devel] [PATCH 09/13] qcow2: flush refcount cache correctly in qcow2_write_snapshots()

2013-03-12 Thread Kevin Wolf
From: Stefan Hajnoczi Since qcow2 metadata is cached we need to flush the caches, not just the underlying file. Use bdrv_flush(bs) instead of bdrv_flush(bs->file). Also add the error return path when bdrv_flush() fails and move the flush after checking for qcow2_alloc_clusters() failure so that

Re: [Qemu-devel] [PATCH v6 2/8] virtio-blk: add the virtio-blk device.

2013-03-12 Thread KONRAD Frédéric
On 12/03/2013 16:12, Peter Maydell wrote: On 12 March 2013 15:08, KONRAD Frédéric wrote: On 12/03/2013 15:42, Peter Maydell wrote: Yes, I see your problem there, but DEFINE_VIRTIO_BLK_SCSI_PROPERTY and DEFINE_DATA_PLANE_PROPERTIES are just convenience macros, not ones that are expected to be u

[Qemu-devel] [PATCH 12/13] qcow2: drop flush in update_cluster_refcount()

2013-03-12 Thread Kevin Wolf
From: Stefan Hajnoczi The update_cluster_refcount() function increments/decrements a cluster's refcount and then returns the new refcount value. There is no need to flush since both update_cluster_refcount() callers already take care of this: 1. qcow2_alloc_bytes() calls update_cluster_refcount

[Qemu-devel] [PULL 00/13] Block patches

2013-03-12 Thread Kevin Wolf
The following changes since commit fe3cc14fd83e0c8f376d849ccd0fc3433388442d: Merge remote-tracking branch 'quintela/migration.next' into staging (2013-03-11 08:30:34 -0500) are available in the git repository at: git://repo.or.cz/qemu/kevin.git for-anthony for you to fetch changes up to 6

Re: [Qemu-devel] [RFC]HLFS driver for QEMU

2013-03-12 Thread Stefan Hajnoczi
On Tue, Mar 12, 2013 at 09:47:57PM +0800, harryxiyou wrote: > Could anyone give me some suggestions to submit HLFS driver patches for > QEMU to our QEMU community. Thanks a lot in advance ;-) http://wiki.qemu.org/Contribute/SubmitAPatch Stefan

Re: [Qemu-devel] [PATCH v6 2/8] virtio-blk: add the virtio-blk device.

2013-03-12 Thread Peter Maydell
On 12 March 2013 15:08, KONRAD Frédéric wrote: > On 12/03/2013 15:42, Peter Maydell wrote: >> >> Yes, I see your problem there, but DEFINE_VIRTIO_BLK_SCSI_PROPERTY >> and DEFINE_DATA_PLANE_PROPERTIES are just convenience macros, not >> ones that are expected to be used by other code, right? So you

Re: [Qemu-devel] [RFC] find_next_bit optimizations

2013-03-12 Thread Stefan Hajnoczi
On Tue, Mar 12, 2013 at 09:41:04AM +0100, Peter Lieven wrote: > > Am 12.03.2013 um 09:35 schrieb Stefan Hajnoczi : > > > On Mon, Mar 11, 2013 at 02:44:03PM +0100, Peter Lieven wrote: > >> I ever since had a few VMs which are very hard to migrate because of a lot > >> of memory I/O. I found that

Re: [Qemu-devel] [PATCH v6 2/8] virtio-blk: add the virtio-blk device.

2013-03-12 Thread KONRAD Frédéric
On 12/03/2013 15:42, Peter Maydell wrote: On 12 March 2013 14:37, KONRAD Frédéric wrote: On 12/03/2013 15:28, Peter Maydell wrote: On 12 March 2013 09:22, wrote: /* The ID for virtio_block */ @@ -130,4 +134,28 @@ typedef struct VirtIOBlock { #define DEFINE_VIRTIO_BLK_FEATURES(_state,

Re: [Qemu-devel] [PATCH 2/2] qga: add windows implementation for guest-set-time

2013-03-12 Thread Eric Blake
On 03/12/2013 03:08 AM, Lei Li wrote: > Signed-off-by: Lei Li > --- > qga/commands-win32.c | 34 ++ > 1 file changed, 34 insertions(+) > > +void qmp_guest_set_time(int64_t time_ns, Error **errp) > +{ > +SYSTEMTIME ts; > +FILETIME tf; > +LONGLONG time;

Re: [Qemu-devel] [PATCH v6 8/8] virtio-blk: cleanup: remove qdev field.

2013-03-12 Thread Peter Maydell
On 12 March 2013 09:22, wrote: > From: KONRAD Frederic > > The qdev field is no longer needed, just drop it. > > Signed-off-by: KONRAD Frederic Reviewed-by: Peter Maydell -- PMM

Re: [Qemu-devel] [PATCH v6 7/8] virtio-blk: cleanup: QOM cast

2013-03-12 Thread Peter Maydell
On 12 March 2013 09:22, wrote: > From: KONRAD Frederic > > Use QOM casts inside virtio-blk. > > Signed-off-by: KONRAD Frederic Reviewed-by: Peter Maydell -- PMM

Re: [Qemu-devel] [PATCH v6 6/8] virtio-blk: cleanup: init and exit functions.

2013-03-12 Thread Peter Maydell
On 12 March 2013 09:22, wrote: > From: KONRAD Frederic > > As all virtio-blk-* are switched to the new API, we can remove the separate > init/exit for the old API. > > Signed-off-by: KONRAD Frederic Reviewed-by: Peter Maydell -- PMM

Re: [Qemu-devel] [PATCH v6 5/8] virtio-blk-ccw switch to new API.

2013-03-12 Thread Peter Maydell
On 12 March 2013 09:22, wrote: > From: KONRAD Frederic > > Here the virtio-ccw-s390 is modified for the new API. The device > virtio-ccw-s390 extends virtio-ccw-device as before. It creates and > connects a virtio-ccw during the init. The properties are not modified. > > Signed-off-by: KONRAD Fr

[Qemu-devel] [PATCH 03/13] Add qdict_clone_shallow()

2013-03-12 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- include/qapi/qmp/qdict.h | 2 ++ qobject/qdict.c | 22 ++ 2 files changed, 24 insertions(+) diff --git a/include/qapi/qmp/qdict.h b/include/qapi/qmp/qdict.h index 6d9a4be..685b2e3 1

Re: [Qemu-devel] [PATCH v6 4/8] virtio-blk-s390: switch to the new API.

2013-03-12 Thread Peter Maydell
On 12 March 2013 09:22, wrote: > From: KONRAD Frederic > > Here the virtio-blk-s390 is modified for the new API. The device > virtio-blk-s390 extends virtio-s390-device as before. It creates and > connects a virtio-blk during the init. The properties are not modified. > > Signed-off-by: KONRAD F

Re: [Qemu-devel] [PATCH v6 3/8] virtio-blk-pci: switch to new API.

2013-03-12 Thread Peter Maydell
On 12 March 2013 09:22, wrote: > From: KONRAD Frederic > > Here the virtio-blk-pci is modified for the new API. The device > virtio-blk-pci extends virtio-pci. It creates and connects a virtio-blk > during the init. The properties are not changed. > > Signed-off-by: KONRAD Frederic Reviewed-by

Re: [Qemu-devel] [RFC PATCH] pci: Differentiate PCI Express bus

2013-03-12 Thread Michael S. Tsirkin
On Mon, Mar 11, 2013 at 03:18:49PM -0600, Alex Williamson wrote: > When creating capabilities devices need to know what kind of bus > they're on. If we're on an express bus without a parent_dev, then > we're on the root complex and need to use integrated endpoints > rather than standard endpoints.

Re: [Qemu-devel] [PATCH v6 2/8] virtio-blk: add the virtio-blk device.

2013-03-12 Thread Peter Maydell
On 12 March 2013 14:37, KONRAD Frédéric wrote: > On 12/03/2013 15:28, Peter Maydell wrote: >> >> On 12 March 2013 09:22, wrote: >>> >>> /* The ID for virtio_block */ >>> @@ -130,4 +134,28 @@ typedef struct VirtIOBlock { >>> #define DEFINE_VIRTIO_BLK_FEATURES(_state, _field) \ >>> D

[Qemu-devel] [PATCH 07/13] qcow2: Allow lazy refcounts to be enabled on the command line

2013-03-12 Thread Kevin Wolf
qcow2 images now accept a boolean lazy_refcounts options. Use it like this: -drive file=test.qcow2,lazy_refcounts=on If the option is specified on the command line, it overrides the default specified by the qcow2 header flags that were set when creating the image. Signed-off-by: Kevin Wolf Re

[Qemu-devel] [PATCH 13/13] qcow2: drop unnecessary flush in qcow2_update_snapshot_refcount()

2013-03-12 Thread Kevin Wolf
From: Stefan Hajnoczi We already flush when the function completes. There is no need to flush after every compressed cluster. Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- block/qcow2-refcount.c | 4 1 file changed, 4 deletions(-) diff --git a/block/qcow2-refcount.c b/bl

[Qemu-devel] [PATCH 11/13] qcow2: flush in qcow2_update_snapshot_refcount()

2013-03-12 Thread Kevin Wolf
From: Stefan Hajnoczi Users of qcow2_update_snapshot_refcount() do not flush consistently. qcow2_snapshot_create() flushes but qcow2_snapshot_goto() and qcow2_snapshot_delete() do not. Solve this by moving the bdrv_flush() into qcow2_update_snapshot_refcount(). Signed-off-by: Stefan Hajnoczi S

[Qemu-devel] [PATCH 02/13] block: Add options QDict to bdrv_open() prototype

2013-03-12 Thread Kevin Wolf
It doesn't do anything yet except storing the options QDict in the BlockDriverState. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- block.c | 47 +++ block/blkverify.c | 2 +- block/qcow2

[Qemu-devel] [PATCH 05/13] qemu-option: Add qemu_opts_absorb_qdict()

2013-03-12 Thread Kevin Wolf
This adds a function that adds all entries of a QDict to a QemuOpts if the keys are known, and leaves only the rest in the QDict. This way a single QDict of -drive options can be processed in multiple places (generic block layer, block driver, backing file block driver, etc.), where each part pick

[Qemu-devel] [PATCH 06/13] block: Support driver specific options in drive_init()

2013-03-12 Thread Kevin Wolf
Any non-default -drive options are now passed down to the block drivers. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- blockdev.c | 69 +- 1 file changed, 59 insertions(+), 10 deletions(-) diff --

[Qemu-devel] [PATCH 08/13] qcow2: flush refcount cache correctly in alloc_refcount_block()

2013-03-12 Thread Kevin Wolf
From: Stefan Hajnoczi update_refcount() affects the refcount cache, it does not write to disk. Therefore bdrv_flush(bs->file) does nothing. We need to flush the refcount cache in order to write out the refcount updates! While we're here also add error returns when qcow2_cache_flush() fails. Si

[Qemu-devel] [PATCH 01/13] block: Add options QDict to .bdrv_open()

2013-03-12 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- block.c | 4 ++-- block/bochs.c | 2 +- block/cloop.c | 2 +- block/cow.c | 2 +- block/dmg.c | 2 +- block/parallels.c | 2 +- block/

[Qemu-devel] [PATCH 04/13] block: Add options QDict to bdrv_open_common()

2013-03-12 Thread Kevin Wolf
The options are passed down to the block drivers, which are supposed to remove all options they have processed. Anything that is left over in the end is an unknown option and results in an error. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- block.c | 32 ++

Re: [Qemu-devel] [PATCH 1/2] Add GDB qAttached support

2013-03-12 Thread Jan Kiszka
On 2013-03-12 15:31, Fabien Chouteau wrote: > With this patch QEMU handles qAttached request from gdb. When QEMU > replies 1, GDB sends a "detach" command at the end of a debugging > session otherwise GDB sends "kill". > > The default value for qAttached is 1 on system emulation and 0 on user > em

Re: [Qemu-devel] [PATCH v6 2/8] virtio-blk: add the virtio-blk device.

2013-03-12 Thread KONRAD Frédéric
On 12/03/2013 15:28, Peter Maydell wrote: On 12 March 2013 09:22, wrote: /* The ID for virtio_block */ @@ -130,4 +134,28 @@ typedef struct VirtIOBlock { #define DEFINE_VIRTIO_BLK_FEATURES(_state, _field) \ DEFINE_VIRTIO_COMMON_FEATURES(_state, _field) +#ifdef CONFIG_VIRTIO_BLK_D

  1   2   3   >