Re: [PATCH 11/18] qapi/crypto: Rename QCryptoHashAlgorithm to *Algo, and drop prefix

2024-08-02 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Tue, Jul 30, 2024 at 02:26:49PM +0200, Markus Armbruster wrote: >> Daniel P. Berrangé writes: >> >> > On Tue, Jul 30, 2024 at 10:10:25AM +0200, Markus Armbruster wrote: >> >> QAPI's 'prefix' feature can make the connection be

Re: [PATCH v2 6/7] qapi/block-core: derpecate block-job-change

2024-08-02 Thread Markus Armbruster
Typo in subject: it's "deprecate".

Re: [PATCH v2 6/7] qapi/block-core: derpecate block-job-change

2024-08-02 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > On 18.07.24 14:01, Markus Armbruster wrote: >> Vladimir Sementsov-Ogievskiy writes: >> >>> That's a first step to move on newer job-* APIs. >>> >>> The difference between block-job-change and job-change is in >

Re: [PATCH for-9.2 v11 10/11] hw/pci: Use -1 as the default value for rombar

2024-08-02 Thread Markus Armbruster
bility" > " issues during option rom execution", > vdev->vbasedev.name); > error_printf("Proceeding anyway since user specified" > - " non zero value for rombar\n"); > + " positive value for rombar\n"); > } else { > warn_report("Rom loading for device at %s has been disabled" > " due to system instability issues", Preferably with the commit message tweak: Reviewed-by: Markus Armbruster

Re: [PATCH v2 0/4] hw/pci: Convert rom_bar into OnOffAuto

2024-08-01 Thread Markus Armbruster
Akihiko Odaki writes: > On 2024/08/01 16:52, Michael S. Tsirkin wrote: >> On Thu, Aug 01, 2024 at 04:01:44PM +0900, Akihiko Odaki wrote: >>> rom_bar_set() and and underlying visit_type_str_preserving() are ugly, but >>> we can remove them once the deprecation period ends. On the other hand, if

Re: [PATCH v2 0/4] hw/pci: Convert rom_bar into OnOffAuto

2024-08-01 Thread Markus Armbruster
Akihiko Odaki writes: > On 2024/07/31 17:32, Markus Armbruster wrote: >> Akihiko Odaki writes: >> >>> rom_bar is tristate but was defined as uint32_t so convert it into >>> OnOffAuto to clarify that. For compatibility, a uint32 value set via >>

Re: [PATCH 5/7] hw/block/fdc-isa: Assert that isa_fdc_get_drive_max_chs() found something

2024-07-31 Thread Markus Armbruster
> +++ b/hw/block/fdc-isa.c > @@ -147,6 +147,8 @@ static void isa_fdc_get_drive_max_chs(FloppyDriveType > type, uint8_t *maxc, > *maxs = fdf->last_sect; > } > } > +/* fd_formats must contain at least one entry per FloppyDriveType */ > +assert(*maxc); > (*maxc)--; > } Reviewed-by: Markus Armbruster

Re: [PATCH 4/7] hw/ide/atapi: Be explicit that assigning to s->lcyl truncates

2024-07-31 Thread Markus Armbruster
r at a time */ @size is int. I wonder why it's fine with size >> 8... ah, atapi_byte_count_limit() returns uint16_t, and Coverity is smart enough to data-flow this via @byte_count_limit into @size. Reviewed-by: Markus Armbruster

Re: [PATCH v2 0/4] hw/pci: Convert rom_bar into OnOffAuto

2024-07-31 Thread Markus Armbruster
Akihiko Odaki writes: > rom_bar is tristate but was defined as uint32_t so convert it into > OnOffAuto to clarify that. For compatibility, a uint32 value set via > QOM will be converted into OnOffAuto. > > Signed-off-by: Akihiko Odaki I agree making property "rombar" an integer was a design

Re: [PATCH 01/18] qapi: Smarter camel_to_upper() to reduce need for 'prefix'

2024-07-31 Thread Markus Armbruster
Avihai Horon writes: > On 31/07/2024 8:12, Markus Armbruster wrote: >> External email: Use caution opening links or attachments >> >> >> Avihai Horon writes: >> >>> On 30/07/2024 15:22, Markus Armbruster wrote: >>>> Avihai, there's a ques

Re: [PATCH 01/18] qapi: Smarter camel_to_upper() to reduce need for 'prefix'

2024-07-30 Thread Markus Armbruster
Avihai Horon writes: > On 30/07/2024 15:22, Markus Armbruster wrote: >> >> Avihai, there's a question for you on VfioMigrationState. >> >> Daniel P. Berrangé writes: >> >>> On Tue, Jul 30, 2024 at 10:10:15AM +0200, Markus Armbruster wrote: [...] >

Re: [PATCH 11/18] qapi/crypto: Rename QCryptoHashAlgorithm to *Algo, and drop prefix

2024-07-30 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Tue, Jul 30, 2024 at 10:10:25AM +0200, Markus Armbruster wrote: >> QAPI's 'prefix' feature can make the connection between enumeration >> type and its constants less than obvious. It's best used with >> restraint. >> >> Q

