Re: [PATCH v1] piix: fix regression during unplug in Xen HVM domUs

2021-03-16 Thread Philippe Mathieu-Daudé
On 3/16/21 11:44 PM, Olaf Hering wrote: > Commit ee358e919e385fdc79d59d0d47b4a81e349cd5c9 causes a regression in > Xen HVM domUs which run xenlinux based kernels. > > If the domU has an USB device assigned, for example with > "usbdevice=['tablet']" in domU.cfg, the late unplug of devices will >

Re: [PATCH v1] piix: fix regression during unplug in Xen HVM domUs

2021-03-16 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210316224412.11609-1-o...@aepfle.de/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210316224412.11609-1-o...@aepfle.de Subject: [PATCH v1] piix: fix regression during unplug

[PATCH v1] piix: fix regression during unplug in Xen HVM domUs

2021-03-16 Thread Olaf Hering
Commit ee358e919e385fdc79d59d0d47b4a81e349cd5c9 causes a regression in Xen HVM domUs which run xenlinux based kernels. If the domU has an USB device assigned, for example with "usbdevice=['tablet']" in domU.cfg, the late unplug of devices will kill the emulated USB host. As a result the khubd

[PULL 10/11] hw/block/nvme: pull lba format initialization

2021-03-16 Thread Klaus Jensen
From: Klaus Jensen Pull lba format initialization code into separate function in preparation for Format NVM support. Signed-off-by: Klaus Jensen Reviewed-by: Minwoo Im --- hw/block/nvme-ns.c | 74 +- 1 file changed, 41 insertions(+), 33

[PULL 11/11] hw/block/nvme: add support for the format nvm command

2021-03-16 Thread Klaus Jensen
From: Minwoo Im Format NVM admin command can make a namespace or namespaces to be with different LBA size and metadata size with protection information types. This patch introduces Format NVM command with LBA format, Metadata, and Protection Information for the device. The secure erase

[PULL 05/11] hw/block/nvme: end-to-end data protection

2021-03-16 Thread Klaus Jensen
From: Klaus Jensen Add support for namespaces formatted with protection information. The type of end-to-end data protection (i.e. Type 1, Type 2 or Type 3) is selected with the `pi` nvme-ns device parameter. If the number of metadata bytes is larger than 8, the `pil` nvme-ns device parameter may

[PULL 04/11] hw/block/nvme: add metadata support

2021-03-16 Thread Klaus Jensen
From: Klaus Jensen Add support for metadata in the form of extended logical blocks as well as a separate buffer of data. The new `ms` nvme-ns device parameter specifies the size of metadata per logical block in bytes. The `mset` nvme-ns device parameter controls whether metadata is transfered as

[PULL 06/11] hw/block/nvme: add verify command

2021-03-16 Thread Klaus Jensen
From: Gollu Appalanaidu See NVM Express 1.4, section 6.14 ("Verify Command"). Signed-off-by: Gollu Appalanaidu [k.jensen: rebased, refactored for e2e] Signed-off-by: Klaus Jensen Reviewed-by: Keith Busch --- hw/block/nvme-dif.h | 2 + hw/block/nvme.h | 1 + include/block/nvme.h

[PULL 07/11] hw/block/nvme: add non-mdts command size limit for verify

2021-03-16 Thread Klaus Jensen
From: Klaus Jensen Verify is not subject to MDTS, so a single Verify command may result in excessive amounts of allocated memory. Impose a limit on the data size by adding support for TP 4040 ("Non-MDTS Command Size Limits"). Signed-off-by: Klaus Jensen Reviewed-by: Keith Busch ---

[PULL 00/11] emulated nvme updates and fixes

2021-03-16 Thread Klaus Jensen
From: Klaus Jensen Hi Peter, The following changes since commit 6e31b3a5c34c6e5be7ef60773e607f189eaa15f3: Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging (2021-03-16 10:53:47 +) are available in the Git repository at:

[PULL 09/11] hw/block/nvme: prefer runtime helpers instead of device parameters

2021-03-16 Thread Klaus Jensen
From: Klaus Jensen In preparation for Format NVM support, use runtime helpers instead of the constant device parameters when getting lba size information etc. Signed-off-by: Klaus Jensen Reviewed-by: Minwoo Im --- hw/block/nvme-ns.h | 2 +- hw/block/nvme-ns.c | 6 +++--- 2 files changed, 4

[PULL 08/11] hw/block/nvme: support multiple lba formats

2021-03-16 Thread Klaus Jensen
From: Minwoo Im This patch introduces multiple LBA formats supported with the typical logical block sizes of 512 bytes and 4096 bytes as well as metadata sizes of 0, 8, 16 and 64 bytes. The format will be chosed based on the lbads and ms parameters of the nvme-ns device. Signed-off-by: Minwoo

[PULL 03/11] hw/block/nvme: fix zone management receive reporting too many zones

2021-03-16 Thread Klaus Jensen
From: Klaus Jensen nvme_zone_mgmt_recv uses nvme_ns_nlbas() to get the number of LBAs in the namespace and then calculates the number of zones to report by incrementing slba with ZSZE until exceeding the number of LBAs as returned by nvme_ns_nlbas(). This is bad because the namespace might be

[PULL 02/11] hw/block/nvme: assert namespaces array indices

2021-03-16 Thread Klaus Jensen
From: Klaus Jensen Coverity complains about a possible memory corruption in the nvme_ns_attach and _detach functions. While we should not (famous last words) be able to reach this function without nsid having previously been validated, this is still an open door for future misuse. Make Coverity

[PULL 01/11] hw/block/nvme: fix potential overflow

2021-03-16 Thread Klaus Jensen
From: Klaus Jensen page_size is a uint32_t, and zasl is a uint8_t, so the expression `page_size << zasl` is done using 32-bit arithmetic and might overflow. Since we then compare this against a 64 bit data_size value, Coverity complains that we might overflow unintentionally. An MDTS/ZASL value

Re: [PATCH V3 1/8] hw/block/nvme: support namespace detach

2021-03-16 Thread Klaus Jensen
On Mar 15 12:56, Keqian Zhu wrote: > Hi, > > I don't dig into code logic, just some nit below. > Thanks! I'll cook up a fix with some corrections on these typos. signature.asc Description: PGP signature

Re: [PATCH 7/7] block/nbd: stop manipulating in_flight counter

2021-03-16 Thread Vladimir Sementsov-Ogievskiy
16.03.2021 19:08, Roman Kagan wrote: On Mon, Mar 15, 2021 at 11:15:44PM +0300, Vladimir Sementsov-Ogievskiy wrote: 15.03.2021 09:06, Roman Kagan wrote: As the reconnect logic no longer interferes with drained sections, it appears unnecessary to explicitly manipulate the in_flight counter.

[PULL v3 00/42] Block layer patches and object-add QAPIfication

2021-03-16 Thread Kevin Wolf
The following changes since commit 6e31b3a5c34c6e5be7ef60773e607f189eaa15f3: Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging (2021-03-16 10:53:47 +) are available in the Git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you to

Re: [PATCH 6/7] block/nbd: decouple reconnect from drain

2021-03-16 Thread Vladimir Sementsov-Ogievskiy
16.03.2021 19:03, Roman Kagan wrote: On Mon, Mar 15, 2021 at 11:10:14PM +0300, Vladimir Sementsov-Ogievskiy wrote: 15.03.2021 09:06, Roman Kagan wrote: The reconnection logic doesn't need to stop while in a drained section. Moreover it has to be active during the drained section, as the

Re: [PATCH v3 6/6] block/qcow2: use seqcache for compressed writes

2021-03-16 Thread Vladimir Sementsov-Ogievskiy
16.03.2021 15:25, Max Reitz wrote: On 15.03.21 15:40, Vladimir Sementsov-Ogievskiy wrote: 15.03.2021 12:58, Max Reitz wrote: [...] The question is whether it really makes sense to even have a seqcache_read() path when in reality it’s probably never accessed.  I mean, besides the fact that

