[no subject]

2022-12-12 Thread Mohammadreza Nasrabadi
Hi, I have launched a qemu process with the following options related to emulated disk: -drive file=disk.qcow2,if=none,id=disk0,l2-cache-size=8M,format=qcow2,discard=on,detect-zeroes=unmap,aio=io_uring -device virtio-blk-pci,drive=disk0,scsi=off,bootindex=2 If I download files on guest OS to incr

Re: [PATCH-for-8.0 03/10] hw/virtio: Constify qmp_virtio_feature_map_t[]

2022-12-12 Thread Philippe Mathieu-Daudé
On 13/12/22 01:02, Richard Henderson wrote: On 12/12/22 17:05, Philippe Mathieu-Daudé wrote: @@ -161,7 +161,7 @@ static qmp_virtio_feature_map_t vhost_user_protocol_map[] = {   };   /* virtio device configuration statuses */ -static qmp_virtio_feature_map_t virtio_config_status_map[] = { +stati

Re: [RFC PATCH-for-8.0 06/10] hw/virtio: Cache access_is_big_endian value in VirtIODevice state

2022-12-12 Thread Philippe Mathieu-Daudé
On 13/12/22 01:14, Richard Henderson wrote: On 12/12/22 17:05, Philippe Mathieu-Daudé wrote: The device endianness doesn't change during runtime. What are you talking about?  Of course it does. The host CPU certainly does, but the virtio device doesn't... Does it? This check only consider t

Re: [RFC PATCH-for-8.0 06/10] hw/virtio: Cache access_is_big_endian value in VirtIODevice state

2022-12-12 Thread Richard Henderson
On 12/12/22 17:05, Philippe Mathieu-Daudé wrote: The device endianness doesn't change during runtime. What are you talking about? Of course it does. I mean, it doesn't often in practice, because the Linux kernel is compiled for one endianness and doesn't keep toggling state, but the hooks th

Re: [PATCH-for-8.0 03/10] hw/virtio: Constify qmp_virtio_feature_map_t[]

2022-12-12 Thread Richard Henderson
On 12/12/22 17:05, Philippe Mathieu-Daudé wrote: @@ -161,7 +161,7 @@ static qmp_virtio_feature_map_t vhost_user_protocol_map[] = { }; /* virtio device configuration statuses */ -static qmp_virtio_feature_map_t virtio_config_status_map[] = { +static const qmp_virtio_feature_map_t virtio_c

[PATCH-for-8.0 05/10] hw/virtio: Extract QMP related code virtio-qmp.c

2022-12-12 Thread Philippe Mathieu-Daudé
The monitor decoders are the only functions using the CONFIG_xxx definitions declared in the target specific CONFIG_DEVICES header. Signed-off-by: Philippe Mathieu-Daudé --- hw/virtio/meson.build | 2 +- hw/virtio/virtio-qmp.c | 631 + hw/virtio/virtio-

[PATCH-for-8.0 02/10] hw/virtio: Rename virtio_ss[] -> specific_virtio_ss[]

2022-12-12 Thread Philippe Mathieu-Daudé
Since virtio_ss[] is added to specific_ss[], rename it as specific_virtio_ss[] to make it clearer. Signed-off-by: Philippe Mathieu-Daudé --- hw/virtio/meson.build | 41 + 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/hw/virtio/meson.build

[RFC PATCH-for-8.0 09/10] hw/virtio: Extract vhost_user_ram_slots_max() to vhost-user-target.c

2022-12-12 Thread Philippe Mathieu-Daudé
The current definition of VHOST_USER_MAX_RAM_SLOTS is target specific. By converting this definition to a runtime vhost_user_ram_slots_max() helper declared in a target specific unit, we can have the rest of vhost-user.c target independent. To avoid variable length array or using the heap to store

[RFC PATCH-for-8.0 06/10] hw/virtio: Cache access_is_big_endian value in VirtIODevice state

2022-12-12 Thread Philippe Mathieu-Daudé
The device endianness doesn't change during runtime. Cache it in the VirtIODevice state. Signed-off-by: Philippe Mathieu-Daudé --- RFC: I'm not sure virtio_init() is the correct place to add this check. We want to initialize this field once the features are negociated. --- hw/virtio/vi

[PATCH-for-8.0 03/10] hw/virtio: Constify qmp_virtio_feature_map_t[]

2022-12-12 Thread Philippe Mathieu-Daudé
These arrays are only accessed read-only, move them to .rodata. Signed-off-by: Philippe Mathieu-Daudé --- hw/virtio/virtio.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 5817f4cbc9..f54cc233

[PATCH-for-8.0 08/10] hw/virtio: Un-inline virtio_access_is_big_endian()

2022-12-12 Thread Philippe Mathieu-Daudé
In order to avoid target-specific code in VirtIO headers, move this particular function -- which is only called once in virtio_init() -- in its own unit. Signed-off-by: Philippe Mathieu-Daudé --- hw/virtio/virtio-config.c | 20 include/hw/virtio/virtio-access.h | 19

[RFC PATCH-for-8.0 07/10] hw/virtio: Directly access cached VirtIODevice::access_is_big_endian

2022-12-12 Thread Philippe Mathieu-Daudé
Since the device endianness doesn't change at runtime, use the cached value instead of evaluating it on each call. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/virtio/virtio-access.h | 44 +++ 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/inc

[RFC PATCH-for-8.0 10/10] hw/virtio: Make most of virtio devices target-independent

2022-12-12 Thread Philippe Mathieu-Daudé
Except the following files: - virtio-config.c - virtio-qmp.c - virtio-iommu.c - virtio-mem.c - vhost-user-target.c - vhost-vdpa.c all other virtio related files are target independent and can be compiled only once for a system emulation build, avoiding compiling hundreds of objects. Signed-off-by:

[RFC PATCH-for-8.0 00/10] hw/virtio: Build most objects as target independent units

2022-12-12 Thread Philippe Mathieu-Daudé
Currently the inlined virtio_access_is_big_endian() function "hw/virtio/virtio-access.h" which is used by all I/O accesses force any virtio device to be built as target-dependent object. This series isolates the few VirtIO target specific bits, trying to not impact the performance (a function is u

[PATCH-for-8.0 04/10] hw/virtio: Extract config read/write accessors to virtio-config.c

2022-12-12 Thread Philippe Mathieu-Daudé
These config helpers use the target-dependent LD/ST API. Signed-off-by: Philippe Mathieu-Daudé --- hw/virtio/meson.build | 1 + hw/virtio/virtio-config.c | 204 ++ hw/virtio/virtio.c| 190 --- 3 files changed, 205

[PATCH-for-8.0 01/10] hw/virtio: Add missing "hw/core/cpu.h" include

2022-12-12 Thread Philippe Mathieu-Daudé
virtio.c uses target_words_bigendian() which is declared in "hw/core/cpu.h". Add the missing header to avoid when refactoring: hw/virtio/virtio.c:2451:9: error: implicit declaration of function 'target_words_bigendian' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (target_

Re: [PATCH 1/3] include/block: Untangle inclusion loops

2022-12-12 Thread Paolo Bonzini
On 12/8/22 15:39, Markus Armbruster wrote: * Global state (GS) API. These functions run under the BQL. * * See include/block/block-global-state.h for more information about - * the GS API. + * the GS API.b */ One-character typo. Paolo

Re: [PATCH v2 14/15] block: Don't poll in bdrv_replace_child_noperm()

2022-12-12 Thread Paolo Bonzini
On 12/12/22 16:57, Kevin Wolf wrote: I looks to me like this is a problem with the test case rather than the change per se. It seems to be fixed with this patch that is already posted as part of the next series: [PATCH 09/18] test-bdrv-drain: Fix incorrrect drain assumptions https://lists.gnu.or

Re: [PATCH 00/18] block: Introduce a block graph rwlock

2022-12-12 Thread Kevin Wolf
Am 07.12.2022 um 15:12 hat Emanuele Giuseppe Esposito geschrieben: > Am 07/12/2022 um 14:18 schrieb Kevin Wolf: > > This series supersedes the first half of Emanuele's "Protect the block > > layer with a rwlock: part 1". It introduces the basic infrastructure for > > protecting the block graph (spe

Re: [PATCH v2 14/15] block: Don't poll in bdrv_replace_child_noperm()

2022-12-12 Thread Kevin Wolf
Am 09.12.2022 um 17:53 hat Paolo Bonzini geschrieben: > On 11/18/22 18:41, Kevin Wolf wrote: > > In order to make sure that bdrv_replace_child_noperm() doesn't have to > > poll any more, get rid of the bdrv_parent_drained_begin_single() call. > > > > This is possible now because we can require tha

[PATCH 1/3] block: apply assertion more widely

2022-12-12 Thread Paolo Bonzini
.bdrv_needs_filename is only set for drivers that also set bdrv_file_open, i.e. protocol drivers. So we can make the assertion always, it will always pass for those drivers that use bdrv_open. Signed-off-by: Paolo Bonzini --- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

[PATCH 2/3] block: do not check bdrv_file_open

2022-12-12 Thread Paolo Bonzini
The set of BlockDrivers that have .bdrv_file_open coincides with those that have .protocol_name and guess what---checking drv->bdrv_file_open is done to see if the driver is a protocol. So check drv->protocol_name instead. Signed-off-by: Paolo Bonzini --- block.c | 13 ++--- 1 file chan

[PATCH 0/3] block: remove separate bdrv_file_open callback

2022-12-12 Thread Paolo Bonzini
The presence of the bdrv_file_open callback is used in some parts of the code to distinguish protocol and format drivers. Use the existing .protocol_name field instead, and unify .bdrv_open with .bdrv_file_open. Paolo Paolo Bonzini (3): block: apply assertion more widely block: do not check

[PATCH 3/3] block: remove separate bdrv_file_open callback

2022-12-12 Thread Paolo Bonzini
bdrv_file_open and bdrv_open are completely equivalent, they are never checked except to see which one to invoke. So merge them into a single callback. Signed-off-by: Paolo Bonzini --- block.c | 2 -- block/blkdebug.c | 2 +- block/blkio.c

[PATCH 13/15] block: second argument of bdrv_do_drained_end is always NULL

2022-12-12 Thread Paolo Bonzini
Remove it and unify the function with bdrv_drained_end. Signed-off-by: Paolo Bonzini --- block/io.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/block/io.c b/block/io.c index 695c8f3f5faa..c2962adf8d2d 100644 --- a/block/io.c +++ b/block/io.c @@ -69,

[PATCH 12/15] block: limit bdrv_co_yield_to_drain to drain_begin

2022-12-12 Thread Paolo Bonzini
Since bdrv_drained_end does not poll anymore, it need not jump out of coroutine context. This in turn enables the removal of the "begin" field in BdrvCoDrainData. Signed-off-by: Paolo Bonzini --- block/io.c | 19 +++ 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a

[PATCH 00/12] More cleanups and fixes for drain

2022-12-12 Thread Paolo Bonzini
There are a few more lines of code that can be removed around draining code, but especially the logic can be simplified by removing unnecessary parameters. Due to the failure of the block-next branch, the first three patches drop patches 14+15 of Kevin's drain cleanup series, and then redo patch 1

[PATCH 07/15] block-backend: enter aio coroutine only after drain

2022-12-12 Thread Paolo Bonzini
When called from within (another) coroutine, aio_co_enter will not enter a coroutine immediately; instead the new coroutine is scheduled to run after qemu_coroutine_yield(). This however might cause the currently-running coroutine to yield without having raised blk->in_flight. If it was a ->draine

[PATCH 10/15] block-backend: always wait for drain before starting operation

2022-12-12 Thread Paolo Bonzini
All I/O operations call blk_wait_while_drained() immediately after blk_inc_in_flight(), except for blk_abort_aio_request() where it does not hurt to add such a call. Merge the two functions into one, and add a note about a disturbing lack of thread-safety that will be fixed shortly. While at it,

[PATCH 06/15] tests/qemu-iotests/030: test_stream_parallel should use auto_finalize=False

2022-12-12 Thread Paolo Bonzini
From: Emanuele Giuseppe Esposito First, use run_job() instead of the current logic to run the stream job. Then, use auto_finalize=False to be sure that the job is not automatically deleted once it is done. In this way, if the job finishes before we want, it is not finalized yet so the other comm

[PATCH 11/15] block-backend: make queued_requests thread-safe

2022-12-12 Thread Paolo Bonzini
Protect quiesce_counter and queued_requests with a QemuMutex, so that they are protected from concurrent access in the main thread (for example blk_root_drained_end() reached from bdrv_drain_all()) and in the iothread (where any I/O operation will call blk_inc_in_flight()). Signed-off-by: Paolo Bo

[PATCH 03/15] block: Pull polling out of bdrv_parent_drained_begin_single()

2022-12-12 Thread Paolo Bonzini
Only one caller of bdrv_parent_drained_begin_single() passes poll=true; move the polling to that one caller. While this requires exposing bdrv_parent_drained_poll_single to outside block/io.c, this is not a big deal because the bdrv_parent_drained_*_single functions are really internal between blo

[PATCH 14/15] block: second argument of bdrv_do_drained_begin and bdrv_drain_poll is always NULL

2022-12-12 Thread Paolo Bonzini
Remove it from the functions, from callers/callees such as bdrv_do_drained_begin_quiesce() and bdrv_drain_poll(), and from bdrv_co_yield_to_drain() and BdrvCoDrainData. Signed-off-by: Paolo Bonzini --- block.c | 4 ++-- block/io.c | 49

[PATCH 15/15] block: only get out of coroutine context for polling

2022-12-12 Thread Paolo Bonzini
The drained_begin callbacks are not polling, all they do is schedule any operations that must complete before bdrv_drained_end(). As such, they can be called before bdrv_co_yield_to_drain(). Thus, the only remaining task left for bdrv_co_drain_bh_cb() is the BDRV_POLL_WHILE() loop. This patch ex

[PATCH 04/15] test-bdrv-drain.c: remove test_detach_by_parent_cb()

2022-12-12 Thread Paolo Bonzini
From: Emanuele Giuseppe Esposito This test uses a callback of an I/O function (blk_aio_preadv) to modify the graph, using bdrv_attach_child. This is simply not allowed anymore. I/O cannot change the graph. Before "block/io.c: make bdrv_do_drained_begin_quiesce static and introduce bdrv_drained_b

[PATCH 05/15] tests/unit/test-bdrv-drain.c: graph setup functions can't run in coroutines

2022-12-12 Thread Paolo Bonzini
From: Emanuele Giuseppe Esposito Graph initialization functions like blk_new(), bdrv_new() and so on should not run in a coroutine. In fact, they might invoke a drain (for example blk_insert_bs eventually calls bdrv_replace_child_noperm) that in turn can invoke callbacks like bdrv_do_drained_begi

[PATCH 09/15] block-backend: make global properties write-once

2022-12-12 Thread Paolo Bonzini
The three global properties allow_aio_context_change, disable_request_queuing and allow_write_before_eof are always set for the whole life of a BlockBackend. Make this clear by removing the possibility of clearing them, and by marking the corresponding function GLOBAL_STATE_CODE(). Signed-off-by:

[PATCH 08/15] nbd: a BlockExport always has a BlockBackend

2022-12-12 Thread Paolo Bonzini
exp->common.blk cannot be NULL, nbd_export_delete() is only called from blk_exp_unref() and in turn that can only happen after blk_exp_add() has asserted exp->blk != NULL. Signed-off-by: Paolo Bonzini --- nbd/server.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --g

[PATCH 02/15] Revert "block: Don't poll in bdrv_replace_child_noperm()"

2022-12-12 Thread Paolo Bonzini
This reverts commit a4e5c80a45b22359cf9c187f0df4f8544812c55c. Signed-off-by: Paolo Bonzini --- block.c | 103 +-- block/io.c | 2 +- include/block/block-io.h | 8 --- tests/unit/test-bdrv-drain.c | 10 4 files c

[PATCH 01/15] Revert "block: Remove poll parameter from bdrv_parent_drained_begin_single()"

2022-12-12 Thread Paolo Bonzini
This reverts commit dcc5d4bc2abed4268bf31908193c4369e4c9d005. Signed-off-by: Paolo Bonzini --- block.c | 4 ++-- block/io.c | 8 ++-- include/block/block-io.h | 5 +++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/block.c b/block.c index 619

Re: [PATCH v4 3/4] hw/nvme: fix missing endian conversions for doorbell buffers

2022-12-12 Thread Philippe Mathieu-Daudé
On 12/12/22 12:44, Klaus Jensen wrote: From: Klaus Jensen The eventidx and doorbell value are not handling endianness correctly. Fix this. Fixes: 3f7fe8de3d49 ("hw/nvme: Implement shadow doorbell buffer support") Cc: qemu-sta...@nongnu.org Reported-by: Guenter Roeck Signed-off-by: Klaus Jense

Re: [PATCH v3 4/4] hw/nvme: fix missing cq eventidx update

2022-12-12 Thread Klaus Jensen
On Dec 12 12:37, Philippe Mathieu-Daudé wrote: > On 12/12/22 12:32, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Prior to reading the shadow doorbell cq head, we have to update the > > eventidx. Otherwise, we risk that the driver will skip an mmio doorbell > > write. This happens on riscv64

[PATCH v4 1/4] hw/nvme: use QOM accessors

2022-12-12 Thread Klaus Jensen
From: Klaus Jensen Replace various ->parent_obj use with the equivalent QOM accessors. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 89 +++--- 1 file changed, 48 insertions(+), 41 deletions(-) diff --git a/hw

[PATCH v4 3/4] hw/nvme: fix missing endian conversions for doorbell buffers

2022-12-12 Thread Klaus Jensen
From: Klaus Jensen The eventidx and doorbell value are not handling endianness correctly. Fix this. Fixes: 3f7fe8de3d49 ("hw/nvme: Implement shadow doorbell buffer support") Cc: qemu-sta...@nongnu.org Reported-by: Guenter Roeck Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 19 +

[PATCH v4 4/4] hw/nvme: fix missing cq eventidx update

2022-12-12 Thread Klaus Jensen
From: Klaus Jensen Prior to reading the shadow doorbell cq head, we have to update the eventidx. Otherwise, we risk that the driver will skip an mmio doorbell write. This happens on riscv64, as reported by Guenter. Adding the missing update to the cq eventidx fixes the issue. Fixes: 3f7fe8de3d4

[PATCH v4 2/4] hw/nvme: rename shadow doorbell related trace events

2022-12-12 Thread Klaus Jensen
From: Klaus Jensen Rename the trace events related to writing the event index and reading the doorbell value to make it more clear that the event is associated with an actual update (write or read respectively). Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.

[PATCH v4 0/4] hw/nvme: fix broken shadow doorbells on some platforms

2022-12-12 Thread Klaus Jensen
From: Klaus Jensen Guenter reports that hw/nvme is broken on riscv64[1] and big endian platforms[2]. This is a regression since 7.1, so this does not warrent an rc5 for 7.2. I'm sure Guenter can carry this patch in his tree, and maybe we can get this out in a stable release. On riscv, the issue

Re: [PATCH v3 4/4] hw/nvme: fix missing cq eventidx update

2022-12-12 Thread Philippe Mathieu-Daudé
On 12/12/22 12:32, Klaus Jensen wrote: From: Klaus Jensen Prior to reading the shadow doorbell cq head, we have to update the eventidx. Otherwise, we risk that the driver will skip an mmio doorbell write. This happens on riscv64, as reported by Guenter. Adding the missing update to the cq even

Re: [PATCH v3 3/4] hw/nvme: fix missing endian conversions for doorbell buffers

2022-12-12 Thread Philippe Mathieu-Daudé
On 12/12/22 12:32, Klaus Jensen wrote: From: Klaus Jensen The eventidx and doorbell value are not handling endianness correctly. Fix this. Fixes: 3f7fe8de3d49 ("hw/nvme: Implement shadow doorbell buffer support") Cc: qemu-sta...@nongnu.org Reported-by: Guenter Roeck Signed-off-by: Klaus Jense

[PATCH v3 1/4] hw/nvme: use QOM accessors

2022-12-12 Thread Klaus Jensen
From: Klaus Jensen Replace various ->parent_obj use with the equivalent QOM accessors. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 89 +++--- 1 file changed, 48 insertions(+), 41 deletions(-) diff --git a/hw

[PATCH v3 2/4] hw/nvme: rename shadow doorbell related trace events

2022-12-12 Thread Klaus Jensen
From: Klaus Jensen Rename the trace events related to writing the event index and reading the doorbell value to make it more clear that the event is associated with an actual update (write or read respectively). Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.

[PATCH v3 4/4] hw/nvme: fix missing cq eventidx update

2022-12-12 Thread Klaus Jensen
From: Klaus Jensen Prior to reading the shadow doorbell cq head, we have to update the eventidx. Otherwise, we risk that the driver will skip an mmio doorbell write. This happens on riscv64, as reported by Guenter. Adding the missing update to the cq eventidx fixes the issue. Fixes: 3f7fe8de3d4

[PATCH v3 3/4] hw/nvme: fix missing endian conversions for doorbell buffers

2022-12-12 Thread Klaus Jensen
From: Klaus Jensen The eventidx and doorbell value are not handling endianness correctly. Fix this. Fixes: 3f7fe8de3d49 ("hw/nvme: Implement shadow doorbell buffer support") Cc: qemu-sta...@nongnu.org Reported-by: Guenter Roeck Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 12

[PATCH v3 0/4] hw/nvme: fix broken shadow doorbells on some platforms

2022-12-12 Thread Klaus Jensen
From: Klaus Jensen Guenter reports that hw/nvme is broken on riscv64[1] and big endian platforms[2]. This is a regression since 7.1, so this does not warrent an rc5 for 7.2. I'm sure Guenter can carry this patch in his tree, and maybe we can get this out in a stable release. On riscv, the issue

Re: [PATCH v2 5/5] qemu-img: Speed up checksum

2022-12-12 Thread Hanna Reitz
On 28.11.22 15:15, Nir Soffer wrote: Add coroutine based loop inspired by `qemu-img convert` design. Changes compared to `qemu-img convert`: - State for the entire image is kept in ImgChecksumState - State for single worker coroutine is kept in ImgChecksumworker. - "Writes" are always in-orde

Re: [PATCH v2 3/5] qemu-img: Add checksum command

2022-12-12 Thread Hanna Reitz
On 28.11.22 15:15, Nir Soffer wrote: The checksum command compute a checksum for disk image content using the blkhash library[1]. The blkhash library is not packaged yet, but it is available via copr[2]. Example run: $ ./qemu-img checksum -p fedora-35.qcow2 6e5c00c995056319d52395f8d91

Re: [PATCH v2 4/5] iotests: Test qemu-img checksum

2022-12-12 Thread Hanna Reitz
On 28.11.22 15:15, Nir Soffer wrote: Add simple tests computing a checksum for image with all kinds of extents in raw and qcow2 formats. The test can be extended later for other formats, format options (e..g compressed qcow2), protocols (e.g. nbd), and image with a backing chain, but I'm not sur

Re: [PATCH v2 2/5] Support format or cache specific out file

2022-12-12 Thread Hanna Reitz
On 28.11.22 15:15, Nir Soffer wrote: Extend the test finder to find tests with format (*.out.qcow2) or cache specific (*.out.nocache) out file. This worked before only for the numbered tests. --- tests/qemu-iotests/findtests.py | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-)

Re: [PATCH v2 1/5] qemu-img.c: Move IO_BUF_SIZE to the top of the file

2022-12-12 Thread Hanna Reitz
On 28.11.22 15:15, Nir Soffer wrote: This macro is used by various commands (compare, convert, rebase) but it is defined somewhere in the middle of the file. I'm going to use it in the new checksum command so lets clean up a bit before that. --- qemu-img.c | 3 +-- 1 file changed, 1 insertion(

Re: [PATCH 1/1] qemu-iotests/stream-under-throttle: do not shutdown QEMU

2022-12-12 Thread Christian Borntraeger
Am 07.12.22 um 14:14 schrieb Christian Borntraeger: Without a kernel or boot disk a QEMU on s390 will exit (usually with a disabled wait state). This breaks the stream-under-throttle test case. Do not exit qemu if on s390. Signed-off-by: Christian Borntraeger --- tests/qemu-iotests/tests/s

Re: [PATCH v2 14/15] block: Don't poll in bdrv_replace_child_noperm()

2022-12-12 Thread Paolo Bonzini
On 12/9/22 17:53, Paolo Bonzini wrote: On 11/18/22 18:41, Kevin Wolf wrote: In order to make sure that bdrv_replace_child_noperm() doesn't have to poll any more, get rid of the bdrv_parent_drained_begin_single() call. This is possible now because we can require that the parent is already draine