Re: [PATCH v3 4/4] configure: add --disable-colo-proxy option

2023-04-27 Thread Lukas Straub
On Thu, 27 Apr 2023 23:29:46 +0300 Vladimir Sementsov-Ogievskiy wrote: > Add option to not build filter-mirror, filter-rewriter and > colo-compare when they are not needed. > > There could be more agile configuration, for example add separate > options for each filter, but that may be done in

Re: [PATCH v3 3/4] build: move COLO under CONFIG_REPLICATION

2023-04-27 Thread Lukas Straub
On Thu, 27 Apr 2023 23:29:45 +0300 Vladimir Sementsov-Ogievskiy wrote: > We don't allow to use x-colo capability when replication is not > configured. So, no reason to build COLO when replication is disabled, > it's unusable in this case. > > Note also that the check in migrate_caps_check() is

Re: [PATCH v3 4/4] configure: add --disable-colo-proxy option

2023-04-27 Thread Vladimir Sementsov-Ogievskiy
On 28.04.23 00:18, Lukas Straub wrote: On Thu, 27 Apr 2023 23:29:46 +0300 Vladimir Sementsov-Ogievskiy wrote: Add option to not build filter-mirror, filter-rewriter and colo-compare when they are not needed. There could be more agile configuration, for example add separate options for each

[PATCH v10 2/8] async: Add an optional reentrancy guard to the BH API

2023-04-27 Thread Alexander Bulekov
Devices can pass their MemoryReentrancyGuard (from their DeviceState), when creating new BHes. Then, the async API will toggle the guard before/after calling the BH call-back. This prevents bh->mmio reentrancy issues. Reviewed-by: Darren Kenny Signed-off-by: Alexander Bulekov ---

[PATCH v10 4/8] hw: replace most qemu_bh_new calls with qemu_bh_new_guarded

2023-04-27 Thread Alexander Bulekov
This protects devices from bh->mmio reentrancy issues. Thanks: Thomas Huth for diagnosing OS X test failure. Reviewed-by: Darren Kenny Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Reviewed-by: Paul Durrant Signed-off-by: Alexander Bulekov Reviewed-by: Thomas Huth ---

Re: [PATCH 03/20] block: bdrv/blk_co_unref() for calls in coroutine context

2023-04-27 Thread Paolo Bonzini
Il gio 27 apr 2023, 19:00 Kevin Wolf ha scritto: > By the way, and slightly unrelated, can vrc somehow help with finding > places that call coroutine wrappers without holding the AioContext lock? > (This results in an abort() when AIO_WAIT_WHILE() tries to unlock the > AioContext.) This is one

Re: [PATCH v3 1/4] block/meson.build: prefer positive condition for replication

2023-04-27 Thread Lukas Straub
On Thu, 27 Apr 2023 23:29:43 +0300 Vladimir Sementsov-Ogievskiy wrote: > Signed-off-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Juan Quintela > Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Lukas Straub > --- > block/meson.build | 2 +- > 1 file changed, 1 insertion(+), 1

[PATCH v3 4/4] configure: add --disable-colo-proxy option

2023-04-27 Thread Vladimir Sementsov-Ogievskiy
Add option to not build filter-mirror, filter-rewriter and colo-compare when they are not needed. There could be more agile configuration, for example add separate options for each filter, but that may be done in future on demand. The aim of this patch is to make possible to disable the whole

[PATCH v3 3/4] build: move COLO under CONFIG_REPLICATION

2023-04-27 Thread Vladimir Sementsov-Ogievskiy
We don't allow to use x-colo capability when replication is not configured. So, no reason to build COLO when replication is disabled, it's unusable in this case. Note also that the check in migrate_caps_check() is not the only restriction: some functions in migration/colo.c will just abort if

[PATCH v3 1/4] block/meson.build: prefer positive condition for replication

2023-04-27 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Juan Quintela Reviewed-by: Philippe Mathieu-Daudé --- block/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/meson.build b/block/meson.build index 382bec0e7d..b9a72e219b 100644 --- a/block/meson.build

[PATCH v3 0/4] COLO: improve build options

2023-04-27 Thread Vladimir Sementsov-Ogievskiy
v3: 01: add r-bs 02: improve commit message 03: - improve commit message - drop ifdefs from migration/colo.c which are not needed anymore - don't move migrate_colo_enabled() (now just migrate_colo()), instead modify it inplace - keep colo-compare.c for now (will be handled in updated

