Re: [PATCH v2] hw/block: m25p80: Support fast read for SST flashes

2021-03-15 Thread Bin Meng
On Thu, Mar 11, 2021 at 4:18 PM Bin Meng wrote: > > On Sat, Mar 6, 2021 at 2:01 PM Bin Meng wrote: > > > > From: Bin Meng > > > > Per SST25VF016B datasheet [1], SST flash requires a dummy byte after > > the address bytes. Note only SPI mode is supported by SST flashes. > > > > [1]

[PULL 11/11] hw/block/pflash_cfi: Replace DPRINTF with trace events

2021-03-15 Thread Philippe Mathieu-Daudé
From: David Edmondson Rather than having a device specific debug implementation in pflash_cfi01.c and pflash_cfi02.c, use the standard tracing facility. Signed-off-by: David Edmondson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210216142721.1985543-2-david.edmond...@oracle.com> [PMD:

[PULL 08/11] hw/block/pflash_cfi02: Add DeviceReset method

2021-03-15 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Edmondson Reviewed-by: Bin Meng Message-Id: <20210310170528.1184868-9-phi...@redhat.com> --- hw/block/pflash_cfi02.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c index

[PULL 07/11] hw/block/pflash_cfi02: Factor out pflash_reset_state_machine()

2021-03-15 Thread Philippe Mathieu-Daudé
There is multiple places resetting the internal state machine. Factor the code out in a new pflash_reset_state_machine() method. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Edmondson Reviewed-by: Bin Meng Message-Id: <20210310170528.1184868-8-phi...@redhat.com> ---

[PULL 06/11] hw/block/pflash_cfi02: Rename register_memory(true) as mode_read_array

2021-03-15 Thread Philippe Mathieu-Daudé
The same pattern is used when setting the flash in READ_ARRAY mode: - Set the state machine command to READ_ARRAY - Reset the write_cycle counter - Reset the memory region in ROMD Refactor the current code by extracting this pattern. It is used three times: - When the timer expires and not in

[PULL 09/11] hw/block/pflash_cfi01: Clarify trace events

2021-03-15 Thread Philippe Mathieu-Daudé
Use the 'mode_read_array' event when we set the device in such mode, and use the 'reset' event in DeviceReset handler. Reviewed-by: Bin Meng Reviewed-by: David Edmondson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20210310170528.1184868-10-phi...@redhat.com> --- hw/block/pflash_cfi01.c

[PULL 10/11] hw/block/pflash_cfi01: Correct the type of PFlashCFI01.ro

2021-03-15 Thread Philippe Mathieu-Daudé
From: David Edmondson PFlashCFI01.ro is a bool, declare it as such. Signed-off-by: David Edmondson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210216142721.1985543-3-david.edmond...@oracle.com> Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Bin Meng --- hw/block/pflash_cfi01.c |

[PULL 05/11] hw/block/pflash_cfi02: Open-code pflash_register_memory(rom=false)

2021-03-15 Thread Philippe Mathieu-Daudé
There is only one call to pflash_register_memory() with rom_mode == false. As we want to modify pflash_register_memory() in the next patch, open-code this trivial function in place for the 'rom_mode == false' case. Reviewed-by: Bin Meng Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David

[PULL 03/11] hw/block/pflash_cfi02: Extract pflash_cfi02_fill_cfi_table()

2021-03-15 Thread Philippe Mathieu-Daudé
Fill the CFI table in out of DeviceRealize() in a new function: pflash_cfi02_fill_cfi_table(). Reviewed-by: Bin Meng Reviewed-by: David Edmondson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20210310170528.1184868-4-phi...@redhat.com> --- hw/block/pflash_cfi02.c | 193

[PULL 04/11] hw/block/pflash_cfi02: Set rom_mode to true in pflash_setup_mappings()

2021-03-15 Thread Philippe Mathieu-Daudé
There is only one call to pflash_setup_mappings(). Convert 'rom_mode' to boolean and set it to true directly within pflash_setup_mappings(). Reviewed-by: Bin Meng Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Edmondson Message-Id: <20210310170528.1184868-5-phi...@redhat.com> ---

[PULL 02/11] hw/block/pflash_cfi01: Extract pflash_cfi01_fill_cfi_table()

2021-03-15 Thread Philippe Mathieu-Daudé
Fill the CFI table in out of DeviceRealize() in a new function: pflash_cfi01_fill_cfi_table(). Reviewed-by: Bin Meng Reviewed-by: David Edmondson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20210310170528.1184868-3-phi...@redhat.com> --- hw/block/pflash_cfi01.c | 140

[PULL 00/11] pflash patches for 2021-03-16

2021-03-15 Thread Philippe Mathieu-Daudé
The following changes since commit 2615a5e433aeb812c300d3a48e1a88e1303e2339: Merge remote-tracking branch 'remotes/stefanha-gitlab/tags/block-pull-request' into staging (2021-03-15 19:23:00 +) are available in the Git repository at: https://github.com/philmd/qemu.git

[PULL 01/11] hw/block/pflash_cfi: Fix code style for checkpatch.pl

2021-03-15 Thread Philippe Mathieu-Daudé
We are going to move this code, fix its style first. Reviewed-by: Bin Meng Reviewed-by: David Edmondson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20210310170528.1184868-2-phi...@redhat.com> --- hw/block/pflash_cfi01.c | 36 hw/block/pflash_cfi02.c

Re: [PATCH v2 00/12] hw/block/pflash: Refactors around setting the device in read-array mode

2021-03-15 Thread Philippe Mathieu-Daudé
On 3/10/21 6:05 PM, Philippe Mathieu-Daudé wrote: > I remembered this almost 2 years old series while reviewing > David Edmondson's patches... (which are included at the end). > > Basically we move things around to make the code easier to maintain. > > David Edmondson (2): >

Re: [PATCH v5 00/13] hw/block/nvme: metadata and end-to-end data protection support

2021-03-15 Thread Klaus Jensen
On Mar 10 10:53, Klaus Jensen wrote: > From: Klaus Jensen > > This is v5 of a series that adds support for metadata and end-to-end > data protection. > > First, on the subject of metadata, in v1, support was restricted to > extended logical blocks, which was pretty trivial to implement, but >

Re: [PULL 0/1] Block patches

2021-03-15 Thread Peter Maydell
On Mon, 15 Mar 2021 at 09:51, Stefan Hajnoczi 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 7/7] block/nbd: stop manipulating in_flight counter

