[Qemu-devel] [Bug 1838277] Re: qemu-system-aarch64: regression in 3.1: breakpoint instructions routed to EL1 from EL2 when ELD is EL1

2019-07-30 Thread Elouan Appéré
I'm not familiar with QEMU's codebase enough & I haven't tested the code below, but I think: raise_exception(env, EXCP_BKPT, syndrome, arm_debug_target_el(env)); should be replaced with something along the lines of: int debug_el = arm_debug_target_el(env); int current_el = arm_current_el(env);

Re: [Qemu-devel] [PATCH RFC 1/2] memory: make MemoryRegion alias migratable

2019-07-30 Thread Igor Mammedov
On Mon, 29 Jul 2019 18:53:15 +0100 "Dr. David Alan Gilbert" wrote: > * Igor Mammedov (imamm...@redhat.com) wrote: > > use qemu_ram_alloc_from_ptr() to create aliased RAMBlock > > to the part of original memory region. > > > > Signed-off-by: Igor Mammedov > > --- > > exec.c | 7 --- > > m

Re: [Qemu-devel] [PATCH] virtiofsd: fix compile error if 'F_OFD_GETLK' not defined

2019-07-30 Thread Eric Blake
On 7/29/19 7:27 PM, piaojun wrote: > Use F_GETLK for fcntl when F_OFD_GETLK not defined. Which system are you hitting this problem on? The problem with F_GETLK is that it is NOT as safe as F_OFD_GETLK. We already have fcntl_op_getlk and qemu_probe_lock_ops() in util/osdep.c to not only determine

