[Qemu-devel] [Bug 1668556] Re: QEMU Guest Agent service fails to start on Windows 10 RS2 preview

2017-03-03 Thread Thomas Huth
** Changed in: qemu Status: New => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1668556 Title: QEMU Guest Agent service fails to start on Windows 10 RS2 preview Status in QEMU:

Re: [Qemu-devel] [Qemu-block] [PATCH 12/15] gluster: Plug memory leaks in qemu_gluster_parse_json()

2017-03-03 Thread Niels de Vos
On Fri, Mar 03, 2017 at 08:38:45AM +0100, Markus Armbruster wrote: > Niels de Vos writes: > > > On Thu, Mar 02, 2017 at 10:44:03PM +0100, Markus Armbruster wrote: > >> To reproduce, run > >> > >> $ valgrind qemu-system-x86_64 --nodefaults -S --drive > >> driver=gluster,volume=testvol,path=/

Re: [Qemu-devel] [Qemu-block] [PATCH 12/15] gluster: Plug memory leaks in qemu_gluster_parse_json()

2017-03-03 Thread Markus Armbruster
Niels de Vos writes: > On Fri, Mar 03, 2017 at 08:38:45AM +0100, Markus Armbruster wrote: >> Niels de Vos writes: >> >> > On Thu, Mar 02, 2017 at 10:44:03PM +0100, Markus Armbruster wrote: >> >> To reproduce, run >> >> >> >> $ valgrind qemu-system-x86_64 --nodefaults -S --drive >> >> driv

[Qemu-devel] [PATCH] virtio: unbreak 1.0 device load with region cache

2017-03-03 Thread Jason Wang
Current code depends on virtio_queue_update_rings() to setup address space cache. But this does not work for 1.0 device since we can't infer avail and used. Fixing this by calling virtio_init_region_cache() after subsections load which can guarantee avail and used are correct. Fixes: 97cd965c0701

Re: [Qemu-devel] [PATCH v2 0/3] migration capability to discard the migrated ram pages

2017-03-03 Thread Pavel Butsykin
On 14.02.2017 17:02, Dr. David Alan Gilbert wrote: Hi Pavel, I was curious, having merged this, how you're using postcopy; do you switch into postcopy mode immediately or wait until the first sync or what? Do you find yourself in postcopy mode long enough that it's worth doing the release? If

[Qemu-devel] [PATCH] virito: unbreak virtio device behinds IOMMU with region cache

2017-03-03 Thread Jason Wang
Commit c611c76417f5 ("virtio: add MemoryListener to cache ring translations") registers a memory listener to dma_as. This may not work when IOMMU is enabled: dma_as(bus_master_as) were correctly initialized in pcibus_machine_done() after virtio_realize() where we try to register listener and initia

Re: [Qemu-devel] [PATCH] virtio: unbreak virtio-pci with IOMMU after caching ring translations

2017-03-03 Thread Jason Wang
On 2017年03月02日 18:30, Paolo Bonzini wrote: On 02/03/2017 08:47, Jason Wang wrote: Fixes: c611c76417f5 ("virtio: add MemoryListener to cache ring translations") Cc: Paolo Bonzini Signed-off-by: Jason Wang This is very ugly. I guess it's better than broken IOMMU ... Paolo? Maybe we can dela

Re: [Qemu-devel] [PATCH] virtio: unbreak 1.0 device load with region cache

2017-03-03 Thread Cornelia Huck
On Fri, 3 Mar 2017 16:51:28 +0800 Jason Wang wrote: > Current code depends on virtio_queue_update_rings() to setup address > space cache. But this does not work for 1.0 device since we can't infer > avail and used. Fixing this by calling virtio_init_region_cache() > after subsections load which

Re: [Qemu-devel] [PATCH] virtio: unbreak 1.0 device load with region cache

2017-03-03 Thread Fam Zheng
On Fri, 03/03 01:02, no-re...@patchew.org wrote: > CC ppc-softmmu/hw/misc/ivshmem.o > In file included from > /var/tmp/patchew-tester-tmp-krtyhjt1/src/hw/misc/ivshmem.c:19:0: > /var/tmp/patchew-tester-tmp-krtyhjt1/src/include/qemu/osdep.h:30:25: fatal > error: config-host.h: No such file o

[Qemu-devel] [Bug?] BQL about live migration

