Re: [PATCH 02/20] qapi: linter fixups

2024-05-15 Thread Markus Armbruster
default: > assert(visit_is_input(v)); > -error_setg(errp, "Invalid parameter type for '%%s', expected: > %(name)s", > - name ? name : "null"); > + error_setg(errp, > + "Invalid parameter type for '%%s', expected: %(name)s", > + name ? name : "null"); > /* Avoid passing invalid *obj to qapi_free_%(c_name)s() */ > g_free(*obj); > *obj = NULL; This is mostly lint I neglected to pick off in my recent work. Thanks for taking care of it! Reviewed-by: Markus Armbruster

Re: [PATCH 03/20] docs/qapidoc: delint a tiny portion of the module

2024-05-15 Thread Markus Armbruster
autodoc import AutodocReporter > > > -__version__ = '1.0' > +__version__ = "1.0" > > > +# fmt: off I figure this tells black to keep quiet for the remainder of the file. Worth a comment, I think. > # Function borrowed from pydash, which is under the MIT license > def intersperse(iterable, separator): > """Yield the members of *iterable* interspersed with *separator*.""" With my comments addressed Reviewed-by: Markus Armbruster

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

2024-05-15 Thread Markus Armbruster
John Snow writes: > Prior to this patch, a section like this: > > @name: lorem ipsum >dolor sit amet > consectetur adipiscing elit > > would be parsed as: > > "lorem ipsum\ndolor sit amet\n consectetur adipiscing elit" > > We want to preserve the indentation for even the first body line

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

2024-05-15 Thread Markus Armbruster
John Snow writes: > On Wed, May 15, 2024, 7:50 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > Prior to this patch, a section like this: >> > >> > @name: lorem ipsum >> >dolor sit amet >> > consectetur adipi

Re: [PATCH 03/20] docs/qapidoc: delint a tiny portion of the module

2024-05-15 Thread Markus Armbruster
John Snow writes: > On Wed, May 15, 2024 at 5:17 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > In the coming patches, it's helpful to have a linting baseline. However, >> > there's no need to shuffle around the deck chairs too much,

Re: [PATCH 05/20] qapi/parser: adjust info location for doc body section

2024-05-15 Thread Markus Armbruster
John Snow writes: > Instead of using the info object for the doc block as a whole, update > the info pointer for each call to ensure_untagged_section when the > existing section is otherwise empty. This way, Sphinx error information > will match precisely to where the text actually starts. > > Si

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

2024-05-15 Thread Markus Armbruster
John Snow writes: > If a comment immediately follows a doc block, the parser doesn't ignore > that token appropriately. Fix that. Reproducer? > > Signed-off-by: John Snow > --- > scripts/qapi/parser.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/scripts/qapi/parse

Re: [PATCH 07/20] qapi/parser: add semantic 'kind' parameter to QAPIDoc.Section

2024-05-15 Thread Markus Armbruster
John Snow writes: > When iterating all_sections, this is helpful to be able to distinguish > "members" from "features"; the only other way to do so is to > cross-reference these sections against QAPIDoc.args or QAPIDoc.features, > but if the desired end goal for QAPIDoc is to remove everything ex

Re: [PATCH 08/20] qapi/parser: differentiate intro and outro paragraphs

2024-05-16 Thread Markus Armbruster
John Snow writes: > Add a semantic tag to paragraphs that appear *before* tagged > sections/members/features and those that appear after. This will control > how they are inlined when doc sections are merged and flattened. This future use is not obvious to me now. I guess the effective way to h

Re: [PATCH 4/6] cpus: Improve error messages on memsave, pmemsave write error

2024-05-27 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 13/5/24 16:45, Markus Armbruster wrote: >> Philippe Mathieu-Daudé writes: >> >>> On 13/5/24 16:17, Markus Armbruster wrote: >>>> qmp_memsave() and qmp_pmemsave() report fwrite() error as >>>> >>>&

Re: [PATCH 5/6] migration: Rephrase message on failure to save / load Xen device state

