Re: [Qemu-devel] [PATCH 0/4] Fix misuse of atomics in trace/simple.c

2013-02-05 Thread Markus Armbruster
Stefan Hajnoczi writes: > On Fri, Jan 25, 2013 at 04:43:36PM +0100, Markus Armbruster wrote: >> More old news: casting pointers considered harmful, and atomics >> considered hard to use correctly. >> >> Markus Armbruster (4): >> trace: Fix simple trace dropped event record for big endian >>

Re: [Qemu-devel] [PATCH 1/2] qga: add guest-get-time command

2013-02-05 Thread mdroth
On Wed, Jan 30, 2013 at 03:37:25PM +0800, Lei Li wrote: > On 01/29/2013 04:24 AM, Anthony Liguori wrote: > >Eric Blake writes: > > > >>On 01/27/2013 11:14 AM, Lei Li wrote: > >>>Signed-off-by: Lei Li > >>>--- > >>> include/qapi/qmp/qerror.h |3 +++ > >>> qga/commands-posix.c | 30

Re: [Qemu-devel] [Qemu-ppc] [PATCH] Fix circular dependency for HOST_LONG_BITS qemu-common.h <-> bswap.h

2013-02-05 Thread David Gibson
On Tue, Feb 05, 2013 at 11:42:30AM +0100, Andreas Färber wrote: > Am 05.02.2013 01:07, schrieb Peter Maydell: > > On 4 February 2013 23:52, Richard Henderson wrote: > >> On 2013-02-04 15:30, David Gibson wrote: > >>> Anthony, Richard, anyone? > >>> > >>> Please apply - qemu has now been build-brok

[Qemu-devel] [Bug 1075252] Re: qemu-img cannot read VMDK4 file

2013-02-05 Thread Paolo Bonzini
** Changed in: qemu Status: New => Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1075252 Title: qemu-img cannot read VMDK4 file Status in QEMU: Fix Committed Bug descripti

[Qemu-devel] [Bug 1075252] Re: qemu-img cannot read VMDK4 file

2013-02-05 Thread Robert Hubbard
This issue is resolved by 1.3.50 release , this bug should be closed now. ** Changed in: qemu Assignee: (unassigned) => Robert Hubbard (hubbardmeister) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/b

Re: [Qemu-devel] [PATCH for-1.4 0/2] fix migration failure from 1.3 due to SeaBIOS size change

2013-02-05 Thread Anthony Liguori
Michael Roth writes: > Migration from 1.3 currently fails due to a mismatch between the expected size > of 256KB and the received size of 128KB for seabios. This series attempts to > fix the issue by allowing a resize function to be registered to handle > resizing > memory blocks to accomodate t

[Qemu-devel] [ANNOUNCE] Revised 1.4 release schedule (no change in GA)

2013-02-05 Thread Anthony Liguori
Hi, The 1.4 release schedule was a little whacky. There would have been a full week between the last -rc and the final release which doesn't make any sense. I've adjusted the schedule to: 2013-02-06 Tag v1.4.0-rc1 2013-02-13 Tag v1.4.0-rc2 2013-02-15 Tag v1.4.0 Please note that the GA d

[Qemu-devel] [PATCH for-1.4 0/2] fix migration failure from 1.3 due to SeaBIOS size change

2013-02-05 Thread Michael Roth
Migration from 1.3 currently fails due to a mismatch between the expected size of 256KB and the received size of 128KB for seabios. This series attempts to fix the issue by allowing a resize function to be registered to handle resizing memory blocks to accomodate the source's, and using that to re-

Re: [Qemu-devel] [PATCH v3 05/10] slirp: switch to GPollFD

2013-02-05 Thread Laszlo Ersek
comments in-line On 02/04/13 13:12, Stefan Hajnoczi wrote: > Slirp uses rfds/wfds/xfds more extensively than other QEMU components. > > The rarely-used out-of-band TCP data feature is used. That means we > need the full table of select(2) to g_poll(3) events: > > rfds -> G_IO_IN | G_IO_HUP |

[Qemu-devel] [PATCH for-1.4 1/2] savevm: add support for RAMBlock resize handlers

2013-02-05 Thread Michael Roth
This allow users to register resize handlers to be called in cases where a RAMBlock is received over the wire that doesn't match the size of the target's corresponding RAMBlock. The handlers are generally responsible for tearing down and re-initializing corresponding MemoryRegions based on knowledg

[Qemu-devel] [PATCH for-1.4 2/2] pc_sysfw: fix migration for versions <= 1.3 via resizable ROM regions

2013-02-05 Thread Michael Roth
SeaBIOS recently changed in tree from 128KB to 256KB. This causes migration from versions prior to 1.4 to fail due to the corresponding RAMBlock sizes not matching. Relaxing this check is insufficient since it results in a partially overwritten BIOS region that leads to a KVM exception on post-migr

Re: [Qemu-devel] Headsup: windows virtio networking does not work on current git

2013-02-05 Thread Michael S. Tsirkin
On Wed, Feb 06, 2013 at 10:33:41AM +1030, Rusty Russell wrote: > Anthony Liguori writes: > > Rusty Russell writes: > >> If I could find a way, I'd like to create some code as an appendix to > >> the virtio spec which would torture test each driver and/or device by > >> configuring it in strange w

Re: [Qemu-devel] Headsup: windows virtio networking does not work on current git

2013-02-05 Thread Rusty Russell
Anthony Liguori writes: > Rusty Russell writes: >> If I could find a way, I'd like to create some code as an appendix to >> the virtio spec which would torture test each driver and/or device by >> configuring it in strange ways. But that's pure speculation at this >> point. > > It wouldn't be so