Re: [PATCH 01/18] qapi: Smarter camel_to_upper() to reduce need for 'prefix'

2024-07-30 Thread Markus Armbruster
Avihai, there's a question for you on VfioMigrationState. Daniel P. Berrangé writes: > On Tue, Jul 30, 2024 at 10:10:15AM +0200, Markus Armbruster wrote: >> camel_to_upper() converts its argument from camel case to upper case >> with '_' between words. Used for generated enume

[PATCH 02/18] tests/qapi-schema: Drop temporary 'prefix'

2024-07-30 Thread Markus Armbruster
Recent commit "qapi: Smarter camel_to_upper() to reduce need for 'prefix'" added a temporary 'prefix' to delay changing the generated code. Revert it. This changes TestUnionEnumA's generated enumeration constant prefix from TEST_UNION_ENUMA to TEST_UNION_ENUM_A. Signed-off-by: Markus

[PATCH 07/18] qapi/machine: Drop temporary 'prefix'

2024-07-30 Thread Markus Armbruster
Recent commit "qapi: Smarter camel_to_upper() to reduce need for 'prefix'" added a temporary 'prefix' to delay changing the generated code. Revert it. This improves HmatLBDataType's generated enumeration constant prefix from HMATLB_DATA_TYPE to HMAT_LB_DATA_TYPE. Signed-off-

[PATCH 18/18] qapi/cryptodev: Rename QCryptodevBackendAlgType to *Algo, and drop prefix

2024-07-30 Thread Markus Armbruster
', but I think the abbreviation "alg" is less than clear. Additionally rename the type to QCryptodevBackendAlgoType. The prefix becomes QCRYPTODEV_BACKEND_ALGO_TYPE. Signed-off-by: Markus Armbruster --- qapi/cryptodev.json | 5 ++--- include/sysemu/cryptodev.h | 2 +-

[PATCH 13/18] qapi/crypto: Rename QCryptoIVGenAlgorithm to *Algo, and drop prefix

2024-07-30 Thread Markus Armbruster
', but then the prefix becomes QCRYPTO_IV_GEN_ALGORITHM, which is rather long. We could additionally rename the type to QCryptoIVGenAlg, but I think the abbreviation "alg" is less than clear. Rename the type to QCryptoIVGenAlgo instead. The prefix becomes QCRYPTO_IV_GEN_ALGO. Signed-off-

[PATCH 14/18] qapi/crypto: Rename QCryptoAkCipherAlgorithm to *Algo, and drop prefix

2024-07-30 Thread Markus Armbruster
O. Signed-off-by: Markus Armbruster --- qapi/crypto.json| 7 +++ crypto/akcipherpriv.h | 2 +- backends/cryptodev-builtin.c| 4 ++-- backends/cryptodev-lkcf.c | 4 ++-- crypto/akcipher.c | 2 +- t

[PATCH 08/18] qapi/ui: Drop temporary 'prefix'

2024-07-30 Thread Markus Armbruster
Recent commit "qapi: Smarter camel_to_upper() to reduce need for 'prefix'" added a temporary 'prefix' to delay changing the generated code. Revert it. This improves DisplayGLMode's generated enumeration constant prefix from DISPLAYGL_MODE to DISPLAY_GL_MODE. Signed-off-by: Markus

[PATCH 17/18] qapi/cryptodev: Drop unwanted 'prefix'

2024-07-30 Thread Markus Armbruster
becomes QCRYPTODEV_BACKEND_SERVICE_TYPE. Signed-off-by: Markus Armbruster --- qapi/cryptodev.json | 1 - backends/cryptodev-builtin.c| 8 backends/cryptodev-lkcf.c | 2 +- backends/cryptodev-vhost-user.c | 6 +++--- backends/cryptodev.c| 6

[PATCH 11/18] qapi/crypto: Rename QCryptoHashAlgorithm to *Algo, and drop prefix

2024-07-30 Thread Markus Armbruster
', but then the prefix becomes QCRYPTO_HASH_ALGORITHM, which is rather long. We could additionally rename the type to QCryptoHashAlg, but I think the abbreviation "alg" is less than clear. Rename the type to QCryptoHashAlgo instead. The prefix becomes to QCRYPTO_HASH_ALGO. Signed-off-by: Markus

[PATCH 01/18] qapi: Smarter camel_to_upper() to reduce need for 'prefix'

2024-07-30 Thread Markus Armbruster
V_BACKEND_SERVICE_TYPE QCRYPTODEV_BACKEND_SERVICE Subsequent commits will tweak things to remove most of these prefixes. Only QAUTHZ_LIST_FORMAT and QAUTHZ_LIST_POLICY will remain. Signed-off-by: Markus Armbruster --- qapi/block-core.json | 3 +- qapi/common.json

[PATCH 16/18] qapi/crypto: Rename QCryptoAFAlg to QCryptoAFAlgo