[PATCH v3 2/4] scripts/qapi: allow optional experimental enum values

2023-04-27 Thread Vladimir Sementsov-Ogievskiy
We have 'if' feature for some things in QAPI, including enum values. But currently it doesn't work for experimental enum values, as in generated QEnumLookup structure, the description for additional features (for example - "unstable") is not surrounded by corresponding "#ifdef"s. So let's fix it.

Re: [PATCH v2 3/4] build: move COLO under CONFIG_REPLICATION

2023-04-27 Thread Vladimir Sementsov-Ogievskiy
On 23.04.23 04:54, Zhang, Chen wrote: -Original Message- From: Vladimir Sementsov-Ogievskiy Sent: Friday, April 21, 2023 4:36 PM To: Zhang, Chen;qemu-de...@nongnu.org Cc:qemu-block@nongnu.org;michael.r...@amd.com;arm...@redhat.com;

Re: [PATCH 10/13] hw/ide/piix: Reuse PCIIDEState::{cmd,data}_ops

2023-04-27 Thread Bernhard Beschow
Am 27. April 2023 10:52:17 UTC schrieb Mark Cave-Ayland : >On 26/04/2023 21:14, Bernhard Beschow wrote: > >> Am 26. April 2023 18:18:35 UTC schrieb Bernhard Beschow : >>> >>> >>> Am 26. April 2023 11:37:48 UTC schrieb Mark Cave-Ayland >>> : On 22/04/2023 16:07, Bernhard Beschow wrote:

[PATCH v10 0/4] Add zone append write for zoned device

2023-04-27 Thread Sam Li
This patch series add zone append operation based on the previous zoned device support part. The file-posix driver is modified to add zone append emulation using regular writes. v9: - address review comments [Stefan] * fix get_zones_wp() for wrong offset index * fix misuses of

[PATCH v10 3/4] qemu-iotests: test zone append operation

2023-04-27 Thread Sam Li
The patch tests zone append writes by reporting the zone wp after the completion of the call. "zap -p" option can print the sector offset value after completion, which should be the start sector where the append write begins. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi ---

[PATCH v10 4/4] block: add some trace events for zone append

2023-04-27 Thread Sam Li
Signed-off-by: Sam Li Reviewed-by: Dmitry Fomichev Reviewed-by: Stefan Hajnoczi --- block/file-posix.c | 3 +++ block/trace-events | 2 ++ 2 files changed, 5 insertions(+) diff --git a/block/file-posix.c b/block/file-posix.c index 8fc7f73d2c..5f1745ede8 100644 --- a/block/file-posix.c +++

[PATCH v10 2/4] block: introduce zone append write for zoned devices

2023-04-27 Thread Sam Li
A zone append command is a write operation that specifies the first logical block of a zone as the write position. When writing to a zoned block device using zone append, the byte offset of the call may point at any position within the zone to which the data is being appended. Upon completion the

[PATCH v10 1/4] file-posix: add tracking of the zone write pointers

2023-04-27 Thread Sam Li
Since Linux doesn't have a user API to issue zone append operations to zoned devices from user space, the file-posix driver is modified to add zone append emulation using regular writes. To do this, the file-posix driver tracks the wp location of all zones of the device. It uses an array of

[PATCH v19 8/8] docs/zoned-storage: add zoned device documentation