2021-03-15 Thread Vladimir Sementsov-Ogievskiy
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: Restrict connection_co reentrance") And here you actually allow qemu_aio_coroutine_enter()

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

2021-03-15 Thread Vladimir Sementsov-Ogievskiy
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 in-flight with the connection to the server broken can only usefully get drained if the

Re: [PATCH 3/7] block/nbd: assert attach/detach runs in the proper context

2021-03-15 Thread Roman Kagan
On Mon, Mar 15, 2021 at 07:41:32PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 15.03.2021 09:06, Roman Kagan wrote: > > Document (via a comment and an assert) that > > nbd_client_detach_aio_context and nbd_client_attach_aio_context_bh run > > in the desired aio_context > > > > Signed-off-by:

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

2021-03-15 Thread Vladimir Sementsov-Ogievskiy
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 in-flight with the connection to the server broken can only usefully get drained if the

Re: [PATCH v5 01/13] hw/block/nvme: fix zone management receive reporting too many zones

2021-03-15 Thread Klaus Jensen
On Mar 14 19:31, Dmitry Fomichev wrote: > LGTM, > Reviewed-by: Dmitry Fomichev > Thanks Dmitry! If you could give [10/13], [11/13] and [12/13] a look-see as well that would be awesome :) - k signature.asc Description: PGP signature

Re: [PATCH v2 10/13] block: remove 'encryption_key_missing' flag from QAPI

2021-03-15 Thread Eric Blake
On 3/15/21 12:45 PM, Daniel P. Berrangé wrote: > This has been hardcoded to "false" since 2.10.0, since secrets required > to unlock block devices are now always provided upfront instead of using up front > interactive prompts. > > Reviewed-by: Thomas Huth > Signed-off-by: Daniel P. Berrangé

Re: [PATCH v2 03/13] monitor: remove 'query-events' QMP command

2021-03-15 Thread Eric Blake
On 3/15/21 12:45 PM, Daniel P. Berrangé wrote: > 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: Thomas Huth > Signed-off-by:

[PATCH v3 3/4] block: detect DKIOCGETBLOCKCOUNT/SIZE before use

2021-03-15 Thread Joelle van Dyne
iOS hosts do not have these defined so we fallback to the default behaviour. Co-authored-by: Warner Losh Reviewed-by: Peter Maydell Signed-off-by: Joelle van Dyne --- block/file-posix.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git