2024-05-27 Thread Markus Armbruster
Peter Xu writes: > On Mon, May 13, 2024 at 04:17:02PM +0200, Markus Armbruster wrote: >> Functions that use an Error **errp parameter to return errors should >> not also report them to the user, because reporting is the caller's >> job. When the caller does, the erro

Re: [PATCH 05/20] qapi/parser: adjust info location for doc body section

2024-05-27 Thread Markus Armbruster
John Snow writes: > On Thu, May 16, 2024, 1:58 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > Instead of using the info object for the doc block as a whole, update >> > the info pointer for each call to ensure_untagged_section when the >> &

Re: [PATCH v6 10/12] hostmem: add a new memory backend based on POSIX shm_open()

2024-05-29 Thread Markus Armbruster
Stefano Garzarella writes: > shm_open() creates and opens a new POSIX shared memory object. > A POSIX shared memory object allows creating memory backend with an > associated file descriptor that can be shared with external processes > (e.g. vhost-user). > > The new `memory-backend-shm` can be us

Re: [PATCH v6 10/12] hostmem: add a new memory backend based on POSIX shm_open()

2024-06-03 Thread Markus Armbruster
Stefano Garzarella writes: > On Wed, May 29, 2024 at 04:50:20PM GMT, Markus Armbruster wrote: >>Stefano Garzarella writes: >> >>> shm_open() creates and opens a new POSIX shared memory object. >>> A POSIX shared memory object allows creating memory backend with

Re: [PATCH v2 1/2] copy-before-write: allow specifying minimum cluster size

2024-06-03 Thread Markus Armbruster
git a/qapi/block-core.json b/qapi/block-core.json > index df5e07debd..8fc0a4b234 100644 > --- a/qapi/block-core.json > +++ b/qapi/block-core.json > @@ -4642,12 +4642,18 @@ > # @on-cbw-error parameter will decide how this failure is handled. > # Default 0. (Since 7.1) > # > +# @min-cluster-size: Minimum size of blocks used by copy-before-write > +# operations. Has to be a power of 2. No effect if smaller than > +# the maximum of the target's cluster size and 64 KiB. Default 0. > +# (Since 9.1) > +# > # Since: 6.2 > ## > { 'struct': 'BlockdevOptionsCbw', >'base': 'BlockdevOptionsGenericFormat', >'data': { 'target': 'BlockdevRef', '*bitmap': 'BlockDirtyBitmap', > -'*on-cbw-error': 'OnCbwError', '*cbw-timeout': 'uint32' } } > +'*on-cbw-error': 'OnCbwError', '*cbw-timeout': 'uint32', > +'*min-cluster-size': 'size' } } > > ## > # @BlockdevOptions: QAPI schema Acked-by: Markus Armbruster

Re: [PATCH v2 2/2] backup: add minimum cluster size to performance options

2024-06-03 Thread Markus Armbruster
'*max-workers': 'int', '*max-chunk': 'int64' } } > + 'data': { '*use-copy-range': 'bool', '*max-workers': 'int', > +'*max-chunk': 'int64', '*min-cluster-size': 'size' } } > > ## > # @BackupCommon: QAPI schema Acked-by: Markus Armbruster

Re: [RFC PATCH v2 21/22] qapi: Inline and remove QERR_UNSUPPORTED definition

2024-06-12 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Michael, Konstantin, QERR_UNSUPPORTED is only used by QGA. > > Do you mind giving our maintainer's position on Markus > analysis so we can know how to proceed with this definition? Daniel Berrangé recently posted patches that get rid of most instances of QERR_UNS

Re: [PATCH RESEND v7 10/12] hostmem: add a new memory backend based on POSIX shm_open()

2024-06-12 Thread Markus Armbruster
x27;memory-backend-memfd': { 'type': 'MemoryBackendMemfdProperties', > 'if': 'CONFIG_LINUX' }, >'memory-backend-ram': 'MemoryBackendProperties', > + 'memory-backend-shm': { 'type': 'MemoryBackendShmProperties', > + 'if': 'CONFIG_POSIX' }, >'pr-manager-helper': { 'type': 'PrManagerHelperProperties', >'if': 'CONFIG_LINUX' }, >'qtest': 'QtestProperties', [...] Other than that, QAPI schema Acked-by: Markus Armbruster

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