2024-07-30 Thread Markus Armbruster
For consistency with other types names *Algo. Signed-off-by: Markus Armbruster --- crypto/afalgpriv.h| 14 +++--- crypto/hmacpriv.h | 2 +- crypto/afalg.c| 8 crypto/cipher-afalg.c | 12 ++-- crypto/hash-afalg.c | 14 +++--- 5 files changed

[PATCH 15/18] qapi/crypto: Rename QCryptoRSAPaddingAlgorithm to *Algo, and drop prefix

2024-07-30 Thread Markus Armbruster
ix becomes QCRYPTO_RSA_PADDING_ALGO. Signed-off-by: Markus Armbruster --- qapi/crypto.json| 9 - backends/cryptodev-builtin.c| 6 +++--- backends/cryptodev-lkcf.c | 10 +- tests/bench/benchmark-crypto-akcipher.c | 12 ++-- tests/unit/t

[PATCH 00/18] qapi: Reduce use of 'prefix'.

2024-07-30 Thread Markus Armbruster
'prefix' where the default is now better. PATCH 09,11-15,18 rename QAPI types, and drop their 'prefix'. I'm prepared to adjust the renames according to maintainers' preference. PATCH 16 renames a non-QAPI type for consistency. Markus Armbruster (18): qapi: Smarter camel_to_upper() to reduce need

[PATCH 05/18] qapi/crypto: Drop temporary 'prefix'

2024-07-30 Thread Markus Armbruster
OCK_FORMAT, and QCryptoBlockLUKSKeyslotState's from Q_CRYPTO_BLOCKLUKS_KEYSLOT_STATE to QCRYPTO_BLOCK_LUKS_KEYSLOT_STATE. Signed-off-by: Markus Armbruster --- qapi/crypto.json | 2 -- block/crypto.c | 10 +- block/qcow.c | 2 +- block/qcow2.c

[PATCH 03/18] qapi/block-core: Drop temporary 'prefix'

2024-07-30 Thread Markus Armbruster
CK_BACKEND to XDBG_BLOCK_GRAPH_NODE_TYPE_BLOCK_BACKEND. Signed-off-by: Markus Armbruster --- qapi/block-core.json | 1 - block.c | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 897bc7e0e7..d4c869ac64 100644 --- a/qapi/block-core.

[PATCH 12/18] qapi/crypto: Rename QCryptoCipherAlgorithm to *Algo, and drop prefix

2024-07-30 Thread Markus Armbruster
', but then the prefix becomes QCRYPTO_CIPHER_ALGORITHM, which is rather long. We could additionally rename the type to QCryptoCipherAlg, but I think the abbreviation "alg" is less than clear. Rename the type to QCryptoCipherAlgo instead. The prefix becomes QCRYPTO_CIPHER_ALGO. Signed-off-

[PATCH 09/18] qapi/machine: Rename CpuS390* to S390Cpu, and drop 'prefix'

2024-07-30 Thread Markus Armbruster
the type to S390CpuEntitlement, so that 'prefix' is not needed. Likewise change CpuS390Polarization to S390CpuPolarization, and CpuS390State to S390CpuState. Signed-off-by: Markus Armbruster --- qapi/machine-common.json| 5 ++--- qapi/machine-target.json| 11 +-- qapi

[PATCH 04/18] qapi/common: Drop temporary 'prefix'

2024-07-30 Thread Markus Armbruster
Recent commit "qapi: Smarter camel_to_upper() to reduce need for 'prefix'" added a temporary 'prefix' to delay changing the generated code. Revert it. This improves OffAutoPCIBAR's generated enumeration constant prefix from OFF_AUTOPCIBAR_OFF to OFF_AUTO_PCIBAR_OFF. Signed-off-

[PATCH 06/18] qapi/ebpf: Drop temporary 'prefix'

2024-07-30 Thread Markus Armbruster
Recent commit "qapi: Smarter camel_to_upper() to reduce need for 'prefix'" added a temporary 'prefix' to delay changing the generated code. Revert it. This improves EbpfProgramID's generated enumeration constant prefix from EBPF_PROGRAMID to EBPF_PROGRAM_ID. Signed-off-by: Markus

[PATCH 10/18] qapi/crypto: Drop unwanted 'prefix'

2024-07-30 Thread Markus Armbruster
becomes QCRYPTO_AK_CIPHER_KEY_TYPE. Signed-off-by: Markus Armbruster --- qapi/crypto.json| 1 - backends/cryptodev-builtin.c| 4 ++-- backends/cryptodev-lkcf.c | 6 +++--- tests/bench/benchmark-crypto-akcipher.c | 2 +- tests/unit/test-crypto

Re: [PATCH v2] block-backend: per-device throttling of BLOCK_IO_ERROR reports

2024-07-19 Thread Markus Armbruster
Kevin Wolf writes: > Am 19.07.2024 um 06:54 hat Markus Armbruster geschrieben: >> Kevin Wolf writes: >> >> > Am 09.01.2024 um 14:13 hat Vladimir Sementsov-Ogievskiy geschrieben: >> >> From: Leonid Kaplan >> >> >> >> BLOCK_IO_ERROR