[Qemu-devel] [PATCH 2/3] hw/virtio-net.c: set config size using host features

2013-02-05 Thread Jesse Larrew
Currently, the config size for virtio devices is hard coded. When a new feature is added that changes the config size, drivers that assume a static config size will break. For purposes of backward compatibility, there needs to be a way to inform drivers of the config size needed to accommodate the

[Qemu-devel] [PATCH V2 0/3] set config size using available features

2013-02-05 Thread Jesse Larrew
This patch set fixes an issue with virtio Windows drivers when multiqueue is enabled. This is a narrow fix for 1.4, and I intend to generalize the approach for all virtio devices in 1.5. Changes since V1: * Added missing parentheses around the endof() macro definition. * Fixed spelling errors in t

[Qemu-devel] [PATCH 1/3] virtio-net: pass host features to virtio_net_init

2013-02-05 Thread Jesse Larrew
From: Anthony Liguori Signed-off-by: Anthony Liguori --- hw/s390x/s390-virtio-bus.c | 3 ++- hw/s390x/virtio-ccw.c | 3 ++- hw/virtio-net.c| 3 ++- hw/virtio-pci.c| 3 ++- hw/virtio.h| 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --

[Qemu-devel] [PATCH 3/3] hw/virtio-net: disable multiqueue by default

2013-02-05 Thread Jesse Larrew
The new multiqueue feature adds fields to the virtio device config, which breaks Windows guests. Disable the feature by default until the Windows drivers are fixed. Signed-off-by: Jesse Larrew --- hw/virtio-net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio-net.h

[Qemu-devel] [PATCH 1/3] virtio-net: pass host features to virtio_net_init

2013-02-05 Thread Jesse Larrew
From: Anthony Liguori Signed-off-by: Anthony Liguori --- hw/s390x/s390-virtio-bus.c | 3 ++- hw/s390x/virtio-ccw.c | 3 ++- hw/virtio-net.c| 3 ++- hw/virtio-pci.c| 3 ++- hw/virtio.h| 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --

[Qemu-devel] [PATCH for-1.4 10/12] qemu-char: General chardev "memory" code cleanup

2013-02-05 Thread Markus Armbruster
Inline trivial cirmem_chr_is_empty() into its only caller. Rename qemu_chr_cirmem_count() to cirmem_count(). Fast ring buffer index wraparound. Without this, there's no point in restricting size to a power two. qemu_is_chr(chr, "memory") returns *zero* when chr is a memory character device, whi

[Qemu-devel] [PATCH 0/3] set config size using available features

2013-02-05 Thread Jesse Larrew
This patch set fixes an issue with virtio Windows drivers when multiqueue is enabled. This is a narrow fix for 1.4, and I intend to generalize the approach for all virtio devices in 1.5.

Re: [Qemu-devel] [PATCH 2/3] hw/virtio-net.c: set config size using host features

2013-02-05 Thread Eric Blake
On 02/05/2013 03:48 PM, Jesse Larrew wrote: > Currently, the config size for virtio devices is hard coded. When a new > feature is added that changes the config size, drivers that assume a static > config size will break. For purposes of backward compatability, there needs s/compatability/compatib

Re: [Qemu-devel] [PATCH for-1.4 10/12] qemu-char: General chardev "memory" code cleanup

2013-02-05 Thread Eric Blake
On 02/05/2013 09:22 AM, Markus Armbruster wrote: > Inline trivial cirmem_chr_is_empty() into its only caller. > > Rename qemu_chr_cirmem_count() to cirmem_count(). > > Fast ring buffer index wraparound. Without this, there's no point in > restricting size to a power two. > > qemu_is_chr(chr, "m

[Qemu-devel] [PATCH 2/3] hw/virtio-net.c: set config size using host features

2013-02-05 Thread Jesse Larrew
Currently, the config size for virtio devices is hard coded. When a new feature is added that changes the config size, drivers that assume a static config size will break. For purposes of backward compatability, there needs to be a way to inform drivers of the config size needed to accomodate the s

Re: [Qemu-devel] [PATCH for-1.4 12/12] QAPI QMP HMP: Fix and improve memchar-read/-write docs

2013-02-05 Thread Eric Blake
On 02/05/2013 09:22 AM, Markus Armbruster wrote: > In particular, document the impact of our crappy UTF-8 handling on > reading. > > Now the QMP examples even work. > > Signed-off-by: Markus Armbruster > --- > hmp-commands.hx | 20 > qapi-schema.json | 37 +

[Qemu-devel] [PATCH 3/3] hw/virtio-net: disable multiqueue by default

2013-02-05 Thread Jesse Larrew
The new multiqueue feature adds fields to the virtio device config, which breaks Windows guests. Disable the feature by default until the Windows drivers are fixed. Signed-off-by: Jesse Larrew --- hw/virtio-net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio-net.h

Re: [Qemu-devel] [PATCH for-1.4 11/12] qmp: Use generic errors in memchar-read, memchar-write

2013-02-05 Thread Eric Blake
On 02/05/2013 09:22 AM, Markus Armbruster wrote: > From: Markus Armbruster > > New errors should be generic unless there's a real use case for rich > errors. > > Signed-off-by: Markus Armbruster > --- > qapi-schema.json | 2 -- > qemu-char.c | 4 ++-- > 2 files changed, 2 insertions(+), 4

