[RFC 0/4] Add full zoned storage emulation to qcow2 driver

2023-06-05 Thread Sam Li
This patch series add a new extension - zoned format - to the qcow2 driver thereby allowing full zoned storage emulation on the qcow2 img file. Users can attach such a qcow2 file to the guest as a zoned device. To create a qcow2 file with zoned format, use command like this: $ qemu-img create

[PATCH v2 10/11] graph-lock: Unlock the AioContext while polling

2023-06-05 Thread Kevin Wolf
If the caller keeps the AioContext lock for a block node in an iothread, polling in bdrv_graph_wrlock() deadlocks if the condition isn't fulfilled immediately. Now that all callers make sure to actually have the AioContext locked when they call bdrv_replace_child_noperm() like they should, we can

[PATCH v2 05/11] block: Fix AioContext locking in bdrv_attach_child_common()

2023-06-05 Thread Kevin Wolf
The function can move the child node to a different AioContext. In this case, it also must take the AioContext lock for the new context before calling functions that require the caller to hold the AioContext for the child node. Signed-off-by: Kevin Wolf --- block.c | 21 - 1

[RFC 1/4] docs/qcow2: add the zoned format feature

2023-06-05 Thread Sam Li
Add the specs for the zoned format feature of the qcow2 driver. Once the zoned_profile is set to `zbc`, then the qcow2 file can be taken as zoned devices and passed through by virtio-blk device to the guest. Signed-off-by: Sam Li --- docs/system/qemu-block-drivers.rst.inc | 31

[RFC 3/4] qcow2: add zoned emulation capability

2023-06-05 Thread Sam Li
By adding zone operations and zoned metadata, the zoned emulation capability enables full emulation support of zoned device using a qcow2 file. The zoned device metadata includes zone type, zoned device state and write pointer of each zone, which is stored to an array of unsigned integers. Each

[RFC 2/4] qcow2: add configurations for zoned format extension

2023-06-05 Thread Sam Li
To configure the zoned format feature on the qcow2 driver, it requires following arguments: the device size, zoned profile, zoned model, zone size, zone capacity, number of conventional zones, limits on zone resources (max append sectors, max open zones, and max_active_zones). To create a qcow2

[RFC 4/4] iotests: test the zoned format feature for qcow2 file

2023-06-05 Thread Sam Li
The zoned format feature can be tested by: $ tests/qemu-iotests/check zoned-qcow2 Signed-off-by: Sam Li --- tests/qemu-iotests/tests/zoned-qcow2 | 110 +++ tests/qemu-iotests/tests/zoned-qcow2.out | 87 ++ 2 files changed, 197 insertions(+) create mode

[PATCH v2 07/11] block: Fix AioContext locking in bdrv_open_inherit()

2023-06-05 Thread Kevin Wolf
bdrv_open_inherit() calls several functions for which it needs to hold the AioContext lock, but currently doesn't. This includes calls in bdrv_append_temp_snapshot(), for which bdrv_open_inherit() is the only caller. Fix the locking in these places. Signed-off-by: Kevin Wolf --- block.c | 25

[PATCH v2 03/11] test-block-iothread: Lock AioContext for blk_insert_bs()

2023-06-05 Thread Kevin Wolf
blk_insert_bs() requires that callers hold the AioContext lock for the node that should be inserted. Take it. Signed-off-by: Kevin Wolf --- tests/unit/test-block-iothread.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/unit/test-block-iothread.c

[PATCH v2 02/11] qdev-properties-system: Lock AioContext for blk_insert_bs()

2023-06-05 Thread Kevin Wolf
blk_insert_bs() requires that callers hold the AioContext lock for the node that should be inserted. Take it. Signed-off-by: Kevin Wolf --- hw/core/qdev-properties-system.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/core/qdev-properties-system.c

[PATCH v2 04/11] block: Fix AioContext locking in bdrv_open_child()