Re: [Qemu-devel] When to use qemu/typedefs.h (was: [PATCH 23/28] numa: Don't include hw/boards.h into sysemu/numa.h)

2019-07-30 Thread Paolo Bonzini
On 30/07/19 15:15, Eric Blake wrote: >> We occasionally give up and use types directly rather than their typedef >> names, flouting the coding style. This patch does. Trades messing with >> qemu/typedefs.h for having to write 'struct' a few times. I think Markus made the right call here. Using

Re: [Qemu-devel] [PATCH RFC 1/2] memory: make MemoryRegion alias migratable

2019-07-30 Thread Paolo Bonzini
On 30/07/19 15:25, Igor Mammedov wrote: > I'd guess you've meant RAMBlocks instead of memory regions, if that's it > then yes, every alias pointing to RAM backed memory region will have > RAMBlock that's points to aliased part of aliased memory region. The question is just, does it break migration

[Qemu-devel] [Bug 1838277] Re: qemu-system-aarch64: regression in 3.1: breakpoint instructions always routed to EL_D even when current EL is higher

2019-07-30 Thread Peter Maydell
Just sent a patch out for review which I think should fix this: https://patchew.org/QEMU/20190730132522.27086-1-peter.mayd...@linaro.org/ -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1838277 Title:

Re: [Qemu-devel] [PATCH 2/2] pcie_root_port: Disable ACS on older machines

2019-07-30 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > ACS got added in 4.0 unconditionally, that broke older<->4.0 migration > where there was a PCIe root port. > Fix this by turning it off for 3.1 and older machines; note this > fixes compatibility for older QEMUs but break

Re: [Qemu-devel] [PATCH v3 01/33] Create Resettable QOM interface

2019-07-30 Thread Cornelia Huck
On Mon, 29 Jul 2019 16:56:22 +0200 Damien Hedde wrote: (...) > +/* > + * ResettableClass: > + * Interface for resettable objects. > + * > + * The reset operation is divided in several phases each represented by a > + * method. > + * > + * Each Ressetable must maintain a reset counter in its stat

Re: [Qemu-devel] [PATCH 1/2] pcie_root_port: Allow ACS to be disabled

2019-07-30 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > ACS was added in 4.0 unconditionally, this breaks migration > compatibility. > Allow ACS to be disabled by adding a property that's > checked by pcie_root_port. > > Unfortunately pcie-root-port doesn't have any instance da

Re: [Qemu-devel] [PATCH v3 01/33] Create Resettable QOM interface

2019-07-30 Thread Peter Maydell
On Tue, 30 Jul 2019 at 14:42, Cornelia Huck wrote: > > On Mon, 29 Jul 2019 16:56:22 +0200 > Damien Hedde wrote: > > (...) > > > +/* > > + * ResettableClass: > > + * Interface for resettable objects. > > + * > > + * The reset operation is divided in several phases each represented by a > > + * met

Re: [Qemu-devel] [PATCH v3 01/33] Create Resettable QOM interface

2019-07-30 Thread Cornelia Huck
On Tue, 30 Jul 2019 14:44:21 +0100 Peter Maydell wrote: > On Tue, 30 Jul 2019 at 14:42, Cornelia Huck wrote: > > > > On Mon, 29 Jul 2019 16:56:22 +0200 > > Damien Hedde wrote: > > > > (...) > > > > > +/* > > > + * ResettableClass: > > > + * Interface for resettable objects. > > > + * > > > +

Re: [Qemu-devel] [PATCH v3 01/33] Create Resettable QOM interface

2019-07-30 Thread Peter Maydell
On Tue, 30 Jul 2019 at 14:56, Cornelia Huck wrote: > > On Tue, 30 Jul 2019 14:44:21 +0100 > Peter Maydell wrote: > > > On Tue, 30 Jul 2019 at 14:42, Cornelia Huck wrote: > > > I'm having a hard time figuring out what a 'cold' or a 'warm' reset is > > > supposed to be... can you add a definition/

Re: [Qemu-devel] [PATCH] virtiofsd: fix compile error if 'F_OFD_GETLK' not defined

2019-07-30 Thread piaojun
Hi Eric, On 2019/7/30 21:28, Eric Blake wrote: > On 7/29/19 7:27 PM, piaojun wrote: >> Use F_GETLK for fcntl when F_OFD_GETLK not defined. > > Which system are you hitting this problem on? > > The problem with F_GETLK is that it is NOT as safe as F_OFD_GETLK. > > We already have fcntl_op_getlk

Re: [Qemu-devel] [PATCH v3 25/50] translator: add translator_ld{ub, sw, uw, l, q}

2019-07-30 Thread Alex Bennée
Richard Henderson writes: > On 7/30/19 5:41 AM, Alex Bennée wrote: >> Do we ever need _code access that isn't part of the >> translator loading instructions? > > We use it; I'm not sure that's the same as need. ;-) Yeah I've run into others (e.g. alpha alpha_cpu_do_unaligned_access). So the q

Re: [Qemu-devel] [PATCH v3 01/33] Create Resettable QOM interface

2019-07-30 Thread Damien Hedde
On 7/30/19 3:59 PM, Peter Maydell wrote: > On Tue, 30 Jul 2019 at 14:56, Cornelia Huck wrote: >> >> On Tue, 30 Jul 2019 14:44:21 +0100 >> Peter Maydell wrote: >> >>> On Tue, 30 Jul 2019 at 14:42, Cornelia Huck wrote: I'm having a hard time figuring out what a 'cold' or a 'warm' reset is >

[Qemu-devel] [PATCH v2 4/4] block/qcow2: introduce parallel subrequest handling in read and write

2019-07-30 Thread Vladimir Sementsov-Ogievskiy
It improves performance for fragmented qcow2 images. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2.c | 125 + block/trace-events | 1 + 2 files changed, 115 insertions(+), 11 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c

[Qemu-devel] [PATCH v2 3/4] block/qcow2: refactor qcow2_co_pwritev_part

2019-07-30 Thread Vladimir Sementsov-Ogievskiy
Similarly to previous commit, prepare for parallelizing write-loop iterations. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2.c | 150 +- 1 file changed, 88 insertions(+), 62 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c ind

[Qemu-devel] [PATCH v2 2/4] block/qcow2: refactor qcow2_co_preadv_part

2019-07-30 Thread Vladimir Sementsov-Ogievskiy
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). While being here, also separate encrypted clusters reading to own function, like

[Qemu-devel] [PATCH v2 1/4] block: introduce aio task pool

2019-07-30 Thread Vladimir Sementsov-Ogievskiy
Common interface for aio task loops. To be used for improving performance of synchronous io loops in qcow2, block-stream, copy-on-read, and may be other places. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/aio_task.h| 52 +++ block/aio_task.c| 119 ++

[Qemu-devel] [PATCH v2 0/4] qcow2: async handling of fragmented io

2019-07-30 Thread Vladimir Sementsov-Ogievskiy
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 improves performance for fragmented qcow2 images, I've tested it as desc

Re: [Qemu-devel] [PATCH v7] qemu-io: add pattern file for write command

2019-07-30 Thread Denis Plotnikov
Ping! On Jul 5 2019, at 1:21 pm, Denis Plotnikov wrote: The patch allows to provide a pattern file for write command. There was no similar ability before. Signed-off-by: Denis Plotnikov --- v7: * fix variable naming * make code more readable * extend help for write command v6: * the pattern fi

[Qemu-devel] [PATCH] vhost-vsock: report QMP event when set running

2019-07-30 Thread N. B.
From: Ning Bo Report vsock running event so that the upper application can control boot sequence. see https://github.com/kata-containers/runtime/pull/1918 Signed-off-by: Ning Bo --- hw/virtio/vhost-vsock.c | 3 +++ qapi/char.json | 22 ++ 2 files changed, 25 inser

Re: [Qemu-devel] [PATCH RFC 1/2] memory: make MemoryRegion alias migratable

2019-07-30 Thread Igor Mammedov
On Tue, 30 Jul 2019 15:34:54 +0200 Paolo Bonzini wrote: > On 30/07/19 15:25, Igor Mammedov wrote: > > I'd guess you've meant RAMBlocks instead of memory regions, if that's it > > then yes, every alias pointing to RAM backed memory region will have > > RAMBlock that's points to aliased part of ali

[Qemu-devel] [Bug 1837049] Re: qemu-system-ppc segfaults with -display sdl

2019-07-30 Thread Alex Bennée
** Tags added: tcg -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1837049 Title: qemu-system-ppc segfaults with -display sdl Status in QEMU: New Bug description: Hello. I was trying to debu

Re: [Qemu-devel] [PATCH v2 3/3] qcow2: add zstd cluster compression

2019-07-30 Thread Denis Plotnikov
On Jul 9 2019, at 9:18 am, Markus Armbruster wrote: Denis Plotnikov writes: zstd significantly reduces cluster compression time. It provides better compression performance maintaining the same level of compression ratio in comparison with zlib, which, by the moment, has been the only compression

Re: [Qemu-devel] [PATCH v2 0/3] add zstd cluster compression

2019-07-30 Thread Denis Plotnikov
Hi all! Is there any other comments besides Markus's one about adding zlib/zstd links to compressed cluster layout description? On Jul 4 2019, at 4:09 pm, Denis Plotnikov wrote: change log: v2: * relax the compression type setting restriction in the spec * fix qcow2 header size checking * fix e

Re: [Qemu-devel] [PATCH for-4.1?] target/arm: Deliver BKPT/BRK exceptions to correct exception level

2019-07-30 Thread Richard Henderson
On 7/30/19 6:25 AM, Peter Maydell wrote: > Most Arm architectural debug exceptions (eg watchpoints) are ignored > if the configured "debug exception level" is below the current > exception level (so for example EL1 can't arrange to get debug exceptions > for EL2 execution). Exceptions generated by

[Qemu-devel] [PATCH for-4.1 1/2] fdc: Fix inserting read-only media in empty drive

2019-07-30 Thread Kevin Wolf
In order to insert a read-only medium (i.e. a read-only block node) to the BlockBackend of a floppy drive, we must not have taken write permissions on that BlockBackend, or the operation will fail with the error message "Block node is read-only". The device already takes care to remove all permiss

[Qemu-devel] [PATCH for-4.1 0/2] fdc: Fix inserting read-only media in empty drive

2019-07-30 Thread Kevin Wolf
Kevin Wolf (2): fdc: Fix inserting read-only media in empty drive iotests/118: Test inserting a read-only medium hw/block/fdc.c | 11 --- tests/qemu-iotests/118 | 6 +- tests/qemu-iotests/118.out | 4 ++-- 3 files changed, 15 insertions(+), 6 deletions(-) -- 2.

[Qemu-devel] [PATCH for-4.1 2/2] iotests/118: Test inserting a read-only medium

2019-07-30 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- tests/qemu-iotests/118 | 6 +- tests/qemu-iotests/118.out | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/118 b/tests/qemu-iotests/118 index 603e10e8a2..499c5f0901 100755 --- a/tests/qemu-iotests/118 +++ b/tests/qem

[Qemu-devel] [Bug 1838277] Re: qemu-system-aarch64: regression in 3.1: breakpoint instructions always routed to EL_D even when current EL is higher

2019-07-30 Thread Peter Maydell
** Changed in: qemu Status: New => In Progress -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1838277 Title: qemu-system-aarch64: regression in 3.1: breakpoint instructions always routed to

Re: [Qemu-devel] [PATCH for-4.1 1/2] fdc: Fix inserting read-only media in empty drive

2019-07-30 Thread Max Reitz
On 30.07.19 16:57, Kevin Wolf wrote: > In order to insert a read-only medium (i.e. a read-only block node) to > the BlockBackend of a floppy drive, we must not have taken write > permissions on that BlockBackend, or the operation will fail with the > error message "Block node is read-only". > > Th

Re: [Qemu-devel] [qemu-s390x] [PATCH RFC 0/2] s390: stop abusing memory_region_allocate_system_memory()

2019-07-30 Thread Christian Borntraeger
I remember that you send a similar patch a while ago and something broke on s390x. Have you changed something from the old patchs set? On 29.07.19 16:52, Igor Mammedov wrote: > While looking into unifying guest RAM allocation to use hostmem backends > for initial RAM (especially when -mempath is

Re: [Qemu-devel] [PATCH for-4.1 1/2] fdc: Fix inserting read-only media in empty drive

2019-07-30 Thread John Snow
On 7/30/19 10:57 AM, Kevin Wolf wrote: > In order to insert a read-only medium (i.e. a read-only block node) to > the BlockBackend of a floppy drive, we must not have taken write > permissions on that BlockBackend, or the operation will fail with the > error message "Block node is read-only". >

Re: [Qemu-devel] [PATCH for-4.1 2/2] iotests/118: Test inserting a read-only medium

2019-07-30 Thread Max Reitz
On 30.07.19 16:57, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > tests/qemu-iotests/118 | 6 +- > tests/qemu-iotests/118.out | 4 ++-- > 2 files changed, 7 insertions(+), 3 deletions(-) Personally, I wouldn’t mind a self.assert_qmp(result, 'return[0]/inserted/ro', read_only_

Re: [Qemu-devel] [PATCH for-4.1 2/2] iotests/118: Test inserting a read-only medium

2019-07-30 Thread John Snow
On 7/30/19 10:57 AM, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > tests/qemu-iotests/118 | 6 +- > tests/qemu-iotests/118.out | 4 ++-- > 2 files changed, 7 insertions(+), 3 deletions(-) > > diff --git a/tests/qemu-iotests/118 b/tests/qemu-iotests/118 > index 603e10e8a2..499c

Re: [Qemu-devel] [PATCH-for-4.2 v8 3/9] hw/acpi: Add ACPI Generic Event Device Support

2019-07-30 Thread Igor Mammedov
On Fri, 26 Jul 2019 11:45:13 +0100 Shameer Kolothum wrote: > From: Samuel Ortiz > > The ACPI Generic Event Device (GED) is a hardware-reduced specific > device[ACPI v6.1 Section 5.6.9] that handles all platform events, > including the hotplug ones. This patch generates the AML code that > defin

Re: [Qemu-devel] [PATCH for-4.1?] target/arm: Deliver BKPT/BRK exceptions to correct exception level

2019-07-30 Thread Philippe Mathieu-Daudé
On 7/30/19 3:25 PM, Peter Maydell wrote: > Most Arm architectural debug exceptions (eg watchpoints) are ignored > if the configured "debug exception level" is below the current > exception level (so for example EL1 can't arrange to get debug exceptions > for EL2 execution). Exceptions generated by

[Qemu-devel] [PULL 0/2] fdc: Fix inserting read-only media in empty drive

2019-07-30 Thread Kevin Wolf
The following changes since commit 8517bf84056282ea3e27772d51f76db3a6fa2d26: Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2019-07-30' into staging (2019-07-30 14:23:07 +0100) are available in the Git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you

[Qemu-devel] [PULL 1/2] fdc: Fix inserting read-only media in empty drive

2019-07-30 Thread Kevin Wolf
In order to insert a read-only medium (i.e. a read-only block node) to the BlockBackend of a floppy drive, we must not have taken write permissions on that BlockBackend, or the operation will fail with the error message "Block node is read-only". The device already takes care to remove all permiss

[Qemu-devel] [PULL 2/2] iotests/118: Test inserting a read-only medium

2019-07-30 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: John Snow --- tests/qemu-iotests/118 | 6 +- tests/qemu-iotests/118.out | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/118 b/tests/qemu-iotests/118 index 603e10e8a2..499c5f0901 100

Re: [Qemu-devel] [PATCH RFC 1/2] memory: make MemoryRegion alias migratable

2019-07-30 Thread Dr. David Alan Gilbert
* Igor Mammedov (imamm...@redhat.com) wrote: > On Tue, 30 Jul 2019 15:34:54 +0200 > Paolo Bonzini wrote: > > > On 30/07/19 15:25, Igor Mammedov wrote: > > > I'd guess you've meant RAMBlocks instead of memory regions, if that's it > > > then yes, every alias pointing to RAM backed memory region wi

Re: [Qemu-devel] [PATCH v3 01/33] Create Resettable QOM interface

2019-07-30 Thread Cornelia Huck
On Tue, 30 Jul 2019 16:08:59 +0200 Damien Hedde wrote: > On 7/30/19 3:59 PM, Peter Maydell wrote: > > On Tue, 30 Jul 2019 at 14:56, Cornelia Huck wrote: > >> > >> On Tue, 30 Jul 2019 14:44:21 +0100 > >> Peter Maydell wrote: > >> > >>> On Tue, 30 Jul 2019 at 14:42, Cornelia Huck wrote: >

Re: [Qemu-devel] [qemu-s390x] [PATCH RFC 0/2] s390: stop abusing memory_region_allocate_system_memory()

2019-07-30 Thread Igor Mammedov
On Tue, 30 Jul 2019 17:22:01 +0200 Christian Borntraeger wrote: > I remember that you send a similar patch a while ago and something broke on > s390x. > Have you changed something from the old patchs set? Thanks for reminder, I totally forgot about it. it was "[PATCH v1 5/5] s390: do not call m

Re: [Qemu-devel] [PULL 3/3] pc-dimm: fix crash when invalid slot number is used

2019-07-30 Thread Michael S. Tsirkin
On Tue, Jul 30, 2019 at 02:36:38PM +0200, Igor Mammedov wrote: > On Mon, 29 Jul 2019 17:16:14 -0400 > "Michael S. Tsirkin" wrote: > > Hi Michael, > > it seems tooling used for pull req is a bit broken > * minor issue is CC list contains bogus addresses like: &l...@redhat.com, > mamme...@redhat

Re: [Qemu-devel] [PATCH] migration: always initial ram_counters for a new migration

2019-07-30 Thread Juan Quintela
Ivan Ren wrote: > From: Ivan Ren > > This patch fix a multifd migration bug in migration speed calculation, this > problem can be reproduced as follows: > 1. start a vm and give a heavy memory write stress to prevent the vm be >successfully migrated to destination > 2. begin a migration with

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

2019-07-30 Thread Peter Maydell
On Tue, 30 Jul 2019 at 13:59, Max Reitz wrote: > > The following changes since commit 6e9a6cbe7d56107f5e0d7711905dc19bb4d7e3f0: > > Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging > (2019-07-30 12:25:35 +0100) > > are available in the Git repository at: > > https:/

[Qemu-devel] [PATCH 0/3] Reduce the number of Valgrind reports in unit tests.

2019-07-30 Thread Andrey Shinkevich
Running unit tests under the Valgrind may help to detect QEMU memory issues (suggested by Denis V. Lunev). Some of the Valgrind reports relate to the unit test code itself. Let's eliminate the detected memory issues to ease locating critical ones. Andrey Shinkevich (3): test-throttle: Fix uninit

[Qemu-devel] [Bug 1837049] Re: qemu-system-ppc segfaults with -display sdl

2019-07-30 Thread Richard Henderson
Works for me with a 32-bit install of fedora 30. That's using gcc 9.1.1. Is building with -Og required to reproduce this? If so, I'm thinking compiler bug... -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/

[Qemu-devel] [PATCH 3/3] i386/kvm: initialize struct at full before ioctl call

2019-07-30 Thread Andrey Shinkevich
Not the whole structure is initialized before passing it to the KVM. Reduce the number of Valgrind reports. Signed-off-by: Andrey Shinkevich --- target/i386/kvm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/i386/kvm.c b/target/i386/kvm.c index dbbb137..ed57e31 100644 --- a/targ

Re: [Qemu-devel] [PULL 0/2] fdc: Fix inserting read-only media in empty drive

2019-07-30 Thread Peter Maydell
On Tue, 30 Jul 2019 at 16:33, Kevin Wolf wrote: > > The following changes since commit 8517bf84056282ea3e27772d51f76db3a6fa2d26: > > Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2019-07-30' > into staging (2019-07-30 14:23:07 +0100) > > are available in the Git repository at:

[Qemu-devel] [PATCH 1/3] test-throttle: Fix uninitialized use of burst_length

2019-07-30 Thread Andrey Shinkevich
ThrottleState::cfg of the static variable 'ts' is reassigned with the local one in the do_test_accounting() and then is passed to the throttle_account() with uninitialized member LeakyBucket::burst_length. Signed-off-by: Andrey Shinkevich --- tests/test-throttle.c | 2 ++ 1 file changed, 2 inser

[Qemu-devel] [PATCH 2/3] tests: Fix uninitialized byte in test_visitor_in_fuzz

2019-07-30 Thread Andrey Shinkevich
One byte in the local buffer stays uninitialized, at least with the first iteration, because of the double decrement in the test_visitor_in_fuzz(). This is what Valgrind does not like and not critical for the test itself. So, reduce the number of the memory issues reports. Signed-off-by: Andrey Sh

Re: [Qemu-devel] [RFC] virtio-mmio: implement modern (v2) personality (virtio-1)

2019-07-30 Thread Laszlo Ersek
On 07/29/19 14:57, Sergio Lopez wrote: > 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 ED

[Qemu-devel] [PATCH 2/3] block/backup: disable copy_range for compressed backup

2019-07-30 Thread Vladimir Sementsov-Ogievskiy
Enabled by default copy_range ignores compress option. It's definitely unexpected for user. It's broken since introduction of copy_range usage in backup in 9ded4a011496. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/backup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[Qemu-devel] [PATCH 3/3] block/backup: refactor write_flags

2019-07-30 Thread Vladimir Sementsov-Ogievskiy
write flags are constant, let's store it in BackupBlockJob instead of recalculating. It also makes two boolean fields to be unused, so, drop them. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/backup.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff

[Qemu-devel] [PATCH 1/3] block/backup: deal with zero detection

2019-07-30 Thread Vladimir Sementsov-Ogievskiy
We have detect_zeroes option, so at least for blockdev-backup user should define it if zero-detection is needed. For drive-backup leave detection enabled by default but do it through existing option instead of open-coding. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/backup.c | 15 +

[Qemu-devel] [PATCH 0/3] backup fixes for 4.1?

2019-07-30 Thread Vladimir Sementsov-Ogievskiy
Hi all! Here are two small fixes. 01 is not a degradation at all, so it's OK for 4.2 02 is degradation of 3.0, so it's possibly OK for 4.2 too, but it seems to be real bug and fix is very simple, so, may be 4.1 is better Or you may take the whole series to 4.1 if you want. Vladimir Sement

Re: [Qemu-devel] [PATCH] riscv: sifive_test: Add reset functionality

2019-07-30 Thread Bin Meng
On Tue, Jul 30, 2019 at 3:47 AM Palmer Dabbelt wrote: > > On Mon, 22 Jul 2019 22:30:15 PDT (-0700), bmeng...@gmail.com wrote: > > Hi Palmer, > > > > On Sat, Jul 20, 2019 at 9:47 AM Palmer Dabbelt wrote: > >> > >> On Fri, 14 Jun 2019 08:15:51 PDT (-0700), bmeng...@gmail.com wrote: > >> > This adds

Re: [Qemu-devel] [PATCH for-4.1?] target/arm: Deliver BKPT/BRK exceptions to correct exception level

2019-07-30 Thread Peter Maydell
On Tue, 30 Jul 2019 at 16:31, Philippe Mathieu-Daudé wrote: > > On 7/30/19 3:25 PM, Peter Maydell wrote: > > Most Arm architectural debug exceptions (eg watchpoints) are ignored > > if the configured "debug exception level" is below the current > > exception level (so for example EL1 can't arrange

Re: [Qemu-devel] [PATCH 3/3] i386/kvm: initialize struct at full before ioctl call

2019-07-30 Thread Philippe Mathieu-Daudé
On 7/30/19 6:01 PM, Andrey Shinkevich wrote: > Not the whole structure is initialized before passing it to the KVM. > Reduce the number of Valgrind reports. > > Signed-off-by: Andrey Shinkevich > --- > target/i386/kvm.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/target/i386/kvm

Re: [Qemu-devel] [PATCH 3/3] i386/kvm: initialize struct at full before ioctl call

2019-07-30 Thread Peter Maydell
On Tue, 30 Jul 2019 at 17:05, Andrey Shinkevich wrote: > > Not the whole structure is initialized before passing it to the KVM. > Reduce the number of Valgrind reports. > > Signed-off-by: Andrey Shinkevich Does it even make sense to try to valgrind a KVM-enabled run of QEMU? As soon as we run th

Re: [Qemu-devel] [PATCH v3 25/50] translator: add translator_ld{ub, sw, uw, l, q}

2019-07-30 Thread Alex Bennée
Richard Henderson writes: > On 7/30/19 5:41 AM, Alex Bennée wrote: >> Do we ever need _code access that isn't part of the >> translator loading instructions? > > We use it; I'm not sure that's the same as need. ;-) > > Lots of the uses that I examined should use a mechanism > like arm does for

Re: [Qemu-devel] [PATCH 3/3] i386/kvm: initialize struct at full before ioctl call

2019-07-30 Thread Christian Borntraeger
On 30.07.19 18:44, Philippe Mathieu-Daudé wrote: > On 7/30/19 6:01 PM, Andrey Shinkevich wrote: >> Not the whole structure is initialized before passing it to the KVM. >> Reduce the number of Valgrind reports. >> >> Signed-off-by: Andrey Shinkevich >> --- >> target/i386/kvm.c | 3 +++ >> 1 fil

Re: [Qemu-devel] [PATCH 3/3] i386/kvm: initialize struct at full before ioctl call

2019-07-30 Thread Christian Borntraeger
On 30.07.19 18:46, Peter Maydell wrote: > On Tue, 30 Jul 2019 at 17:05, Andrey Shinkevich > wrote: >> >> Not the whole structure is initialized before passing it to the KVM. >> Reduce the number of Valgrind reports. >> >> Signed-off-by: Andrey Shinkevich > > Does it even make sense to try to

Re: [Qemu-devel] [PATCH 3/3] i386/kvm: initialize struct at full before ioctl call

2019-07-30 Thread Philippe Mathieu-Daudé
On 7/30/19 7:05 PM, Christian Borntraeger wrote: > On 30.07.19 18:44, Philippe Mathieu-Daudé wrote: >> On 7/30/19 6:01 PM, Andrey Shinkevich wrote: >>> Not the whole structure is initialized before passing it to the KVM. >>> Reduce the number of Valgrind reports. >>> >>> Signed-off-by: Andrey Shink

[Qemu-devel] [PATCH for-4.2 v10 00/15] VIRTIO-IOMMU device

2019-07-30 Thread Eric Auger
This series rebases the virtio-iommu device on qemu 4.1.0-rc2 and implements the v0.12 virtio-iommu spec. The driver has just been upstreamed in 5.3 so kernel dependencies are now resolved. The pci proxy for the virtio-iommu device is now available and needs to be instantiated from the command lin

[Qemu-devel] [PATCH for-4.2 v10 01/15] update-linux-headers: Import virtio_iommu.h

2019-07-30 Thread Eric Auger
Update the script to update the virtio_iommu.h header. Signed-off-by: Eric Auger --- scripts/update-linux-headers.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh index f76d77363b..7805291ca0 100755 --- a/scripts/update-l

[Qemu-devel] [PATCH for-4.2 v10 02/15] linux-headers: update against 5.3-rc2

2019-07-30 Thread Eric Auger
Sync headers against 5.3-rc2 (commit 2a11c76e5301) Signed-off-by: Eric Auger --- include/standard-headers/asm-x86/bootparam.h | 2 + include/standard-headers/asm-x86/kvm_para.h | 3 + include/standard-headers/linux/ethtool.h | 2 + include/standard-headers/linux/pci_regs.h |

[Qemu-devel] [PATCH for-4.2 v10 05/15] virtio-iommu: Add the iommu regions

2019-07-30 Thread Eric Auger
This patch initializes the iommu memory regions so that PCIe end point transactions get translated. The translation function is not yet implemented though. Signed-off-by: Eric Auger --- v9 -> v10: - remove pc/virt machine headers - virtio_iommu_find_add_as: mr_index introduced in that patch a

[Qemu-devel] [PATCH for-4.2 v10 10/15] virtio-iommu: Implement probe request

2019-07-30 Thread Eric Auger
This patch implements the PROBE request. At the moment, no reserved regions are returned as none are registered per device. Only a NONE property is returned. Signed-off-by: Eric Auger --- v8 -> v9: - fix filling of properties (changes induced by v0.7 -> v0.8 spec evolution) - return VIRTIO_IOM

[Qemu-devel] [PATCH for-4.2 v10 07/15] virtio-iommu: Implement attach/detach command

2019-07-30 Thread Eric Auger
This patch implements the endpoint attach/detach to/from a domain. Signed-off-by: Eric Auger --- --- hw/virtio/virtio-iommu.c | 40 ++-- 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/virtio-iommu.c index 7

[Qemu-devel] [PATCH for-4.2 v10 06/15] virtio-iommu: Endpoint and domains structs and helpers

2019-07-30 Thread Eric Auger
This patch introduce domain and endpoint internal datatypes. Both are stored in RB trees. The domain owns a list of endpoints attached to it. Helpers to get/put end points and domains are introduced. get() helpers will become static in subsequent patches. Signed-off-by: Eric Auger Reviewed-by: B

[Qemu-devel] [PATCH for-4.2 v10 03/15] virtio-iommu: Add skeleton

2019-07-30 Thread Eric Auger
This patchs adds the skeleton for the virtio-iommu device. Signed-off-by: Eric Auger --- v9 -> v10: - expose VIRTIO_IOMMU_F_MMIO feature - s/domain_bits/domain_range struct - change error codes - enforce unmigratable - Kconfig v7 -> v8: - expose VIRTIO_IOMMU_F_BYPASS and VIRTIO_F_VERSION_1 f

[Qemu-devel] [PATCH for-4.2 v10 13/15] virtio_iommu: Handle reserved regions in translation process

2019-07-30 Thread Eric Auger
When translating an address we need to check if it belongs to a reserved virtual address range. If it does, there are 2 cases: - it belongs to a RESERVED region: the guest should neither use this address in a MAP not instruct the end-point to DMA on them. We report an error - It belongs to an

[Qemu-devel] [PATCH for-4.2 v10 11/15] virtio-iommu: Expose the IOAPIC MSI reserved region when relevant

2019-07-30 Thread Eric Auger
We introduce a new msi_bypass field which indicates whether the IOAPIC MSI window [0xFEE0 - 0xFEEF] must be exposed as a reserved region. By default the field is set to true at instantiation time. Later on we will introduce a property at virtio pci proxy level to turn it off. Signed-off-by

[Qemu-devel] [PATCH for-4.2 v10 08/15] virtio-iommu: Implement map/unmap

2019-07-30 Thread Eric Auger
This patch implements virtio_iommu_map/unmap. Signed-off-by: Eric Auger --- v5 -> v6: - use new v0.6 fields - replace error_report by qemu_log_mask v3 -> v4: - implement unmap semantics as specified in v0.4 --- hw/virtio/trace-events | 3 ++ hw/virtio/virtio-iommu.c | 94 ++

[Qemu-devel] [PATCH for-4.2 v10 04/15] virtio-iommu: Decode the command payload

2019-07-30 Thread Eric Auger
This patch adds the command payload decoding and introduces the functions that will do the actual command handling. Those functions are not yet implemented. Signed-off-by: Eric Auger --- v9 -> v10: - make virtio_iommu_handle_* more compact and remove get_payload_size v7 -> v8: - handle new d

[Qemu-devel] [PATCH for-4.2 v10 12/15] virtio-iommu: Implement fault reporting

2019-07-30 Thread Eric Auger
The event queue allows to report asynchronous errors. The translate function now injects faults when relevant. Signed-off-by: Eric Auger --- hw/virtio/trace-events | 1 + hw/virtio/virtio-iommu.c | 67 ++-- 2 files changed, 65 insertions(+), 3 deletions(-)

[Qemu-devel] [PATCH for-4.2 01/13] qcow2: Add Error ** to qcow2_read_snapshots()

2019-07-30 Thread Max Reitz
Signed-off-by: Max Reitz --- block/qcow2.h | 2 +- block/qcow2-snapshot.c | 7 ++- block/qcow2.c | 3 +-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/block/qcow2.h b/block/qcow2.h index fc1b0d3c1e..175708cee0 100644 --- a/block/qcow2.h +++ b/block/qcow2.h

[Qemu-devel] [PATCH for-4.2 v10 15/15] hw/arm/virt: Add the virtio-iommu device tree mappings

2019-07-30 Thread Eric Auger
Adds the "virtio,pci-iommu" node in the host bridge node and the RID mapping, excluding the IOMMU RID. Signed-off-by: Eric Auger --- v8 -> v9: - disable msi-bypass property - addition of the subnode is handled is the hotplug handler and IOMMU RID is notimposed anymore v6 -> v7: - align to th

[Qemu-devel] [PATCH for-4.2 v10 09/15] virtio-iommu: Implement translate

2019-07-30 Thread Eric Auger
This patch implements the translate callback Signed-off-by: Eric Auger --- v6 -> v7: - implemented bypass-mode v5 -> v6: - replace error_report by qemu_log_mask v4 -> v5: - check the device domain is not NULL - s/printf/error_report - set flags to IOMMU_NONE in case of all translation faults -

[Qemu-devel] [PATCH for-4.2 00/13] qcow2: Let check -r all repair some snapshot bits

2019-07-30 Thread Max Reitz
Hi, As Eric reports in https://bugzilla.redhat.com/show_bug.cgi?id=1727347, qemu-img amend has a bug when it comes to converting qcow2 v2 images to v3: In v3, every snapshot table entry requires at least 16 bytes of extra metadata to be present, which isn’t the case for v2 images. Currently, qemu-

[Qemu-devel] [PATCH for-4.2 04/13] qcow2: Put qcow2_upgrade() into an own function

2019-07-30 Thread Max Reitz
This does not make sense right now, but it will make sense once we need to do more than to just update s->qcow_version. Signed-off-by: Max Reitz --- block/qcow2.c | 43 ++- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/block/qcow2.c b/bloc

[Qemu-devel] [PATCH for-4.2 05/13] qcow2: Write v3-compliant snapshot list on upgrade

2019-07-30 Thread Max Reitz
qcow2 v3 requires every snapshot table entry to have two extra data fields: The 64-bit VM state size, and the virtual disk size. Both are optional for v2 images, so they may not be present. qcow2_upgrade() therefore should update the snapshot table to ensure all entries have these extra data fiel

[Qemu-devel] [PATCH for-4.2 07/13] qcow2: Add qcow2_check_fix_snapshot_table()

2019-07-30 Thread Max Reitz
qcow2_check_read_snapshot_table() can perform consistency checks, but it cannot fix everything. Specifically, it cannot allocate new clusters, because that should wait until the refcount structures are known to be consistent (i.e., after qcow2_check_refcounts()). Thus, it cannot call qcow2_write_

[Qemu-devel] [PATCH for-4.2 v10 14/15] virtio-iommu-pci: Add virtio iommu pci support

2019-07-30 Thread Eric Auger
This patch adds virtio-iommu-pci, which is the pci proxy for the virtio-iommu device. Signed-off-by: Eric Auger --- v8 -> v9: - add the msi-bypass property - create virtio-iommu-pci.c --- hw/virtio/Makefile.objs | 1 + hw/virtio/virtio-iommu-pci.c | 88 +++

[Qemu-devel] [PATCH for-4.2 02/13] qcow2: Keep unknown extra snapshot data

2019-07-30 Thread Max Reitz
The qcow2 specification says to ignore unknown extra data fields in snapshot table entries. Currently, we discard it whenever we update the image, which is a bit different from "ignore". This patch makes the qcow2 driver keep all unknown extra data fields when updating an image's snapshot table.

[Qemu-devel] [PATCH for-4.2 08/13] qcow2: Fix broken snapshot table entries

2019-07-30 Thread Max Reitz
The only case where we currently reject snapshot table entries is when they have too much extra data. Fix them with qemu-img check -r all by counting it as a corruption, reducing their extra_data_size, and then letting qcow2_check_fix_snapshot_table() do the rest. Signed-off-by: Max Reitz --- b

[Qemu-devel] [PATCH for-4.2 12/13] iotests: Add peek_file* functions

2019-07-30 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/common.rc | 20 1 file changed, 20 insertions(+) diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index 5502c3da2f..78decfd5d5 100644 --- a/tests/qemu-iotests/common.rc +++ b/tests/qemu-iotests/common.rc

[Qemu-devel] [PATCH for-4.2 03/13] qcow2: Make qcow2_write_snapshots() public

2019-07-30 Thread Max Reitz
Updating the snapshot list will be useful when upgrading a v2 image to v3, so we will need to call this function in qcow2.c. Signed-off-by: Max Reitz --- block/qcow2.h | 1 + block/qcow2-snapshot.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/block/qcow2.h b/blo

[Qemu-devel] [PATCH for-4.2 13/13] iotests: Test qcow2's snapshot table handling

2019-07-30 Thread Max Reitz
Add a test how our qcow2 driver handles extra data in snapshot table entries, and how it repairs overly long snapshot tables. Signed-off-by: Max Reitz --- tests/qemu-iotests/261 | 449 + tests/qemu-iotests/261.out | 321 ++ tests/qe

[Qemu-devel] [PATCH for-4.2 10/13] qcow2: Repair snapshot table with too many entries

2019-07-30 Thread Max Reitz
Signed-off-by: Max Reitz --- block/qcow2-snapshot.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c index bd8e56a99e..9e8c7c1f7f 100644 --- a/block/qcow2-snapshot.c +++ b/block/qcow2-snapshot.c @@ -430,6 +430,14 @@ int coroutine_

[Qemu-devel] [PATCH for-4.2 06/13] qcow2: Separate qcow2_check_read_snapshot_table()

2019-07-30 Thread Max Reitz
Reading the snapshot table can fail. That is a problem when we want to repair the image. Therefore, stop reading the snapshot table in qcow2_do_open() in check mode. Instead, add a new function qcow2_check_read_snapshot_table() that reads the snapshot table at a later point. In the future, we w

[Qemu-devel] [PATCH for-4.2 09/13] qcow2: Fix overly long snapshot tables

2019-07-30 Thread Max Reitz
We currently refuse to open qcow2 images with overly long snapshot tables. This patch makes qemu-img check -r all drop all offending entries past what we deem acceptable. Signed-off-by: Max Reitz --- block/qcow2-snapshot.c | 89 +- 1 file changed, 79 inse

[Qemu-devel] [PATCH for-4.2 11/13] qcow2: Fix v3 snapshot table entry compliancy

2019-07-30 Thread Max Reitz
qcow2 v3 images require every snapshot table entry to have at least 16 bytes of extra data. If they do not, let qemu-img check -r all fix it. Signed-off-by: Max Reitz --- block/qcow2-snapshot.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/block/qcow2-snapshot.c b/block/q

[Qemu-devel] [PATCH v8 04/16] block/io_uring: implements interfaces for io_uring

2019-07-30 Thread Aarushi Mehta
Aborts when sqe fails to be set as sqes cannot be returned to the ring. Adds slow path for short reads for older kernels Signed-off-by: Aarushi Mehta Signed-off-by: Stefan Hajnoczi Reviewed-by: Stefan Hajnoczi --- MAINTAINERS | 7 + block/Makefile.objs | 3 + block/io_uring

[Qemu-devel] [PATCH v8 07/16] blockdev: adds bdrv_parse_aio to use io_uring

2019-07-30 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi --- block.c | 22 ++ blockdev.c| 12 include/block/block.h | 1 + 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/block.c b/block.c index cbd8da5f3b..401831e28d 1

[Qemu-devel] [PATCH v8 00/16] Add support for io_uring

2019-07-30 Thread Aarushi Mehta
This patch series adds support for the newly developed io_uring Linux AIO interface. Linux io_uring is faster than Linux's AIO asynchronous I/O code, offers efficient buffered asynchronous I/O support, the ability to do I/O without performing a system call via polled I/O, and other efficiency enha

[Qemu-devel] [PATCH v8 01/16] configure: permit use of io_uring

2019-07-30 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi Reviewed-by: Maxim Levitsky --- configure | 27 +++ 1 file changed, 27 insertions(+) diff --git a/configure b/configure index 714e7fb6a1..493dbc2ec5 100755 --- a/configure +++ b/configure @@ -371,6 +371,7 @@ xen=

<    1   2   3   4   >