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

2023-04-28 Thread Mike Maslenkin
There is another issue with host_cluster_index() function. After this patchset applied `qemu-img check -f parallels some_disk` aborts for empty (just created) disk image. The problem is that host_cluster_index() returns 0 and then bitmap_new(0) rises an abort. For default empty disk

[PATCH v4 01/10] block/meson.build: prefer positive condition for replication

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
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 deletion(-) diff --git a/block/meson.build b/block/meson.build index 382bec0e7d..b9a72e219b

Re: [PATCH 17/17] qapi: Reformat doc comments to conform to current conventions

2023-04-28 Thread Lukas Straub
On Fri, 28 Apr 2023 12:54:29 +0200 Markus Armbruster wrote: > Change > > # @name: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed > #do eiusmod tempor incididunt ut labore et dolore magna aliqua. > > to > > # @name: Lorem ipsum dolor sit amet, consectetur

Re: [PATCH 12/17] qapi: Rewrite parsing of doc comment section symbols and tags

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > To recognize a line starting with a section symbol and or tag, we > first split it at the first space, then examine the part left of the > space. We can just as well examine the unsplit line, so do that. > > Signed-off-by: Markus Armbruster Reviewed-by: Juan Quintela

Re: [PATCH 13/17] qapi: Relax doc string @name: description indentation rules

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > The QAPI schema doc comment language provides special syntax for > command and event arguments, struct and union members, alternate > branches, enumeration values, and features: descriptions starting with > "@name:". > > By convention, we format them like this: > >

Re: [PATCH 14/17] qapi: Section parameter @indent is no longer used, drop

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- Reviewed-by: Juan Quintela

Re: [PATCH 16/17] qga/qapi-schema: Reformat doc comments to conform to current conventions

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > Change > > # @name: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed > #do eiusmod tempor incididunt ut labore et dolore magna aliqua. > > to > > # @name: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed > # do eiusmod

Re: [PATCH 15/17] docs/devel/qapi-code-gen: Update doc comment conventions

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > The commit before previous relaxed the indentation rules to let us > improve the doc comment conventions. This commit changes the written > conventions. The next commits will update QAPI schemas to conform to > them. > > Signed-off-by: Markus Armbruster Reviewed-by:

Re: [PATCH 11/17] qapi: Fix argument description indentation stripping

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > When an argument's description starts on the line after the "#arg: " > line, indentation is stripped only from the description's first line, > as demonstrated by the previous commit. Moreover, subsequent lines > with less indentation are not rejected. > > Make the

Re: [PATCH 10/17] tests/qapi-schema/doc-good: Improve argument description tests

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > Improve the comments to better describe what they test. > > Cover argument description starting on a new line indented. This > style isn't documented in docs/devel/qapi-code-gen.rst. qapi-gen.py > accepts it, but messes up indentation: it's stripped from the first >

Re: [PATCH 09/17] tests/qapi-schema/doc-good: Improve a comment

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > The QAPI generator doesn't reject undocumented members and > features (yet). doc-good.json covers this, with clear "is > undocumented" notes to signal intent. > > Except for @Variant1 member @var1, where it's "(but no @var: line)". > Less clear. Replace by "@var1 is

Re: [PATCH 08/17] qapi/dump: Indent bulleted lists consistently

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > Documentation of dump-guest-memory contains two bulleted lists. The > first one is indented, the second one isn't. Delete the first one's > indentation for a more consistent look. > > Signed-off-by: Markus Armbruster Reviewed-by: Juan Quintela

Re: [PATCH 07/17] qapi: Tidy up a slightly awkward TODO comment

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > MigrateSetParameters has a TODO comment sitting right behind its doc > comment. I wrote it this way to keep it out of the manual, but that > reason is not obvious. > > The previous commit (sphinx/qapidoc: Do not emit TODO sections into > user manuals) lets me move it

Re: [PATCH 06/17] sphinx/qapidoc: Do not emit TODO sections into user manuals

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > QAPI doc comments are for QMP users: they go into the "QEMU QMP > Reference Manual" and the "QEMU Storage Daemon QMP Reference Manual". > > The doc comment TODO sections are for somebody else, namely for the > people who can do: developers. Do not emit them into the

