Re: [Qemu-devel] [PATCH] w32: Fix build with older gcc (unresolved symbol)

2013-05-10 Thread Stefan Weil
Am 10.05.2013 22:14, schrieb Igor Mitsyanko: > On 29.03.2013 21:20, Stefan Weil wrote: >> The cross i586-mingw32msvc-gcc 4.4.4 from Debian Squeeze does not >> support >> __sync_val_compare_and_swap by default. >> >> Using -march=i686 fixes that and should also result in better code. >> >> Signed-of

Re: [Qemu-devel] [PATCH 20/40] pci: use memory core for iommu support

2013-05-10 Thread liu ping fan
On Wed, May 8, 2013 at 2:30 AM, Peter Maydell wrote: > On 7 May 2013 15:16, Paolo Bonzini wrote: >> From: Avi Kivity >> >> Use the new iommu support in the memory core for iommu support. The only >> user, spapr, is also converted, but it still provides a DMAContext >> interface until the non-PC

Re: [Qemu-devel] [PATCH v2 2/3] block: add block-backup QMP command

2013-05-10 Thread Eric Blake
On 04/29/2013 01:42 AM, Stefan Hajnoczi wrote: > @block-backup > > +++ b/qapi-schema.json > @@ -1715,6 +1715,37 @@ > '*speed': 'int' } } > > ## > +# @block-backup > +# > +# Start a point-in-time copy of a block device to a new destination. The > +# status of ongoing block backup o

Re: [Qemu-devel] [PATCH v2 2/3] block: add block-backup QMP command

2013-05-10 Thread Eric Blake
On 05/08/2013 06:49 AM, Kevin Wolf wrote: > Am 29.04.2013 um 09:42 hat Stefan Hajnoczi geschrieben: >> @block-backup >> > drive-backup would probably be a more consistent naming. We would then > still have block-backup for a future low-level command that doesn't > create everything by itself but t

Re: [Qemu-devel] [PATCH v4] Add 'maxqdepth' as an option to tty character devices.

2013-05-10 Thread Eric Blake
On 05/07/2013 04:39 PM, John Baboval wrote: > From: "John V. Baboval" > > This parameter will cause writes to tty backed chardevs to return > -EAGAIN if the backing tty has buffered more than the specified > number of characters. When data is sent, the TIOCOUTQ ioctl is invoked > to determine the

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Anthony Liguori
Paolo Bonzini writes: > Il 10/05/2013 19:41, Anthony Liguori ha scritto: >> Paolo Bonzini writes: >> >>> Il 10/05/2013 16:39, Anthony Liguori ha scritto: I just oppose the notion of disabling casts and *especially* only disabling casts for official builds. >>> >>> This actually happen

Re: [Qemu-devel] [PATCH for-1.5] qom: optimize casting to leaf class and parent class

2013-05-10 Thread Anthony Liguori
Aurelien Jarno writes: > On Fri, May 10, 2013 at 01:47:55PM -0500, Anthony Liguori wrote: >> Most QOM types use type_register_static but we still strdup the >> passed data. However, the original pointers are useful because >> GCC is pretty good about collapsing strings so its very likely any >>

[Qemu-devel] [PATCH 11/11] qapi: add native list coverage for QMP input visitor tests

2013-05-10 Thread Michael Roth
This exercises schema-generated visitors for native list types and does some sanity checking on validity of deserialized data. Signed-off-by: Michael Roth --- tests/test-qmp-input-visitor.c | 338 1 file changed, 338 insertions(+) diff --git a/tests/tes

[Qemu-devel] [PATCH 09/11] qapi: add native list coverage for visitor serialization tests

2013-05-10 Thread Michael Roth
Signed-off-by: Michael Roth --- tests/test-visitor-serialization.c | 451 ++-- 1 file changed, 433 insertions(+), 18 deletions(-) diff --git a/tests/test-visitor-serialization.c b/tests/test-visitor-serialization.c index fed6810..ee7916b 100644 --- a/tests/test-

[Qemu-devel] [PATCH 10/11] qapi: add native list coverage for QMP output visitor tests

2013-05-10 Thread Michael Roth
This exercises schema-generated visitors for native list types and does some sanity checking on validity of serialized data. Signed-off-by: Michael Roth --- qapi-schema-test.json | 15 ++ tests/test-qmp-output-visitor.c | 332 +++ 2 files changed,

[Qemu-devel] [PATCH 08/11] qapi: fix visitor serialization tests for numbers/doubles

2013-05-10 Thread Michael Roth
We never actually stored the stringified double values into the strings before we did the comparisons. This left number/double values completely uncovered in test-visitor-serialization tests. Fixing this exposed a bug in our handling of large whole number values in QEMU's JSON parser which is now

[Qemu-devel] [PATCH 06/11] json-parser: fix handling of large whole number values

2013-05-10 Thread Michael Roth
Currently our JSON parser assumes that numbers lacking a fractional value are integers and attempts to store them as QInt/int64 values. This breaks in the case where the number overflows/underflows int64 values (which is still valid JSON) Fix this by detecting such cases and using a QFloat to stor

[Qemu-devel] [PATCH 07/11] qapi: add QMP input test for large integers

2013-05-10 Thread Michael Roth
Large integers previously got capped to LLONG_MAX/LLONG_MIN so we could store them as int64_t. This could lead to silent errors occuring. Now, we use a double to handle these cases. Add a test to confirm that QMPInputVisitor handles this as expected if we're expected an integer value: errors for