2024-06-13 Thread Markus Armbruster
John Snow writes: > On Thu, May 16, 2024 at 2:01 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > If a comment immediately follows a doc block, the parser doesn't ignore >> > that token appropriately. Fix that. >> >&

Re: [PATCH 07/20] qapi/parser: add semantic 'kind' parameter to QAPIDoc.Section

2024-06-13 Thread Markus Armbruster
John Snow writes: > On Thu, May 16, 2024, 2:18 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > When iterating all_sections, this is helpful to be able to distinguish >> > "members" from "features"; the only other way to

Re: [PATCH 09/20] qapi/parser: add undocumented stub members to all_sections

2024-06-14 Thread Markus Armbruster
John Snow writes: > This helps simplify the doc generator if it doesn't have to check for > undocumented members. > > Signed-off-by: John Snow > --- > scripts/qapi/parser.py | 20 ++-- > 1 file changed, 18 insertions(+), 2 deletions(-) > > diff --git a/scripts/qapi/parser.py b/s

Re: [PATCH 11/20] qapi/schema: add doc_visible property to QAPISchemaDefinition

2024-06-14 Thread Markus Armbruster
John Snow writes: > The intent here is to mark only certain definitions as visible in the > end-user docs. > > All commands and events are inherently visible. Everything else is > visible only if it is a member (or a branch member) of a type that is > visible, or if it is named as a return type f

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

2024-06-14 Thread Markus Armbruster
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 > struggles to do this and transforms the tree inproperly. > > Depending on the rST used, this may result in an assertion error deep in > the

Re: [PATCH 14/20] qapi: fix non-compliant JSON examples

2024-06-14 Thread Markus Armbruster
John Snow writes: > If we parse all examples as QMP, we need them to conform to a standard > so that they render correctly. Once the QMP lexer is active for > examples, these will produce warning messages and fail the build. > > The QMP lexer still supports elisions, but they must be represented

Re: [PATCH 18/20] qapi: ensure all errors sections are uniformly typset

2024-06-14 Thread Markus Armbruster
John Snow writes: > Transactions have the only instance of an Errors section that isn't a > rST list; turn it into one. Just for consistency? Or do you have other shenanigans up your sleeve? If we want the Errors sections to remain all rST lists, we should update docs/devel/qapi-code-gen.rst t

Re: [PATCH 19/20] qapi: convert "Note" sections to plain rST

2024-06-14 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. > > Update the QAPI parser to now prohibit speci

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

2024-06-14 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 by converting > "Example:" or "Examples:" lines into ".. code-block:: QMP" lines. > > This patch does also allow for the use of the rST syntax "Example::

Re: [PATCH RESEND v7 00/12] vhost-user: support any POSIX system (tested on macOS, FreeBSD, OpenBSD)

2024-06-17 Thread Markus Armbruster
Stefano Garzarella writes: > Hi Michael, > > On Wed, Jun 12, 2024 at 03:01:28PM GMT, Stefano Garzarella wrote: >>This series should be in a good shape, in which tree should we queue it? >>@Micheal would your tree be okay? > > Markus suggested a small change to patch 10, so do you want me to resen

Re: [PATCH 14/20] qapi: fix non-compliant JSON examples

2024-06-18 Thread Markus Armbruster
John Snow writes: > On Fri, Jun 14, 2024, 6:55 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > If we parse all examples as QMP, we need them to conform to a standard >> > so that they render correctly. Once the QMP lexer is active for >&

Re: [PATCH 18/20] qapi: ensure all errors sections are uniformly typset

2024-06-18 Thread Markus Armbruster
John Snow writes: > On Fri, Jun 14, 2024, 7:24 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > Transactions have the only instance of an Errors section that isn't a >> > rST list; turn it into one. >> >> Just for consiste

Re: [PATCH 19/20] qapi: convert "Note" sections to plain rST