Re: [PATCH v5 3/3] qapi: introduce device-sync-config

2024-07-19 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > On 18.07.24 11:27, Markus Armbruster wrote: >> Vladimir Sementsov-Ogievskiy writes: >> >>> Add command to sync config from vhost-user backend to the device. It >>> may be helpful when VHOST_USER_SLAVE_CONFIG_CHANG

Re: [PATCH v2] block-backend: per-device throttling of BLOCK_IO_ERROR reports

2024-07-19 Thread Markus Armbruster
Kevin Wolf writes: > Am 09.01.2024 um 14:13 hat Vladimir Sementsov-Ogievskiy geschrieben: >> From: Leonid Kaplan >> >> BLOCK_IO_ERROR events comes from guest, so we must throttle them. >> We still want per-device throttling, so let's use device id as a key. >> >> Signed-off-by: Leonid Kaplan

[PATCH] qapi-block-core: Clean up blockdev-snapshot-internal-sync doc

2024-07-18 Thread Markus Armbruster
nt, where it is more prominently visible, with a slight rephrasing for clarity. Signed-off-by: Markus Armbruster --- qapi/block-core.json | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index f400b334c8..994e384a71 100644 --- a/

Re: [PATCH v9 4/7] qapi: add blockdev-replace command

2024-07-18 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > Add a command that can replace bs in following BdrvChild structures: > > - qdev blk root child > - block-export blk root child > - any child of BlockDriverState selected by child-name > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > blockdev.c

Re: [PATCH v9 2/7] block/export: add blk_by_export_id()

2024-07-18 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > We need it for further blockdev-replace functionality. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/export/export.c | 18 ++ > include/sysemu/block-backend-global-state.h | 1 + > 2 files changed, 19

Re: [PATCH v2 6/7] qapi/block-core: derpecate block-job-change

2024-07-18 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > That's a first step to move on newer job-* APIs. > > The difference between block-job-change and job-change is in > find_block_job_locked() vs find_job_locked() functions. What's > different? > > 1. find_block_job_locked() do check, is found job a

Re: [PATCH v2 5/7] qapi: add job-change

2024-07-18 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > Add a new-style command job-change, doing same thing as > block-job-change. The aim is finally deprecate block-job-* APIs and > move to job-* APIs. > > We add a new command to qapi/block-core.json, not to > qapi/job.json to avoid resolving json file

Re: [PATCH v2 3/7] qapi: block-job-change: make copy-mode parameter optional

2024-07-18 Thread Markus Armbruster
ackground' to 'write-blocking' is implemented. > +# If absent, copy mode remains the same. (optional since 9.1) > # > # Since: 8.2 > ## > { 'struct': 'JobChangeOptionsMirror', > - 'data': { 'copy-mode' : 'MirrorCopyMode' } } > + 'data': { '*copy-mode' : 'MirrorCopyMode' } } > > ## > # @JobChangeOptions: Acked-by: Markus Armbruster

Re: [PATCH v2 1/7] qapi: rename BlockJobChangeOptions to JobChangeOptions

2024-07-18 Thread Markus Armbruster
> git grep -l BlockJobChangeOptions | \ > xargs sed -i 's/BlockJobChangeOptions/JobChangeOptions/g' > > Signed-off-by: Vladimir Sementsov-Ogievskiy Acked-by: Markus Armbruster

Re: [PATCH v5 0/3] vhost-user-blk: live resize additional APIs

2024-07-18 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > ping. Markus, Eric, could someone give an ACC for QAPI part? I apologize for the delay. It was pretty bad.

Re: [PATCH v5 1/3] qdev-monitor: add option to report GenericError from find_device_state

2024-07-18 Thread Markus Armbruster
find_device_state_legacy(). 2. New find_device_state() that reports GenericError. Could also be done in a follow-up. > > Signed-off-by: Vladimir Sementsov-Ogievskiy The patch does what it says on the tin, so Reviewed-by: Markus Armbruster

Re: [PATCH v5 3/3] qapi: introduce device-sync-config

2024-07-18 Thread Markus Armbruster
gt; Command result is racy if allow it during migration. Let's allow the > sync only in RUNNING state. Is this still accurate? The runstate_is_running() check is gone in v4, the migration_is_running() check remains. > Signed-off-by: Vladimir Sementsov-Ogievskiy QAPI schema and QMP par

Re: [PATCH v2 6/9] qapi: convert "Example" sections without titles

2024-07-17 Thread Markus Armbruster
John Snow writes: > On Wed, Jul 17, 2024, 3:44 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > Use the no-option form of ".. qmp-example::" to convert any Examples >> > that do not have any form of caption or explanation whatsoever. N

Re: [PATCH v2 0/9] qapi: convert example sections to qmp-example rST directives

2024-07-17 Thread Markus Armbruster
John Snow writes: > This patchset focuses on converting example sections to rST directives > using a new `.. qmp-example::` directive. Queued, thanks!

Re: [PATCH v2 9/9] qapi: remove "Example" doc section