Re: [PULL v2 00/42] Block layer patches and object-add QAPIfication

2021-03-16 Thread Stefan Hajnoczi
On Tue, Mar 16, 2021 at 03:55:59PM +0100, Kevin Wolf wrote: > Am 16.03.2021 um 15:35 hat Kevin Wolf geschrieben: > > Am 16.03.2021 um 14:17 hat Peter Maydell geschrieben: > > > On Mon, 15 Mar 2021 at 12:35, Kevin Wolf wrote: > > > > > > > > The following changes since commit > > > >

[PULL 11/13] block: remove dirty bitmaps 'status' field

2021-03-16 Thread Daniel P . Berrangé
The same information is available via the 'recording' and 'busy' fields. Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Daniel P. Berrangé --- block/dirty-bitmap.c | 38 docs/system/deprecated.rst | 7 - docs/system/removed-features.rst | 7 +

[PULL 09/13] hw/scsi: remove 'scsi-disk' device

2021-03-16 Thread Daniel P . Berrangé
The 'scsi-hd' and 'scsi-cd' devices provide suitable alternatives. Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé --- docs/system/deprecated.rst | 9 - docs/system/removed-features.rst | 6 hw/i386/pc.c | 1 - hw/scsi/scsi-disk.c |

[PULL 06/13] machine: remove 'arch' field from 'query-cpus-fast' QMP command

2021-03-16 Thread Daniel P . Berrangé
Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé --- docs/system/deprecated.rst | 6 - docs/system/removed-features.rst | 6 + hw/core/machine-qmp-cmds.c | 41 qapi/machine.json| 22 - 4 files

[PULL 04/13] migrate: remove QMP/HMP commands for speed, downtime and cache size

2021-03-16 Thread Daniel P . Berrangé
The generic 'migrate_set_parameters' command handle all types of param. Only the QMP commands were documented in the deprecations page, but the rationale for deprecating applies equally to HMP, and the replacements exist. Furthermore the HMP commands are just shims to the QMP commands, so

[PULL 13/13] block: remove support for using "file" driver with block/char devices

2021-03-16 Thread Daniel P . Berrangé
The 'host_device' and 'host_cdrom' drivers must be used instead. Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrangé --- block/file-posix.c | 17 ++--- docs/system/deprecated.rst | 7 --- docs/system/removed-features.rst | 7 +++

[PULL 12/13] block: remove 'dirty-bitmaps' field from 'BlockInfo' struct

2021-03-16 Thread Daniel P . Berrangé
The same data is available in the 'BlockDeviceInfo' struct. Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Daniel P. Berrangé --- block/qapi.c| 5 - docs/system/deprecated.rst | 13 -

[PULL 03/13] monitor: remove 'query-events' QMP command

2021-03-16 Thread Daniel P . Berrangé
The code comment suggests removing QAPIEvent_(str|lookup) symbols too, however, these are both auto-generated as standard for any enum in QAPI. As such it they'll exist whether we use them or not. Reviewed-by: Eric Blake Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé ---

[PULL 01/13] ui, monitor: remove deprecated VNC ACL option and HMP commands

2021-03-16 Thread Daniel P . Berrangé
The VNC ACL concept has been replaced by the pluggable "authz" framework which does not use monitor commands. Reviewed-by: Thomas Huth Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrangé --- docs/system/deprecated.rst | 16 --- docs/system/removed-features.rst | 13

[PULL 05/13] machine: remove 'query-cpus' QMP command

2021-03-16 Thread Daniel P . Berrangé
The newer 'query-cpus-fast' command avoids side effects on the guest execution. Note that some of the field names are different in the 'query-cpus-fast' command. Reviewed-by: Wainer dos Santos Moschetta Tested-by: Wainer dos Santos Moschetta Signed-off-by: Daniel P. Berrangé ---