Re: [Qemu-devel] [PATCH for-1.4 09/12] qemu-char: Redo chardev "memory" size configuration

2013-02-05 Thread Eric Blake
On 02/05/2013 09:22 AM, Markus Armbruster wrote: > New device, has never been released, so we can still improve things > without worrying about compatibility: > > * Rename parameter from maxcapacity to size (simple words are good for > you). > > * Clearly mark the parameter as optional in docum

Re: [Qemu-devel] [PATCH for-1.4 08/12] qemu-char: Drop undocumented chardev "memory" compatibility syntax

2013-02-05 Thread Eric Blake
On 02/05/2013 09:22 AM, Markus Armbruster wrote: > This is a new device, so there's no compatibility to maintain, and its > use case isn't common enough to justify shorthand syntax. > > Signed-off-by: Markus Armbruster > --- > qemu-char.c | 5 - > 1 file changed, 5 deletions(-) Reviewed-by:

Re: [Qemu-devel] [PATCH 5/5] qcow2: support compressed clusters in BlockFragInfo

2013-02-05 Thread Eric Blake
On 02/05/2013 11:54 AM, Stefan Hajnoczi wrote: > Signed-off-by: Stefan Hajnoczi > --- > block/qcow2-refcount.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c > index 3d85e99..eb90a37 100644 > --- a/block/qcow2-refcount.c > +++ b/block/qco

Re: [Qemu-devel] [PATCH for-1.4 07/12] qemu-char: Fix chardev "memory" not to drop IAC characters

2013-02-05 Thread Eric Blake
On 02/05/2013 09:22 AM, Markus Armbruster wrote: > Undocumented misfeature, get rid of it while we can. > > Signed-off-by: Markus Armbruster > --- > qemu-char.c | 5 - > 1 file changed, 5 deletions(-) Reviewed-by: Eric Blake > > diff --git a/qemu-char.c b/qemu-char.c > index 0f91ca4..946

Re: [Qemu-devel] [PATCH 4/5] qemu-img: add compressed clusters to BlockFragInfo

2013-02-05 Thread Eric Blake
On 02/05/2013 11:54 AM, Stefan Hajnoczi wrote: > Show how many clusters are compressed. This can be used to monitor how > many compressed clusters remain and whether to recompress the image. > > Suggested-by: Cole Robinson > Signed-off-by: Stefan Hajnoczi > --- > +++ b/qemu-img.c > @@ -471,10

Re: [Qemu-devel] [PATCH 3/5] qemu-img: avoid excessive BlockFragInfo line length

2013-02-05 Thread Eric Blake
On 02/05/2013 11:54 AM, Stefan Hajnoczi wrote: > The qemu-img check printf() statement that shows BlockFragInfo results > is poorly formatted. Introduce a local variable to shorten the lines > and restore proper indentation. > > The next patch adds a field to BlockFragInfo so it is beneficial to

Re: [Qemu-devel] [PATCH for-1.4 06/12] qmp: Drop wasteful zero-initialization in qmp_memchar_read()

2013-02-05 Thread Eric Blake
On 02/05/2013 09:22 AM, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > qemu-char.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org s

Re: [Qemu-devel] [PATCH 00/19] hw/ directory restructuring

2013-02-05 Thread Andreas Färber
Am 05.02.2013 22:15, schrieb Peter Maydell: > On 5 February 2013 20:59, Paolo Bonzini wrote: >> # Devices that require ARMCPU >> obj-y += armv7m.o exynos4210.o pxa2xx.o pxa2xx_gpio.o pxa2xx_pic.o >> obj-y += omap1.o omap2.o > > Ideally some of these could be made to not require ARMCPU at > some p

Re: [Qemu-devel] [PATCH 00/19] hw/ directory restructuring

2013-02-05 Thread Paolo Bonzini
Il 05/02/2013 22:15, Peter Maydell ha scritto: > On 5 February 2013 20:59, Paolo Bonzini wrote: >> FWIW, here is the list of files I have in hw/arm/Makefile.objs with a >> more aggressive approach. > >> # All-in-one devices, perhaps should be refactored >> obj-y += tc6393xb.o > > This isn't ARM

[Qemu-devel] [PATCH v2 10/15] qbus_find_recursive(): push Error and make it terminate a recursive search

2013-02-05 Thread Laszlo Ersek
Push error handling to callers. When a bus is found by name and it has no free slots, that's a fatal error for the recursive search. Clarify the interface contract, and use error propagation to unwind the recursion quickly. Conversion status (call chains covered or substituted by error propagatio

Re: [Qemu-devel] [PATCH 2/5] qcow2: record fragmentation statistics during check

2013-02-05 Thread Eric Blake
On 02/05/2013 11:54 AM, Stefan Hajnoczi wrote: > The qemu-img check command can display fragmentation statistics: > * Total number of clusters in virtual disk > * Number of allocated clusters > * Number of fragmented clusters > > This patch adds fragmentation statistics support to qcow2. > > C

[Qemu-devel] [PATCH v2 04/15] qdev_prop_parse(): push error handling to callers

2013-02-05 Thread Laszlo Ersek
Error consumption is moved from qdev_prop_parse() to its direct callers. Conversion status (call chains covered or substituted by error propagation marked with square brackets): do_device_add -> [qemu_find_opts -> error_report] do_device_add -> qdev_device_add -> qerror_report do_device_add -> qd

[Qemu-devel] [PATCH v2 11/15] qbus_find(): extend signature with Error