2024-07-17 Thread Markus Armbruster
h qmp-example can be titled or annotated independently without >bypassing the QMP lexer/validator. > >(i.e. code blocks are now for *code* only, so we don't have to >sacrifice exposition for having lexically valid examples.) > > NOTE: As with the "Notes" conversion (

Re: [PATCH v2 6/9] qapi: convert "Example" sections without titles

2024-07-17 Thread Markus Armbruster
John Snow writes: > Use the no-option form of ".. qmp-example::" to convert any Examples > that do not have any form of caption or explanation whatsoever. Note > that in a few cases, example sections are split into two or more > separate example blocks. This is only done stylistically to create

Re: [PATCH 8/8] qapi: remove "Example" doc section

2024-07-09 Thread Markus Armbruster
John Snow writes: > On Tue, Jul 9, 2024 at 6:52 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > Fully eliminate the "Example" sections in QAPI doc blocks now that they >> > have all been converted to arbitrary rST syntax using the &

Re: [PATCH 4/8] docs/sphinx: add CSS styling for qmp-example directive

2024-07-09 Thread Markus Armbruster
John Snow writes: > On Tue, Jul 9, 2024 at 6:34 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > From: Harmonie Snow >> > >> > Add CSS styling for qmp-example directives to increase readability and >> > consistently style all

Re: [PATCH 0/8] qapi: convert example sections to qmp-example rST directives

2024-07-09 Thread Markus Armbruster
You achieved a clean & consistent look for notes and examples in the browser. Love it!

Re: [PATCH 7/8] qapi: convert "Example" sections with longer prose

2024-07-09 Thread Markus Armbruster
stogram-set", > # "arguments": { "id": "drive0", # "boundaries": [10, 50, 100], # "boundaries-write": [1000, 5000] } } # <- { "return": {} } # # .. qmp-example:: #:title: Remove all latency histograms # # -> { "execute": "block-latency-histogram-set", # "arguments": { "id": "drive0" } } # <- { "return": {} } ## I think using :annotated: for this one as well will look better. [...] Reviewed-by: Markus Armbruster

Re: [PATCH 6/8] qapi: convert "Example" sections with titles

2024-07-09 Thread Markus Armbruster
irective", for a > detailed explanation of this custom directive syntax. > > See commit+2: "qapi: remove "Example" doc section" for a detailed > explanation of why. > > Signed-off-by: John Snow Reviewed-by: Markus Armbruster

Re: [PATCH 5/8] qapi: convert "Example" sections without titles

2024-07-09 Thread Markus Armbruster
John Snow writes: > On Sat, Jul 6, 2024, 10:42 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > Use the no-option form of ".. qmp-example::" to convert any Examples >> > that do not have any form of caption or explanation whatsoever. N

Re: [PATCH 8/8] qapi: remove "Example" doc section

2024-07-09 Thread Markus Armbruster
John Snow writes: > Fully eliminate the "Example" sections in QAPI doc blocks now that they > have all been converted to arbitrary rST syntax using the > ".. qmp-example::" directive. Update tests to match. > > Migrating to the new syntax > --- > > The old "Example:" or

Re: [PATCH 4/8] docs/sphinx: add CSS styling for qmp-example directive

2024-07-09 Thread Markus Armbruster
John Snow writes: > From: Harmonie Snow > > Add CSS styling for qmp-example directives to increase readability and > consistently style all example blocks. > > Signed-off-by: Harmonie Snow > Signed-off-by: John Snow Same sadness as for the previous patch. Acked-by: Markus Armbruster

Re: [PATCH 3/8] docs/qapidoc: add QMP highlighting to annotated qmp-example blocks

2024-07-09 Thread Markus Armbruster
guration nodes. We may > well decide that the default language ought to be QMP for any QAPI > reference pages, but this way the directive behaves consistently no > matter where it is used. > > Signed-off-by: John Snow Sadly, the previous patch didn't add tests, so this patch's effect isn't as easy to observe as it could be. Acked-by: Markus Armbruster

Re: [PATCH 2/8] docs/qapidoc: create qmp-example directive

2024-07-09 Thread Markus Armbruster
stently using > the same directive for all forms of examples to ensure consistent visual > styling, and ensuring all relevant prose is visually grouped alongside > the code literal block. > > Note that as of this commit, the code-block rST syntax "::" does not > apply QMP highlighting; you would need to use ".. code-block:: QMP". The > very next commit changes this behavior to assume all "::" code blocks > within this directive are QMP blocks. > > Signed-off-by: John Snow Acked-by: Markus Armbruster

Re: [PATCH 1/8] docs/qapidoc: factor out do_parse()

2024-07-09 Thread Markus Armbruster
John Snow writes: > On Sat, Jul 6, 2024, 10:47 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > Factor out the compatibility parser helper into a base class, so it can >> > be shared by other directives. >> > >> > Signed-off-by

Re: QEMU Community Call Agenda Items (July 9th, 2024)

2024-07-08 Thread Markus Armbruster
Cc: Block layer core maintainers Philippe Mathieu-Daudé writes: > On 8/7/24 16:58, Alex Bennée wrote: >> Hi, >> The KVM/QEMU community call is at: >>https://meet.jit.si/kvmcallmeeting >>@ >>9/7/2024 14:00 UTC >> Are there any agenda items for the sync-up? > > - I don't remember who

Re: [PATCH 1/8] docs/qapidoc: factor out do_parse()

2024-07-06 Thread Markus Armbruster
John Snow writes: > Factor out the compatibility parser helper into a base class, so it can > be shared by other directives. > > Signed-off-by: John Snow R-by stands.

Re: [PATCH 5/8] qapi: convert "Example" sections without titles

2024-07-06 Thread Markus Armbruster
John Snow writes: > Use the no-option form of ".. qmp-example::" to convert any Examples > that do not have any form of caption or explanation whatsoever. Note > that in a few cases, example sections are split into two or more > separate example blocks. This is only done stylistically to create

Re: [PATCH v2 10/21] qapi: convert "Note" sections to plain rST

2024-07-01 Thread Markus Armbruster
John Snow writes: > We do not need a dedicated section for notes. By eliminating a specially > parsed section, these notes can be treated as normal rST paragraphs in > the new QMP reference manual, and can be placed and styled much more > flexibly. > > Convert all existing "Note" and "Notes"

Re: [PATCH v2 07/21] docs/qapidoc: fix nested parsing under untagged sections

2024-07-01 Thread Markus Armbruster
John Snow writes: > On Fri, Jun 28, 2024, 3:55 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > Sphinx does not like sections without titles, because it wants to >> > convert every section into a reference. When there is no title, it >> >

Re: [PATCH v2 15/21] docs/qapidoc: create qmp-example directive

2024-06-28 Thread Markus Armbruster
John Snow writes: > This is a directive that creates a syntactic sugar for creating > "Example" boxes very similar to the ones already used in the bitmaps.rst > document, please see e.g. > https://www.qemu.org/docs/master/interop/bitmaps.html#creation-block-dirty-bitmap-add > > In its simplest

Re: [PATCH v2 14/21] docs/qapidoc: factor out do_parse()

2024-06-28 Thread Markus Armbruster
lf.state, rstlist, node) > -else: > -save = self.state.memo.reporter > -self.state.memo.reporter = AutodocReporter( > - rstlist, self.state.memo.reporter > -) > -try: > -nested_parse_with_titles(self.state, rstlist, node) > -finally: > -self.state.memo.reporter = save > - > > def setup(app): > """Register qapi-doc directive with Sphinx""" Reviewed-by: Markus Armbruster

