Re: [Qemu-devel] [PATCH v3 3/6] vmstate: replace DeviceState with VMStateIf

2019-09-13 Thread Marc-André Lureau
Hi On Thu, Sep 12, 2019 at 8:19 PM Halil Pasic wrote: > > On Thu, 12 Sep 2019 16:25:11 +0400 > Marc-André Lureau wrote: > > > diff --git a/hw/s390x/s390-skeys.c b/hw/s390x/s390-skeys.c > > index d4807f..16b9bbf04d 100644 > > --- a/hw/s390x/s390-skeys.c > > +++ b/hw/s390x/s390-skeys.c > > @@

Re: [Qemu-devel] [PATCH v2 1/5] rcu: Add automatically released rcu_read_lock variant

2019-09-13 Thread Paolo Bonzini
On 12/09/19 19:45, Dr. David Alan Gilbert wrote: > Do you think it's best to use the block version for all cases > or to use the non-block version by taste? > The block version is quite nice, but that turns most of the patches > into 'indent everything'. I don't really know myself. On first glanc

Re: [Qemu-devel] [PATCH] target/arm: fix CBAR register for AArch64 CPUs

2019-09-13 Thread Luc Michel
Hi Peter, On 9/12/19 6:03 PM, Peter Maydell wrote: > On Thu, 12 Sep 2019 at 12:01, Luc Michel wrote: >> >> For AArch64 CPUs with a CBAR register, we have two views for it: >> - in AArch64 state, the CBAR_EL1 register (S3_1_C15_C3_0), returns the >> full 64 bits CBAR value >> - in AArch32

Re: [Qemu-devel] [RFC PATCH] virtio-blk: schedule virtio_notify_config to run on main context

2019-09-13 Thread Sergio Lopez
Michael S. Tsirkin writes: > On Thu, Sep 12, 2019 at 08:19:25PM +0200, Sergio Lopez wrote: >> Another AioContext-related issue, and this is a tricky one. >> >> Executing a QMP block_resize request for a virtio-blk device running >> on an iothread may cause a deadlock involving the following mut

[Qemu-devel] [PATCH] target/s390x/kvm: Officially require at least kernel 3.15

2019-09-13 Thread Thomas Huth
Since QEMU v2.10, the KVM acceleration does not work on older kernels anymore since the code accidentally requires the KVM_CAP_DEVICE_CTRL capability now - it should have been optional instead. Instead of fixing the bug, we asked in the ChangeLog of QEMU 2.11 - 3.0 that people should speak up if th

Re: [Qemu-devel] [PATCH] target/s390x/kvm: Officially require at least kernel 3.15

2019-09-13 Thread David Hildenbrand
On 13.09.19 09:46, Thomas Huth wrote: > Since QEMU v2.10, the KVM acceleration does not work on older kernels > anymore since the code accidentally requires the KVM_CAP_DEVICE_CTRL > capability now - it should have been optional instead. > Instead of fixing the bug, we asked in the ChangeLog of QEM

Re: [Qemu-devel] [PATCH] blockdev: avoid acquiring AioContext lock twice at do_drive_backup()

2019-09-13 Thread Max Reitz
On 12.09.19 18:16, Sergio Lopez wrote: > do_drive_backup() acquires the AioContext lock of the corresponding > BlockDriverState. This is not a problem when it's called from > qmp_drive_backup(), but drive_backup_prepare() also acquires the lock > before calling it. > > This change adds a BlockDriv

Re: [Qemu-devel] [PATCH v2 3/3] xen: perform XenDevice clean-up in XenBus watch handler

2019-09-13 Thread Paul Durrant
> -Original Message- > From: Xen-devel On Behalf Of Paul > Durrant > Sent: 12 September 2019 16:16 > To: Anthony Perard > Cc: xen-de...@lists.xenproject.org; Stefano Stabellini > ; qemu-devel@nongnu.org > Subject: Re: [Xen-devel] [PATCH v2 3/3] xen: perform XenDevice clean-up in > XenB

[Qemu-devel] [PATCH v3 1/3] xen / notify: introduce a new XenWatchList abstraction

2019-09-13 Thread Paul Durrant
Xenstore watch call-backs are already abstracted away from XenBus using the XenWatch data structure but the associated NotifierList manipulation and file handle registration is still open coded in various xen_bus_...() functions. This patch creates a new XenWatchList data structure to allow these i

[Qemu-devel] [PATCH v3 0/3] xen: fix a potential crash in xen-bus

2019-09-13 Thread Paul Durrant
This series fixes a potential segfault caused by NotifierList corruption in xen-bus. The first two patches lay the groundwork and the third actually fixes the problem. Paul Durrant (3): xen / notify: introduce a new XenWatchList abstraction xen: introduce separate XenWatchList for XenDevice ob

[Qemu-devel] [PATCH v3 3/3] xen: perform XenDevice clean-up in XenBus watch handler

