Re: [Qemu-devel] [PATCH v2 1/1] parallels: add format spec

2015-11-26 Thread Stefan Hajnoczi
On Mon, Nov 23, 2015 at 04:32:37PM +0300, Denis V. Lunev wrote: > From: Vladimir Sementsov-Ogievskiy > > This specifies Parallels image format as implemented in Parallels Cloud > Server 6.10 > > Signed-off-by: Vladimir Sementsov-Ogievskiy > Signed-off-by: Denis V. Lunev > CC: Eric Blake > CC:

Re: [Qemu-devel] [PATCH v3 for-2.5 05/12] qjson: Give each of the six structural chars its own token type

2015-11-26 Thread Markus Armbruster
Eric Blake writes: > On 11/25/2015 02:23 PM, Markus Armbruster wrote: >> Simplifies things, because we always check for a specific one. >> >> Signed-off-by: Markus Armbruster >> --- >> include/qapi/qmp/json-lexer.h | 7 ++- >> qobject/json-lexer.c | 19 --- >> qob

Re: [Qemu-devel] [PATCH v3 for-2.5 06/12] qjson: Inline token_is_keyword() and simplify

2015-11-26 Thread Markus Armbruster
Eric Blake writes: > On 11/25/2015 02:23 PM, Markus Armbruster wrote: >> Signed-off-by: Markus Armbruster >> --- >> qobject/json-parser.c | 20 +++- >> 1 file changed, 7 insertions(+), 13 deletions(-) >> > >> >> -if (token_is_keyword(token, "true")) { >> +val = token_

Re: [Qemu-devel] [PATCH v3 for-2.5 07/12] qjson: Inline token_is_escape() and simplify

2015-11-26 Thread Markus Armbruster
Eric Blake writes: > On 11/25/2015 02:23 PM, Markus Armbruster wrote: >> Signed-off-by: Markus Armbruster >> --- >> qobject/json-parser.c | 32 +++- >> 1 file changed, 15 insertions(+), 17 deletions(-) >> > >> +if (!strcmp(val, "%p")) { >> obj = va_arg(

Re: [Qemu-devel] [PATCH v1 0/7] KVM: Hyper-V SynIC timers

2015-11-26 Thread Andrey Smetanin
On 11/26/2015 08:28 AM, Wanpeng Li wrote: 2015-11-25 23:20 GMT+08:00 Andrey Smetanin : Per Hyper-V specification (and as required by Hyper-V-aware guests), SynIC provides 4 per-vCPU timers. Each timer is programmed via a pair of MSRs, and signals expiration by delivering a special format mess

Re: [Qemu-devel] [PATCH v3 for-2.5 09/12] qjson: Convert to parser to recursive descent

2015-11-26 Thread Markus Armbruster
Eric Blake writes: > On 11/25/2015 02:23 PM, Markus Armbruster wrote: >> We backtrack in parse_value(), even though JSON is LL(1) and thus can >> be parsed by straightforward recursive descent. Do exactly that. >> >> Based on an almost-correct patch from Paolo Bonzini. >> >> Signed-off-by: Mar

Re: [Qemu-devel] [PATCH for-2.5] Avoid memory leak

2015-11-26 Thread stefano
On 2015/11/26 11:43, Eric Blake wrote: > On 11/25/2015 06:30 PM, dongxingshui wrote: >> monitor.c: Avoid memory leak >> >> When send a wrong qmp command, a memory leak occurs. Fix it. > > Looks like the leak was introduced in 710aec9; would be worth amending > the commit message to mention that.

Re: [Qemu-devel] [PATCH for-2.5] Avoid memory leak

2015-11-26 Thread Markus Armbruster
stefano writes: > On 2015/11/26 11:43, Eric Blake wrote: >> On 11/25/2015 06:30 PM, dongxingshui wrote: >>> monitor.c: Avoid memory leak >>> >>> When send a wrong qmp command, a memory leak occurs. Fix it. >> >> Looks like the leak was introduced in 710aec9; would be worth amending >> the commit

Re: [Qemu-devel] [PATCH v1 0/7] KVM: Hyper-V SynIC timers

2015-11-26 Thread Wanpeng Li
2015-11-26 16:34 GMT+08:00 Andrey Smetanin : > > > On 11/26/2015 08:28 AM, Wanpeng Li wrote: >> >> 2015-11-25 23:20 GMT+08:00 Andrey Smetanin : >>> >>> Per Hyper-V specification (and as required by Hyper-V-aware guests), >>> SynIC provides 4 per-vCPU timers. Each timer is programmed via a pair >>>

Re: [Qemu-devel] [PATCH v1 6/7] kvm/x86: Hyper-V SynIC message slot pending clearing at SINT ack

2015-11-26 Thread Andrey Smetanin
On 11/25/2015 08:14 PM, Paolo Bonzini wrote: On 25/11/2015 17:55, Andrey Smetanin wrote: +gpa = synic->msg_page & PAGE_MASK; +page = kvm_vcpu_gfn_to_page(vcpu, gpa >> PAGE_SHIFT); +if (is_error_page(page)) { +vcpu_err(vcpu, "Hyper-V SynIC can't get msg page, gpa 0x%llx\n

Re: [Qemu-devel] [PATCH v3 for-2.5 09/12] qjson: Convert to parser to recursive descent

2015-11-26 Thread Markus Armbruster
Markus Armbruster writes: > We backtrack in parse_value(), even though JSON is LL(1) and thus can > be parsed by straightforward recursive descent. Do exactly that. > > Based on an almost-correct patch from Paolo Bonzini. > > Signed-off-by: Markus Armbruster Missing a Signed-off-by: Paolo Bonz

Re: [Qemu-devel] [PATCH v2] qemu_mutex_iothread_locked not correctly synchronized

2015-11-26 Thread David Engraf
Am 25.11.2015 um 17:16 schrieb Paolo Bonzini: On 25/11/2015 16:48, David Engraf wrote: Indeed, TLS handling is broken. The address of iothread_locked is always the same between threads and I can see that a different thread sets iothread_locked to false, thus my current thread uses an invalid

Re: [Qemu-devel] [RFC PATCH 00/40] Sneak peek of virtio and dataplane changes for 2.6

2015-11-26 Thread Christian Borntraeger
On 11/24/2015 07:00 PM, Paolo Bonzini wrote: > This large series is basically all that I would like to get into 2.6. > It is a combination of several pieces of work on dataplane and > multithreaded block layer. > > It's also a large part of why I would like someone else to look at > miscellaneous

Re: [Qemu-devel] [RFC PATCH 00/40] Sneak peek of virtio and dataplane changes for 2.6

2015-11-26 Thread Christian Borntraeger
On 11/26/2015 10:36 AM, Christian Borntraeger wrote: > On 11/24/2015 07:00 PM, Paolo Bonzini wrote: >> This large series is basically all that I would like to get into 2.6. >> It is a combination of several pieces of work on dataplane and >> multithreaded block layer. >> >> It's also a large part o

Re: [Qemu-devel] [PULL 0/2] Migration pull request

2015-11-26 Thread Peter Maydell
On 25 November 2015 at 14:32, Juan Quintela wrote: > Hi > > This series: > - Ignore madvise return value (david) > > As there is no way to diferentiate an error because the kernel don't > understand HUGE_PAGES and anything else > > - Limit memory usage for block migraiton (wen) > > Please, apl

Re: [Qemu-devel] [PULL 0/9] Misc patches for QEMU 2.5-rc2 (2015-11-25)

2015-11-26 Thread Peter Maydell
On 25 November 2015 at 17:19, Paolo Bonzini wrote: > The following changes since commit 4b6eda626fdb8bf90472c6868d502a2ac09abeeb: > > Merge remote-tracking branch 'remotes/lalrae/tags/mips-20151124' into > staging (2015-11-24 17:05:06 +) > > are available in the git repository at: > > > g

[Qemu-devel] [PATCH v3 0/3] Update tests/qemu-iotests failing cases for the s390 platform

2015-11-26 Thread Bo Tu
From: Bo Tu v3: 1. Remove patch for test 120 because Fam Zheng upstreamed same fix for test 119 and 120 2. Rename 051.out to 051.s390.out, add rule in Makefile to generate 051.s390-ccw-virtio.out 3. Remove superfluous quotation marks in common.config 4. Add "Acked-by: Max Reitz " for test 068,

[Qemu-devel] [PATCH v3 3/3] qemu-iotests: s390x: fix test 068

2015-11-26 Thread Bo Tu
From: Bo Tu Now, s390-virtio-ccw is default machine and s390-ccw.img is default boot loader. If the s390-virtio-ccw machine finds no device to load from and errors out, then emits a panic and exits the vm. This breaks test cases 068 for s390x. Adding the parameter of "-no-shutdown" for s390-ccw-

[Qemu-devel] [PATCH v3 1/3] qemu-iotests: refine common.config

2015-11-26 Thread Bo Tu
From: Bo Tu Replacing awk with sed, then it's easier to read. Replacing "[ ! -z "$default_alias_machine" ]" with "[[ $default_alias_machine ]]", then it's slightly shorter. Reviewed-by: Max Reitz Suggested-By: Sascha Silbe Reviewed-by: Sascha Silbe Reviewed-by: Eric Blake Signed-off-by: B

[Qemu-devel] [PULL 1/1] vnc: fix segfault

2015-11-26 Thread Gerd Hoffmann
Commit "c7628bf vnc: only alloc server surface with clients connected" missed one rarely used codepath (cirrus with guest drivers using 2d accel) where we have to check for the server surface being present, to avoid qemu crashing with a NULL pointer dereference. Add the check. Reported-by: Anthon

[Qemu-devel] [PULL for-2.5 0/1] vnc: fix segfault

2015-11-26 Thread Gerd Hoffmann
in the git repository at: git://git.kraxel.org/qemu tags/pull-vnc-20151126-1 for you to fetch changes up to 7fe4a41c262e2529dc79f77f6fe63c5309fa2fd9: vnc: fix segfault (2015-11-26 08:32:11 +0100) vnc: fi

Re: [Qemu-devel] [PATCH v2 1/1] parallels: add format spec

2015-11-26 Thread Vladimir Sementsov-Ogievskiy
On 26.11.2015 11:17, Stefan Hajnoczi wrote: On Mon, Nov 23, 2015 at 04:32:37PM +0300, Denis V. Lunev wrote: From: Vladimir Sementsov-Ogievskiy This specifies Parallels image format as implemented in Parallels Cloud Server 6.10 Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Denis

Re: [Qemu-devel] [PATCH v2 2/4] qemu-iotests: s390x: fix test 051

2015-11-26 Thread tu bo
Hi Max: On 11/25/2015 11:41 PM, Max Reitz wrote: On 24.11.2015 22:17, Sascha Silbe wrote: This PC/s390x-only hunk looks like an oversight to me. Not really, see http://lists.nongnu.org/archive/html/qemu-devel/2015-02/msg01906.html and http://lists.nongnu.org/archive/html/qemu-devel/2015-04/ms

Re: [Qemu-devel] [PULL 0/4] Ide patches

2015-11-26 Thread Peter Maydell
On 25 November 2015 at 20:25, John Snow wrote: > The following changes since commit 4b6eda626fdb8bf90472c6868d502a2ac09abeeb: > > Merge remote-tracking branch 'remotes/lalrae/tags/mips-20151124' into > staging (2015-11-24 17:05:06 +) > > are available in the git repository at: > > https:/

Re: [Qemu-devel] [PATCH RFC 00/14] vhost-user: shutdown and reconnection

2015-11-26 Thread Michael S. Tsirkin
On Wed, Sep 09, 2015 at 01:09:52AM +0200, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > In a previous series "Add feature to start QEMU without vhost-user > backend", Tetsuya Mukawa proposed to allow the vhost-user backend to > disconnect and reconnect. However, Michael Tsirkin

Re: [Qemu-devel] [RFC PATCH 00/40] Sneak peek of virtio and dataplane changes for 2.6

2015-11-26 Thread Paolo Bonzini
On 26/11/2015 10:36, Christian Borntraeger wrote: > For some unknown reason, this seems to be slightly slower than 2.5-rc1 on my > old z196. (have not net tested the z13) > > your branch is certainly better regarding malloc, but worse regarding others. Thanks for taking the time to test this!

Re: [Qemu-devel] [PULL 0/9] Misc patches for QEMU 2.5-rc2 (2015-11-25)

2015-11-26 Thread Paolo Bonzini
On 26/11/2015 10:46, Peter Maydell wrote: > On 25 November 2015 at 17:19, Paolo Bonzini wrote: >> The following changes since commit 4b6eda626fdb8bf90472c6868d502a2ac09abeeb: >> >> Merge remote-tracking branch 'remotes/lalrae/tags/mips-20151124' into >> staging (2015-11-24 17:05:06 +) >>

Re: [Qemu-devel] [PATCH v2 1/2] utils: Add warning messages

2015-11-26 Thread Markus Armbruster
Lluís Vilanova writes: > Adds a special error object that transforms error messages into > immediately reported warnings. Before I dive into details: my fundamental objection is that &error_warn is new infrastructure without a use. The new "this is how you should do warnings" paragraph in error

Re: [Qemu-devel] [PATCH v7 12/24] virtio-blk: Functions for op blocker management

2015-11-26 Thread Kevin Wolf
Am 26.11.2015 um 08:48 hat Stefan Hajnoczi geschrieben: > On Wed, Nov 25, 2015 at 05:26:02PM +0100, Max Reitz wrote: > > On 25.11.2015 17:18, Kevin Wolf wrote: > > > Am 25.11.2015 um 17:03 hat Max Reitz geschrieben: > > >> On 25.11.2015 16:57, Kevin Wolf wrote: > > >>> Am 09.11.2015 um 23:39 hat Ma

Re: [Qemu-devel] [PULL 0/9] Misc patches for QEMU 2.5-rc2 (2015-11-25)

2015-11-26 Thread Peter Maydell
On 26 November 2015 at 10:40, Paolo Bonzini wrote: > > > On 26/11/2015 10:46, Peter Maydell wrote: >> I definitely don't think we should apply the -fwrapv patch yet; >> would you mind respinning this pullrequest without it? > > In what way does that patch make that thing worse? It makes a claim a

Re: [Qemu-devel] [RESEND RFC 2/6] device_tree: introduce load_device_tree_from_sysfs

2015-11-26 Thread Thomas Huth
On 19/11/15 16:22, Eric Auger wrote: > This function returns the host device tree blob from sysfs > (/sys/firmware/devicetree/base). > > This has a runtime dependency on the dtc binary. This functionality > is useful for platform device passthrough where the host device tree > needs to be parsed t

Re: [Qemu-devel] [PULL v2 for-2.5 0/6] qemu-ga patch queue for 2.5

2015-11-26 Thread Peter Maydell
On 26 November 2015 at 00:01, Michael Roth wrote: > The following changes since commit 1a4dab849d5d06191ab5e5850f6b8bfcad8ceb47: > > Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging > (2015-11-25 14:47:06 +) > > are available in the git repository at: > > > git:

Re: [Qemu-devel] [Qemu-ppc] [PATCH qemu] spapr: Add /system-id

2015-11-26 Thread Greg Kurz
On Thu, 26 Nov 2015 15:29:07 +1100 Alexey Kardashevskiy wrote: > On 11/26/2015 11:49 AM, David Gibson wrote: > > On Wed, Nov 25, 2015 at 04:15:01PM +0100, Alexander Graf wrote: > >> > >> > >> On 18.11.15 11:49, David Gibson wrote: > >>> On Wed, Nov 18, 2015 at 06:45:39PM +1100, Alexey Kardashevsk

[Qemu-devel] [PATCH for-2.5] w32: Use gcc option -mthreads

2015-11-26 Thread Stefan Weil
QEMU uses threads / coroutines, therefore support for thread local storage and thread safe libraries (-D_MT) must be enabled by using -mthreads. Reported-by: David Engraf Signed-off-by: Stefan Weil --- configure | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure b/configure index 9

Re: [Qemu-devel] [PULL 0/9] Misc patches for QEMU 2.5-rc2 (2015-11-25)

2015-11-26 Thread Paolo Bonzini
On 26/11/2015 11:56, Peter Maydell wrote: > On 26 November 2015 at 10:40, Paolo Bonzini wrote: >> >> >> On 26/11/2015 10:46, Peter Maydell wrote: >>> I definitely don't think we should apply the -fwrapv patch yet; >>> would you mind respinning this pullrequest without it? >> >> In what way does

Re: [Qemu-devel] [PATCH v2] qemu_mutex_iothread_locked not correctly synchronized

2015-11-26 Thread Stefan Weil
Am 26.11.2015 um 10:12 schrieb David Engraf: > Am 25.11.2015 um 17:16 schrieb Paolo Bonzini: >> >> >> On 25/11/2015 16:48, David Engraf wrote: >>> >>> Indeed, TLS handling is broken. The address of iothread_locked is >>> always >>> the same between threads and I can see that a different thread sets

Re: [Qemu-devel] [PULL 00/15] vhost, pc: fixes for 2.5

2015-11-26 Thread Peter Maydell
On 19 November 2015 at 13:35, Michael S. Tsirkin wrote: > The following changes since commit 8337c6cbc37c6b2184f41bab3eaff47d5e68012a: > > Update version for v2.5.0-rc0 release (2015-11-13 17:10:36 +) > > are available in the git repository at: > > git://git.kernel.org/pub/scm/virt/kvm/mst

Re: [Qemu-devel] [PULL 0/9] Misc patches for QEMU 2.5-rc2 (2015-11-25)

2015-11-26 Thread Peter Maydell
On 26 November 2015 at 11:23, Paolo Bonzini wrote: > On 26/11/2015 11:56, Peter Maydell wrote: >> It makes a claim about the semantics that the compiler >> guarantees us which isn't currently valid. (Or >> alternatively, it's implicitly claiming that clang isn't >> a supported compiler, which isn'

Re: [Qemu-devel] [PULL for-2.5 0/1] vnc: fix segfault

2015-11-26 Thread Peter Maydell
7;remotes/lalrae/tags/mips-20151124' into > staging (2015-11-24 17:05:06 +) > > are available in the git repository at: > > > git://git.kraxel.org/qemu tags/pull-vnc-20151126-1 > > for you to fetch changes up to 7fe4a41c262e2529dc79f77f6fe6

Re: [Qemu-devel] [PATCH v2] ui/cocoa.m: Prevent activation clicks from going to guest

2015-11-26 Thread Peter Maydell
On 26 November 2015 at 01:14, Programmingkid wrote: > When QEMU is brought to the foreground, the click event that activates QEMU > should not go to the guest. Accidents happen when they do go to the guest > without giving the user a change to handle them. Buttons are clicked > accidently. > Wind

[Qemu-devel] [PATCH] Fix memory leak on error

2015-11-26 Thread 董兴水
hw/ppc/spapr.c: Fix memory leak on error, it was introduced in bc09e0611 hw/acpi/memory_hotplug.c: Fix memory leak on error, it was introduced in 34f2af3d Signed-off-by: Stefano Dong (董兴水) --- hw/acpi/memory_hotplug.c | 1 + hw/ppc/spapr.c | 1 + 2 files changed, 2 insertions(+) diff

Re: [Qemu-devel] [RESEND RFC 3/6] device_tree: introduce qemu_fdt_node_path

2015-11-26 Thread Alex Bennée
Eric Auger writes: > This new helper routine returns the node path of a device > referred to by its name and compat string. > > Signed-off-by: Eric Auger > --- > device_tree.c| 40 > include/sysemu/device_tree.h | 3 +++ > 2 files chang

Re: [Qemu-devel] [PULL 0/9] Misc patches for QEMU 2.5-rc2 (2015-11-25)

2015-11-26 Thread Markus Armbruster
Peter Maydell writes: > On 26 November 2015 at 11:23, Paolo Bonzini wrote: >> On 26/11/2015 11:56, Peter Maydell wrote: >>> It makes a claim about the semantics that the compiler >>> guarantees us which isn't currently valid. (Or >>> alternatively, it's implicitly claiming that clang isn't >>> a

Re: [Qemu-devel] [PATCH] Fix memory leak on error

2015-11-26 Thread Markus Armbruster
Stefano Dong (董兴水) writes: > hw/ppc/spapr.c: Fix memory leak on error, it was introduced in bc09e0611 > hw/acpi/memory_hotplug.c: Fix memory leak on error, it was introduced in > 34f2af3d > > Signed-off-by: Stefano Dong (董兴水) > --- > hw/acpi/memory_hotplug.c | 1 + > hw/ppc/spapr.c |

Re: [Qemu-devel] [PATCH] target-arm: Fix and improve AA32 singlestep translation completion code

2015-11-26 Thread Peter Maydell
On 25 November 2015 at 18:02, Sergey Fedorov wrote: > The AArch32 translation completion code for singlestep enabled/active > case was a way more confusing and too repetitive then it needs to be. > Probably that was the cause for a bug to be introduced into it at some > point. The bug was that SWI

Re: [Qemu-devel] [PATCH] target-arm: Fix and improve AA32 singlestep translation completion code

2015-11-26 Thread Sergey Fedorov
On 26.11.2015 15:33, Peter Maydell wrote: > On 25 November 2015 at 18:02, Sergey Fedorov wrote: >> The AArch32 translation completion code for singlestep enabled/active >> case was a way more confusing and too repetitive then it needs to be. >> Probably that was the cause for a bug to be introduce

[Qemu-devel] [PULL for-2.5 04/13] check-qjson: Add test for JSON nesting depth limit

2015-11-26 Thread Markus Armbruster
This would have prevented the regression mentioned in the previous commit. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <1448486613-17634-4-git-send-email-arm...@redhat.com> --- tests/check-qjson.c | 25 + 1 file changed, 25 insertions(+) diff --

[Qemu-devel] [PULL for-2.5 01/13] monitor: Plug memory leak on QMP error

2015-11-26 Thread Markus Armbruster
Leak introduced in commit 8a4f501..710aec9, v2.4.0. Signed-off-by: Markus Armbruster Message-Id: <1446117309-15322-1-git-send-email-arm...@redhat.com> Reviewed-by: Eric Blake Reviewed-by: Luiz Capitulino --- monitor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/monitor.c b/monitor.c in

[Qemu-devel] [PULL for-2.5 10/13] qjson: Convert to parser to recursive descent

2015-11-26 Thread Markus Armbruster
We backtrack in parse_value(), even though JSON is LL(1) and thus can be parsed by straightforward recursive descent. Do exactly that. Based on an almost-correct patch from Paolo Bonzini. Signed-off-by: Paolo Bonzini Signed-off-by: Markus Armbruster Message-Id: <1448486613-17634-10-git-send-em

[Qemu-devel] [PULL for-2.5 08/13] qjson: Inline token_is_escape() and simplify

2015-11-26 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-Id: <1448486613-17634-8-git-send-email-arm...@redhat.com> Reviewed-by: Eric Blake --- qobject/json-parser.c | 32 +++- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/qobject/json-parser.c b/qobject/json-parser.

[Qemu-devel] [PULL for-2.5 07/13] qjson: Inline token_is_keyword() and simplify

2015-11-26 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-Id: <1448486613-17634-7-git-send-email-arm...@redhat.com> Reviewed-by: Eric Blake --- qobject/json-parser.c | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/qobject/json-parser.c b/qobject/json-parser.c index 020c6

[Qemu-devel] [PULL for-2.5 00/13] QMP and QObject patches

2015-11-26 Thread Markus Armbruster
The following changes since commit 1a4dab849d5d06191ab5e5850f6b8bfcad8ceb47: Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2015-11-25 14:47:06 +) are available in the git repository at: git://repo.or.cz/qemu/armbru.git tags/pull-monitor-2015-11-26 for you

[Qemu-devel] [PULL for-2.5 02/13] qjson: Apply nesting limit more sanely

2015-11-26 Thread Markus Armbruster
The nesting limit from commit 29c75dd "json-streamer: limit the maximum recursion depth and maximum token count" applies separately to braces and brackets. This makes no sense. Apply it to their sum, because that's actually a measure of recursion depth. Signed-off-by: Markus Armbruster Reviewed

[Qemu-devel] [PULL for-2.5 11/13] qjson: store tokens in a GQueue

2015-11-26 Thread Markus Armbruster
From: Paolo Bonzini Even though we still have the "streamer" concept, the tokens can now be deleted as they are read. While doing so convert from QList to GQueue, since the next step will make tokens not a QObject and we will have to do the conversion anyway. Signed-off-by: Paolo Bonzini Messa

[Qemu-devel] [PULL for-2.5 03/13] qjson: Don't crash when input exceeds nesting limit

2015-11-26 Thread Markus Armbruster
We limit nesting depth and input size to defend against input triggering excessive heap or stack memory use (commit 29c75dd json-streamer: limit the maximum recursion depth and maximum token count). However, when the nesting limit is exceeded, parser_context_peek_token()'s assertion fails. Broken

[Qemu-devel] [PULL for-2.5 06/13] qjson: Give each of the six structural chars its own token type

2015-11-26 Thread Markus Armbruster
Simplifies things, because we always check for a specific one. Signed-off-by: Markus Armbruster Message-Id: <1448486613-17634-6-git-send-email-arm...@redhat.com> Reviewed-by: Eric Blake --- include/qapi/qmp/json-lexer.h | 7 ++- qobject/json-lexer.c | 19 --- qobje

[Qemu-devel] [PULL for-2.5 05/13] qjson: Spell out some silent assumptions

2015-11-26 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-Id: <1448486613-17634-5-git-send-email-arm...@redhat.com> Reviewed-by: Eric Blake --- include/qapi/qmp/json-lexer.h | 3 ++- qobject/json-lexer.c | 7 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/qapi/qmp/json-le

[Qemu-devel] [PULL for-2.5 12/13] qjson: surprise, allocating 6 QObjects per token is expensive

2015-11-26 Thread Markus Armbruster
From: Paolo Bonzini Replace the contents of the tokens GQueue with a simple struct. This cuts the amount of memory allocated by tests/check-qjson from ~500MB to ~20MB, and the execution time from 600ms to 80ms on my laptop. Still a lot (some could be saved by using an intrusive list, such as QS

[Qemu-devel] [PULL for-2.5 13/13] qjson: Limit number of tokens in addition to total size

2015-11-26 Thread Markus Armbruster
Commit 29c75dd "json-streamer: limit the maximum recursion depth and maximum token count" attempts to guard against excessive heap usage by limiting total token size (it says "token count", but that's a lie). Total token size is a rather imprecise predictor of heap usage: many small tokens use mor

[Qemu-devel] [PULL for-2.5 09/13] qjson: replace QString in JSONLexer with GString

2015-11-26 Thread Markus Armbruster
From: Paolo Bonzini JSONLexer only needs a simple resizable buffer. json-streamer.c can allocate memory for each token instead of relying on reference counting of QStrings. Signed-off-by: Paolo Bonzini Message-Id: <1448300659-23559-2-git-send-email-pbonz...@redhat.com> [Straightforwardly rebas

Re: [Qemu-devel] [PULL 0/9] Misc patches for QEMU 2.5-rc2 (2015-11-25)

2015-11-26 Thread Paolo Bonzini
On 26/11/2015 12:28, Peter Maydell wrote: >> But we are relying on them, and thus we should document them. Witness >> the number of patches fixing so called "undefined" behavior. And those >> patches are _dangerous_. > > Until and unless the compiler guarantees us the semantics that > we want,

Re: [Qemu-devel] [PULL 0/9] Misc patches for QEMU 2.5-rc2 (2015-11-25)

2015-11-26 Thread Paolo Bonzini
On 26/11/2015 13:19, Peter Maydell wrote: > On 26 November 2015 at 12:15, Markus Armbruster wrote: >> Peter Maydell writes: >>> I don't see much point in documenting what we rely on >>> if we can't rely on it and need to stop relying on it. >> >> "Can't" and "need" are too strong. The kernel c

Re: [Qemu-devel] [PULL 0/9] Misc patches for QEMU 2.5-rc2 (2015-11-25)

2015-11-26 Thread Peter Maydell
On 26 November 2015 at 12:15, Markus Armbruster wrote: > Peter Maydell writes: >> I don't see much point in documenting what we rely on >> if we can't rely on it and need to stop relying on it. > > "Can't" and "need" are too strong. The kernel can, and I fail to see > what makes us so special th

Re: [Qemu-devel] [RESEND RFC 4/6] device_tree: introduce qemu_fdt_getprop_optional

2015-11-26 Thread Alex Bennée
Eric Auger writes: > Current qemu_fdt_getprop exits if the property is not found. It is > sometimes needed to read an optional property, in which case we do > not wish to exit but simply returns a null value. > > This is what this new qemu_fdt_getprop_optional function does. > > Signed-off-by: E

[Qemu-devel] [PATCH] vhost-user-test: fix migration overlap test

2015-11-26 Thread Michael S. Tsirkin
During migration, source does GET_BASE, destination does SET_BASE. Use that as opposed to fds being configured to detect vhost user running on both source and destination. Signed-off-by: Michael S. Tsirkin --- tests/vhost-user-test.c | 13 - 1 file changed, 8 insertions(+), 5 deletio

[Qemu-devel] [PATCH] vhost-user-test: fix migration overlap test

2015-11-26 Thread Michael S. Tsirkin
During migration, source does GET_BASE, destination does SET_BASE. Use that as opposed to fds being configured to detect vhost user running on both source and destination. Signed-off-by: Michael S. Tsirkin --- tests/vhost-user-test.c | 13 - 1 file changed, 8 insertions(+), 5 deletio

Re: [Qemu-devel] [PATCH v6 1/3] target-i386: fallback vcpu's TSC rate to value returned by KVM

2015-11-26 Thread Eduardo Habkost
On Tue, Nov 24, 2015 at 11:33:55AM +0800, Haozhong Zhang wrote: > If no user-specified TSC rate is present, we will try to set > env->tsc_khz to the value returned by KVM_GET_TSC_KHZ. This patch does > not change the current functionality of QEMU and just prepares for later > patches to enable migr

Re: [Qemu-devel] [PATCH v6 2/3] target-i386: reorganize TSC rate setting code

2015-11-26 Thread Eduardo Habkost
On Tue, Nov 24, 2015 at 11:33:56AM +0800, Haozhong Zhang wrote: > Following changes are made to the TSC rate setting code in > kvm_arch_init_vcpu(): > * The code is moved to a new function kvm_arch_set_tsc_khz(). > * If kvm_arch_set_tsc_khz() fails, i.e. following two conditions are >both sat

Re: [Qemu-devel] poor virtio-scsi performance (fio testing)

2015-11-26 Thread Alexandre DERUMIER
>>May be my default cfq slowdown? Yes ! (in your first mail you said that you use deadline scheduler ?) cfq don't play well with a lof of current job. cfq + numjobs=10 : 1 iops cfq + numjobs=1 : 25000 iops deadline + numjobs=1 : 25000 iops deadline + numjobs=10 : 25000 iops - Mail orig

Re: [Qemu-devel] [PATCH] Fix memory leak on error

2015-11-26 Thread Igor Mammedov
On Thu, 26 Nov 2015 12:00:12 + Stefano Dong (董兴水) wrote: > hw/ppc/spapr.c: Fix memory leak on error, it was introduced in bc09e0611 > hw/acpi/memory_hotplug.c: Fix memory leak on error, it was introduced in > 34f2af3d > > Signed-off-by: Stefano Dong (董兴水) Reviewed-by: Igor Mammedov > --

Re: [Qemu-devel] [PATCH v6 3/3] target-i386: add support to migrate vcpu's TSC rate

2015-11-26 Thread Eduardo Habkost
On Tue, Nov 24, 2015 at 11:33:57AM +0800, Haozhong Zhang wrote: > This patch enables migrating vcpu's TSC rate. If KVM on the destination > machine supports TSC scaling, guest programs will observe a consistent > TSC rate across the migration. > > If TSC scaling is not supported on the destination

Re: [Qemu-devel] [PATCH v13 01/14] qobject: Simplify QObject

2015-11-26 Thread Markus Armbruster
Eric Blake writes: > The QObject hierarchy is small enough, and unlikely to grow further > (since we only use it to map to JSON and already cover all JSON > types), that we can simplify things by not tracking a separate > vtable, but just inline the refcnt element of the vtable QType > directly i

Re: [Qemu-devel] [PATCH v2] qemu_mutex_iothread_locked not correctly synchronized

2015-11-26 Thread David Engraf
Am 26.11.2015 um 12:25 schrieb Stefan Weil: Am 26.11.2015 um 10:12 schrieb David Engraf: Am 25.11.2015 um 17:16 schrieb Paolo Bonzini: On 25/11/2015 16:48, David Engraf wrote: Indeed, TLS handling is broken. The address of iothread_locked is always the same between threads and I can see tha

Re: [Qemu-devel] [PATCH v2] ui/cocoa.m: Prevent activation clicks from going to guest

2015-11-26 Thread Programmingkid
On Nov 26, 2015, at 6:45 AM, Peter Maydell wrote: > On 26 November 2015 at 01:14, Programmingkid > wrote: >> When QEMU is brought to the foreground, the click event that activates QEMU >> should not go to the guest. Accidents happen when they do go to the guest >> without giving the user a chan

Re: [Qemu-devel] [PATCH v1 6/7] kvm/x86: Hyper-V SynIC message slot pending clearing at SINT ack

2015-11-26 Thread Paolo Bonzini
On 26/11/2015 10:06, Andrey Smetanin wrote: > > > On 11/25/2015 08:14 PM, Paolo Bonzini wrote: >> >> >> On 25/11/2015 17:55, Andrey Smetanin wrote: +gpa = synic->msg_page & PAGE_MASK; +page = kvm_vcpu_gfn_to_page(vcpu, gpa >> PAGE_SHIFT); +if (is_error_page(page)

Re: [Qemu-devel] [PATCH v13 03/14] qapi: Convert QType into QAPI built-in enum type

2015-11-26 Thread Markus Armbruster
Eric Blake writes: > What's more meta than using qapi to define qapi? :) > > Convert QType into a full-fledged[*] builtin qapi enum type, so > that a subsequent patch can then use it as the discriminator > type of qapi alternate types. Fortunately, the judicious use of > 'prefix' in the qapi def

Re: [Qemu-devel] [PULL 0/9] Misc patches for QEMU 2.5-rc2 (2015-11-25)

2015-11-26 Thread Peter Maydell
On 26 November 2015 at 13:04, Paolo Bonzini wrote: > > > On 26/11/2015 12:28, Peter Maydell wrote: >>> But we are relying on them, and thus we should document them. Witness >>> the number of patches fixing so called "undefined" behavior. And those >>> patches are _dangerous_. >> >> Until and unl

Re: [Qemu-devel] [PATCH v2] ui/cocoa.m: Prevent activation clicks from going to guest

2015-11-26 Thread Peter Maydell
On 26 November 2015 at 14:40, Programmingkid wrote: > > On Nov 26, 2015, at 6:45 AM, Peter Maydell wrote: > >> On 26 November 2015 at 01:14, Programmingkid >> wrote: >>> When QEMU is brought to the foreground, the click event that activates QEMU >>> should not go to the guest. Accidents happen w

Re: [Qemu-devel] [PATCH v13 01/14] qobject: Simplify QObject

2015-11-26 Thread Markus Armbruster
Eric Blake writes: > The QObject hierarchy is small enough, and unlikely to grow further > (since we only use it to map to JSON and already cover all JSON > types), that we can simplify things by not tracking a separate > vtable, but just inline the refcnt element of the vtable QType > directly i

Re: [Qemu-devel] [PATCH qemu 2/2] ppc/spapr: Add "ibm, pa-features" property to the device-tree

2015-11-26 Thread Alexander Graf
On 22.10.15 09:30, Alexey Kardashevskiy wrote: > From: Benjamin Herrenschmidt > > LoPAPR defines a "ibm,pa-features" per-CPU device tree property which > describes extended features of the Processor Architecture. > > This adds the property to the device tree. At the moment this is the > copy o

[Qemu-devel] [PATCH for-2.5] ui/cocoa.m: Prevent activation clicks from going to guest

2015-11-26 Thread Peter Maydell
When QEMU is brought to the foreground, the click event that activates QEMU should not go to the guest. Accidents happen when they do go to the guest without giving the user a chance to handle them. In particular, if the guest input device is not an absolute-position one then the location of the gu

Re: [Qemu-devel] [PATCH] migration: fix analyze-migration.py script

2015-11-26 Thread Alexander Graf
On 30.10.15 17:50, Mark Cave-Ayland wrote: > On 26/10/15 09:48, Mark Cave-Ayland wrote: > >> On 06/09/15 12:54, Mark Cave-Ayland wrote: >> >>> On 06/09/15 09:36, Alexander Graf wrote: >>> On 05.09.15 21:51, Mark Cave-Ayland wrote: > Commit 61964 "Add configuration section" broke the ana

Re: [Qemu-devel] [PATCH] migration: fix analyze-migration.py script

2015-11-26 Thread Dr. David Alan Gilbert
* Alexander Graf (ag...@suse.de) wrote: > > > On 30.10.15 17:50, Mark Cave-Ayland wrote: > > On 26/10/15 09:48, Mark Cave-Ayland wrote: > > > >> On 06/09/15 12:54, Mark Cave-Ayland wrote: > >> > >>> On 06/09/15 09:36, Alexander Graf wrote: > >>> > On 05.09.15 21:51, Mark Cave-Ayland wrote:

[Qemu-devel] [PATCH] qom-test: fix qmp() leaks

2015-11-26 Thread marcandre . lureau
From: Marc-André Lureau Before this patch ASAN reported: SUMMARY: AddressSanitizer: 677165875 byte(s) leaked in 1272437 allocation(s) After this patch: SUMMARY: AddressSanitizer: 465 byte(s) leaked in 32 allocation(s) Signed-off-by: Marc-André Lureau --- tests/qom-test.c | 25

Re: [Qemu-devel] [PATCH] migration: fix analyze-migration.py script

2015-11-26 Thread Alexander Graf
On 26.11.15 16:31, Dr. David Alan Gilbert wrote: > * Alexander Graf (ag...@suse.de) wrote: >> >> >> On 30.10.15 17:50, Mark Cave-Ayland wrote: >>> On 26/10/15 09:48, Mark Cave-Ayland wrote: >>> On 06/09/15 12:54, Mark Cave-Ayland wrote: > On 06/09/15 09:36, Alexander Graf wrote: >>>

Re: [Qemu-devel] [PULL 0/9] Misc patches for QEMU 2.5-rc2 (2015-11-25)

2015-11-26 Thread Paolo Bonzini
On 26/11/2015 16:01, Peter Maydell wrote: > > - regarding overflow, in addition to the weird -Wpedantic warning, GCC 6 > > adds a new -Wshift-overflow flag which is enabled by default in C99 and > > C11 modes, and which only applies to constant expressions. So the > > remaining case where the comp

[Qemu-devel] [PULL 6/9] virtio-scsi: don't crash without a valid device

2015-11-26 Thread Paolo Bonzini
From: "Eugene (jno) Dvurechenski" Make sure that we actually have a device when checking the aio context. Otherwise guests could trigger QEMU crashes. Signed-off-by: "Eugene (jno) Dvurechenski" Reviewed-by: David Hildenbrand Message-Id: <1448549135-6582-2-git-send-email-...@linux.vnet.ibm.com>

[Qemu-devel] [PULL 2/9] call bdrv_drain_all() even if the vm is stopped

2015-11-26 Thread Paolo Bonzini
From: Wen Congyang There are still I/O operations when the vm is stopped. For example, stop the vm, and do block migration. In this case, we don't drain all I/O operation, and may meet the following problem: qemu-system-x86_64: migration/block.c:731: block_save_complete: Assertion `block_mig_st

[Qemu-devel] [PULL 4/9] exec: remove warning about mempath and hugetlbfs

2015-11-26 Thread Paolo Bonzini
From: "Daniel P. Berrange" The gethugepagesize() method in exec.c printed a warning if the file path for "-mem-path" or "-object memory-backend-file" was not on a hugetlbfs filesystem. This warning is bogus, because QEMU functions perfectly well with the path on a regular tmpfs filesystem. Use of

[Qemu-devel] [PULL v2 0/9] Misc patches for QEMU 2.5-rc2

2015-11-26 Thread Paolo Bonzini
The following changes since commit 4b6eda626fdb8bf90472c6868d502a2ac09abeeb: Merge remote-tracking branch 'remotes/lalrae/tags/mips-20151124' into staging (2015-11-24 17:05:06 +) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you to fetc

[Qemu-devel] [PULL 1/9] MAINTAINERS: Update TCG CPU cores section

2015-11-26 Thread Paolo Bonzini
These are the people that I think have been touching it lately or reviewing patches. Signed-off-by: Paolo Bonzini --- MAINTAINERS | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 28f0139..bb1f3e4 100644 --- a/MAINTAINERS +++ b

[Qemu-devel] [PULL 8/9] target-i386: kvm: Use env->mcg_cap when setting up MCE

2015-11-26 Thread Paolo Bonzini
From: Eduardo Habkost When setting up MCE, instead of using the MCE_*_DEF macros directly, just filter the existing env->mcg_cap value. As env->mcg_cap is already initialized as MCE_CAP_DEF|MCE_BANKS_DEF at target-i386/cpu.c:mce_init(), this doesn't change any behavior. But it will allow us to c

[Qemu-devel] [PULL 7/9] target-i386: kvm: Abort if MCE bank count is not supported by host

2015-11-26 Thread Paolo Bonzini
From: Eduardo Habkost Instead of silently changing the number of banks in mcg_cap based on kvm_get_mce_cap_supported(), abort initialization if the host doesn't support MCE_BANKS_DEF banks. Note that MCE_BANKS_DEF was always 10 since it was introduced in QEMU, and Linux always returned 32 at KVM

[Qemu-devel] [PULL 5/9] target-sparc: fix 32-bit truncation in fpackfix

2015-11-26 Thread Paolo Bonzini
This is reported by Coverity. The algorithm description at ftp://ftp.icm.edu.pl/packages/ggi/doc/hw/sparc/Sparc.pdf suggests that the 32-bit parts of rs2, after the left shift, is treated as a 64-bit integer. Bits 32 and above are used to do the saturating truncation. Message-Id: <1446473134-433

[Qemu-devel] [PULL 3/9] Revert "exec: silence hugetlbfs warning under qtest"

2015-11-26 Thread Paolo Bonzini
From: "Daniel P. Berrange" This reverts commit 1c7ba94a184df1eddd589d5400d879568d3e5d08. That commit changed QEMU initialization order from - object-initial, chardev, qtest, object-late to - chardev, qtest, object-initial, object-late This breaks chardev setups which need to rely on object

[Qemu-devel] [PULL 9/9] target-i386: kvm: Print warning when clearing mcg_cap bits

2015-11-26 Thread Paolo Bonzini
From: Eduardo Habkost Instead of silently clearing mcg_cap bits when the host doesn't support them, print a warning when doing that. Signed-off-by: Eduardo Habkost [Avoid \n at end of error_report. - Paolo] Signed-off-by: Paolo Bonzini Message-Id: <1448471956-66873-10-git-send-email-pbonz...@r

Re: [Qemu-devel] [PULL 0/9] Misc patches for QEMU 2.5-rc2 (2015-11-25)

2015-11-26 Thread Peter Maydell
On 26 November 2015 at 15:40, Paolo Bonzini wrote: > On 26/11/2015 16:01, Peter Maydell wrote: >> I'm confused by all this text about constant expressions. Does >> -fwrapv guarantee that signed shift of << behaves as we want >> in all situations (including constant expressions) or doesn't it? > >

Re: [Qemu-devel] [PATCH v1 6/7] kvm/x86: Hyper-V SynIC message slot pending clearing at SINT ack

2015-11-26 Thread Andrey Smetanin
On 11/26/2015 05:43 PM, Paolo Bonzini wrote: On 26/11/2015 10:06, Andrey Smetanin wrote: On 11/25/2015 08:14 PM, Paolo Bonzini wrote: On 25/11/2015 17:55, Andrey Smetanin wrote: +gpa = synic->msg_page & PAGE_MASK; +page = kvm_vcpu_gfn_to_page(vcpu, gpa >> PAGE_SHIFT); +if

Re: [Qemu-devel] [PATCH v1 6/7] kvm/x86: Hyper-V SynIC message slot pending clearing at SINT ack

2015-11-26 Thread Paolo Bonzini
On 26/11/2015 16:53, Andrey Smetanin wrote: >> Then the patches look good, I think. With a testcase I can try them out >> and hopefully merge them for Linux 4.5 / QEMU 2.6. > > Thank you! > > We already have a working Hyper-V SynIC timers kvm-unit-tests test case. > We are going to send approp

[Qemu-devel] [PATCH V3 1/3] hw/acpi: merge pxb adjacent memory/IO ranges

2015-11-26 Thread Marcel Apfelbaum
A generic PCI Bus Expander doesn't necessary have a built-in PCI bridge. Int this case the ACPI will include IO/MEM ranges per device. Try to merge adjacent resources to reduce the ACPI tables length. Signed-off-by: Marcel Apfelbaum --- hw/i386/acpi-build.c | 123 +++-

  1   2   3   >