2024-06-18 Thread Markus Armbruster
John Snow writes: > On Fri, Jun 14, 2024, 9:44 AM Markus Armbruster wrote: > >> 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 &g

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

2024-06-18 Thread Markus Armbruster
John Snow writes: > On Fri, Jun 14, 2024 at 10:39 AM Markus Armbruster > wrote: > >> John Snow writes: >> >> > Eliminate the "Example" sections in QAPI doc blocks, converting them >> > into QMP example code blocks. This is generally done by con

Re: [PATCH 09/20] qapi/parser: add undocumented stub members to all_sections

2024-06-18 Thread Markus Armbruster
John Snow writes: > On Fri, Jun 14, 2024 at 4:53 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > This helps simplify the doc generator if it doesn't have to check for >> > undocumented members. >> > >> > Signed-of

Re: [PATCH 03/13] docs/qapidoc: delint a tiny portion of the module

2024-06-18 Thread Markus Armbruster
_with_titles(self.state, rstlist, node) > finally: > @@ -537,12 +551,12 @@ def do_parse(self, rstlist, node): > > > def setup(app): > -""" Register qapi-doc directive with Sphinx""" > -app.add_config_value('qapidoc_srctree', None, 'env') > -app.add_directive('qapi-doc', QAPIDocDirective) > +"""Register qapi-doc directive with Sphinx""" > +app.add_config_value("qapidoc_srctree", None, "env") > +app.add_directive("qapi-doc", QAPIDocDirective) > > -return dict( > -version=__version__, > -parallel_read_safe=True, > -parallel_write_safe=True > -) > +return { > +"version": __version__, > +"parallel_read_safe": True, > +"parallel_write_safe": True, > +} With intersperse() deleted Reviewed-by: Markus Armbruster

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

2024-06-19 Thread Markus Armbruster
ts/qapi/parser.py > @@ -437,6 +437,7 @@ def _match_at_name_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

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

2024-06-19 Thread Markus Armbruster
de38a386e8f..8b39eb946af 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 06/13] docs/qapidoc: fix nested parsing under untagged sections

2024-06-19 Thread Markus Armbruster
else: > -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 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 08/13] qapi: ensure all errors sections are uniformly typset

2024-06-19 Thread Markus Armbruster
/qapi/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 t

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

2024-06-19 Thread Markus Armbruster
:: If 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 11/13] qapi: add markup to note blocks

2024-06-19 Thread Markus Armbruster
gt; 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 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" sect

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. > > Signed-off

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" sect

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 cau

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 @@ >> # E

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" sect

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 qapidoc.py to &

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

2024-06-20 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 09/13] qapi: convert "Note" sections to plain rST

2024-06-20 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 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: > 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" sect

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 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 bloc

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 wit

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 b/qapi/migra

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 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
new strategy 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
Accidental duplicate, please ignore.

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
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
new strategy 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 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 04/21] docs/qapidoc: delint a tiny portion of the module

2024-06-28 Thread Markus Armbruster
code. > > 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 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 > Ac

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

2024-06-28 Thread Markus Armbruster
t; 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 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 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 fo

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 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" sect

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 a

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: 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 m

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: J

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 3/8] docs/qapidoc: add QMP highlighting to annotated qmp-example blocks

2024-07-09 Thread Markus Armbruster
configuration 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 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 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 "E

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 6/8] qapi: convert "Example" sections with titles

2024-07-09 Thread Markus Armbruster
ple directive", 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 7/8] qapi: convert "Example" sections with longer prose

2024-07-09 Thread Markus Armbruster
cy-histogram-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 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 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 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 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 a

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

2024-07-17 Thread Markus Armbruster
r.) > > 4. Each 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 "

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 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 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 QM

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

2024-07-18 Thread Markus Armbruster
) to 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 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 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 v2 3/7] qapi: block-job-change: make copy-mode parameter optional

2024-07-18 Thread Markus Armbruster
m 'background' 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 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 includin

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 block-job.

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 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

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

2024-07-18 Thread Markus Armbruster
doc comment, 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 100

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

  1   2   3   4   5   6   7   8   9   10   >