Re: [PATCH v2 10/21] qapi: convert "Note" sections to plain rST

2024-06-28 Thread Markus Armbruster
have been turned into ordinary paragraphs within the example. Okay? > NOTE: Because qapidoc.py does not attempt to preserve source ordering of > sections, the conversion of Notes from a "tagged section" to an > "untagged section" means that rendering order for some notes *may > change* as a result of this patch. The forthcoming qapidoc.py rewrite > strictly preserves source ordering in the rendered documentation, so > this issue will be rectified in the new generator. > > Signed-off-by: John Snow > Acked-by: Stefan Hajnoczi [for block*.json] I dislike the indentation changes, and may revert them in my tree. Reviewed-by: Markus Armbruster

Re: [PATCH v2 07/21] docs/qapidoc: fix nested parsing under untagged sections

2024-06-28 Thread Markus Armbruster
ee, leading to errors during rendering time.) > > When parsing an untagged section (free paragraphs), skip making a hollow > section and instead append the parse results to the prior section. > > Many Bothans died to bring us this information. > > Signed-off-by: John Snow >

Re: [PATCH v2 04/21] docs/qapidoc: delint a tiny portion of the module

2024-06-28 Thread Markus Armbruster
> > Code that I intend to keep is still subject to the delinting beam. > > Signed-off-by: John Snow > Reviewed-by: Markus Armbruster Not an objection, just so you know: I still see a few C0411 like 'third party import "import sphinx" should be placed before ...' R-by stands.

Re: [PATCH v2 13/21] qapi/parser: don't parse rST markup as section headers

2024-06-27 Thread Markus Armbruster
gged sections. > > Signed-off-by: John Snow Reviewed-by: Markus Armbruster

Re: [PATCH v2 05/21] qapi/parser: preserve indentation in QAPIDoc sections

2024-06-27 Thread Markus Armbruster
y of preserving indents for rST. > Signed-off-by: John Snow > [Edited commit message and code comments per review --js] And I'll drop this line. > Reviewed-by: Markus Armbruster

Re: [PATCH v2 03/21] docs/qapidoc: remove unused intersperse function

2024-06-27 Thread Markus Armbruster
John Snow writes: > This function has been unused since fd62bff901b. > > Signed-off-by: John Snow Reviewed-by: Markus Armbruster I assume you won't mind me adding a bit of polish: "since commit fd62bff901b (sphinx/qapidoc: Drop code to generate doc for simple union tag)".

Re: [PATCH v2 05/21] qapi/parser: preserve indentation in QAPIDoc sections