2023-04-27 Thread Sam Li
Add the documentation about the zoned device support to virtio-blk emulation. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi Reviewed-by: Damien Le Moal Reviewed-by: Dmitry Fomichev Acked-by: Kevin Wolf Message-id: 20230324090605.28361-9-faithilike...@gmail.com [Add index-api.rst to fix

[PATCH v19 6/8] iotests: test new zone operations

2023-04-27 Thread Sam Li
The new block layer APIs of zoned block devices can be tested by: $ tests/qemu-iotests/check zoned Run each zone operation on a newly created null_blk device and see whether it outputs the same zone information. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi Acked-by: Kevin Wolf

[PATCH v19 5/8] block: add zoned BlockDriver check to block layer

2023-04-27 Thread Sam Li
Putting zoned/non-zoned BlockDrivers on top of each other is not allowed. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi Reviewed-by: Hannes Reinecke Reviewed-by: Dmitry Fomichev Acked-by: Kevin Wolf Message-id: 20230324090605.28361-6-faithilike...@gmail.com [Adjust commit message prefix

[PATCH v19 2/8] block/file-posix: introduce helper functions for sysfs attributes

2023-04-27 Thread Sam Li
Use get_sysfs_str_val() to get the string value of device zoned model. Then get_sysfs_zoned_model() can convert it to BlockZoneModel type of QEMU. Use get_sysfs_long_val() to get the long value of zoned device information. Signed-off-by: Sam Li Reviewed-by: Hannes Reinecke Reviewed-by: Stefan

[PATCH v19 7/8] block: add some trace events for new block layer APIs

2023-04-27 Thread Sam Li
Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi Reviewed-by: Dmitry Fomichev Acked-by: Kevin Wolf Message-id: 20230324090605.28361-8-faithilike...@gmail.com Signed-off-by: Stefan Hajnoczi --- block/file-posix.c | 3 +++ block/trace-events | 2 ++ 2 files changed, 5 insertions(+) diff

[PATCH v19 4/8] block/raw-format: add zone operations to pass through requests

2023-04-27 Thread Sam Li
raw-format driver usually sits on top of file-posix driver. It needs to pass through requests of zone commands. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Dmitry Fomichev Acked-by: Kevin Wolf Message-id:

[PATCH v19 3/8] block/block-backend: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2023-04-27 Thread Sam Li
Add zoned device option to host_device BlockDriver. It will be presented only for zoned host block devices. By adding zone management operations to the host_block_device BlockDriver, users can use the new block layer APIs including Report Zone and four zone management operations (open, close,

[PATCH v19 0/8] Add support for zoned device

2023-04-27 Thread Sam Li
Zoned Block Devices (ZBDs) devide the LBA space to block regions called zones that are larger than the LBA size. It can only allow sequential writes, which reduces write amplification in SSD, leading to higher throughput and increased capacity. More details about ZBDs can be found at:

[PATCH v19 1/8] block/block-common: add zoned device structs

2023-04-27 Thread Sam Li
Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Dmitry Fomichev Acked-by: Kevin Wolf Message-id: 20230324090605.28361-2-faithilike...@gmail.com [Adjust commit message prefix as suggested by Philippe Mathieu-Daudé .

Re: [PATCH 03/20] block: bdrv/blk_co_unref() for calls in coroutine context

2023-04-27 Thread Kevin Wolf
Am 27.04.2023 um 16:30 hat Paolo Bonzini geschrieben: > Il mar 25 apr 2023, 19:32 Kevin Wolf ha scritto: > > > These functions must not be called in coroutine context, because they > > need write access to the graph. > > > > With these patches applied vrc is still complaining about calls to >

Re: [PATCH v9 7/8] memory: abort on re-entrancy in debug builds

2023-04-27 Thread Thomas Huth
On 27/04/2023 16.44, Alexander Bulekov wrote: On 230426 1219, Alexander Bulekov wrote: This is useful for using unit-tests/fuzzing to detect bugs introduced by the re-entrancy guard mechanism into devices that are intentionally re-entrant. Signed-off-by: Alexander Bulekov Reviewed-by: Thomas

[PULL 03/18] migration: Make all functions check have the same format

2023-04-27 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy --- migration/options.c | 153 +++- 1 file changed, 39 insertions(+), 114 deletions(-) diff --git a/migration/options.c b/migration/options.c index 552e8d8e5c..0b1b56e68f 100644 ---

[PULL 12/18] migration: Move migration_properties to options.c

2023-04-27 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy --- migration/migration.c | 157 -- migration/options.c | 155 + migration/options.h | 7 ++ 3 files changed, 162 insertions(+), 157

Re: [PATCH 04/20] block: Don't call no_coroutine_fns in qmp_block_resize()

2023-04-27 Thread Eric Blake
On Thu, Apr 27, 2023 at 01:15:08PM +0200, Kevin Wolf wrote: > Am 25.04.2023 um 22:08 hat Eric Blake geschrieben: > > On Tue, Apr 25, 2023 at 07:31:42PM +0200, Kevin Wolf wrote: > > > This QMP handler runs in a coroutine, so it must use the corresponding > > > no_co_wrappers instead. > > > > > >

Re: [PATCH v2 09/16] qapi: Fix bullet list markup in documentation

2023-04-27 Thread Juan Quintela
Markus Armbruster wrote: > I'm going to squash in the appended patch and add > > John Snow missed the need for a blank line when converting > docs/devel/qapi-code-gen.txt to rST. > > to the commit message. Fine with me O:-) > diff --git a/docs/devel/qapi-code-gen.rst

[PULL 02/18] migration: Create migrate_params_init() function

2023-04-27 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy --- migration/migration.c | 29 + migration/options.c | 31 +++ migration/options.h | 1 + 3 files changed, 33 insertions(+), 28 deletions(-) diff --git

[PULL 08/18] migration: Create migrate_tls_creds() function

2023-04-27 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy --- Moved the type to const char * (vladimir) --- migration/options.c | 7 +++ migration/options.h | 1 + migration/tls.c | 9 - 3 files changed, 12 insertions(+), 5 deletions(-) diff --git

[PULL 00/18] Migration 20230427 patches

2023-04-27 Thread Juan Quintela
/migration-20230427-pull-request for you to fetch changes up to 73208a336e249bc8e3bdd76a78d0af7ecaee9178: migration: Make dirty_bytes_last_sync atomic (2023-04-27 16:39:54 +0200) Migration Pull request (20230427 edition) Hi

[PULL 09/18] migration: Create migrate_tls_authz() function

2023-04-27 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy --- Moved the type to const char * (vladimir) --- migration/options.c | 7 +++ migration/options.h | 1 + migration/tls.c | 5 + 3 files changed, 9 insertions(+), 4 deletions(-) diff --git

[PULL 11/18] migration: Create migrate_block_bitmap_mapping() function

2023-04-27 Thread Juan Quintela
Notice that we changed the test of ->has_block_bitmap_mapping for the test that block_bitmap_mapping is not NULL. Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy --- Make it return const (vladimir) --- migration/block-dirty-bitmap.c | 14 --

Re: [PATCH v2 09/16] qapi: Fix bullet list markup in documentation

2023-04-27 Thread Markus Armbruster
I'm going to squash in the appended patch and add John Snow missed the need for a blank line when converting docs/devel/qapi-code-gen.txt to rST. to the commit message. diff --git a/docs/devel/qapi-code-gen.rst b/docs/devel/qapi-code-gen.rst index d81aac7a19..ea0592034a 100644 ---

[PULL 15/18] multifd: Only flush once each full round of memory

2023-04-27 Thread Juan Quintela
We need to add a new flag to mean to flush at that point. Notice that we still flush at the end of setup and at the end of complete stages. Signed-off-by: Juan Quintela Acked-by: Peter Xu --- Add missing qemu_fflush(), now it passes all tests always. In the previous version, the check that

[PULL 07/18] migration: Remove MigrationState from block_cleanup_parameters()

2023-04-27 Thread Juan Quintela
This makes the function more regular with everything else. Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy --- migration/migration.c | 4 ++-- migration/options.c | 4 +++- migration/options.h | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git

[PULL 05/18] migration: Move migrate_set_block_incremental() to options.c

2023-04-27 Thread Juan Quintela
Once there, make it more regular and remove the need for MigrationState parameter. Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy --- migration/migration.c | 9 ++--- migration/options.c | 9 + migration/options.h | 4 3 files changed, 15

[PULL 16/18] stat64: Add stat64_set() operation

2023-04-27 Thread Juan Quintela
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Reviewed-by: Juan Quintela Reviewed-by: Richard Henderson Signed-off-by: Juan Quintela --- include/qemu/stats64.h | 6 ++ util/stats64.c | 11 +++ 2 files changed, 17 insertions(+) diff --git a/include/qemu/stats64.h

[PULL 18/18] migration: Make dirty_bytes_last_sync atomic

2023-04-27 Thread Juan Quintela
As we set its value, it needs to be operated with atomics. We rename it from remaining to better reflect its meaning. Statistics always return the real reamaining bytes. This was used to store how much pages where dirty on the previous generation, so we can calculate the expected downtime as:

[PULL 17/18] migration: Make dirty_pages_rate atomic

2023-04-27 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Richard Henderson Reviewed-by: Peter Xu --- Don't use __nocheck() variants Use stat64_get() --- migration/migration.c | 6 -- migration/ram.c | 5 +++-- migration/ram.h | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff

[PULL 13/18] multifd: Create property multifd-flush-after-each-section

2023-04-27 Thread Juan Quintela
We used to flush all channels at the end of each RAM section sent. That is not needed, so preparing to only flush after a full iteration through all the RAM. Default value of the property is false. But we return "true" in migrate_multifd_flush_after_each_section() until we implement the code in

[PULL 14/18] multifd: Protect multifd_send_sync_main() calls

2023-04-27 Thread Juan Quintela
We only need to do that on the ram_save_iterate() call on sending and on destination when we get a RAM_SAVE_FLAG_EOS. In setup() and complete() we need to synch in both new and old cases, so don't add a check there. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Acked-by:

[PULL 01/18] multifd: Fix the number of channels ready

2023-04-27 Thread Juan Quintela
We don't wait in the sem when we are doing a sync_main. Make it wait there. To make things clearer, we mark the channel ready at the begining of the thread loop. Signed-off-by: Juan Quintela Reviewed-by: Fabiano Rosas --- migration/multifd.c | 3 ++- 1 file changed, 2 insertions(+), 1

[PULL 06/18] migration: Move block_cleanup_parameters() to options.c

2023-04-27 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy --- migration/migration.c | 10 -- migration/options.c | 10 ++ migration/options.h | 1 + 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/migration/migration.c b/migration/migration.c

[PULL 04/18] migration: Create migrate_downtime_limit() function

2023-04-27 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy --- migration/migration.c | 4 ++-- migration/options.c | 7 +++ migration/options.h | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index

[PULL 10/18] migration: Create migrate_tls_hostname() function

2023-04-27 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy --- Moved the type to const char * (vladimir) --- migration/options.c | 7 +++ migration/options.h | 1 + migration/tls.c | 5 +++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git

Re: [PATCH 07/20] graph-lock: Fix GRAPH_RDLOCK_GUARD*() to be reader lock

2023-04-27 Thread Eric Blake
On Thu, Apr 27, 2023 at 01:28:15PM +0200, Kevin Wolf wrote: > Am 25.04.2023 um 22:36 hat Eric Blake geschrieben: > > On Tue, Apr 25, 2023 at 07:31:45PM +0200, Kevin Wolf wrote: > > > GRAPH_RDLOCK_GUARD() and GRAPH_RDLOCK_GUARD_MAINLOOP() only take a > > > reader lock for the graph, so the correct

Re: [PATCH 01/20] qcow2: Don't call bdrv_getlength() in coroutine_fns

2023-04-27 Thread Eric Blake
On Thu, Apr 27, 2023 at 01:12:43PM +0200, Kevin Wolf wrote: > Am 25.04.2023 um 20:37 hat Eric Blake geschrieben: > > On Tue, Apr 25, 2023 at 07:31:39PM +0200, Kevin Wolf wrote: > > > There is a bdrv_co_getlength() now, which should be used in coroutine > > > context. > > > > > > Signed-off-by:

Re: QMP (without OOB) function running in thread different from the main thread as part of aio_poll

2023-04-27 Thread Peter Xu
On Thu, Apr 27, 2023 at 04:36:14PM +0200, Juan Quintela wrote: > Fiona Ebner wrote: > > Am 27.04.23 um 13:03 schrieb Kevin Wolf: > >> Am 26.04.2023 um 16:31 hat Fiona Ebner geschrieben: > >>> Am 20.04.23 um 08:55 schrieb Paolo Bonzini: > > Hi > > > Our function is a custom variant of saving a

Re: [PATCH v9 7/8] memory: abort on re-entrancy in debug builds

2023-04-27 Thread Alexander Bulekov
On 230426 1219, Alexander Bulekov wrote: > This is useful for using unit-tests/fuzzing to detect bugs introduced by > the re-entrancy guard mechanism into devices that are intentionally > re-entrant. > > Signed-off-by: Alexander Bulekov > Reviewed-by: Thomas Huth > --- This doesn't actually do

Re: QMP (without OOB) function running in thread different from the main thread as part of aio_poll

2023-04-27 Thread Juan Quintela
Fiona Ebner wrote: > Am 27.04.23 um 13:03 schrieb Kevin Wolf: >> Am 26.04.2023 um 16:31 hat Fiona Ebner geschrieben: >>> Am 20.04.23 um 08:55 schrieb Paolo Bonzini: Hi > Our function is a custom variant of saving a snapshot and uses > qemu_savevm_state_setup(), which is why the

Re: [PATCH 03/20] block: bdrv/blk_co_unref() for calls in coroutine context

2023-04-27 Thread Paolo Bonzini
Il mar 25 apr 2023, 19:32 Kevin Wolf ha scritto: > These functions must not be called in coroutine context, because they > need write access to the graph. > With these patches applied vrc is still complaining about calls to bdrv_unref_child from qcow2_do_open and qcow2_do_close. Otherwise, the

Re: [PATCH] block/file-posix.c: No need to sync data when aio + dio is enabled

2023-04-27 Thread Kevin Wolf
Am 27.04.2023 um 15:22 hat zhoushl geschrieben: > Hi Kevin: > I’m sorry for missing commit message, next time I will be careful. When > the application in guest vm execute fsync, qemu will execute fsync too. > But when aio + dio is enabled, pagecache is bypassed As far as I can tell, you don't

Re: [PATCH 17/16] docs/devel/qapi-code-gen: Describe some doc markup pitfalls

2023-04-27 Thread Vladimir Sementsov-Ogievskiy
On 27.04.23 15:41, Vladimir Sementsov-Ogievskiy wrote: On 27.04.23 12:53, Markus Armbruster wrote: Signed-off-by: Markus Armbruster ---   docs/devel/qapi-code-gen.rst | 53   1 file changed, 53 insertions(+) diff --git a/docs/devel/qapi-code-gen.rst

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

2023-04-27 Thread Mike Maslenkin
Sorry for the noise again , but I have another note On Mon, Apr 24, 2023 at 12:44 PM 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

Re: [PATCH] block/file-posix.c: No need to sync data when aio + dio is enabled

2023-04-27 Thread zhoushl
Hi Kevin: I’m sorry for missing commit message, next time I will be careful. When the application in guest vm execute fsync, qemu will execute fsync too. But when aio + dio is enabled, pagecache is bypassed and we could assure the data is on disk(at least on the disk cache), so there is no

Re: [PATCH 11/13] hw/ide/sii3112: Reuse PCIIDEState::{cmd,data}_ops

2023-04-27 Thread BALATON Zoltan
On Thu, 27 Apr 2023, Mark Cave-Ayland wrote: On 27/04/2023 00:24, BALATON Zoltan wrote: On Wed, 26 Apr 2023, Bernhard Beschow wrote: Am 26. April 2023 11:41:54 UTC schrieb Mark Cave-Ayland : On 22/04/2023 16:07, Bernhard Beschow wrote: Allows to unexport pci_ide_{cmd,data}_le_ops and models

Re: [PATCH] block/nfs: avoid BDRV_POLL_WHILE() in nfs_co_get_allocated_file_size()

2023-04-27 Thread Kevin Wolf
Am 04.04.2023 um 01:30 hat Stefan Hajnoczi geschrieben: > Commit 82618d7bc341 ("block: Convert bdrv_get_allocated_file_size() to > co_wrapper") made nfs_get_allocated_file_size() a coroutine. The > coroutine still uses BDRV_POLL_WHILE() to wait for the NFS RPC to > complete. > > Take it a step

Re: [PATCH] block/nvme: use AIO_WAIT_WHILE_UNLOCKED()

2023-04-27 Thread Kevin Wolf
Am 04.04.2023 um 13:20 hat Stefan Hajnoczi geschrieben: > A few Admin Queue commands are submitted during nvme_file_open(). They > are synchronous since device initialization cannot continue until the > commands complete. > > AIO_WAIT_WHILE() is currently used, but the block/nvme.c code actually

Re: [PATCH 17/16] docs/devel/qapi-code-gen: Describe some doc markup pitfalls

2023-04-27 Thread Vladimir Sementsov-Ogievskiy
On 27.04.23 12:53, Markus Armbruster wrote: Signed-off-by: Markus Armbruster --- docs/devel/qapi-code-gen.rst | 53 1 file changed, 53 insertions(+) diff --git a/docs/devel/qapi-code-gen.rst b/docs/devel/qapi-code-gen.rst index d81aac7a19..14983b074c

Re: [PATCH] aio-wait: avoid AioContext lock in aio_wait_bh_oneshot()

2023-04-27 Thread Kevin Wolf
Am 04.04.2023 um 17:33 hat Stefan Hajnoczi geschrieben: > There is no need for the AioContext lock in aio_wait_bh_oneshot(). > It's easy to remove the lock from existing callers and then switch from > AIO_WAIT_WHILE() to AIO_WAIT_WHILE_UNLOCKED() in aio_wait_bh_oneshot(). > > Document that the

Re: [PATCH 17/16] docs/devel/qapi-code-gen: Describe some doc markup pitfalls

2023-04-27 Thread Markus Armbruster
Juan Quintela writes: > Markus Armbruster wrote: >> Signed-off-by: Markus Armbruster > > Reviewed-by: Juan Quintela Thanks! >> --- >> docs/devel/qapi-code-gen.rst | 53 >> 1 file changed, 53 insertions(+) >> >> diff --git a/docs/devel/qapi-code-gen.rst

Re: [PATCH 09/13] hw/ide/piix: Disuse isa_get_irq()

2023-04-27 Thread Mark Cave-Ayland
On 26/04/2023 19:25, Bernhard Beschow wrote: Am 26. April 2023 11:33:40 UTC schrieb Mark Cave-Ayland : On 22/04/2023 16:07, Bernhard Beschow wrote: isa_get_irq() asks for an ISADevice which piix-ide doesn't provide. Passing a NULL pointer works but causes the isabus global to be used then.

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

2023-04-27 Thread Alexander Ivanov
Good point. Thank you. Best regards, Alexander Ivanov On 4/26/23 23:56, Mike Maslenkin wrote: On Mon, Apr 24, 2023 at 12:44 PM 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

Re: QMP (without OOB) function running in thread different from the main thread as part of aio_poll

2023-04-27 Thread Fiona Ebner
Am 27.04.23 um 13:03 schrieb Kevin Wolf: > Am 26.04.2023 um 16:31 hat Fiona Ebner geschrieben: >> Am 20.04.23 um 08:55 schrieb Paolo Bonzini: >>> >>> >>> Il gio 20 apr 2023, 08:11 Markus Armbruster >> > ha scritto: >>> >>> So, splicing in a bottom half unmoored

Re: [PATCH] block: add missing coroutine_fn annotations

2023-04-27 Thread Kevin Wolf
Am 06.04.2023 um 12:17 hat Paolo Bonzini geschrieben: > After the recent introduction of many new coroutine callbacks, > a couple calls from non-coroutine_fn to coroutine_fn have sneaked > in; fix them. > > Signed-off-by: Paolo Bonzini Thanks, applied to the block branch. Kevin

Re: [PATCH] block/file-posix.c: No need to sync data when aio + dio is enabled

2023-04-27 Thread Kevin Wolf
Am 18.04.2023 um 08:05 hat zhous...@163.com geschrieben: > From: zhoushl > > Signed-off-by: zhoushl > > block/file-posix.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/block/file-posix.c b/block/file-posix.c > index 5760cf22d1..fe9568947c 100644 > --- a/block/file-posix.c >

Re: [PATCH v2] block: add configure options for excluding vmdk, vhdx and vpc

2023-04-27 Thread Kevin Wolf
Am 21.04.2023 um 11:27 hat Vladimir Sementsov-Ogievskiy geschrieben: > Let's add --enable / --disable configure options for these formats, > so that those who don't need them may not build them. > > Signed-off-by: Vladimir Sementsov-Ogievskiy Thanks, applied to the block branch. Kevin

Re: [PATCH 07/20] graph-lock: Fix GRAPH_RDLOCK_GUARD*() to be reader lock

2023-04-27 Thread Kevin Wolf
Am 25.04.2023 um 22:36 hat Eric Blake geschrieben: > On Tue, Apr 25, 2023 at 07:31:45PM +0200, Kevin Wolf wrote: > > GRAPH_RDLOCK_GUARD() and GRAPH_RDLOCK_GUARD_MAINLOOP() only take a > > reader lock for the graph, so the correct annotation for them to use is > > TSA_ASSERT_SHARED rather than

Re: [PATCH 11/13] hw/ide/sii3112: Reuse PCIIDEState::{cmd,data}_ops

2023-04-27 Thread Mark Cave-Ayland
On 27/04/2023 00:24, BALATON Zoltan wrote: On Wed, 26 Apr 2023, Bernhard Beschow wrote: Am 26. April 2023 11:41:54 UTC schrieb Mark Cave-Ayland : On 22/04/2023 16:07, Bernhard Beschow wrote: Allows to unexport pci_ide_{cmd,data}_le_ops and models TYPE_SII3112_PCI as a standard-compliant PCI

Re: [PATCH 04/20] block: Don't call no_coroutine_fns in qmp_block_resize()

2023-04-27 Thread Kevin Wolf
Am 25.04.2023 um 22:08 hat Eric Blake geschrieben: > On Tue, Apr 25, 2023 at 07:31:42PM +0200, Kevin Wolf wrote: > > This QMP handler runs in a coroutine, so it must use the corresponding > > no_co_wrappers instead. > > > > Signed-off-by: Kevin Wolf > > --- > > blockdev.c | 4 ++-- > > 1 file

Re: [PATCH 01/20] qcow2: Don't call bdrv_getlength() in coroutine_fns

2023-04-27 Thread Kevin Wolf
Am 25.04.2023 um 20:37 hat Eric Blake geschrieben: > On Tue, Apr 25, 2023 at 07:31:39PM +0200, Kevin Wolf wrote: > > There is a bdrv_co_getlength() now, which should be used in coroutine > > context. > > > > Signed-off-by: Kevin Wolf > > --- > > block/qcow2.h | 4 +++- > >

Re: [PATCH 17/16] docs/devel/qapi-code-gen: Describe some doc markup pitfalls

2023-04-27 Thread Juan Quintela
Markus Armbruster wrote: > Signed-off-by: Markus Armbruster Reviewed-by: Juan Quintela > --- > docs/devel/qapi-code-gen.rst | 53 > 1 file changed, 53 insertions(+) > > diff --git a/docs/devel/qapi-code-gen.rst b/docs/devel/qapi-code-gen.rst > index

Re: [PATCH 08/13] hw/ide: Rename PCIIDEState::*_bar attributes

2023-04-27 Thread Mark Cave-Ayland
On 26/04/2023 19:29, Bernhard Beschow wrote: Am 26. April 2023 11:21:28 UTC schrieb Mark Cave-Ayland : On 22/04/2023 16:07, Bernhard Beschow wrote: The attributes represent memory regions containing operations which are mapped by the device models into PCI BARs. Reflect this by changing the

Re: QMP (without OOB) function running in thread different from the main thread as part of aio_poll

2023-04-27 Thread Kevin Wolf
Am 26.04.2023 um 16:31 hat Fiona Ebner geschrieben: > Am 20.04.23 um 08:55 schrieb Paolo Bonzini: > > > > > > Il gio 20 apr 2023, 08:11 Markus Armbruster > > ha scritto: > > > > So, splicing in a bottom half unmoored monitor commands from the main > > loop. 

Re: [PATCH 10/13] hw/ide/piix: Reuse PCIIDEState::{cmd,data}_ops

2023-04-27 Thread Mark Cave-Ayland
On 26/04/2023 21:14, Bernhard Beschow wrote: Am 26. April 2023 18:18:35 UTC schrieb Bernhard Beschow : Am 26. April 2023 11:37:48 UTC schrieb Mark Cave-Ayland : On 22/04/2023 16:07, Bernhard Beschow wrote: Now that PCIIDEState::{cmd,data}_ops are initialized in the base class constructor

[PATCH 17/16] docs/devel/qapi-code-gen: Describe some doc markup pitfalls

2023-04-27 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- docs/devel/qapi-code-gen.rst | 53 1 file changed, 53 insertions(+) diff --git a/docs/devel/qapi-code-gen.rst b/docs/devel/qapi-code-gen.rst index d81aac7a19..14983b074c 100644 --- a/docs/devel/qapi-code-gen.rst +++

[PATCH 17/16] docs/devel/qapi-code-gen: Describe some doc markup pitfalls

2023-04-27 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- docs/devel/qapi-code-gen.rst | 53 1 file changed, 53 insertions(+) diff --git a/docs/devel/qapi-code-gen.rst b/docs/devel/qapi-code-gen.rst index d81aac7a19..14983b074c 100644 --- a/docs/devel/qapi-code-gen.rst +++