2023-06-05 Thread Kevin Wolf
bdrv_attach_child() requires that the caller holds the AioContext lock for the new child node. Take it in bdrv_open_child() and document that the caller must not hold any AioContext apart from the main AioContext. Signed-off-by: Kevin Wolf --- block.c | 13 +++-- 1 file changed, 11

[PATCH v2 11/11] Revert "graph-lock: Disable locking for now"

2023-06-05 Thread Kevin Wolf
Now that bdrv_graph_wrlock() temporarily drops the AioContext lock that its caller holds, it can poll without causing deadlocks. We can now re-enable graph locking. This reverts commit ad128dff0bf4b6f971d05eb4335a627883a19c1d. Signed-off-by: Kevin Wolf --- block/graph-lock.c | 25

[PATCH v2 09/11] blockjob: Fix AioContext locking in block_job_add_bdrv()

2023-06-05 Thread Kevin Wolf
bdrv_root_attach_child() requires callers to hold the AioContext lock for child_bs. Take it in block_job_add_bdrv() before calling the function. Signed-off-by: Kevin Wolf --- blockjob.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/blockjob.c

[PATCH v2 00/11] block: Re-enable the graph lock

2023-06-05 Thread Kevin Wolf
This series fixes the deadlock that was observed before commit ad128dff ('graph-lock: Disable locking for now'), which just disabled the graph lock completely as a workaround to get 8.0.1 stable. In theory the problem is simple: We can't poll while still holding the lock of a different

[PATCH v2 01/11] iotests: Test active commit with iothread and background I/O

2023-06-05 Thread Kevin Wolf
This is a better regression test for the bugs hidden by commit 80fc5d26 ('graph-lock: Disable locking for now'). With that commit reverted, it hangs instantaneously and reliably for me. It is important to have a reliable test like this, because the following commits will set out to fix the actual

[PATCH v2 06/11] block: Fix AioContext locking in bdrv_reopen_parse_file_or_backing()

2023-06-05 Thread Kevin Wolf
bdrv_set_file_or_backing_noperm() requires the caller to hold the AioContext lock for the child node, but we hold the one for the parent node in bdrv_reopen_parse_file_or_backing(). Take the other one temporarily. Signed-off-by: Kevin Wolf --- block.c | 35 +-- 1

Re: [PATCH v2 11/11] Revert "graph-lock: Disable locking for now"