[Qemu-devel] [PATCH 03/11] qapi: qapi-visit.py, native list support

2013-05-10 Thread Michael Roth
Teach visitor generators about native types so they can generate the appropriate visitor routines. Signed-off-by: Michael Roth --- scripts/qapi-visit.py | 34 +- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/scripts/qapi-visit.py b/scripts/qapi-

[Qemu-devel] [PATCH 05/11] qapi: fix leak in unit tests

2013-05-10 Thread Michael Roth
qmp_output_get_qobject() increments the qobject's reference count. Since we currently pass this straight into qobject_to_json() so we can feed the data into a QMP input visitor, we never actually free the underlying qobject when qmp_output_visitor_cleanup() is called. This causes leaks on all of th

[Qemu-devel] [PATCH 04/11] qapi: enable generation of native list code

2013-05-10 Thread Michael Roth
Also, fix a dependency issue with libqemuutil: qemu-sockets.c needs qapi-types.c/qapi-visit.c Signed-off-by: Michael Roth --- Makefile |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 7dc0204..9695c9d 100644 --- a/Makefile +++ b/Makefile @@ -

[Qemu-devel] [PATCH 02/11] qapi: qapi-visit.py, fix list handling for union types

2013-05-10 Thread Michael Roth
Currently we assume non-list types when generating visitor routines for union types. This is broken, since values like ['Type'] need to mapped to 'TypeList'. We already have a type_name() function to handle this that we use for generating struct visitors, so use that here as well. Signed-off-by:

[Qemu-devel] [PATCH 01/11] qapi: qapi-types.py, native list support

2013-05-10 Thread Michael Roth
Teach type generators about native types so they can generate the appropriate linked list types. Signed-off-by: Michael Roth --- scripts/qapi-types.py | 45 ++--- scripts/qapi.py | 23 +++ 2 files changed, 65 insertions(+), 3

[Qemu-devel] [PATCH v3 00/11] qapi: add support for lists of native types

2013-05-10 Thread Michael Roth
These patches apply on top of qemu.git master, and can also be obtained from: git://github.com/mdroth/qemu.git qapi-native-lists Sending this now since a number of series have popped up in the past that wanted this, and Amos has some pending patches (query-mac-tables) that rely on this as well. T

Re: [Qemu-devel] [PATCH 04/10] qapi: enable generation of native list code

2013-05-10 Thread mdroth
On Fri, May 10, 2013 at 11:32:48AM -0500, mdroth wrote: > On Fri, May 10, 2013 at 10:10:03AM -0400, Luiz Capitulino wrote: > > On Thu, 9 May 2013 21:20:56 -0500 > > Michael Roth wrote: > > > > > Also, fix a dependency issue with libqemuutil: qemu-sockets.c needs > > > qapi-types.c/qapi-visit.c >

Re: [Qemu-devel] [PATCH for-1.5] qom: optimize casting to leaf class and parent class

2013-05-10 Thread Aurelien Jarno
On Fri, May 10, 2013 at 01:47:55PM -0500, Anthony Liguori wrote: > Most QOM types use type_register_static but we still strdup the > passed data. However, the original pointers are useful because > GCC is pretty good about collapsing strings so its very likely any > use of the pointer will end up

[Qemu-devel] [PATCH for-1.5] isapc: Fix non-KVM qemu boot (read/write memory for isapc BIOS)

2013-05-10 Thread Jordan Justen
The isapc machine with seabios currently requires the BIOS region to be read/write memory rather than read-only memory. KVM currently cannot support the BIOS as a ROM region, but qemu in non-KVM mode can. Based on this, isapc machine currently only works with KVM. To work-around this isapc issue,

Re: [Qemu-devel] VFIO VGA test branches

2013-05-10 Thread Alex Williamson
On Fri, 2013-05-10 at 14:31 -0700, Justin Gottula wrote: > Hi, > > The kernel won't compile with CONFIG_HOTPLUG_PCI=m: > > drivers/pci/hotplug/pci_hotplug_core.c:548:5: error: redefinition of > ‘pci_hp_reset_slot’ > int pci_hp_reset_slot(struct hotplug_slot *hotplug, int probe) > ^ > In fil

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Paolo Bonzini
Il 10/05/2013 19:41, Anthony Liguori ha scritto: > Paolo Bonzini writes: > >> Il 10/05/2013 16:39, Anthony Liguori ha scritto: >>> I just oppose the notion of disabling casts and *especially* only >>> disabling casts for official builds. >> >> This actually happens all the time. Exactly this kin

Re: [Qemu-devel] [PATCH] w32: Fix build with older gcc (unresolved symbol)

2013-05-10 Thread Igor Mitsyanko
On 29.03.2013 21:20, Stefan Weil wrote: The cross i586-mingw32msvc-gcc 4.4.4 from Debian Squeeze does not support __sync_val_compare_and_swap by default. Using -march=i686 fixes that and should also result in better code. Signed-off-by: Stefan Weil --- Maybe this modification is also needed f

Re: [Qemu-devel] [PATCH v2 0/2] qga umask fix addenda

