Re: [Qemu-devel] [PATCH] bswap: improve gluing

2013-01-16 Thread Markus Armbruster
David Gibson writes: > On Sun, Jan 13, 2013 at 04:35:41PM +, Blue Swirl wrote: >> OpenBSD system compiler (gcc 4.2.1) has problems with concatenation >> of macro arguments in macro functions: >> CCaes.o >> In file included from /src/qemu/include/qemu-common.h:126, >> fr

Re: [Qemu-devel] [PATCH] block: do_commit() does not pass along error messages for all errors

2013-01-16 Thread Markus Armbruster
[Cc: Luiz for error stuff] Jeff Cody writes: > The non-live bdrv_commit() function may return one of the following > errors: -ENOTSUP, -EBUSY, -EACCES, -EIO. The only error that is > checked in the HMP handler is -EBUSY, so the monitor command 'commit' > silently fails for all error cases other

[Qemu-devel] [PATCH V4 12/13] hmp: switch snapshot info function to qmp based one

2013-01-16 Thread Wenchao Xia
This patch using new added function in last commit which retrieve info from qmp for snapshot info. Note: This patch need previous hmp extention patch which enable info sub command take qdict * as paramter. Signed-off-by: Wenchao Xia --- monitor.c |2 +- savevm.c | 64

[Qemu-devel] [PATCH V4 08/13] qmp: add interface query-images.

2013-01-16 Thread Wenchao Xia
This mirror function will return all image info including snapshots. Now Qemu have both query-images and query-block interfaces. Signed-off-by: Wenchao Xia --- block.c | 32 ++ qapi-schema.json | 27 +++ qmp-commands.hx | 76 +

[Qemu-devel] [PATCH V4 07/13] block: rename bdrv_query_info to bdrv_query_block_info

2013-01-16 Thread Wenchao Xia
Now that we have bdrv_query_image_info, rename this function to make it more obvious what it is doing. Reviewed-by: Eric Blake Signed-off-by: Wenchao Xia --- block.c |4 ++-- include/block/block.h |2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bloc

[Qemu-devel] [PATCH V4 10/13] qmp: add interface query-snapshots

2013-01-16 Thread Wenchao Xia
This interface now return valid internal snapshots for whole vm or a single block device. Note that filter use bdrv_can_read_snapshot() instead of bdrv_can_snapshot(), which should be the correct behavior in information retrieving funtion. Signed-off-by: Wenchao Xia --- block.c |

[Qemu-devel] [PATCH V4 13/13] hmp: show snapshots on single block device

2013-01-16 Thread Wenchao Xia
This patch added the support of showing internal snapshots on a single block device in hmp layer, by simply change parameter in calling of qmp funtion. Note: This patch need previous hmp extention patch which enable info sub command take qdict * as paramter. Signed-off-by: Wenchao Xia --- h

[Qemu-devel] [PATCH V4 04/13] block: add snapshot info query function bdrv_query_snapshot_infolist()

2013-01-16 Thread Wenchao Xia
This patch add function bdrv_query_snapshot_infolist(), which will return snapshot info of an image in qmp object format. The implementation code are mostly copied from qemu-img.c with modification to fit more for qmp based block layer API. To help filter out snapshot info not needed, a call ba

[Qemu-devel] [PATCH V4 11/13] hmp: add function hmp_info_snapshots()

2013-01-16 Thread Wenchao Xia
This function will simply call qmp interface qmp_query_snapshots() added in last commit and then dump information in monitor console. Now snapshot info retrieving code in qemu and qemu-img are merged by calling same block layer function, and then they just translate the qmp object to strings in

[Qemu-devel] [PATCH V4 05/13] block: add image info query function bdrv_query_image_info()

2013-01-16 Thread Wenchao Xia
This patch add function bdrv_query_image_info(), which will return image info in qmp object format. The implementation code are mostly copied from qemu-img.c, but use block layer function to get snapshot info. A check with bdrv_can_read_snapshot(), was done before collecting snapshot info. Sig

[Qemu-devel] [PATCH V4 02/13] block: add bdrv_get_filename() function

2013-01-16 Thread Wenchao Xia
This function will simply return the uri or filename used to open the image. Reviewed-by: Eric Blake Signed-off-by: Wenchao Xia --- block.c |5 + include/block/block.h |1 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/block.c b/block.c index 6fa7c9

[Qemu-devel] [PATCH V4 09/13] block: export function bdrv_find_snapshot()

2013-01-16 Thread Wenchao Xia
This patch move it from savevm.c to block.c and export it. To make it clear about id and name in searching, the API was changed a bit to distinguish them. Caller can choose to search by id or name now. Signed-off-by: Wenchao Xia --- block.c | 51

[Qemu-devel] [PATCH V4 00/13] add qmp/hmp interfaces for snapshot info

2013-01-16 Thread Wenchao Xia
This serial of patches does two things: merge some info code in qemu-img, and add following interfaces: 1) qmp: query-images 2) qmp: query-snapshots 3) hmp: show snapshot info on a single block device These patches follows the rule that use qmp to retieve information, hmp layer just do a transl

[Qemu-devel] [PATCH for-1.4] qom: Extend documentation on QOM method concepts