2024-06-27 Thread Markus Armbruster
Accidental duplicate, please ignore.

Re: [PATCH v2 03/21] docs/qapidoc: remove unused intersperse function

2024-06-27 Thread Markus Armbruster
Accidental duplicate, please ignore.

Re: [PATCH v2 05/21] qapi/parser: preserve indentation in QAPIDoc sections

2024-06-27 Thread Markus Armbruster
y of preserving indents for rST. > Signed-off-by: John Snow > [Edited commit message and code comments per review --js] And I'll drop this line. > Reviewed-by: Markus Armbruster

Re: [PATCH v2 03/21] docs/qapidoc: remove unused intersperse function

2024-06-27 Thread Markus Armbruster
John Snow writes: > This function has been unused since fd62bff901b. > > Signed-off-by: John Snow Reviewed-by: Markus Armbruster I assume you won't mind me adding a bit of polish: "since commit fd62bff901b (sphinx/qapidoc: Drop code to generate doc for simple union tag)".

Re: [PATCH 00/13] qapi: convert "Note" and "Example" sections to rST

2024-06-25 Thread Markus Armbruster
You asked for a summary of my review findings. Here it is: * PATCH 01: DO-NOT-MERGE, not reviewed * PATCH 02, 05..07, 10..12: R-by or A-by * PATCH 03: R-by with straightforward minor adjustments * PATCH 04, 08: R-by with commit message and doc tweaks * PATCH 09: - Commit message tweaks

Re: [PATCH 13/13] qapi: convert "Example" sections to rST

2024-06-25 Thread Markus Armbruster
John Snow writes: > Eliminate the "Example" sections in QAPI doc blocks, converting them > into QMP example code blocks. This is generally done in this patch by > converting "Example:" or "Examples:" lines into ".. code-block:: QMP" > lines. [...] > diff --git a/qapi/migration.json

Re: [PATCH 09/13] qapi: convert "Note" sections to plain rST

2024-06-22 Thread Markus Armbruster
John Snow writes: > On Fri, Jun 21, 2024 at 8:23 AM Markus Armbruster wrote: [...] >> My reason for four spaces is reducing churn. To see by how much, I >> redid your change. I found a few more notes that don't start with a >> capital letter, or don't end with a period

Re: [PATCH 04/13] qapi/parser: preserve indentation in QAPIDoc sections

2024-06-22 Thread Markus Armbruster
John Snow writes: > On Fri, Jun 21, 2024 at 2:38 AM Markus Armbruster wrote: [...] >> I'd like you to express more clearly that you're talking about an >> alternative you rejected. Perhaps like this: >> >> block-level constructs such as code blocks, lists,

Re: [PATCH 09/13] qapi: convert "Note" sections to plain rST

2024-06-21 Thread Markus Armbruster
John Snow writes: > On Thu, Jun 20, 2024 at 11:46 AM John Snow wrote: > >> >> >> On Thu, Jun 20, 2024, 9:35 AM Markus Armbruster wrote: >> >>> Markus Armbruster writes: >>> >>> > John Snow writes: >>> >>> [...] &g

Re: [PATCH 09/13] qapi: convert "Note" sections to plain rST

2024-06-21 Thread Markus Armbruster
John Snow writes: > We do not need a dedicated section for notes. By eliminating a specially > parsed section, these notes can be treated as normal rST paragraphs in > the new QMP reference manual, and can be placed and styled much more > flexibly. > > Convert all existing "Note" and "Notes"

Re: [PATCH 09/13] qapi: convert "Note" sections to plain rST

2024-06-21 Thread Markus Armbruster
John Snow writes: > On Wed, Jun 19, 2024, 8:49 AM Markus Armbruster wrote: > >> John Snow writes: [...] >> > diff --git a/tests/qapi-schema/doc-interleaved-section.json >> > b/tests/qapi-schema/doc-interleaved-section.json >> > index adb29e98daa..b

Re: [PATCH 09/13] qapi: convert "Note" sections to plain rST

2024-06-21 Thread Markus Armbruster
John Snow writes: > Apologies, I meant to do this but forgot there were two cases and only > nabbed one. > > Fixing. No problem at all!

Re: [PATCH 04/13] qapi/parser: preserve indentation in QAPIDoc sections

2024-06-21 Thread Markus Armbruster
John Snow writes: > On Thu, Jun 20, 2024, 11:07 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > On Wed, Jun 19, 2024, 8:03 AM Markus Armbruster wrote: >> > >> >> John Snow writes: >> >> >> >> > Change get_

Re: [PATCH 04/13] qapi/parser: preserve indentation in QAPIDoc sections

2024-06-20 Thread Markus Armbruster
John Snow writes: > On Wed, Jun 19, 2024, 8:03 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > Change get_doc_indented() to preserve indentation on all subsequent text >> > lines, and create a compatibility dedent() function for qapido

Re: [PATCH 09/13] qapi: convert "Note" sections to plain rST