2019-09-13 Thread Paul Durrant
Cleaning up offline XenDevice objects directly in xen_device_backend_changed() is dangerous as xen_device_unrealize() will modify the watch list that is being walked. Even the QLIST_FOREACH_SAFE() used in notifier_list_notify() is insufficient as *two* notifiers (for the frontend and backend watche

Re: [Qemu-devel] [PATCH v3 0/3] xen: fix a potential crash in xen-bus

2019-09-13 Thread Paul Durrant
I typo-ed 'xen-devel'. I'll re-send. Paul > -Original Message- > From: Paul Durrant > Sent: 13 September 2019 09:21 > To: qemu-devel@nongnu.org; xen-dev...@lists.xenproject.org > Cc: Paul Durrant ; Anthony Perard > ; Stefano > Stabellini > Subject: [PATCH v3 0/3] xen: fix a potential

[Qemu-devel] [PATCH v3 2/3] xen: introduce separate XenWatchList for XenDevice objects

2019-09-13 Thread Paul Durrant
This patch uses the XenWatchList abstraction to add a separate watch list for each device. This is more scalable than walking a single notifier list for all watches and is also necessary to implement a bug-fix in a subsequent patch. Signed-off-by: Paul Durrant Reviewed-by: Anthony Perard --- Cc:

[Qemu-devel] [PATCH v3 1/3] xen / notify: introduce a new XenWatchList abstraction

2019-09-13 Thread Paul Durrant
Xenstore watch call-backs are already abstracted away from XenBus using the XenWatch data structure but the associated NotifierList manipulation and file handle registration is still open coded in various xen_bus_...() functions. This patch creates a new XenWatchList data structure to allow these i

[Qemu-devel] [PATCH v3 3/3] xen: perform XenDevice clean-up in XenBus watch handler

2019-09-13 Thread Paul Durrant
Cleaning up offline XenDevice objects directly in xen_device_backend_changed() is dangerous as xen_device_unrealize() will modify the watch list that is being walked. Even the QLIST_FOREACH_SAFE() used in notifier_list_notify() is insufficient as *two* notifiers (for the frontend and backend watche

[Qemu-devel] [PATCH v3 0/3] xen: fix a potential crash in xen-bus

2019-09-13 Thread Paul Durrant
This series fixes a potential segfault caused by NotifierList corruption in xen-bus. The first two patches lay the groundwork and the third actually fixes the problem. Paul Durrant (3): xen / notify: introduce a new XenWatchList abstraction xen: introduce separate XenWatchList for XenDevice ob

[Qemu-devel] [PATCH v3 2/3] xen: introduce separate XenWatchList for XenDevice objects

2019-09-13 Thread Paul Durrant
This patch uses the XenWatchList abstraction to add a separate watch list for each device. This is more scalable than walking a single notifier list for all watches and is also necessary to implement a bug-fix in a subsequent patch. Signed-off-by: Paul Durrant Reviewed-by: Anthony Perard --- Cc:

[Qemu-devel] [PATCH v1 0/6] Allow memory_region_register_iommu_notifier() to fail

2019-09-13 Thread Eric Auger
This series allows the memory_region_register_iommu_notifier() to fail. As of now, when a MAP notifier is attempted to be registered along with SMMUv3, Intel iommu without caching mode or AMD IOMMU, we exit in the IOMMU MR notify_flag_changed() callback. In case of VFIO assigned device hotplug, thi

[Qemu-devel] [PATCH v1 1/6] memory: allow memory_region_register_iommu_notifier() to fail

2019-09-13 Thread Eric Auger
Currently, when a notifier is attempted to be registered and its flags are not supported (especially the MAP one) by the IOMMU MR, we generally abruptly exit in the IOMMU code. The failure could be handled more nicely in the caller and especially in the VFIO code. So let's allow memory_region_regi

[Qemu-devel] [PATCH v1 4/6] vhost: assert on memory_region_register_iommu_notifier() failure

2019-09-13 Thread Eric Auger
memory_region_register_iommu_notifier now returns an error in case of failure. Assert in such a case. Signed-off-by: Eric Auger --- hw/virtio/vhost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 34accdf615..9b5551fc4d 100644 ---

[Qemu-devel] [PATCH v1 6/6] amd_iommu: Let amdvi_iommu_notify_flag_changed() fail

2019-09-13 Thread Eric Auger
In case a MAP notifier is attempted to be registered, let's simply return an error. This latter now is handled in the VFIO code. Signed-off-by: Eric Auger --- hw/i386/amd_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c index 1

[Qemu-devel] [PATCH v1 2/6] vfio/common: Handle memory_region_register_iommu_notifier() failure

2019-09-13 Thread Eric Auger
Now memory_region_register_iommu_notifier() is allowed to fail, let's handle the returned value in vfio_listener_region_add(). This will allow to remove the error handling (exit) in the IOMMUs that implement a notify_flag_changed() that sometimes cannot accept the MAP flag. Signed-off-by: Eric Au

[Qemu-devel] [Bug 1843852] Re: QEMU does not express a dependency on perl-Test-Harness

2019-09-13 Thread Alex Bennée
Given we require python perhaps the simplest solution would be to re- write the tap-driver as a python script rather than adding another configure check? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/

[Qemu-devel] [PATCH v1 3/6] exec: assert on memory_region_register_iommu_notifier() failure

2019-09-13 Thread Eric Auger
memory_region_register_iommu_notifier now returns an error in case of failure. Assert in such a case. Signed-off-by: Eric Auger --- exec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exec.c b/exec.c index 235d6bc883..da30251a2b 100644 --- a/exec.c +++ b/exec.c @@ -692,7

[Qemu-devel] [PATCH v1 5/6] intel_iommu: Let vtd_iommu_notify_flag_changed() fail

2019-09-13 Thread Eric Auger
In case a MAP notifier is attempted to be registered without caching mode, let's simply return an error. This latter now is handled in the VFIO code. Signed-off-by: Eric Auger --- hw/i386/intel_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/intel_iommu.c b/hw

[Qemu-devel] [Bug 1841592] Re: ppc: softfloat float implementation issues

2019-09-13 Thread Alex Bennée
It looks like the test case isn't properly exercising the code that is likely to be wrong. It sounds like we need a proper comprehensive testcase for fused operations (along the line of the ARM fcvt test case). This can probably be a multiarch testcase which we can build for all the various targets

Re: [Qemu-devel] [PATCH v4 0/5] qcow2: async handling of fragmented io

2019-09-13 Thread Max Reitz
On 16.08.19 17:30, Vladimir Sementsov-Ogievskiy wrote: > Hi all! > > Here is an asynchronous scheme for handling fragmented qcow2 > reads and writes. Both qcow2 read and write functions loops through > sequential portions of data. The series aim it to parallelize these > loops iterations. > It imp

Re: [Qemu-devel] [RFC PATCH] virtio-blk: schedule virtio_notify_config to run on main context

2019-09-13 Thread Kevin Wolf
Am 12.09.2019 um 21:51 hat Michael S. Tsirkin geschrieben: > On Thu, Sep 12, 2019 at 08:19:25PM +0200, Sergio Lopez wrote: > > Another AioContext-related issue, and this is a tricky one. > > > > Executing a QMP block_resize request for a virtio-blk device running > > on an iothread may cause a dea

Re: [Qemu-devel] [PATCH 2/6] exec.c: remove an unnecessary assert on PHYS_MAP_NODE_NIL in phys_map_node_alloc()

2019-09-13 Thread Paolo Bonzini
On 13/09/19 01:02, Wei Yang wrote: > It shows PHYS_MAP_NODE_NIL may represents more node the tree could hold. Which is good, it means the assert can trigger. > The assert here is not harmful, while maybe we can have a better way to handle > it? I don't know... The assert just says "careful, some

Re: [Qemu-devel] [PATCH v4 0/5] qcow2: async handling of fragmented io

2019-09-13 Thread Vladimir Sementsov-Ogievskiy
13.09.2019 11:58, Max Reitz wrote: > On 16.08.19 17:30, Vladimir Sementsov-Ogievskiy wrote: >> Hi all! >> >> Here is an asynchronous scheme for handling fragmented qcow2 >> reads and writes. Both qcow2 read and write functions loops through >> sequential portions of data. The series aim it to paral

[Qemu-devel] [PATCH v2] target/s390x/kvm: Officially require at least kernel 3.15

2019-09-13 Thread Thomas Huth
Since QEMU v2.10, the KVM acceleration does not work on older kernels anymore since the code accidentally requires the KVM_CAP_DEVICE_CTRL capability now - it should have been optional instead. Instead of fixing the bug, we asked in the ChangeLog of QEMU 2.11 - 3.0 that people should speak up if th

Re: [Qemu-devel] [PATCH v2] target/s390x/kvm: Officially require at least kernel 3.15

2019-09-13 Thread David Hildenbrand
I'd use the title "s390x/kvm: ..." Reviewed-by: David Hildenbrand On 13.09.19 11:14, Thomas Huth wrote: > Since QEMU v2.10, the KVM acceleration does not work on older kernels > anymore since the code accidentally requires the KVM_CAP_DEVICE_CTRL > capability now - it should have been optional i

Re: [Qemu-devel] [PULL] RISC-V Patches for the 4.2 Soft Freeze, Part 1

2019-09-13 Thread Peter Maydell
On Wed, 11 Sep 2019 at 09:24, Palmer Dabbelt wrote: > > The following changes since commit 89ea03a7dc83ca36b670ba7f787802791fcb04b1: > > Merge remote-tracking branch > 'remotes/huth-gitlab/tags/m68k-pull-2019-09-07' into staging (2019-09-09 > 09:48:34 +0100) > > are available in the Git reposi

Re: [Qemu-devel] [PATCH v1 3/6] exec: assert on memory_region_register_iommu_notifier() failure

2019-09-13 Thread Andrew Jones
On Fri, Sep 13, 2019 at 10:36:12AM +0200, Eric Auger wrote: > memory_region_register_iommu_notifier now returns an error > in case of failure. Assert in such a case. > > Signed-off-by: Eric Auger > --- > exec.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/exec.c b/

[Qemu-devel] [PATCH v2 0/2] ati: fix ati_cursor_define bug.

2019-09-13 Thread Gerd Hoffmann
Gerd Hoffmann (2): vga: move access helpers to separate include file ati: use vga_read_byte in ati_cursor_define hw/display/vga-access.h | 49 hw/display/vga-helpers.h | 26 - hw/display/ati.c | 19 hw/d

[Qemu-devel] [PATCH v2 1/2] vga: move access helpers to separate include file

2019-09-13 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/display/vga-access.h | 49 hw/display/vga-helpers.h | 26 - hw/display/vga.c | 1 + 3 files changed, 50 insertions(+), 26 deletions(-) create mode 100644 hw/display/vga-access.h diff --git

[Qemu-devel] [PATCH v2 2/2] ati: use vga_read_byte in ati_cursor_define

2019-09-13 Thread Gerd Hoffmann
This makes sure reads are confined to vga video memory. v2: fix ati_cursor_draw_line too. Reported-by: xu hang Signed-off-by: Gerd Hoffmann --- hw/display/ati.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/hw/display/ati.c b/hw/display/ati.c index 8f

Re: [Qemu-devel] [RFC PATCH] virtio-blk: schedule virtio_notify_config to run on main context

2019-09-13 Thread Sergio Lopez
Kevin Wolf writes: > Am 12.09.2019 um 21:51 hat Michael S. Tsirkin geschrieben: >> On Thu, Sep 12, 2019 at 08:19:25PM +0200, Sergio Lopez wrote: >> > Another AioContext-related issue, and this is a tricky one. >> > >> > Executing a QMP block_resize request for a virtio-blk device running >> > o

Re: [Qemu-devel] [PATCH] blockdev: avoid acquiring AioContext lock twice at do_drive_backup()

2019-09-13 Thread Sergio Lopez
Max Reitz writes: > On 12.09.19 18:16, Sergio Lopez wrote: >> do_drive_backup() acquires the AioContext lock of the corresponding >> BlockDriverState. This is not a problem when it's called from >> qmp_drive_backup(), but drive_backup_prepare() also acquires the lock >> before calling it. >> >>

Re: [Qemu-devel] [RFC PATCH] virtio-blk: schedule virtio_notify_config to run on main context

2019-09-13 Thread Kevin Wolf
Am 13.09.2019 um 11:28 hat Sergio Lopez geschrieben: > > Kevin Wolf writes: > > > Am 12.09.2019 um 21:51 hat Michael S. Tsirkin geschrieben: > >> On Thu, Sep 12, 2019 at 08:19:25PM +0200, Sergio Lopez wrote: > >> > Another AioContext-related issue, and this is a tricky one. > >> > > >> > Execut

Re: [Qemu-devel] [PATCH V2 1/2] block/nfs: tear down aio before nfs_close

2019-09-13 Thread Max Reitz
On 10.09.19 17:41, Peter Lieven wrote: > nfs_close is a sync call from libnfs and has its own event > handler polling on the nfs FD. Avoid that both QEMU and libnfs > are intefering here. > > CC: qemu-sta...@nongnu.org > Signed-off-by: Peter Lieven > --- > block/nfs.c | 6 -- > 1 file change

[Qemu-devel] [RFC v3 0/3] KVM/ARM: Fix >256 vcpus

2019-09-13 Thread Eric Auger
Since 4.18, KVM/ARM exposes a KVM_MAX_VCPUS equal to 512. However it was reported [1] that a VM with more than 256 vcpus cannot be launched. 5.4 is about to fix the situation with 2 patches: - one upgrade of the KVM_IRQ_LINE API [2] supporting a vcpu id encoded on 12 bits, - the reduction of KVM

[Qemu-devel] [RFC v3 3/3] ARM: KVM: Check KVM_CAP_ARM_IRQ_LINE_LAYOUT_2 for smp_cpus > 256

2019-09-13 Thread Eric Auger
Host kernel within [4.18, 5.3] report an erroneous KVM_MAX_VCPUS=512 for ARM. The actual capability to instantiate more than 256 vcpus was fixed in 5.4 with the upgrade of the KVM_IRQ_LINE ABI to support vcpu id encoded on 12 bits instead of 8 and a redistributor consuming a single KVM IO device in

[Qemu-devel] [RFC v3 2/3] intc/arm_gic: Support IRQ injection for more than 256 vpus

2019-09-13 Thread Eric Auger
Host kernels that expose the KVM_CAP_ARM_IRQ_LINE_LAYOUT_2 capability allow injection of interrupts along with vcpu ids larger than 255. Let's encode the vpcu id on 12 bits according to the upgraded KVM_IRQ_LINE ABI when needed. Given that we have two callsites that need to assemble the value for

[Qemu-devel] [RFC v3 1/3] linux headers: update for KVM_CAP_ARM_IRQ_LINE_LAYOUT_2

2019-09-13 Thread Eric Auger
Temporary header update against 5.3-rc5 + Marc's patch: "[PATCH] KVM: arm/arm64: vgic: Allow more than 256 vcpus for KVM_IRQ_LINE" Signed-off-by: Eric Auger --- include/standard-headers/asm-x86/bootparam.h | 2 ++ include/standard-headers/asm-x86/kvm_para.h | 1 + include/standard-headers/lin

Re: [Qemu-devel] [PATCH] blockdev: avoid acquiring AioContext lock twice at do_drive_backup()

2019-09-13 Thread Max Reitz
On 13.09.19 11:37, Sergio Lopez wrote: > > Max Reitz writes: > >> On 12.09.19 18:16, Sergio Lopez wrote: >>> do_drive_backup() acquires the AioContext lock of the corresponding >>> BlockDriverState. This is not a problem when it's called from >>> qmp_drive_backup(), but drive_backup_prepare() al

Re: [Qemu-devel] [PATCH v4 3/5] block/qcow2: refactor qcow2_co_preadv_part

2019-09-13 Thread Kevin Wolf
Am 16.08.2019 um 17:30 hat Vladimir Sementsov-Ogievskiy geschrieben: > Further patch will run partial requests of iterations of > qcow2_co_preadv in parallel for performance reasons. To prepare for > this, separate part which may be parallelized into separate function > (qcow2_co_preadv_task). > >

Re: [Qemu-devel] [PATCH V2 2/2] block/nfs: add support for nfs_umount

2019-09-13 Thread ronnie sahlberg
On Wed, Sep 11, 2019 at 5:48 PM Max Reitz wrote: > > On 10.09.19 17:41, Peter Lieven wrote: > > libnfs recently added support for unmounting. Add support > > in Qemu too. > > > > Signed-off-by: Peter Lieven > > --- > > block/nfs.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a

Re: [Qemu-devel] [PATCH V2 1/2] block/nfs: tear down aio before nfs_close

2019-09-13 Thread Peter Lieven
Am 13.09.19 um 11:51 schrieb Max Reitz: > On 10.09.19 17:41, Peter Lieven wrote: >> nfs_close is a sync call from libnfs and has its own event >> handler polling on the nfs FD. Avoid that both QEMU and libnfs >> are intefering here. >> >> CC: qemu-sta...@nongnu.org >> Signed-off-by: Peter Lieven >

Re: [Qemu-devel] [PATCH] blockdev: avoid acquiring AioContext lock twice at do_drive_backup()

2019-09-13 Thread Sergio Lopez
Max Reitz writes: > On 13.09.19 11:37, Sergio Lopez wrote: >> >> Max Reitz writes: >> >>> On 12.09.19 18:16, Sergio Lopez wrote: do_drive_backup() acquires the AioContext lock of the corresponding BlockDriverState. This is not a problem when it's called from qmp_drive_backup(),

[Qemu-devel] [PATCH 0/2] HPPA tcg fixes

2019-09-13 Thread Sven Schnelle
Hi Richard, here are two patches for HPPA tcg. QEMU was crashing with a tcg assert because dead temporaries where used. This could be observed at the end· of a HP-UX 11.11 installation, or by running the STARBASE X11 demos in HP-UX 10.20. Thanks, Sven Sven Schnelle (2): target/hppa: prevent tr

[Qemu-devel] [PATCH 2/2] target/hppa: prevent trashing of temporary in do_depw_sar()

2019-09-13 Thread Sven Schnelle
nullify_over() calls brcond which destroys all temporaries. Signed-off-by: Sven Schnelle --- target/hppa/translate.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index b12525d535..c1b2822f60 100644 --- a/target/h

[Qemu-devel] [PATCH 1/2] target/hppa: prevent trashing of temporary in trans_mtctl()

2019-09-13 Thread Sven Schnelle
nullify_over() calls brcond which destroys all temporaries. Signed-off-by: Sven Schnelle --- target/hppa/translate.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 53e17d8963..b12525d535 100644 --- a/target/hppa/tra

Re: [Qemu-devel] [PATCH V2 1/2] block/nfs: tear down aio before nfs_close

2019-09-13 Thread Kevin Wolf
Am 13.09.2019 um 11:51 hat Max Reitz geschrieben: > On 10.09.19 17:41, Peter Lieven wrote: > > nfs_close is a sync call from libnfs and has its own event > > handler polling on the nfs FD. Avoid that both QEMU and libnfs > > are intefering here. > > > > CC: qemu-sta...@nongnu.org > > Signed-off-by

Re: [Qemu-devel] [PATCH v2 1/5] rcu: Add automatically released rcu_read_lock variant

2019-09-13 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > On 12/09/19 19:45, Dr. David Alan Gilbert wrote: > > Do you think it's best to use the block version for all cases > > or to use the non-block version by taste? > > The block version is quite nice, but that turns most of the patches > > into 'indent ev

[Qemu-devel] [PATCH v3 3/5] migration: Use automatic rcu_read unlock in ram.c

2019-09-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Use the automatic read unlocker in migration/ram.c Signed-off-by: Dr. David Alan Gilbert --- migration/ram.c | 260 ++-- 1 file changed, 121 insertions(+), 139 deletions(-) diff --git a/migration/ram.c b/migration/ram.

[Qemu-devel] [PATCH v3 1/5] rcu: Add automatically released rcu_read_lock variants

2019-09-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" RCU_READ_LOCK_GUARD() takes the rcu_read_lock and then uses glib's g_auto infrastructure (and thus whatever the compiler's hooks are) to release it on all exits of the block. WITH_RCU_READ_LOCK_GUARD() is similar but is used as a wrapper for the lock, i.e.: WIT

[Qemu-devel] [PATCH v3 0/5] Automatic RCU read unlock

2019-09-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" This patch uses glib's g_auto mechanism to automatically free rcu_read_lock's at the end of the block. Given that humans have a habit of forgetting an error path somewhere it's best to leave it to the compiler. v3 Add block-head version of macro Rename Add d

[Qemu-devel] [PATCH v3 2/5] migration: Fix missing rcu_read_unlock

2019-09-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Use the automatic rcu_read unlocker to fix a missing unlock. Signed-off-by: Dr. David Alan Gilbert --- migration/ram.c | 35 +-- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/migration/ram.c b/migration/ram.c inde

[Qemu-devel] [PATCH v3 5/5] rcu: Use automatic rc_read unlock in core memory/exec code

2019-09-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Signed-off-by: Dr. David Alan Gilbert --- exec.c | 120 +++--- include/exec/ram_addr.h | 138 +++- memory.c| 15 ++--- 3 files changed, 120 insertions(+), 153 deletio

[Qemu-devel] [PATCH v3 4/5] migration: Use automatic rcu_read unlock in rdma.c

2019-09-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Use the automatic read unlocker in migration/rdma.c. Signed-off-by: Dr. David Alan Gilbert --- migration/rdma.c | 57 ++-- 1 file changed, 11 insertions(+), 46 deletions(-) diff --git a/migration/rdma.c b/migration/rdm

Re: [Qemu-devel] [PATCH v2 1/5] rcu: Add automatically released rcu_read_lock variant

2019-09-13 Thread Paolo Bonzini
On 13/09/19 12:24, Dr. David Alan Gilbert wrote: >> We could also add LOCK_GUARD(lock) and WITH_LOCK_GUARD(lock), using >> QemuLockable for polymorphism. I even had patches a while ago (though >> they used something like LOCK_GUARD(guard_var, lock). I think we >> dropped them because of fear that

Re: [Qemu-devel] [PATCH v3 1/3] block/qcow2: refactoring of threaded encryption code

2019-09-13 Thread Max Reitz
On 13.09.19 00:37, Maxim Levitsky wrote: > This commit tries to clarify few function arguments, > and add comments describing the encrypt/decrypt interface > > Signed-off-by: Maxim Levitsky > --- > block/qcow2-cluster.c | 8 +++--- > block/qcow2-threads.c | 63 ++

Re: [Qemu-devel] [PULL 0/1] Filemon test patches

2019-09-13 Thread Peter Maydell
On Wed, 11 Sep 2019 at 10:33, Daniel P. Berrangé wrote: > > The following changes since commit 89ea03a7dc83ca36b670ba7f787802791fcb04b1: > > Merge remote-tracking branch > 'remotes/huth-gitlab/tags/m68k-pull-2019-09-07' into staging (2019-09-09 > 09:48:34 +0100) > > are available in the Git re

[Qemu-devel] [PATCH 1/2] trace: Remove trailing newline in events

2019-09-13 Thread Philippe Mathieu-Daudé
While the tracing frawework does not forbid trailing newline in events format string, using them lead to confuse output. It is the responsibility of the backend to properly end an event line. Some of our formats have trailing newlines, remove them. Signed-off-by: Philippe Mathieu-Daudé --- hw/m

[Qemu-devel] [PATCH 0/2] trace: Forbid trailing newline in event format

2019-09-13 Thread Philippe Mathieu-Daudé
Hi Stefan, I'v been confused by trailing newline in trace reports, so this series aims to fix this, by cleaning current formats and add a check to catch new one introduced. Regards, Phil. Philippe Mathieu-Daudé (2): trace: Remove trailing newline in events trace: Forbid event format ending

[Qemu-devel] [PATCH 2/2] trace: Forbid event format ending with newline character

2019-09-13 Thread Philippe Mathieu-Daudé
Event format ending with newlines confuse the trace reports. Forbid them. Add a check to refuse new format added with trailing newline: $ make [...] GEN hw/misc/trace.h Traceback (most recent call last): File "scripts/tracetool.py", line 152, in main(sys.argv) File "s

Re: [Qemu-devel] [PATCH v3 2/3] block/qcow2: fix the corruption when rebasing luks encrypted files

2019-09-13 Thread Max Reitz
On 13.09.19 00:37, Maxim Levitsky wrote: > This fixes subtle corruption introduced by luks threaded encryption > in commit 8ac0f15f335 > > Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1745922 > > The corruption happens when we do a write that >* writes to two or more unallocated clus

Re: [Qemu-devel] [PATCH v4 3/5] block/qcow2: refactor qcow2_co_preadv_part

2019-09-13 Thread Vladimir Sementsov-Ogievskiy
13.09.2019 13:01, Kevin Wolf wrote: > Am 16.08.2019 um 17:30 hat Vladimir Sementsov-Ogievskiy geschrieben: >> Further patch will run partial requests of iterations of >> qcow2_co_preadv in parallel for performance reasons. To prepare for >> this, separate part which may be parallelized into separat

Re: [Qemu-devel] [PATCH 2/2] target/hppa: prevent trashing of temporary in do_depw_sar()

2019-09-13 Thread Philippe Mathieu-Daudé
Hi Sven, On 9/13/19 12:17 PM, Sven Schnelle wrote: > nullify_over() calls brcond which destroys all temporaries. > > Signed-off-by: Sven Schnelle > --- > target/hppa/translate.c | 10 ++ > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/target/hppa/translate.c b/target

[Qemu-devel] [PATCH v2] virtio-blk: schedule virtio_notify_config to run on main context

2019-09-13 Thread Sergio Lopez
virtio_notify_config() needs to acquire the global mutex, which isn't allowed from an iothread, and may lead to a deadlock like this: - main thead * Has acquired: qemu_global_mutex. * Is trying the acquire: iothread AioContext lock via AIO_WAIT_WHILE (after aio_poll). - iothread * Has

Re: [Qemu-devel] [PATCH v3 3/3] qemu-iotests: Add test for bz #1745922

2019-09-13 Thread Max Reitz
On 13.09.19 00:37, Maxim Levitsky wrote: > Signed-off-by: Maxim Levitsky > --- > tests/qemu-iotests/263 | 91 ++ > tests/qemu-iotests/263.out | 40 + > tests/qemu-iotests/group | 1 + > 3 files changed, 132 insertions(+) > create mode 10

Re: [Qemu-devel] [PATCH] target/arm: Fix sign-extension for SMLAL*

2019-09-13 Thread Philippe Mathieu-Daudé
On 9/12/19 8:30 PM, Richard Henderson wrote: > The 32-bit product should be sign-extended, not zero-extended. > > Fixes: ea96b374641b > Reported-by: Laurent Desnogues > Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé > --- > target/arm/translate.c | 4 +++- > 1 file chan

Re: [Qemu-devel] [PATCH] build: Don't ignore qapi-visit-core.c

2019-09-13 Thread Philippe Mathieu-Daudé
On 9/12/19 8:46 PM, Eric Blake wrote: > This file is version-controlled, and not generated from a .json file. > > Fixes: bf582c3461b > Reported-by: Thomas Huth Good catch! Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Eric Blake > --- > .gitignore | 1 + > 1 file changed, 1 insertion

Re: [Qemu-devel] [PATCH v4 3/5] block/qcow2: refactor qcow2_co_preadv_part

2019-09-13 Thread Max Reitz
On 13.09.19 12:53, Vladimir Sementsov-Ogievskiy wrote: > 13.09.2019 13:01, Kevin Wolf wrote: >> Am 16.08.2019 um 17:30 hat Vladimir Sementsov-Ogievskiy geschrieben: >>> Further patch will run partial requests of iterations of >>> qcow2_co_preadv in parallel for performance reasons. To prepare for >

Re: [Qemu-devel] [PATCH 2/2] target/hppa: prevent trashing of temporary in do_depw_sar()

2019-09-13 Thread Sven Schnelle
Hi Philippe, On Fri, Sep 13, 2019 at 12:58:14PM +0200, Philippe Mathieu-Daudé wrote: > Hi Sven, > > On 9/13/19 12:17 PM, Sven Schnelle wrote: > > nullify_over() calls brcond which destroys all temporaries. > > > > Signed-off-by: Sven Schnelle > > --- > > target/hppa/translate.c | 10 ++

Re: [Qemu-devel] [PATCH] blockdev: avoid acquiring AioContext lock twice at do_drive_backup()

2019-09-13 Thread Max Reitz
On 13.09.19 12:15, Sergio Lopez wrote: > > Max Reitz writes: > >> On 13.09.19 11:37, Sergio Lopez wrote: >>> >>> Max Reitz writes: >>> On 12.09.19 18:16, Sergio Lopez wrote: > do_drive_backup() acquires the AioContext lock of the corresponding > BlockDriverState. This is not a prob

Re: [Qemu-devel] [PATCH V2 2/2] block/nfs: add support for nfs_umount

2019-09-13 Thread Max Reitz
On 13.09.19 12:09, ronnie sahlberg wrote: > On Wed, Sep 11, 2019 at 5:48 PM Max Reitz wrote: >> >> On 10.09.19 17:41, Peter Lieven wrote: >>> libnfs recently added support for unmounting. Add support >>> in Qemu too. >>> >>> Signed-off-by: Peter Lieven >>> --- >>> block/nfs.c | 3 +++ >>> 1 file

Re: [Qemu-devel] [PATCH 2/2] target/hppa: prevent trashing of temporary in do_depw_sar()

2019-09-13 Thread Philippe Mathieu-Daudé
On 9/13/19 1:08 PM, Sven Schnelle wrote: > Hi Philippe, > > On Fri, Sep 13, 2019 at 12:58:14PM +0200, Philippe Mathieu-Daudé wrote: >> Hi Sven, >> >> On 9/13/19 12:17 PM, Sven Schnelle wrote: >>> nullify_over() calls brcond which destroys all temporaries. >>> >>> Signed-off-by: Sven Schnelle >>>

Re: [Qemu-devel] [Qemu-block] [PATCH v2 6/7] curl: Handle success in multi_check_completion

2019-09-13 Thread Max Reitz
On 10.09.19 18:13, Maxim Levitsky wrote: > On Tue, 2019-09-10 at 14:41 +0200, Max Reitz wrote: >> Background: As of cURL 7.59.0, it verifies that several functions are >> not called from within a callback. Among these functions is >> curl_multi_add_handle(). >> >> curl_read_cb() is a callback from

Re: [Qemu-devel] [PATCH v3] blockjob: update nodes head while removing all bdrv

2019-09-13 Thread Max Reitz
On 11.09.19 12:03, Max Reitz wrote: > From: Sergio Lopez > > block_job_remove_all_bdrv() iterates through job->nodes, calling > bdrv_root_unref_child() for each entry. The call to the latter may > reach child_job_[can_]set_aio_ctx(), which will also attempt to > traverse job->nodes, potentially f

Re: [Qemu-devel] [PATCH] build: Don't ignore qapi-visit-core.c

2019-09-13 Thread Eric Blake
cc: qemu-trivial On 9/12/19 1:46 PM, Eric Blake wrote: > This file is version-controlled, and not generated from a .json file. > > Fixes: bf582c3461b > Reported-by: Thomas Huth > Signed-off-by: Eric Blake > --- > .gitignore | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/.gitignore b

Re: [Qemu-devel] [PATCH v4 3/5] block/qcow2: refactor qcow2_co_preadv_part

2019-09-13 Thread Kevin Wolf
Am 13.09.2019 um 13:06 hat Max Reitz geschrieben: > On 13.09.19 12:53, Vladimir Sementsov-Ogievskiy wrote: > > 13.09.2019 13:01, Kevin Wolf wrote: > >> Am 16.08.2019 um 17:30 hat Vladimir Sementsov-Ogievskiy geschrieben: > >>> Further patch will run partial requests of iterations of > >>> qcow2_co_

Re: [Qemu-devel] [Qemu-block] [PATCH v2 6/7] curl: Handle success in multi_check_completion

2019-09-13 Thread Maxim Levitsky
On Fri, 2019-09-13 at 13:20 +0200, Max Reitz wrote: > On 10.09.19 18:13, Maxim Levitsky wrote: > > On Tue, 2019-09-10 at 14:41 +0200, Max Reitz wrote: > > > Background: As of cURL 7.59.0, it verifies that several functions are > > > not called from within a callback. Among these functions is > > >

Re: [Qemu-devel] [PATCH v2 0/7] block/curl: Fix hang and potential crash

2019-09-13 Thread Max Reitz
On 10.09.19 14:41, Max Reitz wrote: > Hi, > > As reported in https://bugzilla.redhat.com/show_bug.cgi?id=1740193, our > curl block driver can spontaneously hang. This becomes visible e.g. > when reading compressed qcow2 images: > > $ qemu-img convert -p -O raw -n \ > https://download.cirros-cl

Re: [Qemu-devel] [PATCH v4 00/14] block: Try to create well-typed json:{} filenames

2019-09-13 Thread Max Reitz
Another gentle ping. Max On 24.06.19 19:39, Max Reitz wrote: > Hi, > > There are two explanations of this cover letter, a relative one (to v3) > and an absolute one. > > > *** Important note *** > > The final patch in this series is an example that converts most of > block-core.json to use d

Re: [Qemu-devel] [PATCH v3 3/3] qemu-iotests: Add test for bz #1745922

2019-09-13 Thread Maxim Levitsky
On Fri, 2019-09-13 at 13:01 +0200, Max Reitz wrote: > On 13.09.19 00:37, Maxim Levitsky wrote: > > Signed-off-by: Maxim Levitsky > > --- > > tests/qemu-iotests/263 | 91 ++ > > tests/qemu-iotests/263.out | 40 + > > tests/qemu-iotests/group

Re: [Qemu-devel] [PATCH v4 3/5] block/qcow2: refactor qcow2_co_preadv_part

2019-09-13 Thread Max Reitz
On 13.09.19 13:34, Kevin Wolf wrote: > Am 13.09.2019 um 13:06 hat Max Reitz geschrieben: >> On 13.09.19 12:53, Vladimir Sementsov-Ogievskiy wrote: >>> 13.09.2019 13:01, Kevin Wolf wrote: Am 16.08.2019 um 17:30 hat Vladimir Sementsov-Ogievskiy geschrieben: > Further patch will run partial r

Re: [Qemu-devel] [PATCH v3 1/5] rcu: Add automatically released rcu_read_lock variants

2019-09-13 Thread Paolo Bonzini
On 13/09/19 12:25, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > RCU_READ_LOCK_GUARD() takes the rcu_read_lock and then uses glib's > g_auto infrastructure (and thus whatever the compiler's hooks are) to > release it on all exits of the block. > > WITH_RCU_READ_LOCK_GU

[Qemu-devel] [PATCH v3] virtio-mmio: implement modern (v2) personality (virtio-1)

2019-09-13 Thread Sergio Lopez
Implement the modern (v2) personality, according to the VirtIO 1.0 specification. Support for v2 among guests is not as widespread as it'd be desirable. While the Linux driver has had it for a while, support is missing, at least, from Tianocore EDK II, NetBSD and FreeBSD. For this reason, the v2

[Qemu-devel] [PATCH] MAINTAINERS: update my email address

2019-09-13 Thread Paul Durrant
My Citrix email address will expire shortly. Signed-off-by: Paul Durrant --- Cc: Anthony Perard Cc: Stefano Stabellini --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 50eaf005f4..3cabb9e449 100644 --- a/MAINTAINERS +++ b/MAINT

Re: [Qemu-devel] [PATCH 2/2] roms/Makefile.edk2: don't pull in submodules when building from tarball

2019-09-13 Thread Laszlo Ersek
On 09/13/19 01:12, Michael Roth wrote: > Currently the `make efi` target pulls submodules nested under the > roms/edk2 submodule as dependencies. However, when we attempt to build > from a tarball this fails since we are no longer in a git tree. > > A preceding patch will pre-populate these submod

Re: [Qemu-devel] [PATCH v2 16/28] s390x/tcg: Fault-safe memmove

2019-09-13 Thread David Hildenbrand
On 12.09.19 00:03, Richard Henderson wrote: > On 9/6/19 3:57 AM, David Hildenbrand wrote: >> +static void access_memmove_idx(CPUS390XState *env, vaddr dest, vaddr src, >> + int size, int dest_idx, int src_idx, >> + uintptr_t ra) >> +{ >> +

Re: [Qemu-devel] [PULL 0/1] Block patches

2019-09-13 Thread Peter Maydell
On Wed, 11 Sep 2019 at 15:36, Stefan Hajnoczi wrote: > > The following changes since commit cc6613e244e86c66f83467eab5284825d7057cea: > > Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' > into staging (2019-09-03 11:06:09 +0100) > > are available in the Git repository

Re: [Qemu-devel] [PATCH v3 6/8] iotests: Test driver whitelisting in 093

2019-09-13 Thread Max Reitz
On 20.08.19 23:32, John Snow wrote: > > > On 8/19/19 4:18 PM, Max Reitz wrote: >> null-aio may not be whitelisted. Skip all test cases that require it. >> >> Signed-off-by: Max Reitz >> --- >> tests/qemu-iotests/093 | 12 +--- >> 1 file changed, 9 insertions(+), 3 deletions(-) >> >> di

Re: [Qemu-devel] [PATCH v2] qapi/qmp-dispatch: Fix error class for reporting disabled commands

2019-09-13 Thread Markus Armbruster
Michal Privoznik writes: > If a command is disabled an error is reported. But due to usage > of error_setg() the class of the error is GenericError which does > not help callers in distinguishing this case from a case where a > qmp command fails regularly due to other reasons. Use > CommandNotFou

Re: [Qemu-devel] [PATCH v6 25/42] mirror: Deal with filters

2019-09-13 Thread Kevin Wolf
Am 09.08.2019 um 18:13 hat Max Reitz geschrieben: > This includes some permission limiting (for example, we only need to > take the RESIZE permission for active commits where the base is smaller > than the top). > > Signed-off-by: Max Reitz > --- > block/mirror.c | 117 ++

[Qemu-devel] [PATCH v4 0/3] Fix qcow2+luks corruption introduced by commit 8ac0f15f335

2019-09-13 Thread Maxim Levitsky
Commit 8ac0f15f335 accidently broke the COW of non changed areas of newly allocated clusters, when the write spans multiple clusters, and needs COW both prior and after the write. This results in 'after' COW area being encrypted with wrong sector address, which render it corrupted. Bugzilla: https

[Qemu-devel] [PATCH v4 2/3] block/qcow2: fix the corruption when rebasing luks encrypted files

2019-09-13 Thread Maxim Levitsky
This fixes subtle corruption introduced by luks threaded encryption in commit 8ac0f15f335 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1745922 The corruption happens when we do a write that * writes to two or more unallocated clusters at once * doesn't fully cover the first sector

[Qemu-devel] [PATCH v4 1/3] block/qcow2: refactoring of threaded encryption code

2019-09-13 Thread Maxim Levitsky
This commit tries to clarify few function arguments, and add comments describing the encrypt/decrypt interface Signed-off-by: Maxim Levitsky --- block/qcow2-cluster.c | 9 --- block/qcow2-threads.c | 62 ++- block/qcow2.c | 5 ++-- block/qcow

  1   2   3   >