Re: [PATCH 05/17] Revert "qapi: BlockExportRemoveMode: move comments to TODO"

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > This reverts commit 97cd74f77231f3897838f8db32b659d94803e01f. > > The next commit will hide TODO: sections. See there for rationale. Reviewing with forward pointers has its own challenges O:-) > Signed-off-by: Markus Armbruster Reviewed-by: Juan Quintela

Re: [PATCH 04/17] meson: Fix to make QAPI generator output depend on main.py

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > @qapi_gen_depends is missing scripts/qapi/main.py. Fix that, and drop > a duplicate scripts/qapi/common.py. > > Signed-off-by: Markus Armbruster Reviewed-by: Juan Quintela > --- > meson.build | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [PATCH 03/17] qapi: Fix crash on stray double quote character

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > When the lexer chokes on a stray character, its shows the characters > until the next structural character in the error message. You have a problem > It uses a regular expression You use regular expresions. Now you have two problems. Yes, I had to do it. > to

Re: [PATCH 02/17] docs/devel/qapi-code-gen: Turn FIXME admonitions into comments

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > We have two FIXME notes. These FIXMEs are for QAPI developers. They > are not useful for QAPI schema developers. They are marked up as > admonitions, which makes them look important in generated HTML. > > Turn them into comments. QAPI developers will still see them

Re: [PATCH 17/17] qapi: Reformat doc comments to conform to current conventions

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > Change > > # @name: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed > #do eiusmod tempor incididunt ut labore et dolore magna aliqua. > > to > > # @name: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed > # do eiusmod

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

2023-04-28 Thread BALATON Zoltan
On Fri, 28 Apr 2023, Bernhard Beschow wrote: Am 27. April 2023 18:15:24 UTC schrieb 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

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

2023-04-28 Thread Juan Quintela
Kevin Wolf wrote: > Am 28.04.2023 um 10:38 hat Juan Quintela geschrieben: >> Kevin Wolf wrote: >> >> I am perhaps a bit ingenuous here, but it is there a way to convince >> >> qemu that snapshot_save_job_bh *HAS* to run on the main thread? >> > >> > I believe we're talking about a technicality

Re: [PATCH v11 00/12] parallels: Refactor the code of images checks and fix a bug

2023-04-28 Thread Hanna Czenczek
On 24.04.23 11:31, Alexander Ivanov wrote: Fix image inflation when offset in BAT is out of image. Replace whole BAT syncing by flushing only dirty blocks. Move all the checks outside the main check function in separate functions Use WITH_QEMU_LOCK_GUARD for simplier code. Fix incorrect

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

2023-04-28 Thread Bernhard Beschow
Am 27. April 2023 18:15:24 UTC schrieb 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

Re: [PATCH v4 04/20] virtio-scsi: stop using aio_disable_external() during unplug

2023-04-28 Thread Kevin Wolf
Am 25.04.2023 um 19:27 hat Stefan Hajnoczi geschrieben: > This patch is part of an effort to remove the aio_disable_external() > API because it does not fit in a multi-queue block layer world where > many AioContexts may be submitting requests to the same disk. > > The SCSI emulation code is

Re: [PATCH 06/17] sphinx/qapidoc: Do not emit TODO sections into user manuals

2023-04-28 Thread Ani Sinha
On Fri, Apr 28, 2023 at 4:24 PM Markus Armbruster wrote: > QAPI doc comments are for QMP users: they go into the "QEMU QMP > Reference Manual" and the "QEMU Storage Daemon QMP Reference Manual". > > The doc comment TODO sections are for somebody else, namely for the > people who can do:

[PATCH 9/9] hw/ide/ahci: fix broken SError handling