[PULL 00/13] misc patches removing deprecated features

2021-03-16 Thread Daniel P . Berrangé
The following changes since commit 6e31b3a5c34c6e5be7ef60773e607f189eaa15f3: Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging (2021-03-16 10:53:47 +) are available in the Git repository at: https://gitlab.com/berrange/qemu tags/dep-many-pull-request

[PULL 10/13] block: remove 'encryption_key_missing' flag from QAPI

2021-03-16 Thread Daniel P . Berrangé
This has been hardcoded to "false" since 2.10.0, since secrets required to unlock block devices are now always provided up front instead of using interactive prompts. Reviewed-by: Eric Blake Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé --- block/qapi.c | 1 -

[PULL 08/13] hw/ide: remove 'ide-drive' device

2021-03-16 Thread Daniel P . Berrangé
The 'ide-hd' and 'ide-cd' devices provide suitable alternatives. Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé --- docs/qdev-device-use.txt | 2 +- docs/system/deprecated.rst | 6 - docs/system/removed-features.rst | 8 +++ hw/i386/pc.c

[PULL 07/13] chardev: reject use of 'wait' flag for socket client chardevs

2021-03-16 Thread Daniel P . Berrangé
This only makes sense conceptually when used with listener chardevs. Reviewed-by: Marc-André Lureau Signed-off-by: Daniel P. Berrangé --- chardev/char-socket.c| 12 docs/system/deprecated.rst | 6 -- docs/system/removed-features.rst | 6 ++ 3 files

[PULL 02/13] monitor: raise error when 'pretty' option is used with HMP

2021-03-16 Thread Daniel P . Berrangé
This is only semantically useful for QMP. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrangé --- docs/system/deprecated.rst | 7 --- docs/system/removed-features.rst | 6 ++ monitor/monitor.c| 4 ++-- qemu-options.hx | 5 +++--

Re: [PATCH 0/7] block/nbd: decouple reconnect from drain

2021-03-16 Thread Roman Kagan
On Tue, Mar 16, 2021 at 09:41:36AM -0500, Eric Blake wrote: > On 3/15/21 1:06 AM, Roman Kagan wrote: > > The reconnection logic doesn't need to stop while in a drained section. > > Moreover it has to be active during the drained section, as the requests > > that were caught in-flight with the

Re: [PATCH 7/7] block/nbd: stop manipulating in_flight counter