2017-03-03 Thread Gonglei (Arei)
Hello Juan & Dave, We hit a bug in our test: Network error occurs when migrating a guest, libvirt then rollback the migration, causes qemu coredump qemu log: 2017-03-01T12:54:33.904949+08:00|info|qemu[17672]|[33614]|monitor_qapi_event_emit[479]|: {"timestamp": {"seconds": 1488344073, "microsecond

Re: [Qemu-devel] [PATCH] virtio: unbreak 1.0 device load with region cache

2017-03-03 Thread Jason Wang
On 2017年03月03日 17:15, Cornelia Huck wrote: On Fri, 3 Mar 2017 16:51:28 +0800 Jason Wang wrote: Current code depends on virtio_queue_update_rings() to setup address space cache. But this does not work for 1.0 device since we can't infer avail and used. Fixing this by calling virtio_init_regi

Re: [Qemu-devel] [PATCH] virtio: unbreak 1.0 device load with region cache

2017-03-03 Thread Jason Wang
On 2017年03月03日 17:18, Fam Zheng wrote: On Fri, 03/03 01:02,no-re...@patchew.org wrote: CC ppc-softmmu/hw/misc/ivshmem.o In file included from /var/tmp/patchew-tester-tmp-krtyhjt1/src/hw/misc/ivshmem.c:19:0: /var/tmp/patchew-tester-tmp-krtyhjt1/src/include/qemu/osdep.h:30:25: fatal e

Re: [Qemu-devel] [PATCH v2 5/5] xen: use libxendevicemodel when available

2017-03-03 Thread Paul Durrant
> -Original Message- > From: Stefano Stabellini [mailto:sstabell...@kernel.org] > Sent: 02 March 2017 22:50 > To: Paul Durrant > Cc: xen-de...@lists.xenproject.org; qemu-devel@nongnu.org; Stefano > Stabellini ; Anthony Perard > > Subject: Re: [PATCH v2 5/5] xen: use libxendevicemodel when

Re: [Qemu-devel] [PULL v2 0/3] Merge qio 2017/02/27

2017-03-03 Thread Fam Zheng
On Fri, 03/03 09:12, Christian Borntraeger wrote: > On 03/02/2017 05:33 PM, no-re...@patchew.org wrote: > > Fam, this seems to happen sometimes. Can you have a look at that why the > qtest > thing fails on the s390 box? I don't know, when I run the commands manually for a few times, it is not r

Re: [Qemu-devel] [PULL v3 0/5] Block patches for 2.9

2017-03-03 Thread Peter Maydell
On 2 March 2017 at 03:46, Jeff Cody wrote: > The following changes since commit c8c0a1a784cdf70ecea50e93213137c6c89337a7: > > Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into > staging (2017-02-28 13:41:03 +) > > are available in the git repository at: > > g...@git

Re: [Qemu-devel] [PATCH v2 05/11] translate-all: exit cpu_restore_state early if translating

2017-03-03 Thread Alex Bennée
Richard Henderson writes: > On 03/03/2017 06:53 AM, Alex Bennée wrote: >> The translation code uses cpu_ld*_code which can trigger a tlb_fill >> which if it fails will attempt a fault resolution. This never works >> during translation as the TB being generated hasn't been added yet. >> However w

Re: [Qemu-devel] [PATCH v2 04/11] translate: downgrade IRQ BQL asserts to tcg_debug_assert

2017-03-03 Thread Peter Maydell
On 2 March 2017 at 19:53, Alex Bennée wrote: > While on MTTCG hosts it is very important that updates to > cpu->interrupt_request are protected by the BQL not all guests have > been converted to the correct locking yet. As a result we are seeing > breaking on non-MTTCG enabled guests in production

Re: [Qemu-devel] [PATCH V2 0/7] execute code from mmio area

2017-03-03 Thread Frederic Konrad
Hi All, Any feedback for the 4 last patches? Thanks, Fred On 02/17/2017 09:17 PM, fred.kon...@greensocs.com wrote: > From: KONRAD Frederic > > This series allows to execute code from mmio areas. > The main goal of this is to be able to run code for example from an SPI > device. > > The three

Re: [Qemu-devel] [PULL 00/17] ppc-for-2.9 queue 20170303

2017-03-03 Thread Peter Maydell
git repository at: > > git://github.com/dgibson/qemu.git tags/ppc-for-2.9-20170303 > > for you to fetch changes up to 992d7e976c7eca2b3129cd4bae4a0d350a8065fa: > > target/ppc: rewrite f[n]m[add,sub] using float64_muladd (2017-03-03 > 11:38:33 +1100) > > ---

Re: [Qemu-devel] [PATCH v2 5/5] xen: use libxendevicemodel when available

2017-03-03 Thread Paul Durrant
> -Original Message- > From: Stefano Stabellini [mailto:sstabell...@kernel.org] > Sent: 02 March 2017 22:50 > To: Paul Durrant > Cc: xen-de...@lists.xenproject.org; qemu-devel@nongnu.org; Stefano > Stabellini ; Anthony Perard > > Subject: Re: [PATCH v2 5/5] xen: use libxendevicemodel when

Re: [Qemu-devel] [PATCH V2] migration: expose qemu_announce_self() via qmp

2017-03-03 Thread Dr. David Alan Gilbert
* Germano Veit Michel (germ...@redhat.com) wrote: > qemu_announce_self() is triggered by qemu at the end of migrations > to update the network regarding the path to the guest l2addr. > > however it is also useful when there is a network change such as > an active bond slave swap. Essentially, it's

Re: [Qemu-devel] [Bug?] BQL about live migration

2017-03-03 Thread Fam Zheng
On Fri, 03/03 09:29, Gonglei (Arei) wrote: > Hello Juan & Dave, > > We hit a bug in our test: > Network error occurs when migrating a guest, libvirt then rollback the > migration, causes qemu coredump > qemu log: > 2017-03-01T12:54:33.904949+08:00|info|qemu[17672]|[33614]|monitor_qapi_event_emit[4

[Qemu-devel] qemu-system-ppc64 crashes during "info qtree"

2017-03-03 Thread Thomas Huth
Hi Cédric, hi David, running "info qtree" at the HMP monitor with the pseries machine currently results in: [...] dev: spapr-vty, id "vty@7100" reg = 1895825408 (0x7100) chardev = "serial0" irq = 4098 (0x1002) dev: spapr-rtc, id "" dev: icp, id "" hw/c

Re: [Qemu-devel] [PATCH v2 04/11] translate: downgrade IRQ BQL asserts to tcg_debug_assert

2017-03-03 Thread Alex Bennée
Peter Maydell writes: > On 2 March 2017 at 19:53, Alex Bennée wrote: >> While on MTTCG hosts it is very important that updates to >> cpu->interrupt_request are protected by the BQL not all guests have >> been converted to the correct locking yet. As a result we are seeing >> breaking on non-MTT

Re: [Qemu-devel] qemu-system-ppc64 crashes during "info qtree"

2017-03-03 Thread Cédric Le Goater
On 03/03/2017 11:48 AM, Thomas Huth wrote: > Hi Cédric, hi David, > > running "info qtree" at the HMP monitor with the pseries machine > currently results in: > > [...] > dev: spapr-vty, id "vty@7100" > reg = 1895825408 (0x7100) > chardev = "serial0" > irq

Re: [Qemu-devel] [PATCH v2 09/11] target/mips/op_helper: hold BQL before calling cpu_mips_get_count

2017-03-03 Thread Yongbok Kim
On 02/03/2017 19:53, Alex Bennée wrote: > We should hold the BQL before we transition to HW emulation. This is > because all HW emulation needs to be serialised under MTTCG > conditions. This is picked up by asserts that fire when > cpu_mips_get_count triggers and IRQ. > > Reported-by: Yongbok K

Re: [Qemu-devel] [PATCH v2 04/11] translate: downgrade IRQ BQL asserts to tcg_debug_assert

2017-03-03 Thread Peter Maydell
On 3 March 2017 at 11:05, Alex Bennée wrote: > According to the commit that added it > (c552d6c038f7cf4058d1fd5987118ffd41e0e050) it is meant to be a hint to > the compiler. Reading the GCC notes however seems to contradict that. > > FWIW I did test it in both builds and we do used tese for a bunc

[Qemu-devel] [PATCH] target/mips: hold BQL for timer interrupts

2017-03-03 Thread Yongbok Kim
Hold BQL when accessing timer which can cause interrupts Signed-off-by: Yongbok Kim --- target/mips/op_helper.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/target/mips/op_helper.c b/target/mips/op_helper.c index b683fcb..e5f3ea4 100644 --- a/target/

[Qemu-devel] [PATCH] linux-user: limit number of arguments to execve

2017-03-03 Thread P J P
From: Prasad J Pandit Limit the number of arguments passed to execve(2) call from a user program, as large number of them could lead to a bad guest address error. Reported-by: Jann Horn Signed-off-by: Prasad J Pandit --- linux-user/syscall.c | 7 +++ 1 file changed, 7 insertions(+) diff

[Qemu-devel] [PATCH v3] os: don't corrupt pre-existing memory-backend data with prealloc

2017-03-03 Thread Daniel P. Berrange
When using a memory-backend object with prealloc turned on, QEMU will memset() the first byte in every memory page to zero. While this might have been acceptable for memory backends associated with RAM, this corrupts application data for NVDIMMs. Instead of setting every page to zero, read the cur

Re: [Qemu-devel] [PATCH v3] os: don't corrupt pre-existing memory-backend data with prealloc

2017-03-03 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20170303113255.28262-1-berra...@redhat.com Type: series Subject: [Qemu-devel] [PATCH v3] os: don't corrupt pre-existing memory-backend data with prealloc === TEST SCRIPT BEGIN === #!/bin

Re: [Qemu-devel] [PATCH v2 06/11] sparc/sparc64: grab BQL before calling cpu_check_irqs

2017-03-03 Thread Paolo Bonzini
On 02/03/2017 20:53, Alex Bennée wrote: > IRQ modification is part of device emulation and should be done while > the BQL is held to prevent races when MTTCG is enabled. This adds > assertions in the hw emulation layer and wraps the calls from helpers > in the BQL. > > Reported-by: Mark Cave-Ayl

[Qemu-devel] [PATCH v3 0/5] xen: use new xendevicemodel library

2017-03-03 Thread Paul Durrant
My recent patches to Xen [1] introduced a new library to support running device models for HVM guests. This series ports QEMU onto the new library if it is available in the build environment. [1] Patches starting with http://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=b108240265deea37601f1a60591

[Qemu-devel] [PATCH v3 5/5] xen: use libxendevicemodel when available

2017-03-03 Thread Paul Durrant
This patch modifies the wrapper functions in xen_common.h to use the new xendevicemodel interface if it is available along with compatibility code to use the old libxenctrl interface if it is not. Signed-off-by: Paul Durrant Reviewed-by: Anthony Perard --- Cc: Stefano Stabellini NOTE: Xen patc

[Qemu-devel] [PATCH v3 2/5] xen: rename xen_modified_memory() to xen_hvm_modified_memory()

2017-03-03 Thread Paul Durrant
This patch is a purely cosmetic change that avoids a name collision in a subsequent patch. Signed-off-by: Paul Durrant Reviewed-by: Anthony Perard --- Cc: Paolo Bonzini Cc: Stefano Stabellini --- include/exec/ram_addr.h | 4 ++-- include/hw/xen/xen.h| 2 +- xen-hvm-stub.c | 2 +-

[Qemu-devel] [PATCH v3 4/5] configure: detect presence of libxendevicemodel

2017-03-03 Thread Paul Durrant
This patch adds code in configure to set CONFIG_XEN_CTRL_INTERFACE_VERSION to a new value of 490 if libxendevicemodel is present in the build environment. Signed-off-by: Paul Durrant Reviewed-by: Anthony Perard --- Cc: Stefano Stabellini --- configure | 19 +++ 1 file changed,

[Qemu-devel] [PATCH v3 3/5] xen: create wrappers for all other uses of xc_hvm_XXX() functions

2017-03-03 Thread Paul Durrant
This patch creates inline wrapper functions in xen_common.h for all open coded calls to xc_hvm_XXX() functions outside of xen_common.h so that use of xen_xc can be made implicit. This again is in preparation for the move to using libxendevicemodel. Signed-off-by: Paul Durrant Reviewed-by: Anthony

[Qemu-devel] [PATCH v3 1/5] xen: make use of xen_xc implicit in xen_common.h inlines

2017-03-03 Thread Paul Durrant
Doing this will make the transition to using the new libxendevicemodel interface less intrusive on the callers of these functions, since using the new library will require a change of handle. NOTE: The patch also moves the 'externs' for xen_xc and xen_fmem from xen_backend.h to xen_common.h,

Re: [Qemu-devel] [PATCH v2 04/11] translate: downgrade IRQ BQL asserts to tcg_debug_assert

2017-03-03 Thread Paolo Bonzini
On 03/03/2017 11:08, Peter Maydell wrote: > On 2 March 2017 at 19:53, Alex Bennée wrote: >> While on MTTCG hosts it is very important that updates to >> cpu->interrupt_request are protected by the BQL not all guests have >> been converted to the correct locking yet. As a result we are seeing >>

[Qemu-devel] [PATCH for-2.9] hw/misc/imx6_src: Don't crash trying to reset missing CPUs

2017-03-03 Thread Peter Maydell
Commit 4881658a4b introduced a call to arm_get_cpu_by_id(), and Coverity noticed that we weren't checking that it didn't return NULL (CID 1371652). Normally this won't happen (because all 4 CPUs are expected to exist), but it's possible the user requested fewer CPUs on the command line. Handle thi

Re: [Qemu-devel] [Bug?] BQL about live migration

2017-03-03 Thread Dr. David Alan Gilbert
* Gonglei (Arei) (arei.gong...@huawei.com) wrote: > Hello Juan & Dave, cc'ing in pbonzini since it's magic involving cpu_synrhonize_all_states() > We hit a bug in our test: > Network error occurs when migrating a guest, libvirt then rollback the > migration, causes qemu coredump > qemu log: > 201

[Qemu-devel] [PATCH] target-nios2: take BQL around interrupt check

2017-03-03 Thread Paolo Bonzini
The interrupt controller does not have its own locking. Signed-off-by: Paolo Bonzini --- target/nios2/op_helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/nios2/op_helper.c b/target/nios2/op_helper.c index 538853c..efb1c48 100644 --- a/target/nios2/op_helper.c +++ b/target/n

Re: [Qemu-devel] [PATCH V2] migration: expose qemu_announce_self() via qmp

2017-03-03 Thread Markus Armbruster
"Dr. David Alan Gilbert" writes: > * Germano Veit Michel (germ...@redhat.com) wrote: >> qemu_announce_self() is triggered by qemu at the end of migrations >> to update the network regarding the path to the guest l2addr. >> >> however it is also useful when there is a network change such as >> an

Re: [Qemu-devel] [PATCH 0/5] A few VLAN-related bugfixes for RX packet abstraction

2017-03-03 Thread Peter Maydell
On 17 February 2017 at 03:04, Jason Wang wrote: > > > On 2017年02月16日 20:29, Dmitry Fleytman wrote: >> >> This series fix a few issues related >> to processing of RX packets with VLAN headers. >> >> See commit messages of specific patches >> for information regarding affected devices. >> >> Dmitry

Re: [Qemu-devel] [PATCH 1/1] virtio: fail device if set_event_notifier fails

2017-03-03 Thread Cornelia Huck
On Thu, 2 Mar 2017 19:59:42 +0100 Halil Pasic wrote: > The function virtio_notify_irqfd used to ignore the return code of > event_notifier_set. Let's fail the device should this occur. I'm wondering if there are reasons for event_notifier_set() to fail beyond "we've hit an internal race and sho

Re: [Qemu-devel] [PULL 00/26] QAPI patches for 2017-02-28

2017-03-03 Thread Markus Armbruster
Can break with multiple monitors race against each other: NAK

[Qemu-devel] [PATCH] [RFT] target/arm/arm-powerctl: Fix psci info return values

2017-03-03 Thread Andrew Jones
The power state spec section 5.1.5 AFFINITY_INFO defines the affinity info return values as 0 ON 1 OFF 2 ON_PENDING I grepped QEMU for power_state to ensure that no assumptions of OFF=0 were being made. Signed-off-by: Andrew Jones --- I found this with the yet to be committed kvm-unit-t

[Qemu-devel] [PATCH v4 10/28] qmp: Improve QMP dispatch error messages

2017-03-03 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- qapi/qmp-dispatch.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c index 23b0528..578c6d8 100644 --- a/qapi/qmp-dispatch.c +++ b/qapi/qmp-dispatch.c @@ -30,7

[Qemu-devel] [PATCH v4 00/28] qapi: QMP dispatch and input visitor work

2017-03-03 Thread Markus Armbruster
v4: * PATCH 05+06: New * PATCH 07: Messing with the list of commands breaks when multiple monitors race against each other, use two separate lists instead (R-by dropped) v3: * PATCH 12+18+19: Commit message tidied up [Eric] * PATCH 17: Spurious whitespace change dropped [Eric] * PATCH 22: Missi

[Qemu-devel] [PATCH v4 06/28] qapi-introspect: Mangle --prefix argument properly for C

2017-03-03 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- scripts/qapi-introspect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qapi-introspect.py b/scripts/qapi-introspect.py index 541644e..fb72c61 100644 --- a/scripts/qapi-introspect.py +++ b/scripts/qapi-introspect.py @@ -64,7 +64,

[Qemu-devel] [PATCH v4 13/28] qapi: Make QObject input visitor set *list reliably

2017-03-03 Thread Markus Armbruster
qobject_input_start_struct() sets *list, except when it fails because qobject_input_get_object() fails, i.e. the input object doesn't exist. All the other input visitor start_struct(), start_list(), start_alternate() always set *obj / *list. Change qobject_input_start_struct() to match. Signed-o

[Qemu-devel] [PATCH v4 01/28] qga: Fix crash on non-dictionary QMP argument

2017-03-03 Thread Markus Armbruster
The value of key 'arguments' must be a JSON object. qemu-ga neglects to check, and crashes. To reproduce, send { 'execute': 'guest-sync', 'arguments': [] } to qemu-ga. do_qmp_dispatch() uses qdict_get_qdict() to get the arguments. When not a JSON object, this gets a null pointer, which fl

[Qemu-devel] [PATCH v4 24/28] test-qobject-input-visitor: Cover missing nested struct member

2017-03-03 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- tests/test-qobject-input-visitor.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/test-qobject-input-visitor.c b/tests/test-qobject-input-visitor.c index 10c15c4..9f3a826 100644 --- a/tests/test-qobject-input-visitor.c +++ b/

[Qemu-devel] [PATCH v4 03/28] qmp-test: New, covering basic QMP protocol

2017-03-03 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- MAINTAINERS| 1 + tests/Makefile.include | 5 +- tests/libqtest.c | 17 -- tests/libqtest.h | 8 +++ tests/qmp-test.c | 139 + 5 files changed, 16

[Qemu-devel] [PATCH v4 11/28] qapi: Improve a QObject input visitor error message

2017-03-03 Thread Markus Armbruster
The QObject input visitor has three error message formats: * Parameter '%s' is missing * "Invalid parameter type for '%s', expected: %s" * "QMP input object member '%s' is unexpected" The '%s' are member names (or "null", but I'll fix that later). The last error message calls the thing "QMP inpu

[Qemu-devel] [PATCH v4 18/28] test-qobject-input-visitor: Use strict visitor

2017-03-03 Thread Markus Armbruster
The qobject input visitor comes in a strict and a non-strict variant. This test is the non-strict variant's last user. Turns out it relies on non-strict only in test_visitor_in_null(), and just out of laziness. We don't actually test the non-strict behavior. Clean up test_visitor_in_null(), and

[Qemu-devel] [PATCH v4 04/28] qmp: Dumb down how we run QMP command registration

2017-03-03 Thread Markus Armbruster
The way we get QMP commands registered is high tech: * qapi-commands.py generates qmp_init_marshal() that does the actual work * it also generates the magic to register it as a MODULE_INIT_QAPI function, so it runs when someone calls module_call_init(MODULE_INIT_QAPI) * main() calls module_c

[Qemu-devel] [PATCH v4 12/28] qapi: Clean up after commit 3d344c2

2017-03-03 Thread Markus Armbruster
Drop unused QIV_STACK_SIZE and unused qobject_input_start_struct() parameter errp. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- qapi/qobject-input-visitor.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/qapi/qobject-input-visitor.c b/qapi/qo

[Qemu-devel] [PATCH v4 09/28] qmp: Eliminate silly QERR_QMP_* macros

2017-03-03 Thread Markus Armbruster
The QERR_ macros are leftovers from the days of "rich" error objects. QERR_QMP_BAD_INPUT_OBJECT, QERR_QMP_BAD_INPUT_OBJECT_MEMBER, QERR_QMP_EXTRA_MEMBER are used in just one place now, except for one use that has crept into qobject-input-visitor.c. Drop these macros, to make the (bad) error messa

[Qemu-devel] [PATCH v4 08/28] qmp: Drop duplicated QMP command object checks

2017-03-03 Thread Markus Armbruster
qmp_check_input_obj() duplicates qmp_dispatch_check_obj(), except the latter screws up an error message. handle_qmp_command() runs first the former, then the latter via qmp_dispatch(), masking the screwup. qemu-ga also masks the screwup, because it also duplicates checks, just differently. qmp_c

[Qemu-devel] [PATCH v4 17/28] qom: Make object_property_set_qobject()'s input visitor strict

2017-03-03 Thread Markus Armbruster
Commit 240f64b made all qobject input visitors created outside tests strict, except for the one in object_property_set_qobject(). That one was left behind only because Eric couldn't spare the time to figure out whether making it strict would break anything, with a TODO comment. Time to resolve it

[Qemu-devel] [PATCH v4 20/28] tests-qobject-input-strict: Merge into test-qobject-input-visitor

2017-03-03 Thread Markus Armbruster
Much of test-qobject-input-strict.c duplicates test-qobject-input-strict.c, but with less assertions on expected output: * test_validate_struct() duplicates test_visitor_in_struct() * test_validate_struct_nested() duplicates test_visitor_in_struct_nested() * test_validate_list() duplicates the

[Qemu-devel] [PATCH v4 15/28] qapi: Drop string input visitor method optional()

2017-03-03 Thread Markus Armbruster
visit_optional() is to be called only between visit_start_struct() and visit_end_struct(). Visitors that don't support struct visits, i.e. don't implement start_struct(), end_struct(), have no use for it. Clarify documentation. The string input visitor doesn't support struct visits. Its parse_op

[Qemu-devel] [PATCH v4 26/28] tests: Cover input visit beyond end of list

2017-03-03 Thread Markus Armbruster
When you try to visit beyond the end of a list, the qobject input visitor crashes, and the string visitor screws returns garbage. The generated list visits never go beyond the list end, but manual visits could. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- tests/test-opts-visito

[Qemu-devel] [PATCH v4 16/28] qapi: Make string input and opts visitor require non-null input

2017-03-03 Thread Markus Armbruster
The string input visitor tries to cope with null input. Null input isn't used anywhere, and isn't covered by tests. Unsurprisingly, it doesn't fully work: start_list() crashes because it passes the input via parse_str() to strtoll() unchecked. Make string_input_visitor_new() assert its argument

[Qemu-devel] [PATCH v4 28/28] qapi: Improve qobject visitor documentation

2017-03-03 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- include/qapi/qobject-input-visitor.h | 37 ++- include/qapi/qobject-output-visitor.h | 35 + 2 files changed, 67 insertions(+), 5 deletions(-) diff --git a/include/qapi/

[Qemu-devel] [PATCH v4 27/28] qapi: Fix object input visit beyond end of list

2017-03-03 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- qapi/qobject-input-visitor.c | 11 --- tests/test-qobject-input-visitor.c | 2 -- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/qapi/qobject-input-visitor.c b/qapi/qobject-input-visitor.c index 34065ba..

Re: [Qemu-devel] [PULL 00/15] virtio, pc: fixes, features

2017-03-03 Thread Peter Maydell
On 2 March 2017 at 06:20, Michael S. Tsirkin wrote: > The following changes since commit 1e0addb682c3c552fd97480037d4f8ff18e2b87e: > > Merge remote-tracking branch 'remotes/sstabellini/tags/xen-20170228-tag' > into staging (2017-03-01 20:33:47 +) > > are available in the git repository at:

[Qemu-devel] [PATCH v4 14/28] qapi: Improve qobject input visitor error reporting

2017-03-03 Thread Markus Armbruster
Error messages refer to nodes of the QObject being visited by name. Trouble is the names are sometimes less than helpful: * The name of the root QObject is whatever @name argument got passed to the visitor, except NULL gets mapped to "null". We commonly pass NULL. Not good. Avoiding error

[Qemu-devel] [PATCH v4 21/28] test-string-input-visitor: Tear down existing test automatically

2017-03-03 Thread Markus Armbruster
Call visitor_input_teardown() from visitor_input_test_init(), so you don't have to call it from the actual tests. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- tests/test-string-input-visitor.c | 19 ++- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git

[Qemu-devel] [PATCH v4 23/28] tests: Cover partial input visit of list

2017-03-03 Thread Markus Armbruster
Demonstrates a design flaw: there is no way to for input visitors to report that a list visit didn't visit the complete input list. The generated list visits always do, but manual visits needn't. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- tests/test-opts-visitor.c |

[Qemu-devel] [PATCH v4 05/28] qapi: Support multiple command registries per program

2017-03-03 Thread Markus Armbruster
The command registry encapsulates a single command list. Give the functions using it a parameter instead. Define suitable command lists in monitor, guest agent and test-qmp-commands. Signed-off-by: Markus Armbruster --- include/qapi/qmp/dispatch.h | 22 ++ monitor.c

[Qemu-devel] [PATCH v4 25/28] qapi: Make input visitors detect unvisited list tails

2017-03-03 Thread Markus Armbruster
Fix the design flaw demonstrated in the previous commit: new method check_list() lets input visitors report that unvisited input remains for a list, exactly like check_struct() lets them report that unvisited input remains for a struct or union. Implement the method for the qobject input visitor (

Re: [Qemu-devel] [PULL v2 0/3] Merge qio 2017/02/27

2017-03-03 Thread Christian Borntraeger
On 03/03/2017 10:53 AM, Fam Zheng wrote: > On Fri, 03/03 09:12, Christian Borntraeger wrote: >> On 03/02/2017 05:33 PM, no-re...@patchew.org wrote: >> >> Fam, this seems to happen sometimes. Can you have a look at that why the >> qtest >> thing fails on the s390 box? > > I don't know, when I run

Re: [Qemu-devel] [Bug?] BQL about live migration

2017-03-03 Thread Paolo Bonzini
On 03/03/2017 13:00, Dr. David Alan Gilbert wrote: > Ouch that's pretty nasty; I remember Paolo explaining to me a while ago that > their were times when run_on_cpu would have to drop the BQL and I worried > about it, > but this is the 1st time I've seen an error due to it. > > Do you know what

[Qemu-devel] [PATCH v4 19/28] qapi: Drop unused non-strict qobject input visitor

2017-03-03 Thread Markus Armbruster
The split between tests/test-qobject-input-visitor.c and tests/test-qobject-input-strict.c now makes less sense than ever. The next commit will take care of that. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- block/nbd.c | 2 +- block/nfs.c

Re: [Qemu-devel] qemu-system-ppc64 crashes during "info qtree"

2017-03-03 Thread Cédric Le Goater
On 03/03/2017 12:16 PM, Cédric Le Goater wrote: > On 03/03/2017 11:48 AM, Thomas Huth wrote: >> Hi Cédric, hi David, >> >> running "info qtree" at the HMP monitor with the pseries machine >> currently results in: >> >> [...] >> dev: spapr-vty, id "vty@7100" >> reg = 1895825408

[Qemu-devel] [PATCH v4 02/28] libqtest: Work around a "QMP wants a newline" bug

2017-03-03 Thread Markus Armbruster
The next commit is going to add a test that calls qmp("null"). Curiously, this hangs. Here's why. qmp_fd_sendv() doesn't send newlines. Not even when @fmt contains some. At first glance, the QMP parser seems to be fine with that. However, it turns out that it fails to react to input until it se

Re: [Qemu-devel] [PATCH 1/1] virtio: fail device if set_event_notifier fails

2017-03-03 Thread Cornelia Huck
On Fri, 3 Mar 2017 13:43:32 +0100 Halil Pasic wrote: > On 03/03/2017 01:21 PM, Cornelia Huck wrote: > > On Thu, 2 Mar 2017 19:59:42 +0100 > > Halil Pasic wrote: > > > >> The function virtio_notify_irqfd used to ignore the return code of > >> event_notifier_set. Let's fail the device should thi

[Qemu-devel] [PATCH v4 07/28] qmp: Clean up how we enforce capability negotiation

2017-03-03 Thread Markus Armbruster
To enforce capability negotiation before normal operation, handle_qmp_command() inspects every command before it's handed off to qmp_dispatch(). This is a bit of a layering violation, and results in duplicated code. Before capability negotiation (!cur_mon->in_command_mode), we fail commands other

[Qemu-devel] [PATCH] ppc/xics: register reset handlers for the ICP and ICS objects

2017-03-03 Thread Cédric Le Goater
The recent changes on the XICS layer removed the XICSState object to let the sPAPR machine handle the ICP and ICS directly. The reset of these objects was previously handled by XICSState, which was a SysBus device, and to keep the same behavior, the ICP and ICS were assigned to SysbBus. But that b

[Qemu-devel] [PATCH v4 22/28] test-string-input-visitor: Improve list coverage

2017-03-03 Thread Markus Armbruster
Lists with elements above INT64_MAX don't work (known bug). Empty lists don't work (weird). Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- tests/test-string-input-visitor.c | 85 +-- 1 file changed, 72 insertions(+), 13 deletions(-) diff --git

Re: [Qemu-devel] [PATCH 1/1] virtio: fail device if set_event_notifier fails

2017-03-03 Thread Halil Pasic
On 03/03/2017 01:21 PM, Cornelia Huck wrote: > On Thu, 2 Mar 2017 19:59:42 +0100 > Halil Pasic wrote: > >> The function virtio_notify_irqfd used to ignore the return code of >> event_notifier_set. Let's fail the device should this occur. > > I'm wondering if there are reasons for event_notifi

Re: [Qemu-devel] [PATCH V2 0/7] execute code from mmio area

2017-03-03 Thread Paolo Bonzini
On 21/02/2017 09:51, KONRAD Frederic wrote: > Ping! > > Would be nice for us if we can get this into 2.9. Sorry, I've been much busier with icount than I would have liked. :( Paolo > Thanks, > Fred > > Le 17/02/2017 à 21:17, fred.kon...@greensocs.com a écrit : >> From: KONRAD Frederic >> >>

Re: [Qemu-devel] [PATCH v2 09/11] target/mips/op_helper: hold BQL before calling cpu_mips_get_count

2017-03-03 Thread Alex Bennée
Yongbok Kim writes: > On 02/03/2017 19:53, Alex Bennée wrote: >> We should hold the BQL before we transition to HW emulation. This is >> because all HW emulation needs to be serialised under MTTCG >> conditions. This is picked up by asserts that fire when >> cpu_mips_get_count triggers and IRQ.

Re: [Qemu-devel] [PULL 00/15] virtio, pc: fixes, features

2017-03-03 Thread Peter Maydell
On 2 March 2017 at 06:20, Michael S. Tsirkin wrote: > dtc | 2 +- I just noticed this erroneous submodule update in here, unfortunately after I pushed it to master :-( I'll fix up the tree... thanks -- PMM

Re: [Qemu-devel] [PATCH] virito: unbreak virtio device behinds IOMMU with region cache

2017-03-03 Thread Paolo Bonzini
On 03/03/2017 10:06, Jason Wang wrote: > Commit c611c76417f5 ("virtio: add MemoryListener to cache ring > translations") registers a memory listener to dma_as. This may not > work when IOMMU is enabled: dma_as(bus_master_as) were correctly > initialized in pcibus_machine_done() after virtio_reali

Re: [Qemu-devel] [PATCH v2 09/11] target/mips/op_helper: hold BQL before calling cpu_mips_get_count

2017-03-03 Thread Yongbok Kim
On 03/03/2017 12:54, Alex Bennée wrote: > > Yongbok Kim writes: > >> On 02/03/2017 19:53, Alex Bennée wrote: >>> We should hold the BQL before we transition to HW emulation. This is >>> because all HW emulation needs to be serialised under MTTCG >>> conditions. This is picked up by asserts tha

Re: [Qemu-devel] [PATCH v4 00/28] qapi: QMP dispatch and input visitor work

2017-03-03 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 1488544368-30622-1-git-send-email-arm...@redhat.com Type: series Subject: [Qemu-devel] [PATCH v4 00/28] qapi: QMP dispatch and input visitor work === TEST SCRIPT BEGIN === #!/bin/bash BA

Re: [Qemu-devel] [PATCH] ppc/xics: register reset handlers for the ICP and ICS objects

2017-03-03 Thread Thomas Huth
On 03.03.2017 13:51, Cédric Le Goater wrote: > The recent changes on the XICS layer removed the XICSState object to > let the sPAPR machine handle the ICP and ICS directly. The reset of > these objects was previously handled by XICSState, which was a SysBus > device, and to keep the same behavior,

Re: [Qemu-devel] [PATCH 02/15] sheepdog: Fix error handling in sd_snapshot_delete()

2017-03-03 Thread Kevin Wolf
Am 02.03.2017 um 22:43 hat Markus Armbruster geschrieben: > As a bdrv_snapshot_delete() method, sd_snapshot_delete() must set an > error and return negative errno on failure. It sometimes returns -1, > and sometimes neglects to set an error. It also prints error messages > with error_report(). F

Re: [Qemu-devel] [PATCH 1/1] virtio: fail device if set_event_notifier fails

2017-03-03 Thread Halil Pasic
On 03/03/2017 01:50 PM, Cornelia Huck wrote: > On Fri, 3 Mar 2017 13:43:32 +0100 > Halil Pasic wrote: > >> On 03/03/2017 01:21 PM, Cornelia Huck wrote: >>> On Thu, 2 Mar 2017 19:59:42 +0100 >>> Halil Pasic wrote: >>> The function virtio_notify_irqfd used to ignore the return code of

[Qemu-devel] [PATCH 0/6] tcg: fix icount super slowdown

2017-03-03 Thread Paolo Bonzini
icount has become much slower after tcg_cpu_exec has stopped using the BQL. There is also a latent bug that is masked by the slowness. The slowness happens because every occurrence of a QEMU_CLOCK_VIRTUAL timer now has to wake up the I/O thread and wait for it. The rendez-vous is mediated by the

[Qemu-devel] [PATCH 4/5] main-loop: remove now unnecessary optimization

2017-03-03 Thread Paolo Bonzini
This optimization is not necessary anymore, because the vCPU now drops the I/O thread lock even with TCG. Drop it to simplify the code and avoid the "I/O thread spun for 1000 iterations" warning. Signed-off-by: Paolo Bonzini --- vl.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) di

[Qemu-devel] [PATCH 1/5] qemu-timer: fix off-by-one

2017-03-03 Thread Paolo Bonzini
If the first timer is exactly at the current value of the clock, the deadline is met and the timer should fire. This fixes itself without icount, but with icount execution of instructions will stop exactly at the deadline. Signed-off-by: Paolo Bonzini --- util/qemu-timer.c | 2 +- 1 file change

[Qemu-devel] [PATCH 2/5] qemu-timer: do not include sysemu/cpus.h from util/qemu-timer.h

2017-03-03 Thread Paolo Bonzini
This dependency is the wrong way, and we will need util/qemu-timer.h from sysemu/cpus.h in the next patch. Signed-off-by: Paolo Bonzini --- cpu-exec.c| 1 + hw/core/ptimer.c | 1 + include/qemu/timer.h | 1 - include/sysemu/cpus.h | 2 ++ kvm-all.c | 1 + monitor.c

[Qemu-devel] [PATCH 5/5] icount: process QEMU_CLOCK_VIRTUAL timers in vCPU thread

2017-03-03 Thread Paolo Bonzini
icount has become much slower after tcg_cpu_exec has stopped using the BQL. There is also a latent bug that is masked by the slowness. The slowness happens because every occurrence of a QEMU_CLOCK_VIRTUAL timer now has to wake up the I/O thread and wait for it. The rendez-vous is mediated by the

[Qemu-devel] [PATCH 3/5] cpus: define QEMUTimerListNotifyCB for QEMU system emulation

2017-03-03 Thread Paolo Bonzini
There is no change for now, because the callback just invokes qemu_notify_event. Signed-off-by: Paolo Bonzini --- cpus.c | 5 + include/qemu/timer.h | 4 ++-- include/sysemu/cpus.h| 1 + stubs/cpu-get-icount.c | 6 ++ tests/test-aio-multith

[Qemu-devel] [PULL 1/1] qemu-options: Rewrite -numa documentation

2017-03-03 Thread Eduardo Habkost
Rewrite the -numa documentation to clarify what exactly it does. Signed-off-by: Eduardo Habkost Message-Id: <20170123180632.28942-3-ehabk...@redhat.com> Reviewed-by: Igor Mammedov Signed-off-by: Eduardo Habkost --- qemu-options.hx | 38 -- 1 file changed, 28

Re: [Qemu-devel] [Bug?] BQL about live migration

2017-03-03 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > > > On 03/03/2017 13:00, Dr. David Alan Gilbert wrote: > > Ouch that's pretty nasty; I remember Paolo explaining to me a while ago that > > their were times when run_on_cpu would have to drop the BQL and I worried > > about it, > > but this is the 1

  1   2   3   4   >