2013-02-05 Thread Laszlo Ersek
Signed-off-by: Laszlo Ersek --- hw/qdev-monitor.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c index 4fa64c9..728aa24 100644 --- a/hw/qdev-monitor.c +++ b/hw/qdev-monitor.c @@ -359,7 +359,7 @@ static BusState *qbus_find_recursi

[Qemu-devel] [PATCH v2 14/15] qdev_device_add(): push error handling/consumption to callers

2013-02-05 Thread Laszlo Ersek
Conversion status (call chains covered or substituted by error propagation marked with square brackets): do_device_add -> [qemu_find_opts -> error_report] do_device_add -> [qdev_device_add -> qerror_report] do_device_add -> [qdev_device_add -> qbus_find -> qbus_find_recursive -> qerror_report] d

[Qemu-devel] [PATCH v2 02/15] do_device_add(): look up "device" opts list with qemu_find_opts_err()

2013-02-05 Thread Laszlo Ersek
Conversion status (call chains covered or substituted by error propagation marked with square brackets): do_device_add -> [qemu_find_opts -> error_report] do_device_add -> qdev_device_add -> qerror_report do_device_add -> qdev_device_add -> qbus_find -> qbus_find_recursive -> qerror_report do_de

Re: [Qemu-devel] [PATCH 00/19] hw/ directory restructuring

2013-02-05 Thread Peter Maydell
On 5 February 2013 20:59, Paolo Bonzini wrote: > FWIW, here is the list of files I have in hw/arm/Makefile.objs with a > more aggressive approach. > # All-in-one devices, perhaps should be refactored > obj-y += tc6393xb.o This isn't ARM specific. It's just an I/O controller model. > # Devices t

[Qemu-devel] [PATCH v2 13/15] qdev_device_add(): extend signature with Error

2013-02-05 Thread Laszlo Ersek
Signed-off-by: Laszlo Ersek --- hw/qdev-monitor.h |3 ++- hw/qdev-monitor.c |4 ++-- vl.c |2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/qdev-monitor.h b/hw/qdev-monitor.h index 9ec4850..3760bf5 100644 --- a/hw/qdev-monitor.h +++ b/hw/qdev-monit

[Qemu-devel] [PATCH v2 08/15] qbus_find_recursive(): reorganize

2013-02-05 Thread Laszlo Ersek
Eliminate the "match" variable, and move the remaining locals to the narrowest possible scope. Signed-off-by: Laszlo Ersek --- hw/qdev-monitor.c | 35 --- 1 files changed, 16 insertions(+), 19 deletions(-) diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c inde

[Qemu-devel] [PATCH v2 06/15] set_property(): extend signature with Error

2013-02-05 Thread Laszlo Ersek
Signed-off-by: Laszlo Ersek --- hw/qdev-monitor.c | 21 - 1 files changed, 16 insertions(+), 5 deletions(-) diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c index cf96046..545e66c 100644 --- a/hw/qdev-monitor.c +++ b/hw/qdev-monitor.c @@ -100,9 +100,14 @@ static void qde

[Qemu-devel] [PATCH v2 01/15] remove some trailing whitespace

2013-02-05 Thread Laszlo Ersek
Signed-off-by: Laszlo Ersek --- hw/qdev-monitor.c |2 +- vl.c |8 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c index 4f9a6eb..56d66c3 100644 --- a/hw/qdev-monitor.c +++ b/hw/qdev-monitor.c @@ -490,7 +490,7 @@ D

[Qemu-devel] [PATCH v2 09/15] qbus_find_recursive(): extend signature with Error

2013-02-05 Thread Laszlo Ersek
Signed-off-by: Laszlo Ersek --- hw/qdev-monitor.c |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c index 64359ee..0a0bced 100644 --- a/hw/qdev-monitor.c +++ b/hw/qdev-monitor.c @@ -289,7 +289,7 @@ static DeviceState *qbus_find

Re: [Qemu-devel] [PATCH 5/5] target-i386: fix kvm_default_features overwriting kvm_arch_get_supported_cpuid()

2013-02-05 Thread Eduardo Habkost
On Tue, Feb 05, 2013 at 08:47:29PM +0100, Igor Mammedov wrote: > On Tue, 5 Feb 2013 17:04:26 -0200 > Eduardo Habkost wrote: > > > On Tue, Feb 05, 2013 at 07:46:09PM +0100, Igor Mammedov wrote: > > > On Tue, 5 Feb 2013 15:53:04 -0200 > > > Eduardo Habkost wrote: > > > > > > > On Tue, Feb 05, 201

[Qemu-devel] [PATCH v2 03/15] qdev_prop_parse(): extend signature with Error

2013-02-05 Thread Laszlo Ersek
Error handling is not changed yet. Signed-off-by: Laszlo Ersek --- hw/qdev-properties.h |4 +++- hw/qdev-monitor.c|2 +- hw/qdev-properties.c |5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/qdev-properties.h b/hw/qdev-properties.h index 20c67f3..0fe403

[Qemu-devel] [PATCH v2 05/15] qdev_prop_parse(): change return type to void

2013-02-05 Thread Laszlo Ersek
Problems are now reported via Error only. Signed-off-by: Laszlo Ersek --- hw/qdev-properties.h |4 ++-- hw/qdev-monitor.c|3 ++- hw/qdev-properties.c | 14 ++ 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/hw/qdev-properties.h b/hw/qdev-properties.h in

Re: [Qemu-devel] [PATCH 1/5] qcow2: introduce check_refcounts_l1/l2() flags