2024-06-20 Thread Markus Armbruster
John Snow writes: > We do not need a dedicated section for notes. By eliminating a specially > parsed section, these notes can be treated as normal rST paragraphs in > the new QMP reference manual, and can be placed and styled much more > flexibly. > > Convert all existing "Note" and "Notes"

Re: [PATCH 09/13] qapi: convert "Note" sections to plain rST

2024-06-20 Thread Markus Armbruster
Markus Armbruster writes: > John Snow writes: [...] >> diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json >> index b3de1fb6b3a..57598331c5c 100644 >> --- a/qga/qapi-schema.json >> +++ b/qga/qapi-schema.json [...] >> @@ -631,8 +632,8 @@ >>

Re: [PATCH 13/13] qapi: convert "Example" sections to rST

2024-06-19 Thread Markus Armbruster
John Snow writes: > Eliminate the "Example" sections in QAPI doc blocks, converting them > into QMP example code blocks. This is generally done in this patch by > converting "Example:" or "Examples:" lines into ".. code-block:: QMP" > lines. > > The old "Example:" or "Examples:" syntax is now

Re: [PATCH 09/13] qapi: convert "Note" sections to plain rST

2024-06-19 Thread Markus Armbruster
John Snow writes: > We do not need a dedicated section for notes. By eliminating a specially > parsed section, these notes can be treated as normal rST paragraphs in > the new QMP reference manual, and can be placed and styled much more > flexibly. > > Convert all existing "Note" and "Notes"

Re: [PATCH 12/13] qapi/parser: don't parse rST markup as section headers

2024-06-19 Thread Markus Armbruster
John Snow writes: > The double-colon synax is rST formatting that precedes a literal code > block. We do not want to capture these as QAPI-specific sections. > > Coerce blocks that start with e.g. "Example::" to be parsed as untagged > paragraphs instead of special tagged sections. > >

Re: [PATCH 09/13] qapi: convert "Note" sections to plain rST

2024-06-19 Thread Markus Armbruster
John Snow writes: > We do not need a dedicated section for notes. By eliminating a specially > parsed section, these notes can be treated as normal rST paragraphs in > the new QMP reference manual, and can be placed and styled much more > flexibly. > > Convert all existing "Note" and "Notes"

Re: [PATCH 11/13] qapi: add markup to note blocks

2024-06-19 Thread Markus Armbruster
e not yet > adjusted here; they will be converted en masse in a subsequent patch > after the new QAPI doc generator is merged. > > Signed-off-by: John Snow Reviewed-by: Markus Armbruster

Re: [PATCH 10/13] qapi: update prose in note blocks

2024-06-19 Thread Markus Armbruster
return value does not match the previous call to > +# .. note:: If the return value does not match the previous call to > #guest-fsfreeze-freeze, this likely means some freezable filesystems > #were unfrozen before this call, and that the filesystem state may > #have changed before issuing this command. Reviewed-by: Markus Armbruster

Re: [PATCH 08/13] qapi: ensure all errors sections are uniformly typset

2024-06-19 Thread Markus Armbruster
/transaction.json > +++ b/qapi/transaction.json > @@ -235,7 +235,7 @@ > # additional detail. > # > # Errors: > -# Any errors from commands in the transaction > +# - Any errors from commands in the transaction > # > # Note: The transaction aborts on the fi

Re: [PATCH 07/13] qapi: fix non-compliant JSON examples

2024-06-19 Thread Markus Armbruster
elisions, but they must be represented as > the value "...", so three examples have been adjusted to support that > format here. > > Signed-off-by: John Snow Reviewed-by: Markus Armbruster

Re: [PATCH 06/13] docs/qapidoc: fix nested parsing under untagged sections

2024-06-19 Thread Markus Armbruster
self._parse_text_into_node( > -dedent(section.text) if section.tag else section.text, > -snode, > - ) > +self._parse_text_into_node(dedent(section.text), snode) > nodelist.append(snode) > return nodelist Acked-by: Markus Armbruster

Re: [PATCH 05/13] qapi/parser: fix comment parsing immediately following a doc block

2024-06-19 Thread Markus Armbruster
46af 100644 > --- a/tests/qapi-schema/doc-good.json > +++ b/tests/qapi-schema/doc-good.json > @@ -55,6 +55,8 @@ > # - {braces} > ## > > +# Not a doc comment > + > ## > # @Enum: > # Reviewed-by: Markus Armbruster

Re: [PATCH 04/13] qapi/parser: preserve indentation in QAPIDoc sections

2024-06-19 Thread Markus Armbruster
e_colon(string: str) -> > Optional[Match[str]]: > return re.match(r'@([^:]*): *', string) > > def get_doc_indented(self, doc: 'QAPIDoc') -> Optional[str]: > +"""get_doc_indented preserves indentation for later rST parsing.""" A proper function comment explains what the function does. This one merely points out one minor aspect. Easy fix: delete it. Alternative fix: write a proper function comment. > self.accept(False) > line = self.get_doc_line() > while line == '': [...] Just commit message and doc nitpicks, so Reviewed-by: Markus Armbruster

  1   2   3   4   5   6   7   8   9   10   >