[PATCH v3 1/4] block: feature detection for host block support

2021-03-15 Thread Joelle van Dyne
On Darwin (iOS), there are no system level APIs for directly accessing host block devices. We detect this at configure time. Signed-off-by: Joelle van Dyne --- meson.build | 6 +- qapi/block-core.json | 10 +++--- block/file-posix.c | 33 ++--- 3

[PATCH v3 2/4] block: check for sys/disk.h

2021-03-15 Thread Joelle van Dyne
Some BSD platforms do not have this header. Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Joelle van Dyne --- meson.build | 1 + block.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index

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

2021-03-15 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 +

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

2021-03-15 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 upfront instead of using interactive prompts. Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé --- block/qapi.c | 1 -

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

2021-03-15 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

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

2021-03-15 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

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

2021-03-15 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é ---

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

2021-03-15 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 +++

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

2021-03-15 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 |

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

2021-03-15 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 -

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

2021-03-15 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 +++--

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

2021-03-15 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

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

2021-03-15 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

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

2021-03-15 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

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

2021-03-15 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: Thomas Huth Signed-off-by: Daniel P. Berrangé --- docs/system/deprecated.rst |

[PATCH v2 00/13] deprecations: remove many old deprecations

2021-03-15 Thread Daniel P . Berrangé
This is an update to https://lists.gnu.org/archive/html/qemu-devel/2021-02/msg07558.html The following features have been deprecated for well over the 2 release cycle we promise ``-drive file=3Djson:{...{'driver':'file'}}`` (since 3.0) ``-vnc acl`` (since 4.0.0) ``-mon

Re: [PATCH 3/7] block/nbd: assert attach/detach runs in the proper context

2021-03-15 Thread Vladimir Sementsov-Ogievskiy
15.03.2021 09:06, Roman Kagan wrote: Document (via a comment and an assert) that nbd_client_detach_aio_context and nbd_client_attach_aio_context_bh run in the desired aio_context Signed-off-by: Roman Kagan --- block/nbd.c | 12 1 file changed, 12 insertions(+) diff --git

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-15 Thread Kevin Wolf
Am 15.03.2021 um 16:26 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Am 13.03.2021 um 14:40 hat Markus Armbruster geschrieben: > >> Markus Armbruster writes: > >> > >> > Paolo Bonzini writes: > >> > > >> >> On 11/03/21 15:08, Markus Armbruster wrote: > >> I would rather

Re: [PATCH 2/7] block/nbd: use uniformly nbd_client_connecting_wait

2021-03-15 Thread Vladimir Sementsov-Ogievskiy
15.03.2021 09:06, Roman Kagan wrote: Use nbd_client_connecting_wait uniformly all over the block/nbd.c. While at this, drop the redundant check for nbd_client_connecting_wait in reconnect_delay_timer_init, as all its callsites do this check too. Signed-off-by: Roman Kagan Reviewed-by:

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

2021-03-15 Thread Vladimir Sementsov-Ogievskiy
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 connection coroutine yielded waiting for the connection thread to complete, when it resumes it may

Re: [PATCH] Document qemu-img options data_file and data_file_raw

2021-03-15 Thread Stefan Hajnoczi
On Mon, Mar 08, 2021 at 10:43:54AM -0600, Connor Kuehl wrote: > On 3/1/21 11:28 AM, Connor Kuehl wrote: > > The contents of this patch were initially developed and posted by Han > > Han[1], however, it appears the original patch was not applied. Since > > then, the relevant documentation has been

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-15 Thread Markus Armbruster
Kevin Wolf writes: > Am 13.03.2021 um 14:40 hat Markus Armbruster geschrieben: >> Markus Armbruster writes: >> >> > Paolo Bonzini writes: >> > >> >> On 11/03/21 15:08, Markus Armbruster wrote: >> I would rather keep the OptsVisitor here. Do the same check for JSON >> syntax that

Re: [PATCH v3 0/6] Allow changing bs->file on reopen

2021-03-15 Thread Vladimir Sementsov-Ogievskiy
09.03.2021 20:08, Alberto Garcia wrote: Based-on: <20201127144522.29991-1-vsement...@virtuozzo.com> Hello, here's the third version of the patches that allow replacing bs->file using (x-)blockdev-reopen. You can read more details here:

Re: [PATCH v3 26/30] qemu-img: Use user_creatable_process_cmdline() for --object