2013-05-10 Thread mdroth
On Fri, May 10, 2013 at 09:53:27PM +0200, Laszlo Ersek wrote: > On 05/10/13 21:30, mdroth wrote: > > On Wed, May 08, 2013 at 05:31:34PM +0200, Laszlo Ersek wrote: > >> I should have paid more attention to portability and error path cleanup > >> in the CVE-2013-2007 fix. > >> > >> (We continue to as

[Qemu-devel] [PATCH V2] osdep.h: include sys/types.h for ssize_t definition

2013-05-10 Thread Igor Mitsyanko
sys/types.h is taken out from "ifdef __OpenBSD__" guard. It should be safe for other systems, according to following survey: http://hacks.owlfolio.org/header-survey/ This fixes build for CONFIG_IOVEC-less systems (mingw). Signed-off-by: Igor Mitsyanko --- include/qemu/osdep.h | 2 +- 1 file cha

Re: [Qemu-devel] [PATCH v2 0/2] qga umask fix addenda

2013-05-10 Thread Laszlo Ersek
On 05/10/13 21:30, mdroth wrote: > On Wed, May 08, 2013 at 05:31:34PM +0200, Laszlo Ersek wrote: >> I should have paid more attention to portability and error path cleanup >> in the CVE-2013-2007 fix. >> >> (We continue to assume, like the rest of qemu code, that >> qemu_set_cloexec() never fails i

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Anthony Liguori
Aurelien Jarno writes: > On Fri, May 10, 2013 at 12:41:07PM -0500, Anthony Liguori wrote: >> Paolo Bonzini writes: >> >> > Il 10/05/2013 16:39, Anthony Liguori ha scritto: >> >> I just oppose the notion of disabling casts and *especially* only >> >> disabling casts for official builds. >> > >>

Re: [Qemu-devel] [PATCH v2 0/2] qga umask fix addenda

2013-05-10 Thread mdroth
On Wed, May 08, 2013 at 05:31:34PM +0200, Laszlo Ersek wrote: > I should have paid more attention to portability and error path cleanup > in the CVE-2013-2007 fix. > > (We continue to assume, like the rest of qemu code, that > qemu_set_cloexec() never fails internally. This should be a reasonable

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Aurelien Jarno
On Fri, May 10, 2013 at 12:41:07PM -0500, Anthony Liguori wrote: > Paolo Bonzini writes: > > > Il 10/05/2013 16:39, Anthony Liguori ha scritto: > >> I just oppose the notion of disabling casts and *especially* only > >> disabling casts for official builds. > > > > This actually happens all the ti

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Anthony Liguori
Aurelien Jarno writes: > On Fri, May 10, 2013 at 02:16:34PM +0200, Paolo Bonzini wrote: >> Cast debugging can have a substantial cost (20% or more, measured by >> Aurelien on qemu-system-ppc64). Instead of adding special-cased "fast >> casts" in the hot paths, we can just disable it in releases.

[Qemu-devel] [PATCH for-1.5] qom: optimize casting to leaf class and parent class

2013-05-10 Thread Anthony Liguori
Most QOM types use type_register_static but we still strdup the passed data. However, the original pointers are useful because GCC is pretty good about collapsing strings so its very likely any use of the pointer will end up being that same address. IOW, with a little trickery, we can compare typ

[Qemu-devel] [PATCH] 9p: Be robust against paths without FS_IOC_GETVERSION

2013-05-10 Thread Gabriel de Perthuis
9P optionally uses the FS_IOC_GETVERSION ioctl to get information about a file's version (sometimes called generation number). The code checks for supported filesystems at mount time, but some paths may come from other mounted filesystems. Change it to treat unsupported paths the same as unsuppor

Re: [Qemu-devel] [PATCH for-1.5 8/9] qom: simplify object_class_dynamic_cast, part 1

2013-05-10 Thread Anthony Liguori
Paolo Bonzini writes: > Access everything from the class. > > Signed-off-by: Paolo Bonzini > --- > qom/object.c | 8 +++- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/qom/object.c b/qom/object.c > index f5f416b..f82f12c 100644 > --- a/qom/object.c > +++ b/qom/object.c

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Anthony Liguori
Paolo Bonzini writes: > Il 10/05/2013 16:39, Anthony Liguori ha scritto: >> I just oppose the notion of disabling casts and *especially* only >> disabling casts for official builds. > > This actually happens all the time. Exactly this kind of type-safe cast > is disabled in releases of GCC, but

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Paolo Bonzini
Il 10/05/2013 18:18, Andreas Färber ha scritto: > Am 10.05.2013 17:56, schrieb Aurelien Jarno: >> To improve the performance a bit more, and come back to the same kind of >> code as before, we should move simple accessors from qom/*.c to >> include/qom/*.h and mark them as inline, so that they can

Re: [Qemu-devel] [PATCH for-1.5?] target-ppc: Drop unnecessary dynamic cast in ppc_env_get_cpu()

2013-05-10 Thread Andreas Färber
Am 10.05.2013 18:20, schrieb Peter Maydell: > On 10 May 2013 17:14, Andreas Färber wrote: >> Personally I wouldn't oppose dropping these checks for release builds as >> proposed by Paolo in his series; for me, the value of POWERPC_CPU() is >> being closer to an OO cast than any container_of()-styl

Re: [Qemu-devel] [PATCH 04/10] qapi: enable generation of native list code

2013-05-10 Thread mdroth
On Fri, May 10, 2013 at 10:10:03AM -0400, Luiz Capitulino wrote: > On Thu, 9 May 2013 21:20:56 -0500 > Michael Roth wrote: > > > Also, fix a dependency issue with libqemuutil: qemu-sockets.c needs > > qapi-types.c/qapi-visit.c > > > > Signed-off-by: Michael Roth > > --- > > Makefile |6 ++

Re: [Qemu-devel] [PATCH for-1.5?] target-ppc: Drop unnecessary dynamic cast in ppc_env_get_cpu()

2013-05-10 Thread Peter Maydell
On 10 May 2013 17:14, Andreas Färber wrote: > Personally I wouldn't oppose dropping these checks for release builds as > proposed by Paolo in his series; for me, the value of POWERPC_CPU() is > being closer to an OO cast than any container_of()-style expressions. > > But I can also see Anthony's p

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Andreas Färber
Am 10.05.2013 17:56, schrieb Aurelien Jarno: > To improve the performance a bit more, and come back to the same kind of > code as before, we should move simple accessors from qom/*.c to > include/qom/*.h and mark them as inline, so that they can be removed by > the compiler. Currently, even if the

Re: [Qemu-devel] [PATCH for-1.5?] target-ppc: Drop unnecessary dynamic cast in ppc_env_get_cpu()

2013-05-10 Thread Andreas Färber
Am 10.05.2013 17:32, schrieb Alexander Graf: > > On 10.05.2013, at 17:23, Andreas Färber wrote: > >> Am 10.05.2013 17:06, schrieb Anthony Liguori: >>> Andreas Färber writes: >>> A transition from CPUPPCState to PowerPCCPU can be considered safe, just like PowerPCCPU::env access in the

[Qemu-devel] [RFC 7/7] pl181.c: convert to async IO SD card interface

2013-05-10 Thread Igor Mitsyanko
Signed-off-by: Igor Mitsyanko --- hw/sd/pl181.c | 302 +- 1 file changed, 192 insertions(+), 110 deletions(-) diff --git a/hw/sd/pl181.c b/hw/sd/pl181.c index 2caacc2..a8a3510 100644 --- a/hw/sd/pl181.c +++ b/hw/sd/pl181.c @@ -20,7 +20,7 @@

[Qemu-devel] [RFC 5/7] sd.c: introduce async read operation

2013-05-10 Thread Igor Mitsyanko
It will only be used if start bit and databusy callbacks were initialized by user of SD card model. Signed-off-by: Igor Mitsyanko --- hw/sd/sd.c | 85 -- 1 file changed, 77 insertions(+), 8 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/

[Qemu-devel] [RFC 6/7] sd.c: introduce async write interface

2013-05-10 Thread Igor Mitsyanko
Signed-off-by: Igor Mitsyanko --- hw/sd/sd.c | 145 - 1 file changed, 133 insertions(+), 12 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 659ec56..615ab61 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -958,6 +958,11 @@ static sd

[Qemu-devel] [RFC 4/7] sd.c: use callbacks as a flag to use async IO

2013-05-10 Thread Igor Mitsyanko
This is temporary to distinguish between sync and async users. Signed-off-by: Igor Mitsyanko --- hw/sd/sd.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 2e75201..a0bbbaa 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -530,6 +530,10 @@ void sd_set_cb(SDState

[Qemu-devel] [RFC 1/7] sd.c: introduce AIO related members in SD state

2013-05-10 Thread Igor Mitsyanko
New state members will be used for async IO implementation later. Signed-off-by: Igor Mitsyanko --- hw/sd/sd.c | 13 + 1 file changed, 13 insertions(+) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 2e0ef3e..1dd1331 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -112,6 +112,10 @@ struct SD

[Qemu-devel] [RFC 3/7] sd.c: introduce "start bit" and "busy deasserted" callbacks

2013-05-10 Thread Igor Mitsyanko
Start bit callback models arrival of first bit of data on card's DAT line. Busy deasserted callback models releasing of DAT0 line by card when it transitions from a programming state to a writing data state. Both of them will be used for async IO later. Signed-off-by: Igor Mitsyanko --- hw/sd/

[Qemu-devel] [RFC 2/7] sd.c: introduce variable for trekking valid data

2013-05-10 Thread Igor Mitsyanko
Initialize it appropriately when various commands are processed. Signed-off-by: Igor Mitsyanko --- hw/sd/sd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 1dd1331..775a55c 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -116,6 +116,7 @@ struct SDState { QEMU

[Qemu-devel] [RFC 0/7] Convert SD card model to AIO

2013-05-10 Thread Igor Mitsyanko
This is an initial attempt to change our SD card model to use asynchronious input/output API instead of synchronious one. This will require converting of every user also. Right now I've converted only PL181 model, and I'll wait for some feedback on taken approach before I'll continue with other use

Re: [Qemu-devel] [PATCH 06/10] json-parser: fix handling of large whole number values

2013-05-10 Thread mdroth
On Fri, May 10, 2013 at 11:17:17AM -0400, Luiz Capitulino wrote: > On Thu, 9 May 2013 21:20:58 -0500 > Michael Roth wrote: > > > Currently our JSON parser assumes that numbers lacking a mantissa are > > integers and attempts to store them as QInt/int64 values. This breaks in > > the case where t

Re: [Qemu-devel] [PATCH v2 00/10] qapi: add support for lists of native types

2013-05-10 Thread Laszlo Ersek
On 05/10/13 17:30, Luiz Capitulino wrote: > On Thu, 9 May 2013 21:20:52 -0500 > Michael Roth wrote: > >> These patches apply on top of qemu.git master, and can also be obtained from: >> git://github.com/mdroth/qemu.git qapi-native-lists >> >> Sending this now since a number of series have popped

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Aurelien Jarno
On Fri, May 10, 2013 at 02:16:34PM +0200, Paolo Bonzini wrote: > Cast debugging can have a substantial cost (20% or more, measured by > Aurelien on qemu-system-ppc64). Instead of adding special-cased "fast > casts" in the hot paths, we can just disable it in releases. At the > same time, add trac

Re: [Qemu-devel] [PATCH 01/10] qapi: qapi-types.py, native list support

2013-05-10 Thread mdroth
On Fri, May 10, 2013 at 10:07:45AM -0400, Luiz Capitulino wrote: > On Thu, 9 May 2013 21:20:53 -0500 > Michael Roth wrote: > > > Teach type generators about native types so they can generate the > > appropriate linked list types. > > > > Signed-off-by: Michael Roth > > --- > > scripts/qapi-ty

Re: [Qemu-devel] [PATCH for-1.5?] target-ppc: Drop unnecessary dynamic cast in ppc_env_get_cpu()

2013-05-10 Thread Andreas Färber
[resending after bounce] Am 10.05.2013 17:06, schrieb Anthony Liguori: > Andreas Färber writes: > >> A transition from CPUPPCState to PowerPCCPU can be considered safe, >> just like PowerPCCPU::env access in the opposite direction. >> >> This should slightly improve interrupt performance. >> >>

[Qemu-devel] [Bug 1175513] Re: Qemu 1.5-git gpu clock control doesn`t work after guest reboot

2013-05-10 Thread commiethebeastie
And all work after killing qemu with ^C. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1175513 Title: Qemu 1.5-git gpu clock control doesn`t work after guest reboot Status in The Linux Kernel: N

Re: [Qemu-devel] [PATCH 0/2] pci-assign: MSI affinity support

2013-05-10 Thread Alex Williamson
On Fri, 2013-05-10 at 14:40 +0200, Jan Kiszka wrote: > On 2013-05-09 18:35, Alex Williamson wrote: > > I posted these about 6 months ago and Jan felt we should implement > > MSI notifiers like we have for MSI-X. That still hasn't happened. > > Device assignments are the only currently known users

Re: [Qemu-devel] [PATCH v2 00/10] qapi: add support for lists of native types

2013-05-10 Thread Luiz Capitulino
On Fri, 10 May 2013 17:40:20 +0200 Laszlo Ersek wrote: > On 05/10/13 17:30, Luiz Capitulino wrote: > > On Thu, 9 May 2013 21:20:52 -0500 > > Michael Roth wrote: > > > >> These patches apply on top of qemu.git master, and can also be obtained > >> from: > >> git://github.com/mdroth/qemu.git qa

Re: [Qemu-devel] [PATCH] osdep.h: include sys/types.h for ssize_t definition

2013-05-10 Thread Igor Mitsyanko
On 05/10/2013 07:24 PM, Peter Maydell wrote: On 10 May 2013 16:16, Igor Mitsyanko wrote: This fixes build for mingw32 Signed-off-by: Igor Mitsyanko --- include/qemu/osdep.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 42545bc..1794

[Qemu-devel] [PATCH V2 0/2] Fix memory migration for exynos 4210 SoC

2013-05-10 Thread Igor Mitsyanko
Fix issues in exynos4210 code which were blocking proper memory migration. V1->V2 PATCH1 now doesn't use memory_region_init_ram_ptr at all. Instead, it converts chipid memory to an mmio region. PATCH3 is dropped until hard freeze is over. It better be sent separately anyway. Igor Mitsyanko (2):

[Qemu-devel] [PATCH V2 2/2] exynos4210.c: register rom_mem for memory migration

2013-05-10 Thread Igor Mitsyanko
From: Igor Mitsyanko Even if we do not register newly created RAM MemoryRegion for migration with vmstate_register_ram_global() function, ram_save_setup() still saves this region to snapshot file with empty idstr=="". Consequently this results in error during VM loading in ram_load(). Register ro

[Qemu-devel] [PATCH V2 1/2] hw/arm/exynos4210.c: convert chipid_and_omr to an mmio region

2013-05-10 Thread Igor Mitsyanko
From: Igor Mitsyanko Exynos SoC was misusing memory_region_init_ram_ptr(): this interface can safely be used only for memory regions which size is a multiple of target page size. Change chipid_and_omr memory to an mmio region to fix this. Signed-off-by: Igor Mitsyanko --- hw/arm/exynos4210.c |

Re: [Qemu-devel] [PATCH v2 00/10] qapi: add support for lists of native types

2013-05-10 Thread Luiz Capitulino
On Thu, 9 May 2013 21:20:52 -0500 Michael Roth wrote: > These patches apply on top of qemu.git master, and can also be obtained from: > git://github.com/mdroth/qemu.git qapi-native-lists > > Sending this now since a number of series have popped up in the past that > wanted this, and Amos has so

Re: [Qemu-devel] [PATCH] osdep.h: include sys/types.h for ssize_t definition

2013-05-10 Thread Peter Maydell
On 10 May 2013 16:16, Igor Mitsyanko wrote: > This fixes build for mingw32 > > Signed-off-by: Igor Mitsyanko > --- > include/qemu/osdep.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h > index 42545bc..17946a3 100644 > --- a/include/qemu/os

Re: [Qemu-devel] [PATCH 06/10] json-parser: fix handling of large whole number values

2013-05-10 Thread Luiz Capitulino
On Thu, 9 May 2013 21:20:58 -0500 Michael Roth wrote: > Currently our JSON parser assumes that numbers lacking a mantissa are > integers and attempts to store them as QInt/int64 values. This breaks in > the case where the number overflows/underflows int64 values (which is > still valid JSON) An

[Qemu-devel] [PATCH] osdep.h: include sys/types.h for ssize_t definition

2013-05-10 Thread Igor Mitsyanko
This fixes build for mingw32 Signed-off-by: Igor Mitsyanko --- include/qemu/osdep.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 42545bc..17946a3 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -163,6 +163,8 @@ int qemu_c

Re: [Qemu-devel] [PATCH 05/10] qapi: fix leak in unit tests

2013-05-10 Thread Luiz Capitulino
On Thu, 9 May 2013 21:20:57 -0500 Michael Roth wrote: > qmp_output_get_qobject() increments the qobject's reference count. Since > we currently pass this straight into qobject_to_json() so we can feed > the data into a QMP input visitor, we never actually free the underlying > qobject when qmp_o

Re: [Qemu-devel] CPU scheduling with TCG in SMP system emulation mode

2013-05-10 Thread Sebastian Huber
On 02/22/2013 01:46 AM, Max Filippov wrote: Hello. Do I understand it right that there's no dedicated mechanism other than icount that would switch current CPU in emulated SMP system and that in the absence of icount such scheduling is a side effect of interrupt delivery to the current CPU? I

Re: [Qemu-devel] [RFC PATCH v5 3/3] Force auto-convegence of live migration

2013-05-10 Thread Anthony Liguori
Chegu Vinod writes: > On 5/10/2013 6:07 AM, Anthony Liguori wrote: >> Chegu Vinod writes: >> >>> If a user chooses to turn on the auto-converge migration capability >>> these changes detect the lack of convergence and throttle down the >>> guest. i.e. force the VCPUs out of the guest for s

Re: [Qemu-devel] [PATCH for-1.5?] target-ppc: Drop unnecessary dynamic cast in ppc_env_get_cpu()

2013-05-10 Thread Paolo Bonzini
Il 10/05/2013 17:06, Anthony Liguori ha scritto: > Andreas Färber writes: > >> A transition from CPUPPCState to PowerPCCPU can be considered safe, >> just like PowerPCCPU::env access in the opposite direction. >> >> This should slightly improve interrupt performance. >> >> Reported-by: Anthony Li

Re: [Qemu-devel] [RFC PATCH v5 3/3] Force auto-convegence of live migration

2013-05-10 Thread Anthony Liguori
"Daniel P. Berrange" writes: > On Fri, May 10, 2013 at 08:07:51AM -0500, Anthony Liguori wrote: >> Chegu Vinod writes: >> >> > If a user chooses to turn on the auto-converge migration capability >> > these changes detect the lack of convergence and throttle down the >> > guest. i.e. force th

Re: [Qemu-devel] [PATCH for-1.5?] target-ppc: Drop unnecessary dynamic cast in ppc_env_get_cpu()

2013-05-10 Thread Paolo Bonzini
Il 10/05/2013 16:47, Andreas Färber ha scritto: > Am 10.05.2013 16:42, schrieb Peter Maydell: >> On 10 May 2013 15:39, Andreas Färber wrote: >>> A transition from CPUPPCState to PowerPCCPU can be considered safe, >>> just like PowerPCCPU::env access in the opposite direction. >>> >>> This should s

Re: [Qemu-devel] [PATCH for-1.5?] target-ppc: Drop unnecessary dynamic cast in ppc_env_get_cpu()

2013-05-10 Thread Anthony Liguori
Andreas Färber writes: > A transition from CPUPPCState to PowerPCCPU can be considered safe, > just like PowerPCCPU::env access in the opposite direction. > > This should slightly improve interrupt performance. > > Reported-by: Anthony Liguori > Signed-off-by: Andreas Färber Another option wou

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Andreas Färber
Am 10.05.2013 16:46, schrieb Aurelien Jarno: > We have changed a pointer access in a hot path (and more are likely to > come as far as I know) to a complex function. The correct way to fix > that is to remove the complex function. FWIW I had started to investigate whether I can tweak TCG to use CP

Re: [Qemu-devel] [PATCH for-1.5?] target-ppc: Drop unnecessary dynamic cast in ppc_env_get_cpu()

2013-05-10 Thread Anthony Liguori
Peter Maydell writes: > On 10 May 2013 15:39, Andreas Färber wrote: >> A transition from CPUPPCState to PowerPCCPU can be considered safe, >> just like PowerPCCPU::env access in the opposite direction. >> >> This should slightly improve interrupt performance. > >> static inline PowerPCCPU *ppc_

[Qemu-devel] [PATCH] ui/gtk.c: do not use gdk_display_warp_pointer when GTK ver >3.0

2013-05-10 Thread Igor Mitsyanko
Commit 9697f5d2d38e5dd1e64e8e0d64436e6d44e7b1fe "gtk: custom cursor support" introduced unconditional usage of gdk_display_warp_pointer(). This function is marked as deprecated since GTK-3.0, and triggers warning (error with -Werror) during compilation. Conditionally change gdk_display_warp_pointer

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Paolo Bonzini
Il 10/05/2013 16:39, Anthony Liguori ha scritto: > I just oppose the notion of disabling casts and *especially* only > disabling casts for official builds. This actually happens all the time. Exactly this kind of type-safe cast is disabled in releases of GCC, but enabled when building from svn tr

Re: [Qemu-devel] [PATCH 06/10] json-parser: fix handling of large whole number values

2013-05-10 Thread mdroth
On Fri, May 10, 2013 at 08:08:05AM -0600, Eric Blake wrote: > On 05/10/2013 06:47 AM, Laszlo Ersek wrote: > > > The pre-patch code for JSON_INTEGER: > > > > obj = QOBJECT(qint_from_int(strtoll(token_get_value(token), NULL, 10))); > > > > doesn't check for errors at all. (I assume that JSON_INTEG

Re: [Qemu-devel] [PATCH for-1.5?] target-ppc: Drop unnecessary dynamic cast in ppc_env_get_cpu()

2013-05-10 Thread Andreas Färber
Am 10.05.2013 16:42, schrieb Peter Maydell: > On 10 May 2013 15:39, Andreas Färber wrote: >> A transition from CPUPPCState to PowerPCCPU can be considered safe, >> just like PowerPCCPU::env access in the opposite direction. >> >> This should slightly improve interrupt performance. > >> static in

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Aurelien Jarno
On Fri, May 10, 2013 at 09:27:28AM -0500, Anthony Liguori wrote: > Paolo Bonzini writes: > > > Il 10/05/2013 15:01, Anthony Liguori ha scritto: > >> Paolo Bonzini writes: > >> > >>> Cast debugging can have a substantial cost (20% or more, measured by > >>> Aurelien on qemu-system-ppc64). > >>

Re: [Qemu-devel] [PATCH for-1.5?] target-ppc: Drop unnecessary dynamic cast in ppc_env_get_cpu()

2013-05-10 Thread Peter Maydell
On 10 May 2013 15:39, Andreas Färber wrote: > A transition from CPUPPCState to PowerPCCPU can be considered safe, > just like PowerPCCPU::env access in the opposite direction. > > This should slightly improve interrupt performance. > static inline PowerPCCPU *ppc_env_get_cpu(CPUPPCState *env) >

Re: [Qemu-devel] [PATCH for-1.5] Revert "pc: Kill the "use flash device for BIOS unless KVM" misfeature"

2013-05-10 Thread Anthony Liguori
Paolo Bonzini writes: > This reverts commit 9953f8822cc316eec9962f0a2858c3439a80adec. > While Markus's analysis is entirely correct, there are 1.6 patches > that fix the bug for real and without requiring machine type hacks. > Let's think of the children who will have to read this code, and > avo

[Qemu-devel] [PATCH for-1.5?] target-ppc: Drop unnecessary dynamic cast in ppc_env_get_cpu()

2013-05-10 Thread Andreas Färber
A transition from CPUPPCState to PowerPCCPU can be considered safe, just like PowerPCCPU::env access in the opposite direction. This should slightly improve interrupt performance. Reported-by: Anthony Liguori Signed-off-by: Andreas Färber --- target-ppc/cpu-qom.h | 2 +- 1 file changed, 1 inse

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Anthony Liguori
Paolo Bonzini writes: > Il 10/05/2013 15:23, Andreas Färber ha scritto: >> Am 10.05.2013 15:08, schrieb Paolo Bonzini: >>> Il 10/05/2013 15:01, Anthony Liguori ha scritto: I'd prefer not to disable but instead focus on improving performance. >>> >>> For 1.5? This is a regression in 1.5 due

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Anthony Liguori
Paolo Bonzini writes: > Il 10/05/2013 15:01, Anthony Liguori ha scritto: >> Paolo Bonzini writes: >> >>> Cast debugging can have a substantial cost (20% or more, measured by >>> Aurelien on qemu-system-ppc64). >> >> [Needs citation] > > Sure: http://permalink.gmane.org/gmane.comp.emulators.qem

Re: [Qemu-devel] [RFC PATCH v5 2/3] Add 'auto-converge' migration capability

2013-05-10 Thread Eric Blake
On 05/10/2013 01:43 AM, Paolo Bonzini wrote: >> +++ b/qapi-schema.json >> @@ -602,10 +602,13 @@ >> # This feature allows us to minimize migration traffic for certain >> work >> # loads, by sending compressed difference of the pages >> # >> +# @auto-converge: Migration supports

Re: [Qemu-devel] [PATCH 04/10] qapi: enable generation of native list code

2013-05-10 Thread Luiz Capitulino
On Thu, 9 May 2013 21:20:56 -0500 Michael Roth wrote: > Also, fix a dependency issue with libqemuutil: qemu-sockets.c needs > qapi-types.c/qapi-visit.c > > Signed-off-by: Michael Roth > --- > Makefile |6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/Makefile

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Aurelien Jarno
On Fri, May 10, 2013 at 03:30:17PM +0200, Paolo Bonzini wrote: > Il 10/05/2013 15:23, Andreas Färber ha scritto: > > Am 10.05.2013 15:08, schrieb Paolo Bonzini: > >> Il 10/05/2013 15:01, Anthony Liguori ha scritto: > >>> I'd prefer not to disable but instead focus on improving performance. > >> > >

Re: [Qemu-devel] Profiling sparc64 emulation

2013-05-10 Thread Anthony Liguori
Paolo Bonzini writes: > Il 09/05/2013 20:30, Aurelien Jarno ha scritto: >> 13,16% libglib-2.0.so.0.3200.4 [.] g_hash_table_lookup >> 8,18% libglib-2.0.so.0.3200.4 [.] g_str_hash >> 2,47% qemu-system-ppc64[.] object_class_dynamic_cast >> 1,97% qemu-system-ppc64[.] type

Re: [Qemu-devel] [RFC PATCH v5 3/3] Force auto-convegence of live migration

2013-05-10 Thread Daniel P. Berrange
On Fri, May 10, 2013 at 08:07:51AM -0500, Anthony Liguori wrote: > Chegu Vinod writes: > > > If a user chooses to turn on the auto-converge migration capability > > these changes detect the lack of convergence and throttle down the > > guest. i.e. force the VCPUs out of the guest for some dura

Re: [Qemu-devel] [RFC PATCH v5 3/3] Force auto-convegence of live migration

2013-05-10 Thread Chegu Vinod
On 5/10/2013 6:07 AM, Anthony Liguori wrote: Chegu Vinod writes: If a user chooses to turn on the auto-converge migration capability these changes detect the lack of convergence and throttle down the guest. i.e. force the VCPUs out of the guest for some duration and let the migration t

Re: [Qemu-devel] [PATCH 06/10] json-parser: fix handling of large whole number values

2013-05-10 Thread Eric Blake
On 05/10/2013 06:47 AM, Laszlo Ersek wrote: > The pre-patch code for JSON_INTEGER: > > obj = QOBJECT(qint_from_int(strtoll(token_get_value(token), NULL, 10))); > > doesn't check for errors at all. (I assume that JSON_INTEGER is selected > by the parser, token_get_type(), based on syntax purely.)

Re: [Qemu-devel] [PATCH 01/10] qapi: qapi-types.py, native list support

2013-05-10 Thread Luiz Capitulino
On Thu, 9 May 2013 21:20:53 -0500 Michael Roth wrote: > Teach type generators about native types so they can generate the > appropriate linked list types. > > Signed-off-by: Michael Roth > --- > scripts/qapi-types.py | 43 --- > scripts/qapi.py

Re: [Qemu-devel] [PATCH 20/40] pci: use memory core for iommu support

2013-05-10 Thread Paolo Bonzini
Il 10/05/2013 15:07, Alexey Kardashevskiy ha scritto: >> @@ -2234,10 +2239,12 @@ static void pci_device_class_init(ObjectClass >> *klass, void *data) >> k->props = pci_props; >> } >> >> -void pci_setup_iommu(PCIBus *bus, PCIDMAContextFunc fn, void *opaque) >> +void pci_setup_iommu(PCIBus *

Re: [Qemu-devel] [PATCH 06/10] json-parser: fix handling of large whole number values

2013-05-10 Thread mdroth
On Fri, May 10, 2013 at 02:47:18PM +0200, Laszlo Ersek wrote: > On 05/10/13 14:22, Eric Blake wrote: > > On 05/09/2013 08:20 PM, Michael Roth wrote: > >> Currently our JSON parser assumes that numbers lacking a mantissa are > >> integers and attempts to store them as QInt/int64 values. This breaks

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Paolo Bonzini
Il 10/05/2013 15:23, Andreas Färber ha scritto: > Am 10.05.2013 15:08, schrieb Paolo Bonzini: >> Il 10/05/2013 15:01, Anthony Liguori ha scritto: >>> I'd prefer not to disable but instead focus on improving performance. >> >> For 1.5? This is a regression in 1.5 due to more and more usage of >> fo

Re: [Qemu-devel] [PATCH v2 0/2] qga umask fix addenda

2013-05-10 Thread Luiz Capitulino
On Wed, 8 May 2013 17:31:34 +0200 Laszlo Ersek wrote: > I should have paid more attention to portability and error path cleanup > in the CVE-2013-2007 fix. > > (We continue to assume, like the rest of qemu code, that > qemu_set_cloexec() never fails internally. This should be a reasonable > ass

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Andreas Färber
Am 10.05.2013 15:08, schrieb Paolo Bonzini: > Il 10/05/2013 15:01, Anthony Liguori ha scritto: >> I'd prefer not to disable but instead focus on improving performance. > > For 1.5? This is a regression in 1.5 due to more and more usage of > foo_env_on_cpu. If CPUs were the only reason, we could

Re: [Qemu-devel] [PATCH 20/40] pci: use memory core for iommu support

2013-05-10 Thread Alexey Kardashevskiy
On 05/08/2013 12:16 AM, Paolo Bonzini wrote: > From: Avi Kivity > > Use the new iommu support in the memory core for iommu support. The only > user, spapr, is also converted, but it still provides a DMAContext > interface until the non-PCI bits switch to AddressSpace. > > Cc: Michael S. Tsirkin

Re: [Qemu-devel] [PATCH for-1.5 0/9] Disable expensive QOM cast debugging for official releases

2013-05-10 Thread Paolo Bonzini
Il 10/05/2013 15:01, Anthony Liguori ha scritto: > Paolo Bonzini writes: > >> Cast debugging can have a substantial cost (20% or more, measured by >> Aurelien on qemu-system-ppc64). > > [Needs citation] Sure: http://permalink.gmane.org/gmane.comp.emulators.qemu/210830 49,73% perf-10672.map

  1   2   >