2021-03-16 Thread Roman Kagan
On Mon, Mar 15, 2021 at 11:15:44PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 15.03.2021 09:06, Roman Kagan wrote: > > As the reconnect logic no longer interferes with drained sections, it > > appears unnecessary to explicitly manipulate the in_flight counter. > > > > Fixes: 5ad81b4946 ("nbd:

[PATCH 5/5] test-coroutine: Add rwlock downgrade test

2021-03-16 Thread Paolo Bonzini
From: David Edmondson Test that downgrading an rwlock does not result in a failure to schedule coroutines queued on the rwlock. The diagram associated with test_co_rwlock_downgrade() describes the intended behaviour, but what was observed previously corresponds to: | c1 | c2 | c3

Re: [PATCH 6/7] block/nbd: decouple reconnect from drain

2021-03-16 Thread Roman Kagan
On Mon, Mar 15, 2021 at 11:10:14PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 15.03.2021 09:06, Roman Kagan wrote: > > The reconnection logic doesn't need to stop while in a drained section. > > Moreover it has to be active during the drained section, as the requests > > that were caught

[PATCH 1/5] block/vdi: When writing new bmap entry fails, don't leak the buffer

2021-03-16 Thread Paolo Bonzini
From: David Edmondson If a new bitmap entry is allocated, requiring the entire block to be written, avoiding leaking the buffer allocated for the block should the write fail. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: David Edmondson Message-Id:

[PATCH 4/5] coroutine-lock: reimplement CoRwLock to fix downgrade bug

2021-03-16 Thread Paolo Bonzini
A feature of the current rwlock is that if multiple coroutines hold a reader lock, all must be runnable. The unlock implementation relies on this, choosing to wake a single coroutine when the final read lock holder exits the critical section, assuming that it will wake a coroutine attempting to

[PATCH 3/5] coroutine/mutex: Store the coroutine in the CoWaitRecord only once

2021-03-16 Thread Paolo Bonzini
From: David Edmondson When taking the slow path for mutex acquisition, set the coroutine value in the CoWaitRecord in push_waiter(), rather than both there and in the caller. Reviewed-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: David Edmondson Message-Id:

[PATCH v3 0/5] coroutine rwlock downgrade fix, minor VDI changes

2021-03-16 Thread Paolo Bonzini
This is a resubmit of David Edmondson's series at https://patchew.org/QEMU/20210309144015.557477-1-david.edmond...@oracle.com/. After closer analysis on IRC, the CoRwLock's attempt to ensure fairness turned out to be flawed. Therefore, this series reimplements CoRwLock without using a CoQueue.

[PATCH 2/5] block/vdi: Don't assume that blocks are larger than VdiHeader

2021-03-16 Thread Paolo Bonzini
From: David Edmondson Given that the block size is read from the header of the VDI file, a wide variety of sizes might be seen. Rather than re-using a block sized memory region when writing the VDI header, allocate an appropriately sized buffer. Signed-off-by: David Edmondson Message-Id:

Re: [PULL v2 00/42] Block layer patches and object-add QAPIfication

2021-03-16 Thread Stefan Hajnoczi
On Tue, Mar 16, 2021 at 2:36 PM Kevin Wolf wrote: > > Am 16.03.2021 um 14:17 hat Peter Maydell geschrieben: > > On Mon, 15 Mar 2021 at 12:35, Kevin Wolf wrote: > > > > > > The following changes since commit > > > 6157b0e19721aadb4c7fdcfe57b2924af6144b14: > > > > > > Merge remote-tracking

Re: [PATCH 0/7] block/nbd: decouple reconnect from drain

2021-03-16 Thread Roman Kagan
On Mon, Mar 15, 2021 at 10:45:39PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 15.03.2021 09:06, Roman Kagan wrote: > > The reconnection logic doesn't need to stop while in a drained section. > > Moreover it has to be active during the drained section, as the requests > > that were caught

Re: [PATCH 1/7] block/nbd: avoid touching freed connect_thread

2021-03-16 Thread Roman Kagan
On Mon, Mar 15, 2021 at 06:40:12PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 15.03.2021 09:06, Roman Kagan wrote: > > When the NBD connection is being torn down, the connection thread gets > > canceled and "detached", meaning it is about to get freed. > > > > If this happens while the

Re: [PULL v2 00/42] Block layer patches and object-add QAPIfication

2021-03-16 Thread Kevin Wolf
Am 16.03.2021 um 15:35 hat Kevin Wolf geschrieben: > Am 16.03.2021 um 14:17 hat Peter Maydell geschrieben: > > On Mon, 15 Mar 2021 at 12:35, Kevin Wolf wrote: > > > > > > The following changes since commit > > > 6157b0e19721aadb4c7fdcfe57b2924af6144b14: > > > > > > Merge remote-tracking branch

Re: [PATCH 0/7] block/nbd: decouple reconnect from drain

2021-03-16 Thread Eric Blake
On 3/15/21 1:06 AM, Roman Kagan wrote: > The reconnection logic doesn't need to stop while in a drained section. > Moreover it has to be active during the drained section, as the requests > that were caught in-flight with the connection to the server broken can > only usefully get drained if the

Re: [PULL v2 00/42] Block layer patches and object-add QAPIfication

2021-03-16 Thread Kevin Wolf
Am 16.03.2021 um 14:17 hat Peter Maydell geschrieben: > On Mon, 15 Mar 2021 at 12:35, Kevin Wolf wrote: > > > > The following changes since commit 6157b0e19721aadb4c7fdcfe57b2924af6144b14: > > > > Merge remote-tracking branch > > 'remotes/vivier2/tags/linux-user-for-6.0-pull-request' into

Re: [PATCH 2/9] block: Replaced qemu_mutex_lock calls with QEMU_LOCK_GUARD

2021-03-16 Thread Eric Blake
On 3/12/21 4:23 AM, Vladimir Sementsov-Ogievskiy wrote: > 11.03.2021 06:15, Mahmoud Mandour wrote: >> Replaced various qemu_mutex_lock/qemu_mutex_unlock calls with >> lock guard macros (QEMU_LOCK_GUARD() and WITH_QEMU_LOCK_GUARD). >> This slightly simplifies the code by eliminating calls to >>

"make check" broken with everything but tools disabled

2021-03-16 Thread Markus Armbruster
Watch this: $ mkdir bld-tools $ cd bld-tools $ ../configure --disable-system --disable-user --enable-tools $ make check [...] make: *** No rule to make target 'tests/qemu-iotests/socket_scm_helper', needed by 'check-block'. Stop.

Re: [PULL v2 00/42] Block layer patches and object-add QAPIfication

2021-03-16 Thread Peter Maydell
On Mon, 15 Mar 2021 at 12:35, Kevin Wolf wrote: > > The following changes since commit 6157b0e19721aadb4c7fdcfe57b2924af6144b14: > > Merge remote-tracking branch > 'remotes/vivier2/tags/linux-user-for-6.0-pull-request' into staging > (2021-03-14 17:47:49 +) > > are available in the Git

Re: [PATCH v3 6/6] block/qcow2: use seqcache for compressed writes

2021-03-16 Thread Max Reitz
On 15.03.21 15:40, Vladimir Sementsov-Ogievskiy wrote: 15.03.2021 12:58, Max Reitz wrote: [...] The question is whether it really makes sense to even have a seqcache_read() path when in reality it’s probably never accessed.  I mean, besides the fact that it seems based purely on chance

Re: [PATCH v5 09/13] hw/block/nvme: parameterize nvme_ns_nlbas

2021-03-16 Thread Minwoo Im
On 21-03-16 08:19:08, Klaus Jensen wrote: > On Mar 16 15:53, Minwoo Im wrote: > > On 21-03-10 10:53:43, Klaus Jensen wrote: > > > From: Klaus Jensen > > > > > > Provide a more flexible nlbas helper. > > > > > > Signed-off-by: Klaus Jensen > > > --- > > > hw/block/nvme-ns.h | 14 ++

Re: [PATCH v5 09/13] hw/block/nvme: parameterize nvme_ns_nlbas

2021-03-16 Thread Klaus Jensen
On Mar 16 15:53, Minwoo Im wrote: > On 21-03-10 10:53:43, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Provide a more flexible nlbas helper. > > > > Signed-off-by: Klaus Jensen > > --- > > hw/block/nvme-ns.h | 14 ++ > > 1 file changed, 10 insertions(+), 4 deletions(-) > >

Re: [PATCH v5 09/13] hw/block/nvme: parameterize nvme_ns_nlbas

2021-03-16 Thread Minwoo Im
On 21-03-10 10:53:43, Klaus Jensen wrote: > From: Klaus Jensen > > Provide a more flexible nlbas helper. > > Signed-off-by: Klaus Jensen > --- > hw/block/nvme-ns.h | 14 ++ > 1 file changed, 10 insertions(+), 4 deletions(-) > > diff --git a/hw/block/nvme-ns.h b/hw/block/nvme-ns.h

Re: [PATCH v5 08/13] hw/block/nvme: pull lba format initialization

2021-03-16 Thread Minwoo Im
Reviewed-by: Minwoo Im

Re: [PATCH v5 07/13] hw/block/nvme: prefer runtime helpers instead of device parameters

2021-03-16 Thread Minwoo Im
Reviewed-by: Minwoo Im