2023-06-05 Thread Kevin Wolf
Am 05.06.2023 um 11:06 hat Paolo Bonzini geschrieben: > On 6/5/23 10:57, Kevin Wolf wrote: > > void bdrv_graph_rdlock_main_loop(void) > > @@ -296,18 +276,13 @@ void assert_bdrv_graph_readable(void) > > { > > /* reader_count() is slow due to aio_context_list_lock lock > > contention */ >

[PATCH v2 08/11] block: Fix AioContext locking in bdrv_open_backing_file()

2023-06-05 Thread Kevin Wolf
bdrv_set_backing() requires the caller to hold the AioContext lock for @backing_hd. Take it in bdrv_open_backing_file() before calling the function. Signed-off-by: Kevin Wolf --- block.c | 5 + 1 file changed, 5 insertions(+) diff --git a/block.c b/block.c index 954b9923d9..d5f8231f31

Re: [PATCH v2 11/11] Revert "graph-lock: Disable locking for now"

2023-06-05 Thread Paolo Bonzini
On 6/5/23 10:57, Kevin Wolf wrote: void bdrv_graph_rdlock_main_loop(void) @@ -296,18 +276,13 @@ void assert_bdrv_graph_readable(void) { /* reader_count() is slow due to aio_context_list_lock lock contention */ /* TODO Reenable when wrlock is reenabled */ There's still a TODO

[PULL 02/17] block: Collapse padded I/O vecs exceeding IOV_MAX

2023-06-05 Thread Hanna Czenczek
When processing vectored guest requests that are not aligned to the storage request alignment, we pad them by adding head and/or tail buffers for a read-modify-write cycle. The guest can submit I/O vectors up to IOV_MAX (1024) in length, but with this padding, the vector can exceed that limit.

[PULL 00/17] Block patches

2023-06-05 Thread Hanna Czenczek
The following changes since commit 848a6caa88b9f082c89c9b41afa975761262981d: Merge tag 'migration-20230602-pull-request' of https://gitlab.com/juan.quintela/qemu into staging (2023-06-02 17:33:29 -0700) are available in the Git repository at: https://gitlab.com/hreitz/qemu.git

[PULL 16/17] parallels: Incorrect condition in out-of-image check

2023-06-05 Thread Hanna Czenczek
From: Alexander Ivanov All the offsets in the BAT must be lower than the file size. Fix the check condition for correct check. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Message-Id: <20230424093147.197643-13-alexander.iva...@virtuozzo.com> Reviewed-by: Hanna Czenczek

[PULL 01/17] util/iov: Make qiov_slice() public

2023-06-05 Thread Hanna Czenczek
We want to inline qemu_iovec_init_extended() in block/io.c for padding requests, and having access to qiov_slice() is useful for this. As a public function, it is renamed to qemu_iovec_slice(). (We will need to count the number of I/O vector elements of a slice there, and then later process this

[PULL 10/17] parallels: Move check of unclean image to a separate function

2023-06-05 Thread Hanna Czenczek
From: Alexander Ivanov We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id:

Re: [PATCH v2] hw/scsi/megasas: Silent GCC duplicated-cond warning

2023-06-05 Thread Philippe Mathieu-Daudé
ping? On 28/3/23 23:01, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé GCC9 is confused when building with CFLAG -O3: hw/scsi/megasas.c: In function ‘megasas_scsi_realize’: hw/scsi/megasas.c:2387:26: error: duplicated ‘if’ condition [-Werror=duplicated-cond] 2387 |

[PULL 04/17] iotests/iov-padding: New test

2023-06-05 Thread Hanna Czenczek
Test that even vectored IO requests with 1024 vector elements that are not aligned to the device's request alignment will succeed. Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Hanna Czenczek Message-Id: <20230411173418.19549-5-hre...@redhat.com> ---

[PULL 06/17] parallels: Fix high_off calculation in parallels_co_check()

2023-06-05 Thread Hanna Czenczek
From: Alexander Ivanov Don't let high_off be more than the file size even if we don't fix the image. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <20230424093147.197643-3-alexander.iva...@virtuozzo.com> Reviewed-by: Hanna

[PULL 09/17] parallels: Use generic infrastructure for BAT writing in parallels_co_check()

2023-06-05 Thread Hanna Czenczek
From: Alexander Ivanov BAT is written in the context of conventional operations over the image inside bdrv_co_flush() when it calls parallels_co_flush_to_os() callback. Thus we should not modify BAT array directly, but call parallels_set_bat_entry() helper and bdrv_co_flush() further on. After

[PULL 15/17] parallels: Replace qemu_co_mutex_lock by WITH_QEMU_LOCK_GUARD

2023-06-05 Thread Hanna Czenczek
From: Alexander Ivanov Replace the way we use mutex in parallels_co_check() for simplier and less error prone code. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Message-Id: <20230424093147.197643-12-alexander.iva...@virtuozzo.com> Reviewed-by: Hanna Czenczek Signed-off-by:

[PULL 17/17] qcow2: add discard-no-unref option

2023-06-05 Thread Hanna Czenczek
From: Jean-Louis Dupond When we for example have a sparse qcow2 image and discard: unmap is enabled, there can be a lot of fragmentation in the image after some time. Especially on VM's that do a lot of writes/deletes. This causes the qcow2 image to grow even over 110% of its virtual size,

[PULL 12/17] parallels: Fix statistics calculation

2023-06-05 Thread Hanna Czenczek
From: Alexander Ivanov Exclude out-of-image clusters from allocated and fragmented clusters calculation. Signed-off-by: Alexander Ivanov Message-Id: <20230424093147.197643-9-alexander.iva...@virtuozzo.com> Reviewed-by: Hanna Czenczek Signed-off-by: Hanna Czenczek --- block/parallels.c | 6

Re: [RFC 2/4] qcow2: add configurations for zoned format extension

2023-06-05 Thread Eric Blake
On Mon, Jun 05, 2023 at 06:41:06PM +0800, Sam Li wrote: > To configure the zoned format feature on the qcow2 driver, it > requires following arguments: the device size, zoned profile, > zoned model, zone size, zone capacity, number of conventional > zones, limits on zone resources (max append

Re: [PATCH v5 2/5] parallels: Split image leak handling to separate check and fix helpers

2023-06-05 Thread Alexander Ivanov
On 6/2/23 16:08, Hanna Czenczek wrote: On 29.05.23 17:15, Alexander Ivanov wrote: We need to fix leak after deduplication in the next patch. Move leak fixing to a separate helper parallels_fix_leak() and add parallels_get_leak_size() helper wich used in parallels_fix_leak() and

Re: [PATCH v2] hw/scsi/megasas: Silent GCC duplicated-cond warning

2023-06-05 Thread Hannes Reinecke
On 6/5/23 15:44, Philippe Mathieu-Daudé wrote: ping? On 28/3/23 23:01, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé GCC9 is confused when building with CFLAG -O3:    hw/scsi/megasas.c: In function ‘megasas_scsi_realize’:    hw/scsi/megasas.c:2387:26: error: duplicated ‘if’

[PULL 13/17] parallels: Move check of leaks to a separate function

2023-06-05 Thread Hanna Czenczek
From: Alexander Ivanov We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov Message-Id: <20230424093147.197643-10-alexander.iva...@virtuozzo.com> Reviewed-by:

[PULL 08/17] parallels: create parallels_set_bat_entry_helper() to assign BAT value

2023-06-05 Thread Hanna Czenczek
From: Alexander Ivanov This helper will be reused in next patches during parallels_co_check rework to simplify its code. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <20230424093147.197643-5-alexander.iva...@virtuozzo.com>

[PULL 05/17] parallels: Out of image offset in BAT leads to image inflation

2023-06-05 Thread Hanna Czenczek
From: Alexander Ivanov data_end field in BDRVParallelsState is set to the biggest offset present in BAT. If this offset is outside of the image, any further write will create the cluster at this offset and/or the image will be truncated to this offset on close. This is definitely not correct.

[PULL 14/17] parallels: Move statistic collection to a separate function

2023-06-05 Thread Hanna Czenczek
From: Alexander Ivanov We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id:

[PULL 03/17] util/iov: Remove qemu_iovec_init_extended()

2023-06-05 Thread Hanna Czenczek
bdrv_pad_request() was the main user of qemu_iovec_init_extended(). HEAD^ has removed that use, so we can remove qemu_iovec_init_extended() now. The only remaining user is qemu_iovec_init_slice(), which can easily inline the small part it really needs. Note that qemu_iovec_init_extended()

[PULL 07/17] parallels: Fix image_end_offset and data_end after out-of-image check

2023-06-05 Thread Hanna Czenczek
From: Alexander Ivanov Set data_end to the end of the last cluster inside the image. In such a way we can be sure that corrupted offsets in the BAT can't affect on the image size. If there are no allocated clusters set image_end_offset by data_end. Signed-off-by: Alexander Ivanov Reviewed-by:

[PULL 11/17] parallels: Move check of cluster outside image to a separate function

2023-06-05 Thread Hanna Czenczek
From: Alexander Ivanov We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Message-Id:

Re: [PATCH v5 3/5] parallels: Add checking and repairing duplicate offsets in BAT

2023-06-05 Thread Alexander Ivanov
On 6/2/23 16:43, Hanna Czenczek wrote: On 29.05.23 17:15, Alexander Ivanov wrote: Cluster offsets must be unique among all the BAT entries. Find duplicate offsets in the BAT and fix it by copying the content of the relevant cluster to a newly allocated cluster and set the new cluster offset

Re: [PATCH 2/2] scsi/qemu-pr-helper: Use defaults [get/set]_multipath_config() impl

2023-06-05 Thread Paolo Bonzini
On 6/5/23 19:41, Philippe Mathieu-Daudé wrote: Commit b3f1c8c413 ("qemu-pr-helper: use new libmultipath API") declared the two [get/set]_multipath_config() functions to satisfy the 'new' API. The library already provides an internal implementation for these helpers, exposed as weak symbols.

Re: [PATCH v2 05/20] qemu_file: Use a stat64 for qemu_file_transferred

2023-06-05 Thread Peter Xu
On Tue, May 30, 2023 at 08:39:26PM +0200, Juan Quintela wrote: > This way we can read it from any thread. > I checked that it gives the same value than the current one. We never > use to qemu_files at the same time. > > Signed-off-by: Juan Quintela The follow up patch may be better to be

Re: [PULL 00/17] Block patches

2023-06-05 Thread Richard Henderson
On 6/5/23 08:45, Hanna Czenczek wrote: The following changes since commit 848a6caa88b9f082c89c9b41afa975761262981d: Merge tag 'migration-20230602-pull-request' ofhttps://gitlab.com/juan.quintela/qemu into staging (2023-06-02 17:33:29 -0700) are available in the Git repository at:

Re: [PATCH v2 1/5] util/cacheflush: Use declarations from on Darwin

2023-06-05 Thread Richard Henderson
On 6/5/23 10:56, Philippe Mathieu-Daudé wrote: Per the cache(3) man page, sys_icache_invalidate() and sys_dcache_flush() are declared in . Signed-off-by: Philippe Mathieu-Daudé --- util/cacheflush.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderson

Re: [PATCH 0/2] scsi/qemu-pr-helper: Drop 'old' lib and use default config helpers

2023-06-05 Thread Philippe Mathieu-Daudé
On 5/6/23 19:41, Philippe Mathieu-Daudé wrote: The 'old' lib check was added for CentOS 7 which we don't support anymore. We don't need to implement particular [get/set]_multipath_config() helpers: use the defaults. Philippe Mathieu-Daudé (2): scsi/qemu-pr-helper: Drop support for 'old'

[PATCH 2/2] scsi/qemu-pr-helper: Use defaults [get/set]_multipath_config() impl

2023-06-05 Thread Philippe Mathieu-Daudé
Commit b3f1c8c413 ("qemu-pr-helper: use new libmultipath API") declared the two [get/set]_multipath_config() functions to satisfy the 'new' API. The library already provides an internal implementation for these helpers, exposed as weak symbols. Since our implementation doesn't provide much, we can

[PATCH 0/2] scsi/qemu-pr-helper: Drop 'old' lib and use default config helpers

2023-06-05 Thread Philippe Mathieu-Daudé
The 'old' lib check was added for CentOS 7 which we don't support anymore. We don't need to implement particular [get/set]_multipath_config() helpers: use the defaults. Philippe Mathieu-Daudé (2): scsi/qemu-pr-helper: Drop support for 'old' libmultipath API scsi/qemu-pr-helper: Use defaults

[PATCH 1/2] scsi/qemu-pr-helper: Drop support for 'old' libmultipath API

2023-06-05 Thread Philippe Mathieu-Daudé
Commit 1b0578f5c4 ("qemu-pr-helper: Fix build on CentOS 7") added code to probe for 'old' libmultipath API on CentOS 7. However since merge commit 8c345b3e6a (June 2021) we don't build/test CentOS 7 as it felt out of our list of supported distrib versions. Therefore we can safely remove the 'old'

[PATCH v2 4/5] bulk: Do not declare function prototypes using 'extern' keyword

2023-06-05 Thread Philippe Mathieu-Daudé
By default, C function prototypes declared in headers are visible, so there is no need to declare them as 'extern' functions. Remove this redundancy in a single bulk commit; do not modify: - meson.build (used to check function availability at runtime) - pc-bios/ - libdecnumber/ - tests/

[PATCH v2 0/5] bulk: Do not declare function prototypes using 'extern' keyword

2023-06-05 Thread Philippe Mathieu-Daudé
Since v2: - Do not change variable declarations in "block/dmg.h" (danpb) - Rebased - Added R-b from v1 v1: - Remove the 'extern' keyword on function prototypes declared in header. - Replace __attribute__((noreturn)) -> G_NORETURN - Trivial cleanups to keep the previous commits generic.

[PATCH v2 1/5] util/cacheflush: Use declarations from on Darwin

2023-06-05 Thread Philippe Mathieu-Daudé
Per the cache(3) man page, sys_icache_invalidate() and sys_dcache_flush() are declared in . Signed-off-by: Philippe Mathieu-Daudé --- util/cacheflush.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/cacheflush.c b/util/cacheflush.c index 06c2333a60..de35616718

Re: [PATCH v2 2/5] tcg/tcg-op-vec: Remove left over _link_error() definitions

2023-06-05 Thread Richard Henderson
On 6/5/23 10:56, Philippe Mathieu-Daudé wrote: In commit d56fea79f9 ("tcg: Move TCG_{LOW,HIGH} to tcg-internal.h") we replaced the "_link_error" definitions with modern QEMU_ERROR() attribute markup. We covered tcg-op.c but forgot to completely clean tcg-op-vec.c. Do it now. Signed-off-by:

Re: [PATCH v2 5/5] bulk: Replace __attribute__((noreturn)) -> G_NORETURN

2023-06-05 Thread Richard Henderson
On 6/5/23 10:56, Philippe Mathieu-Daudé wrote: -static __attribute__((noreturn)) void exit_failure(void) +static G_NORETURN void exit_failure(void) I think attr-spec-seq ('[[noreturn]]') has to come before specifiers-and-qualifiers (i.e. 'static'). To me this means that G_NORETURN being

[PATCH v2 5/5] bulk: Replace __attribute__((noreturn)) -> G_NORETURN

2023-06-05 Thread Philippe Mathieu-Daudé
Under MSYS2, G_NORETURN is expanded to '[[noreturn]]'. Simpler to use the same definition everywhere, unifying the code style. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Juan Quintela --- include/sysemu/os-win32.h | 2 +- tests/migration/stress.c | 2 +- 2 files changed, 2

[PATCH v2 2/5] tcg/tcg-op-vec: Remove left over _link_error() definitions

2023-06-05 Thread Philippe Mathieu-Daudé
In commit d56fea79f9 ("tcg: Move TCG_{LOW,HIGH} to tcg-internal.h") we replaced the "_link_error" definitions with modern QEMU_ERROR() attribute markup. We covered tcg-op.c but forgot to completely clean tcg-op-vec.c. Do it now. Signed-off-by: Philippe Mathieu-Daudé --- tcg/tcg-op-vec.c | 11

[PATCH v2 3/5] qemu/uri: Use QueryParams type definition

2023-06-05 Thread Philippe Mathieu-Daudé
Follow QEMU CODING_STYLE, use the type definition. Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/uri.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qemu/uri.h b/include/qemu/uri.h index b43f35a6a6..2875c51417 100644 --- a/include/qemu/uri.h +++

Re: [PATCH v2 04/20] qemu-file: We only call qemu_file_transferred_* on the sending side

2023-06-05 Thread Peter Xu
On Tue, May 30, 2023 at 08:39:25PM +0200, Juan Quintela wrote: > Remove the increase in qemu_file_fill_buffer() and add asserts to > qemu_file_transferred* functions. > > Signed-off-by: Juan Quintela The read side accounting does look a bit weird and never caught my notice.. Maybe worth also

Re: [PATCH v2 5/8] hw/ide/ahci: PxCI should not get cleared when ERR_STAT is set

2023-06-05 Thread John Snow
On Thu, Jun 1, 2023 at 9:46 AM Niklas Cassel wrote: > > From: Niklas Cassel > > For NCQ, PxCI is cleared on command queued successfully. > For non-NCQ, PxCI is cleared on command completed successfully. > Successfully means ERR_STAT, BUSY and DRQ are all cleared. > > A command that has ERR_STAT