2021-03-15 Thread Kevin Wolf
Am 15.03.2021 um 15:15 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Am 13.03.2021 um 13:30 hat Markus Armbruster geschrieben: > >> Paolo Bonzini writes: > >> > >> > On 13/03/21 08:40, Markus Armbruster wrote: > >> >>> +if (!user_creatable_add_from_str(optarg,

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

2021-03-15 Thread Vladimir Sementsov-Ogievskiy
15.03.2021 12:58, Max Reitz wrote: On 12.03.21 19:43, Vladimir Sementsov-Ogievskiy wrote: 12.03.2021 21:15, Max Reitz wrote: On 05.03.21 18:35, Vladimir Sementsov-Ogievskiy wrote: Compressed writes are unaligned to 512, which works very slow in O_DIRECT mode. Let's use the cache.

Re: [PATCH v3 26/30] qemu-img: Use user_creatable_process_cmdline() for --object

2021-03-15 Thread Markus Armbruster
Kevin Wolf writes: > Am 13.03.2021 um 13:30 hat Markus Armbruster geschrieben: >> Paolo Bonzini writes: >> >> > On 13/03/21 08:40, Markus Armbruster wrote: >> >>> +if (!user_creatable_add_from_str(optarg, _err)) { >> >>> +if (local_err) { >> >>> +

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

2021-03-15 Thread Vladimir Sementsov-Ogievskiy
13.03.2021 08:51, Mahmoud Mandour wrote: Thank you for the fast review and I'm sorry for the silly and obvious style errors. Unfortunately I did not notice the section on using the checkpatch script in the Contributing page on the wiki before committing. But I assure you that such errors will

Re: [RFC] nbd: decouple reconnect from drain

2021-03-15 Thread Vladimir Sementsov-Ogievskiy
15.03.2021 08:36, Roman Kagan wrote: On Fri, Mar 12, 2021 at 03:35:25PM +0300, Vladimir Sementsov-Ogievskiy wrote: 10.03.2021 12:32, Roman Kagan wrote: NBD connect coroutine takes an extra in_flight reference as if it's a request handler. This prevents drain from completion until the

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

2021-03-15 Thread Kevin Wolf
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 repository at: git://repo.or.cz/qemu/kevin.git

Re: [PATCH 10/14] hw/scsi: remove 'scsi-disk' device

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

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

2021-03-15 Thread Peter Maydell
On Mon, 15 Mar 2021 at 12:09, Kevin Wolf wrote: > Hm, okay. I guess this means we can't test that a deprecated option > still works. I'll remove the test and resend. You'd need a mechanism for "suppress the warning because we expect it". (Often we do this in a kind of ad-hoc way by having

Re: [PATCH 0/4] hw/block/pflash_cfi01: Remove pflash_cfi01_get_memory()

2021-03-15 Thread Peter Maydell
On Mon, 15 Mar 2021 at 11:34, Paolo Bonzini wrote: > > On 07/03/21 23:26, Philippe Mathieu-Daudé wrote: > > TYPE_PFLASH_CFI01 is a TYPE_SYS_BUS_DEVICE which registers its romd > > MemoryRegion with sysbus_init_mmio(), so we can use the generic > > sysbus_mmio_get_region() to get the region, no

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

2021-03-15 Thread Kevin Wolf
Am 12.03.2021 um 19:56 hat Peter Maydell geschrieben: > On Thu, 11 Mar 2021 at 14:48, Kevin Wolf wrote: > > > > The following changes since commit d689ecad073e0289afa8ca863e45879d719e5c21: > > > > Merge remote-tracking branch 'remotes/nvme/tags/nvme-next-pull-request' > > into staging

Re: [PATCH v3 27/30] hmp: QAPIfy object_add

2021-03-15 Thread Paolo Bonzini
On 15/03/21 12:38, Dr. David Alan Gilbert wrote: * Kevin Wolf (kw...@redhat.com) wrote: Am 15.03.2021 um 10:39 hat Markus Armbruster geschrieben: Paolo Bonzini writes: On 13/03/21 14:28, Markus Armbruster wrote: Kevin Wolf writes: This switches the HMP command object_add from a

Re: [PATCH 14/14] block: remove support for using "file" driver with block/char devices

2021-03-15 Thread Eric Blake
On 2/24/21 7:11 AM, Daniel P. Berrangé wrote: > The 'host_device' and 'host_cdrom' drivers must be used instead. > > Signed-off-by: Daniel P. Berrangé > --- > block/file-posix.c | 17 ++--- > docs/system/deprecated.rst | 7 --- >

Re: [PATCH 14/14] block: remove support for using "file" driver with block/char devices

2021-03-15 Thread Daniel P . Berrangé
Ping for anyone, especially block maintainers, willing to review this before soft freeze. On Wed, Feb 24, 2021 at 01:11:42PM +, Daniel P. Berrangé wrote: > The 'host_device' and 'host_cdrom' drivers must be used instead. > > Signed-off-by: Daniel P. Berrangé > --- > block/file-posix.c

Re: [PATCH 07/14] machine: remove 'arch' field from 'query-cpus-fast' QMP command

2021-03-15 Thread Thomas Huth
On 24/02/2021 14.11, Daniel P. Berrangé wrote: 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

Re: [PATCH 07/14] machine: remove 'arch' field from 'query-cpus-fast' QMP command

2021-03-15 Thread Daniel P . Berrangé
Ping for anyone willing to review this so I can get this in before freeze. On Wed, Feb 24, 2021 at 01:11:35PM +, Daniel P. Berrangé wrote: > Signed-off-by: Daniel P. Berrangé > --- > docs/system/deprecated.rst | 6 - > docs/system/removed-features.rst | 6 + >

Re: [PATCH v3 22/30] qom: Factor out user_creatable_process_cmdline()

2021-03-15 Thread Kevin Wolf
Am 13.03.2021 um 09:41 hat Markus Armbruster geschrieben: > Observation, not objection: > > 1. QMP core parses JSON text into QObject, passes to generated >marshaller. > > 2. Marshaller converts QObject to ObjectOptions with the QObject input >visitor, passes to qmp_object_add(). > > 3.

Re: [PATCH v3 27/30] hmp: QAPIfy object_add

2021-03-15 Thread Dr. David Alan Gilbert
* Kevin Wolf (kw...@redhat.com) wrote: > Am 15.03.2021 um 10:39 hat Markus Armbruster geschrieben: > > Paolo Bonzini writes: > > > > > On 13/03/21 14:28, Markus Armbruster wrote: > > >> Kevin Wolf writes: > > >> > > >>> This switches the HMP command object_add from a QemuOpts-based parser to >

Re: [PATCH v3 26/30] qemu-img: Use user_creatable_process_cmdline() for --object

2021-03-15 Thread Kevin Wolf
Am 13.03.2021 um 13:30 hat Markus Armbruster geschrieben: > Paolo Bonzini writes: > > > On 13/03/21 08:40, Markus Armbruster wrote: > >>> +if (!user_creatable_add_from_str(optarg, _err)) { > >>> +if (local_err) { > >>> +

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-15 Thread Kevin Wolf
Am 13.03.2021 um 14:40 hat Markus Armbruster geschrieben: > Markus Armbruster writes: > > > Paolo Bonzini writes: > > > >> On 11/03/21 15:08, Markus Armbruster wrote: > I would rather keep the OptsVisitor here. Do the same check for JSON > syntax that you have in

Re: [PATCH 0/4] hw/block/pflash_cfi01: Remove pflash_cfi01_get_memory()

2021-03-15 Thread Paolo Bonzini
On 07/03/21 23:26, Philippe Mathieu-Daudé wrote: TYPE_PFLASH_CFI01 is a TYPE_SYS_BUS_DEVICE which registers its romd MemoryRegion with sysbus_init_mmio(), so we can use the generic sysbus_mmio_get_region() to get the region, no need for a specific pflash_cfi01_get_memory() helper. First replace

Re: [PATCH 2/2] hw/block/nvme: assert namespaces array indices

2021-03-15 Thread Klaus Jensen
On Mar 15 12:19, Philippe Mathieu-Daudé wrote: > On 3/15/21 12:03 PM, Klaus Jensen wrote: > > 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

Re: [PATCH 2/2] hw/block/nvme: assert namespaces array indices

2021-03-15 Thread Philippe Mathieu-Daudé
On 3/15/21 12:03 PM, Klaus Jensen wrote: > 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

Re: [PATCH v3 27/30] hmp: QAPIfy object_add

2021-03-15 Thread Kevin Wolf
Am 15.03.2021 um 10:39 hat Markus Armbruster geschrieben: > Paolo Bonzini writes: > > > On 13/03/21 14:28, Markus Armbruster wrote: > >> Kevin Wolf writes: > >> > >>> This switches the HMP command object_add from a QemuOpts-based parser to > >>> user_creatable_add_from_str() which uses a

[PATCH 1/2] hw/block/nvme: fix potential overflow

2021-03-15 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

[PATCH 0/2] hw/block/nvme: coverity fixes

2021-03-15 Thread Klaus Jensen
From: Klaus Jensen Fix three issues reported by coverity (CID 1450756, CID 1450757 and CID 1450758). Klaus Jensen (2): hw/block/nvme: fix potential overflow hw/block/nvme: assert namespaces array indices hw/block/nvme-subsys.h | 2 ++ hw/block/nvme.h| 10 --

[PATCH 2/2] hw/block/nvme: assert namespaces array indices

2021-03-15 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

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

2021-03-15 Thread Max Reitz
On 12.03.21 19:43, Vladimir Sementsov-Ogievskiy wrote: 12.03.2021 21:15, Max Reitz wrote: On 05.03.21 18:35, Vladimir Sementsov-Ogievskiy wrote: Compressed writes are unaligned to 512, which works very slow in O_DIRECT mode. Let's use the cache. Signed-off-by: Vladimir Sementsov-Ogievskiy

[PULL 1/1] virtio-blk: Respect discard granularity

2021-03-15 Thread Stefan Hajnoczi
From: Akihiko Odaki Report the configured granularity for discard operation to the guest. If this is not set use the block size. Since until now we have ignored the configured discard granularity and always reported the block size, let's add 'report-discard-granularity' property and disable it

[PULL 0/1] Block patches

2021-03-15 Thread Stefan Hajnoczi
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 repository at: https://gitlab.com/stefanha/qemu.git

Re: [PATCH v3 27/30] hmp: QAPIfy object_add

2021-03-15 Thread Markus Armbruster
Paolo Bonzini writes: > On 13/03/21 14:28, Markus Armbruster wrote: >> Kevin Wolf writes: >> >>> This switches the HMP command object_add from a QemuOpts-based parser to >>> user_creatable_add_from_str() which uses a keyval parser and enforces >>> the QAPI schema. >>> >>> Apart from being a

[PATCH 2/7] block/nbd: use uniformly nbd_client_connecting_wait

2021-03-15 Thread Roman Kagan
Use nbd_client_connecting_wait uniformly all over the block/nbd.c. While at this, drop the redundant check for nbd_client_connecting_wait in reconnect_delay_timer_init, as all its callsites do this check too. Signed-off-by: Roman Kagan --- block/nbd.c | 34 +++--- 1

[PATCH 3/7] block/nbd: assert attach/detach runs in the proper context

2021-03-15 Thread Roman Kagan
Document (via a comment and an assert) that nbd_client_detach_aio_context and nbd_client_attach_aio_context_bh run in the desired aio_context. Signed-off-by: Roman Kagan --- block/nbd.c | 12 1 file changed, 12 insertions(+) diff --git a/block/nbd.c b/block/nbd.c index

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

2021-03-15 Thread Roman Kagan
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 connection is restored. Otherwise such requests

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

2021-03-15 Thread Roman Kagan
As the reconnect logic no longer interferes with drained sections, it appears unnecessary to explicitly manipulate the in_flight counter. Fixes: 5ad81b4946 ("nbd: Restrict connection_co reentrance") Signed-off-by: Roman Kagan --- block/nbd.c | 6 -- nbd/client.c | 2 -- 2 files changed, 8

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

2021-03-15 Thread Roman Kagan
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 connection is restored. Otherwise such requests

[PATCH 5/7] block/nbd: better document a case in nbd_co_establish_connection

2021-03-15 Thread Roman Kagan
Cosmetic: adjust the comment and the return value in nbd_co_establish_connection where it's entered while the connection thread is still running. Signed-off-by: Roman Kagan --- block/nbd.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index

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

2021-03-15 Thread Roman Kagan
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 connection coroutine yielded waiting for the connection thread to complete, when it resumes it may access the invalidated connection thread

[PATCH 4/7] block/nbd: transfer reconnection stuff across aio_context switch

2021-03-15 Thread Roman Kagan
Make varios pieces of reconnection logic correctly survive the transition of the BDRVNBDState from one aio_context to another. In particular, - cancel the reconnect_delay_timer and rearm it in the new context; - cancel the sleep of the connection_co between reconnect attempt so that it