2013-01-16 Thread Andreas Färber
Add a documentation section "Methods" and discuss among others how to handle overriding virtual methods. Clarify DeviceClass::realize documentation and refer to the above. Signed-off-by: Andreas Färber --- hw/qdev-core.h | 14 +-- include/qom/object.h | 104

[Qemu-devel] [PATCH] fix unbounded qemu NetQueue

2013-01-16 Thread Luigi Rizzo
The comment at the beginning of net/queue.c says that packets that cannot be sent by qemu_net_queue_send() should not be enqueued unless a callback is set. This patch implements this behaviour, that prevents a queue to grow unbounded (e.g. when a network backend is not connected). Also for good m

Re: [Qemu-devel] [QEMU PATCH v2] virtio-net: introduce a new macaddr control

2013-01-16 Thread Amos Kong
On Thu, Jan 17, 2013 at 11:49:20AM +1030, Rusty Russell wrote: > ak...@redhat.com writes: > > @@ -349,6 +351,14 @@ static int virtio_net_handle_mac(VirtIONet *n, uint8_t > > cmd, > > { > > struct virtio_net_ctrl_mac mac_data; > > > > +if (cmd == VIRTIO_NET_CTRL_MAC_ADDR_SET && elem->ou

Re: [Qemu-devel] [RFC] Add serial number to usbdevice when passthrough to VM

2013-01-16 Thread Lei Li
On 01/16/2013 03:56 PM, Gerd Hoffmann wrote: On 01/16/13 08:18, Lei Li wrote: Hi guys, Currently we can passthrough the host USB device to the virtual machine. This is done like: –usbdevice host:1234:5678, where 1234 is vendor id, 5678 is product id. But there is a problem. If there are two

Re: [Qemu-devel] [QEMU PATCH v2] virtio-net: introduce a new macaddr control

2013-01-16 Thread Rusty Russell
ak...@redhat.com writes: > @@ -349,6 +351,14 @@ static int virtio_net_handle_mac(VirtIONet *n, uint8_t > cmd, > { > struct virtio_net_ctrl_mac mac_data; > > +if (cmd == VIRTIO_NET_CTRL_MAC_ADDR_SET && elem->out_num == 2 && > +elem->out_sg[1].iov_len == ETH_ALEN) { > +/*

Re: [Qemu-devel] [PULL 00/10] chardev hotplug support

2013-01-16 Thread Anthony Liguori
Pulled. Thanks. Regards, Anthony Liguori

Re: [Qemu-devel] [PATCH] bswap: improve gluing

2013-01-16 Thread David Gibson
On Sun, Jan 13, 2013 at 04:35:41PM +, Blue Swirl wrote: > OpenBSD system compiler (gcc 4.2.1) has problems with concatenation > of macro arguments in macro functions: > CCaes.o > In file included from /src/qemu/include/qemu-common.h:126, > from /src/qemu/aes.c:30: > /src/

Re: [Qemu-devel] [PATCH] define qemukvm-1.2 machine type

2013-01-16 Thread Cole Robinson
On 01/15/2013 11:29 AM, Paolo Bonzini wrote: > Il 15/01/2013 04:45, Cole Robinson ha scritto: >> Libvirt always specifies an explicit machine type and carries it for the life >> of the VM. What we want is for 'qemu-kvm-1.2 -M pc-1.2' to migrate seamlessly >> into 'qemu-1.3+ -M pc-1.2' without the u

Re: [Qemu-devel] [PATCH v2 00/12] Drive mirroring performance improvements

2013-01-16 Thread Eric Blake
On 01/16/2013 10:31 AM, Paolo Bonzini wrote: > The fixes from the previous post are: > > 1) the in_flight_bitmap is now properly set and cleared [Stefan]; > > 2) persistent dirty bitmap left out [Stefan]; > > 3) reordered arguments in qmp-command.hx to follow patch order [Stefan]; > > 4) tests/

Re: [Qemu-devel] [PATCH v2 10/12] mirror: add buf-size argument to drive-mirror

2013-01-16 Thread Eric Blake
On 01/16/2013 10:31 AM, Paolo Bonzini wrote: > This makes sense when the next commit starts using the extra buffer space > to perform many I/O operations asynchronously. > > Signed-off-by: Paolo Bonzini > --- > v1->v2: reordered arguments in qmp-command.hx [Stefan]; > tests/qemu-i

Re: [Qemu-devel] [PATCH v2 08/12] mirror: allow customizing the granularity

2013-01-16 Thread Eric Blake
On 01/16/2013 10:31 AM, Paolo Bonzini wrote: > The desired granularity may be very different depending on the kind of > operation (e.g. continuous replication vs. collapse-to-raw) and whether > the VM is expected to perform lots of I/O while mirroring is in progress. > > Allow the user to customiz

Re: [Qemu-devel] [RFC qom-cpu 03/15] target-i386: Update CPU to QOM realizefn

2013-01-16 Thread Eduardo Habkost
On Wed, Jan 16, 2013 at 11:52:47PM +0100, Andreas Färber wrote: > Am 16.01.2013 17:04, schrieb Eduardo Habkost: > > On Wed, Jan 16, 2013 at 06:32:48AM +0100, Andreas Färber wrote: > > [...] > >> @@ -2247,6 +2247,9 @@ static void x86_cpu_common_class_init(ObjectClass > >> *oc, void *data) > >> { >

Re: [Qemu-devel] [PATCH v2 07/12] block: allow customizing the granularity of the dirty bitmap

2013-01-16 Thread Eric Blake
On 01/16/2013 10:31 AM, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > block-migration.c |5 +++-- > block.c | 17 ++--- > block/mirror.c| 14 -- > include/block/block.h |5 + > qapi-schema.json |4 +++- > 5 f

Re: [Qemu-devel] [RFC V1 11/12] qmp: Add block-pause-dedup.

2013-01-16 Thread Eric Blake
On 01/16/2013 09:25 AM, Benoît Canet wrote: > --- > blockdev.c | 18 ++ > qapi-schema.json | 18 ++ > qmp-commands.hx | 23 +++ > 3 files changed, 59 insertions(+) > > > ## > +# @block-pause-dedup: > +# > +# This command pause th

[Qemu-devel] [PATCH] block: do_commit() does not pass along error messages for all errors

2013-01-16 Thread Jeff Cody
The non-live bdrv_commit() function may return one of the following errors: -ENOTSUP, -EBUSY, -EACCES, -EIO. The only error that is checked in the HMP handler is -EBUSY, so the monitor command 'commit' silently fails for all error cases other than 'Device is in use'. This patch adds the appropria

[Qemu-devel] buildbot failure in qemu on default_x86_64_rhel61

2013-01-16 Thread qemu
The Buildbot has detected a new failure on builder default_x86_64_rhel61 while building qemu. Full details are available at: http://buildbot.b1-systems.de/qemu/builders/default_x86_64_rhel61/builds/499 Buildbot URL: http://buildbot.b1-systems.de/qemu/ Buildslave for this Build: kraxel_rhel61 B

Re: [Qemu-devel] [PATCH 4/7 v2] KVM regsync: Add register bitmap parameter to do_kvm_cpu_synchronize_state

2013-01-16 Thread Marcelo Tosatti
On Wed, Jan 16, 2013 at 09:41:54PM +0100, Christian Borntraeger wrote: > On 16/01/13 21:21, Marcelo Tosatti wrote: > > On Wed, Jan 16, 2013 at 09:03:20PM +0100, Christian Borntraeger wrote: > >> On 16/01/13 17:05, Marcelo Tosatti wrote: > >> > >>> The S/390 problem, from > >>> http://lists.nongnu.o

Re: [Qemu-devel] [RFC V1 10/12] qerror: Add QERR_DEVICE_NOT_DEDUPLICATED.

2013-01-16 Thread Eric Blake
On 01/16/2013 09:25 AM, Benoît Canet wrote: > --- > include/qapi/qmp/qerror.h |3 +++ > 1 file changed, 3 insertions(+) You don't want this patch; instead, code in later patches that currently uses error_set(errp, QERR_DEVICE_NOT_DEDUPLICATED, bdrv_get_device_name(bs)); should instead ca

Re: [Qemu-devel] [RFC qom-cpu 03/15] target-i386: Update CPU to QOM realizefn

2013-01-16 Thread Andreas Färber
Am 16.01.2013 17:04, schrieb Eduardo Habkost: > On Wed, Jan 16, 2013 at 06:32:48AM +0100, Andreas Färber wrote: > [...] >> @@ -2247,6 +2247,9 @@ static void x86_cpu_common_class_init(ObjectClass *oc, >> void *data) >> { >> X86CPUClass *xcc = X86_CPU_CLASS(oc); >> CPUClass *cc = CPU_CLAS

Re: [Qemu-devel] [PATCH v2 02/12] add hierarchical bitmap data type and test cases

2013-01-16 Thread Eric Blake
On 01/16/2013 10:31 AM, Paolo Bonzini wrote: > HBitmaps provides an array of bits. The bits are stored as usual in an > array of unsigned longs, but HBitmap is also optimized to provide fast > iteration over set bits; going from one bit to the next is O(logB n) > worst case, with B = sizeof(long)

Re: [Qemu-devel] [PATCH] hw: Spelling fix in log message

2013-01-16 Thread Andreas Färber
Am 16.01.2013 18:40, schrieb Stefan Weil: > defineition -> definition > > Signed-off-by: Stefan Weil > --- > hw/openrisc_sim.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/openrisc_sim.c b/hw/openrisc_sim.c > index fb47cdc..6c443ba 100644 > --- a/hw/openrisc_si

Re: [Qemu-devel] [RFC qom-cpu 02/15] target-arm: Update CPU to QOM realizefn

2013-01-16 Thread Andreas Färber
Am 16.01.2013 16:52, schrieb Eduardo Habkost: > On Wed, Jan 16, 2013 at 06:32:47AM +0100, Andreas Färber wrote: > [...] >> diff --git a/target-arm/helper.c b/target-arm/helper.c >> index 37c34a1..f4553de 100644 >> --- a/target-arm/helper.c >> +++ b/target-arm/helper.c >> @@ -1270,14 +1270,12 @@ ARM

Re: [Qemu-devel] unbounded qemu NetQue's ?

2013-01-16 Thread Luigi Rizzo
On Mon, Jan 7, 2013 at 5:49 AM, Stefan Hajnoczi wrote: > On Sun, Jan 06, 2013 at 08:23:56PM +0100, Luigi Rizzo wrote: > > Hi, > > while testing the tx path in qemu without a network backend connected, > > i noticed that qemu_net_queue_send() builds up an unbounded > > queue, because QTAILQ* have

Re: [Qemu-devel] [Qemu-stable] Patch Round-up for stable 1.3.1, freeze Monday

2013-01-16 Thread Michael Tokarev
16.01.2013 22:56, mdroth wrote: On Wed, Jan 16, 2013 at 10:12:38PM +0400, Michael Tokarev wrote: 5afd0ec e1000: Discard oversized packets based on SBP|LPE (Michael Contreras) 2c0331f4f7d241995452b99afaf0aab00493334a Guys, this is just one half of the CVE-2012-6075 fix. Please don't repeat th

Re: [Qemu-devel] [PATCH] audio: Replace non-portable asprintf in debug code by g_strdup_printf

2013-01-16 Thread Anthony Liguori
Applied. Thanks. Regards, Anthony Liguori

Re: [Qemu-devel] [PATCH] build: fix Win32 clean build

2013-01-16 Thread Anthony Liguori
Applied. Thanks. Regards, Anthony Liguori

Re: [Qemu-devel] [PATCH v2] Add new DEFAULT_MACHINE_OPTIONS to q35 and ppc405

2013-01-16 Thread Anthony Liguori
Applied. Thanks. Regards, Anthony Liguori

Re: [Qemu-devel] [PATCH] usb-storage: Drop useless null test in usb_msd_handle_data()

2013-01-16 Thread Anthony Liguori
Applied. Thanks. Regards, Anthony Liguori

Re: [Qemu-devel] [PATCH] ui: Drop useless null tests in parse_keyboard_layout()

2013-01-16 Thread Anthony Liguori
Applied. Thanks. Regards, Anthony Liguori

Re: [Qemu-devel] [PATCH] pseries: Replace non-portable asprintf by g_strdup_printf

2013-01-16 Thread Anthony Liguori
Applied. Thanks. Regards, Anthony Liguori

[Qemu-devel] [PATCH 1/2] win32-aio: Fix vectored reads

2013-01-16 Thread Kevin Wolf
Copying data in the right direction really helps a lot! Cc: qemu-sta...@nongnu.org Signed-off-by: Kevin Wolf --- block/win32-aio.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/block/win32-aio.c b/block/win32-aio.c index 46a5db7..53b82e6 100644 --- a/block/win32-aio.c

[Qemu-devel] [PATCH 2/2] win32-aio: Fix memory leak

2013-01-16 Thread Kevin Wolf
The buffer is allocated for both reads and writes, and obviously it should be freed even if an error occurs. Cc: qemu-sta...@nongnu.org Signed-off-by: Kevin Wolf --- block/win32-aio.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/block/win32-aio.c b/block/win32-aio.c

[Qemu-devel] [PATCH 0/2] win32-aio fixes

2013-01-16 Thread Kevin Wolf
Paolo, especially the first one is worrying with respect to the test status of this code. We should probably give it some additional testing. Kevin Wolf (2): win32-aio: Fix vectored reads win32-aio: Fix memory leak block/win32-aio.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(

Re: [Qemu-devel] [PATCH 4/7 v2] KVM regsync: Add register bitmap parameter to do_kvm_cpu_synchronize_state

2013-01-16 Thread Christian Borntraeger
On 16/01/13 21:21, Marcelo Tosatti wrote: > On Wed, Jan 16, 2013 at 09:03:20PM +0100, Christian Borntraeger wrote: >> On 16/01/13 17:05, Marcelo Tosatti wrote: >> >>> The S/390 problem, from >>> http://lists.nongnu.org/archive/html/qemu-devel/2012-11/msg02213.html: >>> >>> ">>> The kvm register syn

Re: [Qemu-devel] 3 new x86 instructions

2013-01-16 Thread Torbjorn Granlund
Richard Henderson writes: Then you got the wrong branch from the repository: translate.c:4055:case 0x3f6: /* mulx By, Gy, rdx, Ey */ You need the "x86-next" branch. I am not a git user, and misundersand the command. Now I have the correct version, and can confirm that

Re: [Qemu-devel] [PATCH 4/7 v2] KVM regsync: Add register bitmap parameter to do_kvm_cpu_synchronize_state

2013-01-16 Thread Marcelo Tosatti
On Wed, Jan 16, 2013 at 05:00:52PM +, Bhushan Bharat-R65777 wrote: > Second-) > Currently kvm_arch_get_registers() is not optimized in two sense; one, it > always get all registers from KVM; two, in kvm_arch_get_registers() it copies > all registers to env->. This patch-set handles the second

Re: [Qemu-devel] [PATCH 4/7 v2] KVM regsync: Add register bitmap parameter to do_kvm_cpu_synchronize_state

2013-01-16 Thread Marcelo Tosatti
On Wed, Jan 16, 2013 at 09:03:20PM +0100, Christian Borntraeger wrote: > On 16/01/13 17:05, Marcelo Tosatti wrote: > > > The S/390 problem, from > > http://lists.nongnu.org/archive/html/qemu-devel/2012-11/msg02213.html: > > > > ">>> The kvm register sync needs to happen in the kvm register sync >

[Qemu-devel] [PATCH 0/2] win32-aio fixes

2013-01-16 Thread Kevin Wolf
Paolo, especially the first one is worrying with respect to the test status of this code. We should probably give it some additional testing. Kevin Wolf (2): win32-aio: Fix vectored reads win32-aio: Fix memory leak block/win32-aio.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] configure: silence pkg-config's check for curses

2013-01-16 Thread Vadim Evard
Signed-off-by: Vadim Evard --- configure |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 4ebb60d..6211db9 100755 --- a/configure +++ b/configure @@ -2039,7 +2039,7 @@ fi if test "$mingw32" = "yes" ; then curses_list="-lpdcurses" else -

Re: [Qemu-devel] [RFC V1 12/14] qcow2: Add qcow2_dedup_update_metrics to compute dedup RAM usage.

2013-01-16 Thread Eric Blake
On 01/16/2013 09:25 AM, Benoît Canet wrote: > --- > block/qcow2-dedup.c | 13 + > block/qcow2.h |1 + > 2 files changed, 14 insertions(+) > > diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c > index db23b71..4305746 100644 > --- a/block/qcow2-dedup.c > +++ b/block/qc

Re: [Qemu-devel] [PATCH 0/8] -numa option parsing fixes (v3)

2013-01-16 Thread Eric Blake
On 01/16/2013 11:28 AM, Eduardo Habkost wrote: > Changes v2 -> v3: > - Add 'base' parameter to parse_uint*() (patch 1/8) > - Keep existing base=10 behavior when parsing "nodeid" and "cpus" >(patches 6/8, 8/8) > - Trivial whitespace change on patch 1/8 > - Fix fprintf() format string on patc

Re: [Qemu-devel] [PATCH 4/7 v2] KVM regsync: Add register bitmap parameter to do_kvm_cpu_synchronize_state

2013-01-16 Thread Christian Borntraeger
On 16/01/13 17:05, Marcelo Tosatti wrote: > The S/390 problem, from > http://lists.nongnu.org/archive/html/qemu-devel/2012-11/msg02213.html: > > ">>> The kvm register sync needs to happen in the kvm register sync function :) >>> That would eliminate the whole purpose of sync regs and forces

[Qemu-devel] [RFC V5 12/62] qcow2: make the deduplication forget a cluster hash when a cluster is to dedupe

2013-01-16 Thread Benoît Canet
Signed-off-by: Benoit Canet --- block/qcow2-cluster.c | 11 +-- block/qcow2-dedup.c |8 +++- block/qcow2.h |2 ++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index ef91216..5b1d20d 100644 --- a/block

[Qemu-devel] [RFC V5 42/62] qcow2: Count QCowHashNode creation metrics.

2013-01-16 Thread Benoît Canet
--- block/qcow2-dedup.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c index 0f095a9..d22e2a4 100644 --- a/block/qcow2-dedup.c +++ b/block/qcow2-dedup.c @@ -289,6 +289,7 @@ static void qcow2_build_and_insert_hash_node(BlockDriverState *bs,

[Qemu-devel] Trivial memory allocation fixes & cleanups

2013-01-16 Thread Markus Armbruster
v2: Windows compile fix in PATCH 08/11 (thanks eblake!), rest identical Markus Armbruster (11): g_malloc(0) and g_malloc0(0) return NULL; simplify g_strdup(NULL) returns NULL; simplify hw/9pfs: Fix unchecked strdup() by converting to g_strdup() readline: Fix unchecked strdup() by convertin

[Qemu-devel] [PATCH 2/2] alpha-linux-user: Correct select

2013-01-16 Thread Richard Henderson
From: Laurent Vivier Alpha, like s390x, passes all select arguments in registers. Signed-off-by: Laurent Vivier Signed-off-by: Richard Henderson --- linux-user/syscall.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.

[Qemu-devel] [RFC V1 04/14] qcow2: Collect deduplicated cluster metric.

2013-01-16 Thread Benoît Canet
--- block/qcow2-dedup.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c index e4920d4..716371c 100644 --- a/block/qcow2-dedup.c +++ b/block/qcow2-dedup.c @@ -400,10 +400,14 @@ static int qcow2_deduplicate_cluster(BlockDri

Re: [Qemu-devel] [RFC V5 00/62] QCOW2 deduplication

2013-01-16 Thread Benoît Canet
> Psychologically, reviewers tend to shy away from a 62-patch series, as > it implies a major time commitment to go through. Sending this as three > separate series, with clear instructions in the later ones that they > depend on earlier ones, aids the review process, even if it actually > results

[Qemu-devel] [RFC V5 09/62] qcow2: Extract qcow2_dedup_grow_table

2013-01-16 Thread Benoît Canet
Signed-off-by: Benoit Canet --- block/qcow2-cluster.c | 102 +++-- block/qcow2-dedup.c |3 +- block/qcow2.h |6 +++ 3 files changed, 71 insertions(+), 40 deletions(-) diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index 6

[Qemu-devel] [RFC V5 56/62] block: Add bdrv_pause_dedup.

2013-01-16 Thread Benoît Canet
--- block.c | 19 +++ include/block/block.h |1 + 2 files changed, 20 insertions(+) diff --git a/block.c b/block.c index 4e80da8..8c527b6 100644 --- a/block.c +++ b/block.c @@ -4380,6 +4380,25 @@ int bdrv_resume_dedup(BlockDriverState *bs) return 0; } +

[Qemu-devel] [RFC V1 10/14] qapi: Add support for deduplication infos in qapi-schema.json.

2013-01-16 Thread Benoît Canet
--- qapi-schema.json | 40 +++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/qapi-schema.json b/qapi-schema.json index 5dfa052..1a5014c 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -720,6 +720,40 @@ { 'command': 'query-block', 'ret

[Qemu-devel] [PATCH v2 08/11] qemu-log: Plug trivial memory leak in cpu_set_log_filename()

2013-01-16 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qemu-log.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/qemu-log.c b/qemu-log.c index 64a1b88..30c8b01 100644 --- a/qemu-log.c +++ b/qemu-log.c @@ -21,10 +21,12 @@ #include "qemu/log.h" #ifdef WIN32 -static const char

[Qemu-devel] [RFC V1 00/14] QCOW2 deduplication metrics

2013-01-16 Thread Benoît Canet
This patchset implements QMP metrics for the qcow2 deduplication. It applies on top of the "QCOW2 deduplication core functionality" patchset. Benoît Canet (14): qcow2: Add deduplication metrics structures. qcow2: Initialize deduplication metrics. qcow2: Collect unaligned writes missing data

Re: [Qemu-devel] [RFC V1 10/14] qapi: Add support for deduplication infos in qapi-schema.json.

2013-01-16 Thread Eric Blake
On 01/16/2013 09:25 AM, Benoît Canet wrote: > --- > qapi-schema.json | 40 +++- > 1 file changed, 39 insertions(+), 1 deletion(-) > > +# > +# @deleted-clusters: Number of deleted cluster when refcount < 0 Is it really when refcount goes negative, o

[Qemu-devel] [PATCH 05/21] target-mips: Fix incorrect code and test for INSV

2013-01-16 Thread Michael Roth
From: Petar Jovanovic Content of register rs should be shifted for pos before applying a mask. This change contains both fix for the instruction and to the existing test. Signed-off-by: Petar Jovanovic Reviewed-by: Eric Johnson Signed-off-by: Aurelien Jarno (cherry picked from commit 34f5606e

[Qemu-devel] [RFC V5 44/62] qcow2: Count cluster deleted metric

2013-01-16 Thread Benoît Canet
--- block/qcow2-dedup.c |1 + 1 file changed, 1 insertion(+) diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c index 64e5a13..4a1b184 100644 --- a/block/qcow2-dedup.c +++ b/block/qcow2-dedup.c @@ -991,6 +991,7 @@ void qcow2_dedup_refcount_zero_reached(BlockDriverState *bs, /* remo

[Qemu-devel] [RFC V1 09/14] qcow2: Count deduplication refcount overflow metric.

2013-01-16 Thread Benoît Canet
--- block/qcow2-dedup.c |1 + 1 file changed, 1 insertion(+) diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c index 4a1b184..db23b71 100644 --- a/block/qcow2-dedup.c +++ b/block/qcow2-dedup.c @@ -1024,6 +1024,7 @@ void qcow2_dedup_refcount_half_max_reached(BlockDriverState *bs,

[Qemu-devel] [RFC V5 22/62] qcow2: Add qcow2_dedup_is_running to probe if dedup is running.

2013-01-16 Thread Benoît Canet
--- block/qcow2-dedup.c |6 ++ block/qcow2.h |1 + 2 files changed, 7 insertions(+) diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c index 8b51dda..cc99e27 100644 --- a/block/qcow2-dedup.c +++ b/block/qcow2-dedup.c @@ -999,3 +999,9 @@ void qcow2_dedup_refcount_half_max_rea

[Qemu-devel] [RFC V5 04/36] qcow2: Make update_refcount public.

2013-01-16 Thread Benoît Canet
Signed-off-by: Benoit Canet --- block/qcow2-refcount.c |6 +- block/qcow2.h |2 ++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 6a95aa6..e014b0e 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refco

[Qemu-devel] [RFC V5 48/62] qcow2: Add qcow2_dedup_update_metrics to compute dedup RAM usage.

2013-01-16 Thread Benoît Canet
--- block/qcow2-dedup.c | 13 + block/qcow2.h |1 + 2 files changed, 14 insertions(+) diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c index db23b71..4305746 100644 --- a/block/qcow2-dedup.c +++ b/block/qcow2-dedup.c @@ -1311,3 +1311,16 @@ void qcow2_dedup_close(Bloc

[Qemu-devel] [PATCH v2 10/12] mirror: add buf-size argument to drive-mirror

2013-01-16 Thread Paolo Bonzini
This makes sense when the next commit starts using the extra buffer space to perform many I/O operations asynchronously. Signed-off-by: Paolo Bonzini --- v1->v2: reordered arguments in qmp-command.hx [Stefan]; tests/qemu-iotests/041.out is regenerated block/mirror.c

[Qemu-devel] [RFC V5 38/62] qcow2: Initialize deduplication metrics.

2013-01-16 Thread Benoît Canet
--- block/qcow2-dedup.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c index 6cd1af4..997714b 100644 --- a/block/qcow2-dedup.c +++ b/block/qcow2-dedup.c @@ -1272,6 +1272,8 @@ int qcow2_dedup_init(BlockDriverState *bs) s->has_dedup = true;

[Qemu-devel] [RFC V5 13/62] qcow2: Create qcow2_is_cluster_to_dedup.

2013-01-16 Thread Benoît Canet
Signed-off-by: Benoit Canet --- block/qcow2-cluster.c | 52 + block/qcow2.h |4 2 files changed, 56 insertions(+) diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index 5b1d20d..fedcf57 100644 --- a/block/qcow2-cluster.

[Qemu-devel] [RFC V1 06/14] qcow2: Count QCowHashNode creation metrics.

2013-01-16 Thread Benoît Canet
--- block/qcow2-dedup.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c index 0f095a9..d22e2a4 100644 --- a/block/qcow2-dedup.c +++ b/block/qcow2-dedup.c @@ -289,6 +289,7 @@ static void qcow2_build_and_insert_hash_node(BlockDriverState *bs,

[Qemu-devel] [PATCH 4/8] vl.c: Check for NUMA node limit inside numa_add()

2013-01-16 Thread Eduardo Habkost
Instead of checking the limit before calling numa_add(), check the limit only when we already know we're going to add a new node. Signed-off-by: Eduardo Habkost Reviewed-by: Eric Blake --- Changes v2: - Implement the change without adding numa_node_add() function --- vl.c | 10 ++ 1 fi

[Qemu-devel] [PATCH v2 06/11] virtfs-proxy-helper: Fix unchecked strdup() by conv. to g_strdup()

2013-01-16 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- fsdev/virtfs-proxy-helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c index 6b9afd3..36f6616 100644 --- a/fsdev/virtfs-proxy-helper.c +++ b/fsdev/v

[Qemu-devel] [RFC V5 40/62] qcow2: Collect deduplicated cluster metric.

2013-01-16 Thread Benoît Canet
--- block/qcow2-dedup.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c index e4920d4..716371c 100644 --- a/block/qcow2-dedup.c +++ b/block/qcow2-dedup.c @@ -400,10 +400,14 @@ static int qcow2_deduplicate_cluster(BlockDri

[Qemu-devel] [PATCH v2 11/11] qemu-ga: Fix unchecked strdup() by converting to g_strdup()

2013-01-16 Thread Markus Armbruster
I figure it's freed somewhere deep down in QAPI, with g_free(). Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- qga/commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/commands.c b/qga/commands.c index 7ffb35e..528b082 100644 --- a/qga/commands.c +++

[Qemu-devel] [PATCH v2 09/11] libcacard: Fix unchecked strdup() by converting to g_strdup()

2013-01-16 Thread Markus Armbruster
Note that we already free with g_free(). Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- libcacard/vcard_emul_nss.c | 4 ++-- libcacard/vreader.c| 2 +- libcacard/vscclient.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libcacard/vcard_emul_

[Qemu-devel] [PATCH v2 1/2] qxl: stop using non revision 4 rom fields for revision < 4

2013-01-16 Thread Alon Levy
Signed-off-by: Alon Levy --- hw/qxl.c | 11 +++ trace-events | 2 ++ 2 files changed, 13 insertions(+) diff --git a/hw/qxl.c b/hw/qxl.c index 9dc44b9..0d81816 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -945,6 +945,12 @@ static void interface_set_client_capabilities(QXLInstance *sin,

[Qemu-devel] [RFC V5 14/62] qcow2: Load and save deduplication table header extension.

2013-01-16 Thread Benoît Canet
Signed-off-by: Benoit Canet --- block/qcow2.c | 43 +++ 1 file changed, 43 insertions(+) diff --git a/block/qcow2.c b/block/qcow2.c index 410d3c1..acd3258 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -53,9 +53,18 @@ typedef struct { uint32_t le

[Qemu-devel] [RFC V5 11/36] qcow2: Makes qcow2_alloc_cluster_link_l2 mark to deduplicate clusters.

2013-01-16 Thread Benoît Canet
--- block/qcow2-cluster.c |8 ++-- block/qcow2-dedup.c |7 +++ block/qcow2.h |3 +++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index dbcb6d2..ef91216 100644 --- a/block/qcow2-cluster.c +++ b/block/qco

[Qemu-devel] [PATCH 20/21] vfio-pci: Loosen sanity checks to allow future features

2013-01-16 Thread Michael Roth
From: Alex Williamson VFIO_PCI_NUM_REGIONS and VFIO_PCI_NUM_IRQS should never have been used in this manner as it locks a specific kernel implementation. Future features may introduce new regions or interrupt entries (VGA may add legacy ranges, AER might add an IRQ for error signalling). Fix thi

[Qemu-devel] [RFC V1 12/14] qcow2: Add qcow2_dedup_update_metrics to compute dedup RAM usage.

2013-01-16 Thread Benoît Canet
--- block/qcow2-dedup.c | 13 + block/qcow2.h |1 + 2 files changed, 14 insertions(+) diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c index db23b71..4305746 100644 --- a/block/qcow2-dedup.c +++ b/block/qcow2-dedup.c @@ -1311,3 +1311,16 @@ void qcow2_dedup_close(Bloc

[Qemu-devel] [RFC V5 20/36] qcow2: Drop hash for a given cluster when dedup makes refcount > 2^16/2.

2013-01-16 Thread Benoît Canet
A new physical cluster with the same hash value will be used for further occurence of this hash. --- block/qcow2-dedup.c| 32 block/qcow2-refcount.c |3 +++ block/qcow2.h |4 3 files changed, 39 insertions(+) diff --git a/block/qcow2-de

[Qemu-devel] [RFC V1 08/14] qcow2: Count cluster deleted metric

2013-01-16 Thread Benoît Canet
--- block/qcow2-dedup.c |1 + 1 file changed, 1 insertion(+) diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c index 64e5a13..4a1b184 100644 --- a/block/qcow2-dedup.c +++ b/block/qcow2-dedup.c @@ -991,6 +991,7 @@ void qcow2_dedup_refcount_zero_reached(BlockDriverState *bs, /* remo

[Qemu-devel] [PATCH 17/21] target-xtensa: fix search_pc for the last TB opcode

2013-01-16 Thread Michael Roth
From: Max Filippov Zero out tcg_ctx.gen_opc_instr_start for instructions representing the last guest opcode in the TB. Cc: qemu-sta...@nongnu.org Signed-off-by: Max Filippov Signed-off-by: Blue Swirl (cherry picked from commit 36f25d2537c40c6c47f4abee5d31a24863d1adf7) *modified to use older g

[Qemu-devel] [PULL 0/2] alpha-linux-user patch queue

2013-01-16 Thread Richard Henderson
The following changes since commit 249d41720b7dfbb5951b430b9eefdbee7464f515: qdev: Prepare "realized" property (2013-01-15 18:27:00 -0600) are available in the git repository at: git://github.com/rth7680/qemu.git axp-next for you to fetch changes up to 9468a5d4904223af2c47131f32e3a0555142e4

[Qemu-devel] [PATCH 2/8] vl.c: Fix off-by-one bug when handling "-numa node" argument

2013-01-16 Thread Eduardo Habkost
The numa_add() code was unconditionally adding 1 to the get_opt_name() return value, making it point after the end of the string if no ',' separator is present. Example of weird behavior caused by the bug: $ qemu-img create -f qcow2 this-file-image-has,cpus=5,mem=1000,in-its-name.qcow2 5G Fo

[Qemu-devel] [RFC V5 30/62] qcow2: Add lazy refcounts to deduplication to prevent qcow2_cache_set_dependency loops

2013-01-16 Thread Benoît Canet
Signed-off-by: Benoit Canet --- block/qcow2.c |1 + 1 file changed, 1 insertion(+) diff --git a/block/qcow2.c b/block/qcow2.c index e742e02..7ef9170 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1616,6 +1616,7 @@ static int qcow2_create(const char *filename, QEMUOptionParameter *option

[Qemu-devel] [PATCH v2 12/12] mirror: support arbitrarily-sized iterations

2013-01-16 Thread Paolo Bonzini
Yet another optimization is to extend the mirroring iteration to include more adjacent dirty blocks. This limits the number of I/O operations and makes mirroring efficient even with a small granularity. Most of the infrastructure is already in place; we only need to put a loop around the computat

[Qemu-devel] [RFC V5 26/36] qcow2: Adapt checking of QCOW_OFLAG_COPIED for dedup.

2013-01-16 Thread Benoît Canet
Signed-off-by: Benoit Canet --- block/qcow2-refcount.c |9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 34a6a04..f7a283a 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -1003,7 +1003,14 @@ stat

[Qemu-devel] [RFC V5 03/36] qcow2: Add qcow2_dedup_read_missing_and_concatenate

2013-01-16 Thread Benoît Canet
This function is used to read missing data when unaligned writes are done. This function also concatenate missing data with the given qiov data in order to prepare a buffer used to look for duplicated clusters. Signed-off-by: Benoit Canet --- block/Makefile.objs |1 + block/qcow2-dedup.c |

Re: [Qemu-devel] [PATCH 6/8] vl.c: Use parse_uint_full() for NUMA nodeid

2013-01-16 Thread Eduardo Habkost
On Wed, Jan 16, 2013 at 10:25:31AM -0700, Eric Blake wrote: > On 01/16/2013 08:24 AM, Eduardo Habkost wrote: > > This should catch many kinds of errors that the current code wasn't > > checking for: > > > > - Values that can't be parsed as a number > > - Negative values > > - Overflow > > - Em

[Qemu-devel] [PATCH v2 0/2] fix two revision related errors

2013-01-16 Thread Alon Levy
Regarding orientation setting in windows 7 64 guest: Desktop, right click->Screen resolution - You can choose Orientation: Landscape, Portrait, Landscape (flipped), Portrait (flipped) - You can choose Resolution - You can click "Advanced Settings", then "List All Modes" at the bottom, you get

Re: [Qemu-devel] [Qemu-stable] Patch Round-up for stable 1.3.1, freeze Monday

2013-01-16 Thread mdroth
On Wed, Jan 16, 2013 at 10:12:38PM +0400, Michael Tokarev wrote: > 16.01.2013 20:49, Michael Roth wrote: > >Hi everyone, > > > >The following new patches are queued for QEMU stable v1.3.1: > > > >https://github.com/mdroth/qemu/commits/stable-1.3-staging > > > >The release is planned for 01-25-2013:

[Qemu-devel] [RFC V5 36/36] qcow2: Enable the deduplication feature.

2013-01-16 Thread Benoît Canet
--- block/qcow2.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index bd7579a..753fce0 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -542,6 +542,13 @@ static int qcow2_open(BlockDriverState *bs, int flags) }

  1   2   3   4   5   >