2013-02-05 Thread Eric Blake
On 02/05/2013 11:54 AM, Stefan Hajnoczi wrote: > The check_refcounts_l1/l2() functions have a check_copied argument to > check that the QCOW_O_COPIED flag is consistent with refcount == 1. > This should be a bool, not an int. > > However, the next patch introduces qcow2 fragmentation statistics an

[Qemu-devel] [PATCH v2 07/15] set_property(): push error handling to callers

2013-02-05 Thread Laszlo Ersek
The return type can't be changed to void, because "set_property" must have type "qemu_opt_loopfunc". Conversion status (call chains covered or substituted by error propagation marked with square brackets): do_device_add -> [qemu_find_opts -> error_report] do_device_add -> qdev_device_add -> qerro

Re: [Qemu-devel] [PATCH 00/19] hw/ directory restructuring

2013-02-05 Thread Paolo Bonzini
Il 05/02/2013 15:17, Paolo Bonzini ha scritto: We could have a "hw/socks" directory for devices which are pure >> > containers :-) >> > I'd surely prefer hw/socs/ over hw/socks/ ;) but my point is why would >> > we want to mix arm and sh4 SoCs (with a clear dependency on $arch) >> > rathe

Re: [Qemu-devel] [PATCH 1/4] trace: Fix simple trace dropped event record for big endian

2013-02-05 Thread Stefan Hajnoczi
On Thu, Jan 31, 2013 at 12:18:52PM +0100, Laszlo Ersek wrote: > BTW I wonder if trace files are endianness-dependent by design -- > normally you'd store them in network byte order (= big endian) only and > use htonX() when writing, an ntohX() when reading. Yes, they are host endian but the magic n

[Qemu-devel] [PATCH v2 15/15] qdev_device_add(): beautify "driver not found" error message