2023-04-28 Thread Niklas Cassel
From: Niklas Cassel When encountering an NCQ error, you should not write the NCQ tag to the SError register. This is completely wrong. The SError register has a clear definition, where each bit represents a different error, see PxSERR definition in AHCI 1.3.1. If we write a random value (like

Re: [PATCH 07/17] qapi: Tidy up a slightly awkward TODO comment

2023-04-28 Thread Ani Sinha
On Fri, Apr 28, 2023 at 4:24 PM Markus Armbruster wrote: > MigrateSetParameters has a TODO comment sitting right behind its doc > comment. I wrote it this way to keep it out of the manual, but that > reason is not obvious. > > The previous commit (sphinx/qapidoc: Do not emit TODO sections into

[PATCH 4/9] hw/ide/ahci: simplify and document PxCI handling

2023-04-28 Thread Niklas Cassel
From: Niklas Cassel The AHCI spec states that: For NCQ, PxCI is cleared on command queued successfully. For non-NCQ, PxCI is cleared on command completed successfully. (A non-NCQ command that completes with error does not clear PxCI.) The current QEMU implementation either clears PxCI in

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

2023-04-28 Thread Niklas Cassel
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 set, does not get to clear PxCI. See AHCI 1.3.1, section 5.3.8,

[PATCH 3/9] hw/ide/ahci: write D2H FIS on when processing NCQ command

2023-04-28 Thread Niklas Cassel
From: Niklas Cassel The way that BUSY + PxCI is cleared for NCQ (FPDMA QUEUED) commands is described in SATA 3.5a Gold: 11.15 FPDMA QUEUED command protocol DFPDMAQ2: ClearInterfaceBsy "Transmit Register Device to Host FIS with the BSY bit cleared to zero and the DRQ bit cleared to zero and

[PATCH 0/9] misc AHCI cleanups

2023-04-28 Thread Niklas Cassel
From: Niklas Cassel Hello John, Here comes some misc AHCI cleanups. Most are related to error handling. Please review. (I'm also working on a second series which will add support for READ LOG EXT and READ LOG DMA EXT, but I will send that one out once it is ready.) Kind regards, Niklas

[PATCH 2/9] hw/ide/core: set ERR_STAT in unsupported command completion

2023-04-28 Thread Niklas Cassel
From: Niklas Cassel Currently, the first time sending an unsupported command (e.g. READ LOG DMA EXT) will not have ERR_STAT set in the completion. Sending the unsupported command again, will correctly have ERR_STAT set. When ide_cmd_permitted() returns false, it calls ide_abort_command().

[PATCH 7/9] hw/ide/ahci: trigger either error IRQ or regular IRQ, not both

2023-04-28 Thread Niklas Cassel
From: Niklas Cassel According to AHCI 1.3.1, 5.3.8.1 RegFIS:Entry, if ERR_STAT is set, we jump to state ERR:FatalTaskfile, which will raise a TFES IRQ unconditionally, regardless if the I bit is set in the FIS or not. Thus, we should never raise a normal IRQ after having sent an error IRQ.

[PATCH 6/9] hw/ide/ahci: PxSACT and PxCI is cleared when PxCMD.ST is cleared

2023-04-28 Thread Niklas Cassel
From: Niklas Cassel According to AHCI 1.3.1 definition of PxSACT: This field is cleared when PxCMD.ST is written from a '1' to a '0' by software. This field is not cleared by a COMRESET or a software reset. According to AHCI 1.3.1 definition of PxCI: This field is also cleared when PxCMD.ST is

[PATCH 1/9] hw/ide/ahci: remove stray backslash

2023-04-28 Thread Niklas Cassel
From: Niklas Cassel This backslash obviously does not belong here, so remove it. Signed-off-by: Niklas Cassel --- hw/ide/ahci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 55902e1df7..a36e3fb77c 100644 --- a/hw/ide/ahci.c +++

[PATCH 8/9] hw/ide/ahci: fix ahci_write_fis_sdb()

2023-04-28 Thread Niklas Cassel
From: Niklas Cassel When there is an error, we need to raise a TFES error irq, see AHCI 1.3.1, 5.3.13.1 SDB:Entry. If ERR_STAT is set, we jump to state ERR:FatalTaskfile, which will raise a TFES IRQ unconditionally, regardless if the I bit is set in the FIS or not. Thus, we should never raise

[PULL 09/17] file-posix: add tracking of the zone write pointers

2023-04-28 Thread Stefan Hajnoczi
From: 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

[PULL 08/17] docs/zoned-storage: add zoned device documentation

2023-04-28 Thread Stefan Hajnoczi
From: 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 Signed-off-by: Stefan Hajnoczi Message-id:

[PULL 05/17] block: add zoned BlockDriver check to block layer

2023-04-28 Thread Stefan Hajnoczi
From: 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 Signed-off-by: Stefan Hajnoczi Message-id:

[PULL 15/17] block: add accounting for zone append operation

2023-04-28 Thread Stefan Hajnoczi
From: Sam Li Taking account of the new zone append write operation for zoned devices, BLOCK_ACCT_ZONE_APPEND enum is introduced as other I/O request type (read, write, flush). Signed-off-by: Sam Li Signed-off-by: Stefan Hajnoczi Message-Id: <20230407082528.18841-4-faithilike...@gmail.com> ---

[PULL 16/17] virtio-blk: add some trace events for zoned emulation

2023-04-28 Thread Stefan Hajnoczi
From: Sam Li Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi Signed-off-by: Stefan Hajnoczi Message-Id: <20230407082528.18841-5-faithilike...@gmail.com> --- hw/block/virtio-blk.c | 12 hw/block/trace-events | 7 +++ 2 files changed, 19 insertions(+) diff --git

[PULL 12/17] block: add some trace events for zone append

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

[PULL 13/17] include: update virtio_blk headers to v6.3-rc1

2023-04-28 Thread Stefan Hajnoczi
From: Sam Li Use scripts/update-linux-headers.sh to update headers to 6.3-rc1. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi Reviewed-by: Dmitry Fomichev Signed-off-by: Stefan Hajnoczi [Reran scripts/update-linux-headers.sh on Linux v6.3. The only change was the use of __virtioXX types

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

2023-04-28 Thread Stefan Hajnoczi
On Fri, Apr 28, 2023 at 01:20:11AM +0800, Sam Li wrote: > 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 >

[PULL 10/17] block: introduce zone append write for zoned devices

2023-04-28 Thread Stefan Hajnoczi
From: 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

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

2023-04-28 Thread Stefan Hajnoczi
On Fri, Apr 28, 2023 at 01:23:35AM +0800, Sam Li wrote: > 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

[PULL 06/17] iotests: test new zone operations

2023-04-28 Thread Stefan Hajnoczi
From: 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

[PULL 11/17] qemu-iotests: test zone append operation

2023-04-28 Thread Stefan Hajnoczi
From: 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

[PULL 17/17] docs/zoned-storage:add zoned emulation use case

2023-04-28 Thread Stefan Hajnoczi
From: Sam Li Add the documentation about the example of using virtio-blk driver to pass the zoned block devices through to the guest. Signed-off-by: Sam Li Signed-off-by: Stefan Hajnoczi [Fix rST syntax --Stefan] Message-Id: <20230407082528.18841-6-faithilike...@gmail.com> ---

[PULL 14/17] virtio-blk: add zoned storage emulation for zoned devices

2023-04-28 Thread Stefan Hajnoczi
From: Sam Li This patch extends virtio-blk emulation to handle zoned device commands by calling the new block layer APIs to perform zoned device I/O on behalf of the guest. It supports Report Zone, four zone oparations (open, close, finish, reset), and Append Zone. The VIRTIO_BLK_F_ZONED

[PULL 04/17] block/raw-format: add zone operations to pass through requests

2023-04-28 Thread Stefan Hajnoczi
From: 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

[PULL 02/17] block/file-posix: introduce helper functions for sysfs attributes

2023-04-28 Thread Stefan Hajnoczi
From: 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

[PULL 01/17] block/block-common: add zoned device structs

2023-04-28 Thread Stefan Hajnoczi
From: 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 Signed-off-by: Stefan Hajnoczi Message-id: 20230427172019.3345-2-faithilike...@gmail.com Message-id:

[PULL 07/17] block: add some trace events for new block layer APIs

2023-04-28 Thread Stefan Hajnoczi
From: Sam Li Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi Reviewed-by: Dmitry Fomichev Acked-by: Kevin Wolf Signed-off-by: Stefan Hajnoczi Message-id: 20230427172019.3345-8-faithilike...@gmail.com Message-id: 20230324090605.28361-8-faithilike...@gmail.com Signed-off-by: Stefan

[PULL 03/17] block/block-backend: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2023-04-28 Thread Stefan Hajnoczi
From: 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

[PULL 00/17] Block patches

2023-04-28 Thread Stefan Hajnoczi
The following changes since commit 05d50ba2d4668d43a835c5a502efdec9b92646e6: Merge tag 'migration-20230427-pull-request' of https://gitlab.com/juan.quintela/qemu into staging (2023-04-28 08:35:06 +0100) are available in the Git repository at: https://gitlab.com/stefanha/qemu.git

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

2023-04-28 Thread Kevin Wolf
Am 28.04.2023 um 10:38 hat Juan Quintela geschrieben: > Kevin Wolf wrote: > >> I am perhaps a bit ingenuous here, but it is there a way to convince > >> qemu that snapshot_save_job_bh *HAS* to run on the main thread? > > > > I believe we're talking about a technicality here. I asked another more

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

2023-04-28 Thread Kevin Wolf
Am 28.04.2023 um 11:39 hat zhoushl geschrieben: > > On Apr 27, 2023, at 22:02, Kevin Wolf wrote: > > 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

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

2023-04-28 Thread Alexander Ivanov
On 4/27/23 15:46, Mike Maslenkin wrote: Sorry for the noise again , but I have another note No, you don't need to apologize. You help me make code better. On Mon, Apr 24, 2023 at 12:44 PM Alexander Ivanov wrote: Cluster offsets must be unique among all the BAT entries. Find duplicate

Re: [PATCH 01/17] docs/devel/qapi-code-gen: Clean up use of quotes a bit

2023-04-28 Thread Juan Quintela
Markus Armbruster wrote: > Section "Definition documentation" uses both single and double quotes > around doc text snippets. Stick to double quotes. > > Signed-off-by: Markus Armbruster Reviewed-by: Juan Quintela

Re: [PATCH 00/17] qapi: Reformat doc comments

2023-04-28 Thread Markus Armbruster
Forgot to mention: it's based on my "[PULL 00/17] QAPI patches patches for 2023-04-28". Apologies!

[PATCH 14/17] qapi: Section parameter @indent is no longer used, drop

2023-04-28 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- scripts/qapi/parser.py | 31 ++- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py index 3e29b7bf48..22ee631198 100644 --- a/scripts/qapi/parser.py +++

[PATCH 05/17] Revert "qapi: BlockExportRemoveMode: move comments to TODO"

2023-04-28 Thread Markus Armbruster
This reverts commit 97cd74f77231f3897838f8db32b659d94803e01f. The next commit will hide TODO: sections. See there for rationale. Signed-off-by: Markus Armbruster --- qapi/block-export.json | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qapi/block-export.json

[PATCH 02/17] docs/devel/qapi-code-gen: Turn FIXME admonitions into comments

2023-04-28 Thread Markus Armbruster
We have two FIXME notes. These FIXMEs are for QAPI developers. They are not useful for QAPI schema developers. They are marked up as admonitions, which makes them look important in generated HTML. Turn them into comments. QAPI developers will still see them (they read and write the .rst).

[PATCH 08/17] qapi/dump: Indent bulleted lists consistently

2023-04-28 Thread Markus Armbruster
Documentation of dump-guest-memory contains two bulleted lists. The first one is indented, the second one isn't. Delete the first one's indentation for a more consistent look. Signed-off-by: Markus Armbruster --- qapi/dump.json | 12 ++-- 1 file changed, 6 insertions(+), 6

[PATCH 10/17] tests/qapi-schema/doc-good: Improve argument description tests

2023-04-28 Thread Markus Armbruster
Improve the comments to better describe what they test. Cover argument description starting on a new line indented. This style isn't documented in docs/devel/qapi-code-gen.rst. qapi-gen.py accepts it, but messes up indentation: it's stripped from the first line, not subsequent ones. The next

[PATCH 01/17] docs/devel/qapi-code-gen: Clean up use of quotes a bit

2023-04-28 Thread Markus Armbruster
Section "Definition documentation" uses both single and double quotes around doc text snippets. Stick to double quotes. Signed-off-by: Markus Armbruster --- docs/devel/qapi-code-gen.rst | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git

[PATCH 03/17] qapi: Fix crash on stray double quote character

2023-04-28 Thread Markus Armbruster
When the lexer chokes on a stray character, its shows the characters until the next structural character in the error message. It uses a regular expression to match a non-empty string of non-structural characters. Bug: the regular expression treats '"' as structural. When the lexer chokes on

[PATCH 09/17] tests/qapi-schema/doc-good: Improve a comment

2023-04-28 Thread Markus Armbruster
The QAPI generator doesn't reject undocumented members and features (yet). doc-good.json covers this, with clear "is undocumented" notes to signal intent. Except for @Variant1 member @var1, where it's "(but no @var: line)". Less clear. Replace by "@var1 is undocumented". Signed-off-by: Markus

[PATCH 11/17] qapi: Fix argument description indentation stripping

2023-04-28 Thread Markus Armbruster
When an argument's description starts on the line after the "#arg: " line, indentation is stripped only from the description's first line, as demonstrated by the previous commit. Moreover, subsequent lines with less indentation are not rejected. Make the first line's indentation the expected

[PATCH 00/17] qapi: Reformat doc comments

2023-04-28 Thread Markus Armbruster
This series improves the doc comment formatting rules, then reformats doc comments to conform to them. I don't like reformatting code. But I'm tired of looking at ugly doc comments. People imitate them in new work (not blaming them for that), which leads to tiresome arguments about style. I've

[PATCH 06/17] sphinx/qapidoc: Do not emit TODO sections into user manuals

2023-04-28 Thread Markus Armbruster
QAPI doc comments are for QMP users: they go into the "QEMU QMP Reference Manual" and the "QEMU Storage Daemon QMP Reference Manual". The doc comment TODO sections are for somebody else, namely for the people who can do: developers. Do not emit them into the user manuals. This elides the

[PATCH 15/17] docs/devel/qapi-code-gen: Update doc comment conventions

2023-04-28 Thread Markus Armbruster
The commit before previous relaxed the indentation rules to let us improve the doc comment conventions. This commit changes the written conventions. The next commits will update QAPI schemas to conform to them. Signed-off-by: Markus Armbruster --- docs/devel/qapi-code-gen.rst | 46

[PATCH 07/17] qapi: Tidy up a slightly awkward TODO comment

2023-04-28 Thread Markus Armbruster
MigrateSetParameters has a TODO comment sitting right behind its doc comment. I wrote it this way to keep it out of the manual, but that reason is not obvious. The previous commit (sphinx/qapidoc: Do not emit TODO sections into user manuals) lets me move it into the doc comment as a TODO

[PATCH 04/17] meson: Fix to make QAPI generator output depend on main.py

2023-04-28 Thread Markus Armbruster
@qapi_gen_depends is missing scripts/qapi/main.py. Fix that, and drop a duplicate scripts/qapi/common.py. Signed-off-by: Markus Armbruster --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index c44d05a13f..ed24df2ade 100644 ---

[PATCH 12/17] qapi: Rewrite parsing of doc comment section symbols and tags

2023-04-28 Thread Markus Armbruster
To recognize a line starting with a section symbol and or tag, we first split it at the first space, then examine the part left of the space. We can just as well examine the unsplit line, so do that. Signed-off-by: Markus Armbruster --- scripts/qapi/parser.py | 51

[PATCH 16/17] qga/qapi-schema: Reformat doc comments to conform to current conventions

2023-04-28 Thread Markus Armbruster
Change # @name: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed #do eiusmod tempor incididunt ut labore et dolore magna aliqua. to # @name: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed # do eiusmod tempor incididunt ut labore et dolore

[PATCH 13/17] qapi: Relax doc string @name: description indentation rules

2023-04-28 Thread Markus Armbruster
The QAPI schema doc comment language provides special syntax for command and event arguments, struct and union members, alternate branches, enumeration values, and features: descriptions starting with "@name:". By convention, we format them like this: # @name: Lorem ipsum dolor sit amet,

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

2023-04-28 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > On 28.04.23 12:34, Markus Armbruster wrote: >> Vladimir Sementsov-Ogievskiy writes: >> >>> On 27.04.23 12:53, Markus Armbruster wrote: Signed-off-by: Markus Armbruster --- docs/devel/qapi-code-gen.rst | 53

Re: [PULL 00/18] Migration 20230427 patches

2023-04-28 Thread Richard Henderson
On 4/27/23 16:22, Juan Quintela wrote: The following changes since commit 1eb95e1baef852d0971a1dd62a3293cd68f1ec35: Merge tag 'migration-20230426-pull-request' ofhttps://gitlab.com/juan.quintela/qemu into staging (2023-04-27 10:47:14 +0100) are available in the Git repository at:

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

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
On 28.04.23 12:34, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: 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

Re: [PATCH 00/16] qapi qga/qapi-schema: Doc fixes

2023-04-28 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > On 04.04.23 14:58, Markus Armbruster wrote: >> It's always nice to get doc fixes into the release, but if it's too >> late, it's too late. >> Generated code does not change, except for the last patch, which moves >> a bit of code without changing it. > > >

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

2023-04-28 Thread zhoushl
> On Apr 27, 2023, at 22:02, Kevin Wolf wrote: > > 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

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

2023-04-28 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > 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 v3 4/4] configure: add --disable-colo-proxy option

2023-04-28 Thread Juan Quintela
Vladimir Sementsov-Ogievskiy wrote: > On 28.04.23 10:33, Juan Quintela wrote: >> 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

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

2023-04-28 Thread Juan Quintela
Vladimir Sementsov-Ogievskiy wrote: > On 28.04.23 10:33, Juan Quintela wrote: >> 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

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

2023-04-28 Thread Zhang, Chen
> -Original Message- > From: Vladimir Sementsov-Ogievskiy > Sent: Friday, April 28, 2023 5:30 AM > To: Lukas Straub > Cc: qemu-de...@nongnu.org; qemu-block@nongnu.org; > michael.r...@amd.com; arm...@redhat.com; ebl...@redhat.com; > jasow...@redhat.com; quint...@redhat.com; Zhang,

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

2023-04-28 Thread Juan Quintela
Kevin Wolf wrote: >> >> I am perhaps a bit ingenuous here, but it is there a way to convince >> qemu that snapshot_save_job_bh *HAS* to run on the main thread? > > I believe we're talking about a technicality here. I asked another more > fundamental question that nobody has answered yet: > >

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

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
On 28.04.23 10:30, Juan Quintela wrote: 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 not

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

2023-04-28 Thread Kevin Wolf
Am 28.04.2023 um 09:47 hat Juan Quintela geschrieben: > Fiona Ebner wrote: > > Am 27.04.23 um 16:36 schrieb 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

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

2023-04-28 Thread Vladimir Sementsov-Ogievskiy
On 28.04.23 10:33, Juan Quintela wrote: 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: QMP (without OOB) function running in thread different from the main thread as part of aio_poll

2023-04-28 Thread Fiona Ebner
Am 27.04.23 um 16:56 schrieb 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

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

2023-04-28 Thread Juan Quintela
Fiona Ebner wrote: > Am 27.04.23 um 16:36 schrieb 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

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

2023-04-28 Thread Juan Quintela
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 future on demand. The > aim of this

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

2023-04-28 Thread Juan Quintela
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 not the only > restriction: some

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

2023-04-28 Thread Fiona Ebner
Am 27.04.23 um 16:36 schrieb 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 >>

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

2023-04-28 Thread Juan Quintela
Vladimir Sementsov-Ogievskiy wrote: > 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 >>>