2013-02-05 Thread Laszlo Ersek
Signed-off-by: Laszlo Ersek --- hw/qdev-monitor.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c index 47b8e13..20c1cbe 100644 --- a/hw/qdev-monitor.c +++ b/hw/qdev-monitor.c @@ -480,7 +480,7 @@ DeviceState *qdev_device_add(QemuOpt

Re: [Qemu-devel] [PATCH 0/4] Fix misuse of atomics in trace/simple.c

2013-02-05 Thread Stefan Hajnoczi
On Fri, Jan 25, 2013 at 04:43:36PM +0100, Markus Armbruster wrote: > More old news: casting pointers considered harmful, and atomics > considered hard to use correctly. > > Markus Armbruster (4): > trace: Fix simple trace dropped event record for big endian > trace: Direct access of atomics is

Re: [Qemu-devel] [PATCH v3 04/10] slirp: slirp/slirp.c coding style cleanup

2013-02-05 Thread Laszlo Ersek
On 02/04/13 13:12, Stefan Hajnoczi wrote: > The slirp glue code uses tabs in some places. Since the next patch will > modify the file, convert tabs to spaces and fix checkpatch.pl issues. > > Signed-off-by: Stefan Hajnoczi > --- > slirp/slirp.c | 608 > ++---

Re: [Qemu-devel] [PATCH for-1.4 05/12] qmp: Drop superfluous special case "empty" in qmp_memchar_read()

2013-02-05 Thread Eric Blake
On 02/05/2013 09:22 AM, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > qemu-char.c | 4 > 1 file changed, 4 deletions(-) Reviewed-by: Eric Blake > > diff --git a/qemu-char.c b/qemu-char.c > index 9bf53e0..036ca2c 100644 > --- a/qemu-char.c > +++ b/qemu-char.c > @@ -2

Re: [Qemu-devel] [PATCH for-1.4 04/12] qmp: Plug memory leaks in memchar-write, memchar-read

2013-02-05 Thread Eric Blake
On 02/05/2013 09:22 AM, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > qemu-char.c | 5 + > 1 file changed, 5 insertions(+) Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc

Re: [Qemu-devel] [PATCH v2 for-1.4] tests/test-string-input-visitor: Handle errors provoked by fuzz test

2013-02-05 Thread Andreas Färber
Am 05.02.2013 21:44, schrieb Peter Maydell: > It's OK and expected for visitors to return errors when presented with > the fuzz test's random data. Since the fuzzer doesn't care about > errors, we pass in NULL rather than an Error**. This fixes a bug in > the fuzzer where it was passing the same Er

[Qemu-devel] [PATCH v2 for-1.4] tests/test-string-input-visitor: Handle errors provoked by fuzz test

2013-02-05 Thread Peter Maydell
It's OK and expected for visitors to return errors when presented with the fuzz test's random data. Since the fuzzer doesn't care about errors, we pass in NULL rather than an Error**. This fixes a bug in the fuzzer where it was passing the same Error** into each visitor, with the effect that once o

[Qemu-devel] [PATCH v2 12/15] qbus_find(): propagate error handling / consumption to callers

2013-02-05 Thread Laszlo Ersek
Conversion status (call chains covered or substituted by error propagation marked with square brackets): do_device_add -> [qemu_find_opts -> error_report] do_device_add -> qdev_device_add -> qerror_report do_device_add -> qdev_device_add -> [qbus_find -> qbus_find_recursive -> qerror_report] do_

[Qemu-devel] [PATCH v2 00/15] propagate Errors to do_device_add()

2013-02-05 Thread Laszlo Ersek
In v2, I'm mostly attempting to address Luiz's comments for v1: - (rebase to b22dd124,) - return "void" from a converted function if retval used to communicate error/success only, - rebase error check from retval to returned Error wherever possible, - formulate interface contract of qbus_find_re

Re: [Qemu-devel] [PATCH for-1.4] linux-user: Restore cast to target type in get_user()

2013-02-05 Thread Peter Maydell
Ping as a for-1.4 patch with reviews. patchwork url: http://patchwork.ozlabs.org/patch/217186/ Blue, Anthony: could one of you apply this, please? thanks -- PMM On 31 January 2013 12:50, Peter Maydell wrote: > Commit 658f2dc97 accidentally dropped the cast to the target type of > the value load

[Qemu-devel] [PATCH for-1.4 11/12] qmp: Use generic errors in memchar-read, memchar-write

2013-02-05 Thread Markus Armbruster
From: Markus Armbruster New errors should be generic unless there's a real use case for rich errors. Signed-off-by: Markus Armbruster --- qapi-schema.json | 2 -- qemu-char.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/qapi-schema.json b/qapi-schema.json index

Re: [Qemu-devel] [PATCH 5/5] target-i386: fix kvm_default_features overwriting kvm_arch_get_supported_cpuid()

2013-02-05 Thread Igor Mammedov
On Tue, 5 Feb 2013 17:04:26 -0200 Eduardo Habkost wrote: > On Tue, Feb 05, 2013 at 07:46:09PM +0100, Igor Mammedov wrote: > > On Tue, 5 Feb 2013 15:53:04 -0200 > > Eduardo Habkost wrote: > > > > > On Tue, Feb 05, 2013 at 05:39:24PM +0100, Igor Mammedov wrote: > > > > ORing kvm_default_features

Re: [Qemu-devel] [PATCH for-1.4 01/12] qmp: Fix design bug and read beyond buffer in memchar-write

2013-02-05 Thread Eric Blake
On 02/05/2013 09:22 AM, Markus Armbruster wrote: > Command memchar-write takes data and size parameter. Begs the > question what happens when data doesn't match size. > > With format base64, qmp_memchar_write() copies the full data argument, > regardless of size argument. > > With format utf8, q

[Qemu-devel] [PATCH 1/5] target-i386: Move cpu_x86_init()

2013-02-05 Thread Igor Mammedov
From: Andreas Färber Consolidate CPU functions in cpu.c. Allows to make cpu_x86_register() static. No functional changes. Signed-off-by: Andreas Färber --- target-i386/cpu.c| 26 +- target-i386/cpu.h|1 - target-i386/helper.c | 24 --

[Qemu-devel] [PATCH for-1.4 12/12] QAPI QMP HMP: Fix and improve memchar-read/-write docs

2013-02-05 Thread Markus Armbruster
In particular, document the impact of our crappy UTF-8 handling on reading. Now the QMP examples even work. Signed-off-by: Markus Armbruster --- hmp-commands.hx | 20 qapi-schema.json | 37 +++-- qemu-char.c | 7 +++ qmp-commands.h

[Qemu-devel] [PATCH qom-cpu-next v4 0/5] target-i386: X86CPU subclasses

2013-02-05 Thread Igor Mammedov
It was noticed that in theory a QOM class enumeration could lead to the host CPU class_init running before kvm_init(). But currently such enumeration happens only on '-cpu ?' and it doesn't print neither 'host' cpu nor dumps each cpu_model vendor value. If we ever would need to print 'host' name on

Re: [Qemu-devel] [PATCH 3/7] qdev_prop_parse(): report errors via Error

2013-02-05 Thread Laszlo Ersek
On 02/05/13 13:20, Luiz Capitulino wrote: > On Tue, 05 Feb 2013 01:31:14 +0100 > Laszlo Ersek wrote: > >> On 02/04/13 18:27, Luiz Capitulino wrote: >>> >>> I usually split this kind of patch the following way: >>> >>> 1. add an Error ** argument to the function reporting the error. Callers >>>

[Qemu-devel] [PATCH 3/5] qemu-img: avoid excessive BlockFragInfo line length

2013-02-05 Thread Stefan Hajnoczi
The qemu-img check printf() statement that shows BlockFragInfo results is poorly formatted. Introduce a local variable to shorten the lines and restore proper indentation. The next patch adds a field to BlockFragInfo so it is beneficial to straighten out this code before modifying it. Signed-off

[Qemu-devel] [PATCH 2/5] qcow2: record fragmentation statistics during check

2013-02-05 Thread Stefan Hajnoczi
The qemu-img check command can display fragmentation statistics: * Total number of clusters in virtual disk * Number of allocated clusters * Number of fragmented clusters This patch adds fragmentation statistics support to qcow2. Compressed and normal clusters count as allocated. Zero cluster

[Qemu-devel] [PATCH 2/5] target-i386: Split command line parsing out of cpu_x86_register()

2013-02-05 Thread Igor Mammedov
From: Andreas Färber In order to instantiate a CPU subtype we will need to know which type, so move the cpu_model splitting into cpu_x86_init(). Parameters need to be set on the X86CPU instance, so move cpu_x86_parse_featurestr() into cpu_x86_init() as well. This leaves cpu_x86_register() opera

[Qemu-devel] [PATCH for-1.4 00/12] Fix memchar-read/-write before API gets released

2013-02-05 Thread Markus Armbruster
We have a serious design bug in memchar-write [PATCH 01], and a less serious one in memchar-read [PATCH 02]. I really, really want them fixed before the API gets calcified by the release. While there, plug memory leaks [PATCH 04], drop undocumented misfeatures [PATCH 07+08+11], improve device con

Re: [Qemu-devel] [PATCH 5/5] target-i386: fix kvm_default_features overwriting kvm_arch_get_supported_cpuid()

2013-02-05 Thread Eduardo Habkost
On Tue, Feb 05, 2013 at 07:46:09PM +0100, Igor Mammedov wrote: > On Tue, 5 Feb 2013 15:53:04 -0200 > Eduardo Habkost wrote: > > > On Tue, Feb 05, 2013 at 05:39:24PM +0100, Igor Mammedov wrote: > > > ORing kvm_default_features to def->kvm_features might set unsupported > > > bits if kvm_arch_get_s

Re: [Qemu-devel] [PATCH] check-qjson: More thorough testing of UTF-8 in strings

2013-02-05 Thread Markus Kuhn
On 05/02/13 07:39, Markus Armbruster wrote: Blue Swirl writes: On Mon, Feb 4, 2013 at 5:19 PM, Markus Armbruster wrote: Test cases are scraped from Markus Kuhn's UTF-8 decoder capability and stress test at http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt There's no license. Can w

[Qemu-devel] [PATCH for-1.4 08/12] qemu-char: Drop undocumented chardev "memory" compatibility syntax

2013-02-05 Thread Markus Armbruster
This is a new device, so there's no compatibility to maintain, and its use case isn't common enough to justify shorthand syntax. Signed-off-by: Markus Armbruster --- qemu-char.c | 5 - 1 file changed, 5 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 9460a9d..ab011c6 100644 --- a/

[Qemu-devel] [PATCH 0/5] qcow2: add fragmentation and compression info support

2013-02-05 Thread Stefan Hajnoczi
This series adds fragmentation info support to qcow2 and then adds compression info. Previously only QED supported fragmentation info. Note that fragmentation info only covers the current image, internal snapshots are not included. The new BlockFragInfo.compressed field contains the number of co

[Qemu-devel] [PATCH 1/5] qcow2: introduce check_refcounts_l1/l2() flags

2013-02-05 Thread Stefan Hajnoczi
The check_refcounts_l1/l2() functions have a check_copied argument to check that the QCOW_O_COPIED flag is consistent with refcount == 1. This should be a bool, not an int. However, the next patch introduces qcow2 fragmentation statistics and also needs to pass an option to check_refcounts_l1/l2()

[Qemu-devel] [PATCH for-1.4 06/12] qmp: Drop wasteful zero-initialization in qmp_memchar_read()

2013-02-05 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qemu-char.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qemu-char.c b/qemu-char.c index 036ca2c..0f91ca4 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2819,7 +2819,7 @@ char *qmp_memchar_read(const char *device, int64_t size,

[Qemu-devel] [PATCH 5/5] qcow2: support compressed clusters in BlockFragInfo

2013-02-05 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi --- block/qcow2-refcount.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 3d85e99..eb90a37 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -968,6 +968,7 @@ static int check_refcounts_l2(B

[Qemu-devel] [PATCH 4/5] qemu-img: add compressed clusters to BlockFragInfo

2013-02-05 Thread Stefan Hajnoczi
Show how many clusters are compressed. This can be used to monitor how many compressed clusters remain and whether to recompress the image. Suggested-by: Cole Robinson Signed-off-by: Stefan Hajnoczi --- include/block/block.h| 1 + qemu-img.c | 5 +++-- tests/qemu-iote

[Qemu-devel] [PATCH] e1000: fix link down handling with auto negotiation

2013-02-05 Thread Michael S. Tsirkin
Fixes a couple of regression bugs introduced by b9d03e352cb6b31a66545763f6a1e20c9abf0c2c and related to auto-negotiation: - Auto-negotiation currently sets link up even if it was forced down from the monitor. - If Auto-negotiation was in progress during migration, link will never come u

Re: [Qemu-devel] [PATCH 5/5] target-i386: fix kvm_default_features overwriting kvm_arch_get_supported_cpuid()

2013-02-05 Thread Igor Mammedov
On Tue, 5 Feb 2013 15:53:04 -0200 Eduardo Habkost wrote: > On Tue, Feb 05, 2013 at 05:39:24PM +0100, Igor Mammedov wrote: > > ORing kvm_default_features to def->kvm_features might set unsupported > > bits if kvm_arch_get_supported_cpuid() returns less bits set than in > > kvm_default_features. Fi

Re: [Qemu-devel] [PATCH V3 0/8] Generalize MDIO framework

2013-02-05 Thread Edgar E. Iglesias
On Sat, Feb 02, 2013 at 11:40:01PM +, Grant Likely wrote: > Hi Edgar, > > Here is one more version of this patch set. I've addressed as many > comments as I could. There is more work to be done, particularly in > moving to the common GPIO api, but that work can be done as a follow on > patch s

[Qemu-devel] [PATCH for-1.4 04/12] qmp: Plug memory leaks in memchar-write, memchar-read

2013-02-05 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qemu-char.c | 5 + 1 file changed, 5 insertions(+) diff --git a/qemu-char.c b/qemu-char.c index 892d5bb..9bf53e0 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2782,6 +2782,10 @@ void qmp_memchar_write(const char *device, const char *data, ret =

[Qemu-devel] [PATCH for-1.4 03/12] qmp: Clean up type usage in qmp_memchar_write(), qmp_memchar_read()

2013-02-05 Thread Markus Armbruster
Const-correctness, consistently use standard C types instead of mixing them with GLib types. Signed-off-by: Markus Armbruster --- qemu-char.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 6de8aff..892d5bb 100644 --- a/qemu-char.c +++ b/

Re: [Qemu-devel] [PATCH for-1.4 01/12] qmp: Fix design bug and read beyond buffer in memchar-write

2013-02-05 Thread Markus Armbruster
Eric Blake writes: > On 02/05/2013 09:22 AM, Markus Armbruster wrote: >> Command memchar-write takes data and size parameter. Begs the >> question what happens when data doesn't match size. >> >> With format base64, qmp_memchar_write() copies the full data argument, >> regardless of size argume

Re: [Qemu-devel] [PATCH 5/5] target-i386: fix kvm_default_features overwriting kvm_arch_get_supported_cpuid()

2013-02-05 Thread Eduardo Habkost
On Tue, Feb 05, 2013 at 05:39:24PM +0100, Igor Mammedov wrote: > ORing kvm_default_features to def->kvm_features might set unsupported > bits if kvm_arch_get_supported_cpuid() returns less bits set than in > kvm_default_features. Fix it by removing kvm_default_features and using > only what kvm_arc

Re: [Qemu-devel] [PATCH for-1.4 02/12] qmp: Clean up design of memchar-read

2013-02-05 Thread Markus Armbruster
Eric Blake writes: > On 02/05/2013 09:22 AM, Markus Armbruster wrote: >> The data returned has a well-defined size, which makes the size >> returned along with it redundant at best. Drop it. >> >> Signed-off-by: Markus Armbruster >> --- >> hmp.c| 11 --- >> qapi-schema.jso

Re: [Qemu-devel] [PATCH for-1.4] libi2c-omap: Fix endianness dependency

2013-02-05 Thread Andreas Färber
Am 05.02.2013 17:58, schrieb Anthony Liguori: > Andreas Färber writes: > >> memread(s->addr + OMAP_I2C_DATA, &data, 2); >> >> -memread(s->addr + OMAP_I2C_STAT, &stat, 2); >> +omap_i2c_read16(s->addr + OMAP_I2C_STAT, &stat); >> if (unlikely(len == 1)) { >> -

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

2013-02-05 Thread Luigi Rizzo
In the current implementation of qemu, running without a network backend will cause the queue to grow unbounded when the guest is transmitting traffic. This patch fixes the problem by implementing bounded size NetQueue, used with an arbitrary limit of 1 packets, and dropping packets when the q

Re: [Qemu-devel] [PATCH 2/7] do_device_add(): look up "device" opts list with qemu_find_opts_err()

2013-02-05 Thread Laszlo Ersek
On 02/05/13 09:45, Paolo Bonzini wrote: > Il 05/02/2013 01:04, Laszlo Ersek ha scritto: list = qemu_find_opts_err("device", &local_err); if (error_is_set(&local_err)) { /* handle error */ } opts = qemu_opts_from_qdict(..., &local_err); if (error_is_set(&local_e

Re: [Qemu-devel] [PATCH V2 3/4] blockdev: Allow snapshoting of protocols.

2013-02-05 Thread Kevin Wolf
Am 29.01.2013 17:24, schrieb Eric Blake: > On 01/29/2013 07:27 AM, Benoît Canet wrote: >>> base1 [file] --- base1 [qcow2] --- snap1.qcow2 --\ >>> base2 [file] --- base2 [qcow2] --- snap2.qcow2 --->-- quorum >>> base3 [file] --- base3 [qcow2] --- snap3.qcow2 --/ > > For that matter, I think it woul

Re: [Qemu-devel] [PATCH for-1.4 03/12] qmp: Clean up type usage in qmp_memchar_write(), qmp_memchar_read()

2013-02-05 Thread Eric Blake
On 02/05/2013 09:22 AM, Markus Armbruster wrote: > Const-correctness, consistently use standard C types instead of mixing > them with GLib types. > > Signed-off-by: Markus Armbruster > --- > qemu-char.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Eric Blake --

Re: [Qemu-devel] [PATCH for-1.4 02/12] qmp: Clean up design of memchar-read

2013-02-05 Thread Eric Blake
On 02/05/2013 09:22 AM, Markus Armbruster wrote: > The data returned has a well-defined size, which makes the size > returned along with it redundant at best. Drop it. > > Signed-off-by: Markus Armbruster > --- > hmp.c| 11 --- > qapi-schema.json | 18 ++ > q

[Qemu-devel] [PATCH 3/5] target-i386: Slim conversion to X86CPU subclasses

2013-02-05 Thread Igor Mammedov
From: Andreas Färber Move x86_def_t definition to header and embed into X86CPUClass. Register types per built-in model definition. Move version initialization from x86_cpudef_setup() to class_init. Inline cpu_x86_register() into the X86CPU initfn. Since instance_init cannot reports errors, drop

[Qemu-devel] [PATCH for-1.4 01/12] qmp: Fix design bug and read beyond buffer in memchar-write

2013-02-05 Thread Markus Armbruster
Command memchar-write takes data and size parameter. Begs the question what happens when data doesn't match size. With format base64, qmp_memchar_write() copies the full data argument, regardless of size argument. With format utf8, qmp_memchar_write() copies size bytes from data, happily reading

[Qemu-devel] [PATCH for-1.4 02/12] qmp: Clean up design of memchar-read

2013-02-05 Thread Markus Armbruster
The data returned has a well-defined size, which makes the size returned along with it redundant at best. Drop it. Signed-off-by: Markus Armbruster --- hmp.c| 11 --- qapi-schema.json | 18 ++ qemu-char.c | 21 + qmp-commands.hx | 2

  1   2   >