linux-cxl.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] qapi: convert remaining "simple" intro sections
@ 2026-09-11 17:21 John Snow
  2026-09-11 17:21 ` [PATCH 1/6] qapi: convert remaining simple intros for block-export.json John Snow
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: John Snow @ 2026-09-11 17:21 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-block, Kevin Wolf, Philippe Mathieu-Daudé, Eric Blake,
	Jonathan Cameron, Lukas Straub, Paolo Bonzini, Zhao Liu,
	linux-cxl, Jason Wang, Hanna Reitz, Markus Armbruster,
	Fabiano Rosas, Peter Xu, John Snow

Hello, this work converts the remaining "simple" intro sections in the
QAPI schema to use the new syntax. This is part of our ongoing effort
to add the mythical "inliner" to our generated QMP documentation.

This batch covers structures that *are* likely to be inlined, and thus
have introductory paragraphs that are quite likely to be omitted when
the member documentation is copied into other contexts (e.g. as
arguments for command documentation, or as members of a branch for
commands that accept union arguments.)

"simple" here is a non-technical distinction that means a single
paragraph of text followed by an existing section boundary that
naturally already delineates what comprises the intro.

If you are a non-QAPI maintainer who has been CC'd on this series, you
may wish to review what information is being codified as the "intro"
(The indented paragraph) and keep in mind that in the future, this
text may not be visible to the end-user reading our QMP documentation
if this structure is utilized as the 'base' for another struct, used
as the arguments for a command or event, or used as branch of a
union. This series keeps it pretty simple, and every conversion herein
is being codified as "the intro", i.e. "not crucial to understanding
the behavior of the members of this struct".

This is the last of the brain-dead, simple conversions apart from any
new cases that may have been merged during the development of this
series. The remaining patches all convert or split longer paragraphs
and require more scrutiny.

We're almost back to reviewing actual code! Hang in there, everybody.

John Snow (6):
  qapi: convert remaining simple intros for block-export.json
  qapi: convert remaining simple intros for cxl.json
  qapi: convert remaining simple intros for machine.json
  qapi: convert remaining simple intros for block-core.json
  qapi: convert intro sections with "TODO" markers
  qapi: convert intro sections followed by notes/examples

 qapi/block-core.json   | 45 ++++++++++++++++++------------------------
 qapi/block-export.json | 19 ++++++++----------
 qapi/cxl.json          | 14 +++++--------
 qapi/machine.json      | 15 +++++---------
 qapi/migration.json    | 25 +++++++++--------------
 qapi/misc.json         |  3 +--
 qapi/net.json          |  9 +++------
 qapi/run-state.json    |  7 +++----
 qapi/yank.json         |  5 +----
 9 files changed, 54 insertions(+), 88 deletions(-)

-- 
2.55.0



^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/6] qapi: convert remaining simple intros for block-export.json
  2026-09-11 17:21 [PATCH 0/6] qapi: convert remaining "simple" intro sections John Snow
@ 2026-09-11 17:21 ` John Snow
  2026-09-12  7:34   ` Markus Armbruster
  2026-09-11 17:21 ` [PATCH 2/6] qapi: convert remaining simple intros for cxl.json John Snow
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 12+ messages in thread
From: John Snow @ 2026-09-11 17:21 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-block, Kevin Wolf, Philippe Mathieu-Daudé, Eric Blake,
	Jonathan Cameron, Lukas Straub, Paolo Bonzini, Zhao Liu,
	linux-cxl, Jason Wang, Hanna Reitz, Markus Armbruster,
	Fabiano Rosas, Peter Xu, John Snow

These are either structs or unions that are used in an inlinable
context: i.e. the generated documentation is likely to feature a
version of this documentation block that does not include the intro in
context of another command, event, or structure.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 qapi/block-export.json | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/qapi/block-export.json b/qapi/block-export.json
index 2893c6456d5..e9f7e72c8ee 100644
--- a/qapi/block-export.json
+++ b/qapi/block-export.json
@@ -37,10 +37,9 @@
 
 ##
 # @NbdServerOptions:
-#
-# Keep this type consistent with the `NbdServerOptionsLegacy` type.
-# The only intended difference is using `SocketAddress` instead of
-# `SocketAddressLegacy`.
+#     Keep this type consistent with the `NbdServerOptionsLegacy`
+#     type.  The only intended difference is using `SocketAddress`
+#     instead of `SocketAddressLegacy`.
 #
 # @addr: Address on which to listen (since 4.2).
 ##
@@ -50,10 +49,9 @@
 
 ##
 # @NbdServerOptionsLegacy:
-#
-# Keep this type consistent with the `NbdServerOptions` type.  The
-# only intended difference is using `SocketAddressLegacy` instead of
-# `SocketAddress`.
+#     Keep this type consistent with the `NbdServerOptions` type.  The
+#     only intended difference is using `SocketAddressLegacy` instead
+#     of `SocketAddress`.
 #
 # @addr: Address on which to listen (since 1.3).
 ##
@@ -339,9 +337,8 @@
 
 ##
 # @BlockExportOptions:
-#
-# Describes a block export, i.e. how single node should be exported on
-# an external interface.
+#     Describes a block export, i.e. how single node should be
+#     exported on an external interface.
 #
 # @type: Block export type
 #
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/6] qapi: convert remaining simple intros for cxl.json
  2026-09-11 17:21 [PATCH 0/6] qapi: convert remaining "simple" intro sections John Snow
  2026-09-11 17:21 ` [PATCH 1/6] qapi: convert remaining simple intros for block-export.json John Snow
@ 2026-09-11 17:21 ` John Snow
  2026-09-11 17:21 ` [PATCH 3/6] qapi: convert remaining simple intros for machine.json John Snow
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: John Snow @ 2026-09-11 17:21 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-block, Kevin Wolf, Philippe Mathieu-Daudé, Eric Blake,
	Jonathan Cameron, Lukas Straub, Paolo Bonzini, Zhao Liu,
	linux-cxl, Jason Wang, Hanna Reitz, Markus Armbruster,
	Fabiano Rosas, Peter Xu, John Snow

These are either structs or unions that are used in an inlinable
context: i.e. the generated documentation is likely to feature a
version of this documentation block that does not include the intro in
context of another command, event, or structure.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 qapi/cxl.json | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/qapi/cxl.json b/qapi/cxl.json
index 631d4def2ac..9422d5a0e2d 100644
--- a/qapi/cxl.json
+++ b/qapi/cxl.json
@@ -32,9 +32,8 @@
 
 ##
 # @CXLCommonEventBase:
-#
-# Common event base for a CXL Event (CXL r3.2 8.2.10.2.1
-# Table 8-55 Common Event Record Format).
+#     Common event base for a CXL Event (CXL r3.2 8.2.10.2.1 Table
+#     8-55 Common Event Record Format).
 #
 # @path: CXL type 3 device canonical QOM path
 #
@@ -63,8 +62,7 @@
 
 ##
 # @CXLGeneralMediaEvent:
-#
-# Event record for a General Media Event (CXL r3.2 8.2.10.2.1.1).
+#     Event record for a General Media Event (CXL r3.2 8.2.10.2.1.1).
 #
 # @dpa: Device Physical Address (relative to @path device).  Note
 #     lower bits include some flags.  See CXL r3.2 Table 8-57 General
@@ -129,8 +127,7 @@
 
 ##
 # @CXLDRAMEvent:
-#
-# Event record for a DRAM Event (CXL r3.2 8.2.10.2.1.2).
+#     Event record for a DRAM Event (CXL r3.2 8.2.10.2.1.2).
 #
 # @dpa: Device Physical Address (relative to @path device).  Note
 #     lower bits include some flags.  See CXL r3.2 Table 8-58 DRAM
@@ -211,8 +208,7 @@
 
 ##
 # @CXLMemModuleEvent:
-#
-# Event record for a Memory Module Event (CXL r3.2 8.2.10.2.1.3).
+#     Event record for a Memory Module Event (CXL r3.2 8.2.10.2.1.3).
 #
 # @type: Device Event Type.  See CXL r3.2 Table 8-59 Memory Module
 #     Event Record for bit definitions for bit definiions.
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/6] qapi: convert remaining simple intros for machine.json
  2026-09-11 17:21 [PATCH 0/6] qapi: convert remaining "simple" intro sections John Snow
  2026-09-11 17:21 ` [PATCH 1/6] qapi: convert remaining simple intros for block-export.json John Snow
  2026-09-11 17:21 ` [PATCH 2/6] qapi: convert remaining simple intros for cxl.json John Snow
@ 2026-09-11 17:21 ` John Snow
  2026-09-12  7:34   ` Markus Armbruster
  2026-09-11 17:21 ` [PATCH 4/6] qapi: convert remaining simple intros for block-core.json John Snow
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 12+ messages in thread
From: John Snow @ 2026-09-11 17:21 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-block, Kevin Wolf, Philippe Mathieu-Daudé, Eric Blake,
	Jonathan Cameron, Lukas Straub, Paolo Bonzini, Zhao Liu,
	linux-cxl, Jason Wang, Hanna Reitz, Markus Armbruster,
	Fabiano Rosas, Peter Xu, John Snow

These are either structs or unions that are used in an inlinable
context: i.e. the generated documentation is likely to feature a
version of this documentation block that does not include the intro in
context of another command, event, or structure.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 qapi/machine.json | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/qapi/machine.json b/qapi/machine.json
index 0516112f8e8..13875fc4642 100644
--- a/qapi/machine.json
+++ b/qapi/machine.json
@@ -449,8 +449,7 @@
 
 ##
 # @NumaOptions:
-#
-# A discriminated record of NUMA options.  (for OptsVisitor)
+#     A discriminated record of NUMA options.  (for OptsVisitor)
 #
 # @type: NUMA option type
 #
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 4/6] qapi: convert remaining simple intros for block-core.json
  2026-09-11 17:21 [PATCH 0/6] qapi: convert remaining "simple" intro sections John Snow
                   ` (2 preceding siblings ...)
  2026-09-11 17:21 ` [PATCH 3/6] qapi: convert remaining simple intros for machine.json John Snow
@ 2026-09-11 17:21 ` John Snow
  2026-09-12  7:35   ` Markus Armbruster
  2026-09-11 17:21 ` [PATCH 5/6] qapi: convert intro sections with "TODO" markers John Snow
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 12+ messages in thread
From: John Snow @ 2026-09-11 17:21 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-block, Kevin Wolf, Philippe Mathieu-Daudé, Eric Blake,
	Jonathan Cameron, Lukas Straub, Paolo Bonzini, Zhao Liu,
	linux-cxl, Jason Wang, Hanna Reitz, Markus Armbruster,
	Fabiano Rosas, Peter Xu, John Snow

These are either structs or unions that are used in an inlinable
context: i.e. the generated documentation is likely to feature a
version of this documentation block that does not include the intro in
context of another command, event, or structure.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 qapi/block-core.json | 45 +++++++++++++++++++-------------------------
 1 file changed, 19 insertions(+), 26 deletions(-)

diff --git a/qapi/block-core.json b/qapi/block-core.json
index 1ca147285e7..88218e38d02 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -4462,9 +4462,8 @@
 
 ##
 # @BlockdevOptionsCurlHttp:
-#
-# Driver specific block device options for HTTP connections over the
-# curl backend.  URLs must start with "http://".
+#     Driver specific block device options for HTTP connections over
+#     the curl backend.  URLs must start with "http://".
 #
 # @cookie: List of cookies to set; format is "name1=content1;
 #     name2=content2;" as explained by CURLOPT_COOKIE(3).  Defaults to
@@ -4488,9 +4487,8 @@
 
 ##
 # @BlockdevOptionsCurlHttps:
-#
-# Driver specific block device options for HTTPS connections over the
-# curl backend.  URLs must start with "https://".
+#     Driver specific block device options for HTTPS connections over
+#     the curl backend.  URLs must start with "https://".
 #
 # @sslverify: Whether to verify the SSL certificate's validity
 #     (defaults to true)
@@ -4503,9 +4501,8 @@
 
 ##
 # @BlockdevOptionsCurlFtp:
-#
-# Driver specific block device options for FTP connections over the
-# curl backend.  URLs must start with "ftp://".
+#     Driver specific block device options for FTP connections over
+#     the curl backend.  URLs must start with "ftp://".
 #
 # Since: 2.9
 ##
@@ -4515,9 +4512,8 @@
 
 ##
 # @BlockdevOptionsCurlFtps:
-#
-# Driver specific block device options for FTPS connections over the
-# curl backend.  URLs must start with "ftps://".
+#     Driver specific block device options for FTPS connections over
+#     the curl backend.  URLs must start with "ftps://".
 #
 # @sslverify: Whether to verify the SSL certificate's validity
 #     (defaults to true)
@@ -4643,14 +4639,13 @@
 
 ##
 # @BlockdevOptionsCbw:
-#
-# Driver specific block device options for the copy-before-write
-# driver, which does so called copy-before-write operations: when data
-# is written to the filter, the filter first reads corresponding
-# blocks from its file child and copies them to @target child.  After
-# successfully copying, the write request is propagated to file child.
-# If copying fails, the original write request is failed too and no
-# data is written to file child.
+#     Driver specific block device options for the copy-before-write
+#     driver, which does so called copy-before-write operations: when
+#     data is written to the filter, the filter first reads
+#     corresponding blocks from its file child and copies them to
+#     @target child.  After successfully copying, the write request is
+#     propagated to file child.  If copying fails, the original write
+#     request is failed too and no data is written to file child.
 #
 # @target: The target for copy-before-write operations.
 #
@@ -4686,9 +4681,8 @@
 
 ##
 # @BlockdevOptions:
-#
-# Options for creating a block device.  Many options are available for
-# all block devices, independent of the block driver:
+#     Options for creating a block device.  Many options are available
+#     for all block devices, independent of the block driver:
 #
 # @driver: block driver name
 #
@@ -5473,9 +5467,8 @@
 
 ##
 # @BlockdevAmendOptionsQcow2:
-#
-# Driver specific image amend options for qcow2.  For now, only
-# encryption options can be amended
+#     Driver specific image amend options for qcow2.  For now, only
+#     encryption options can be amended
 #
 # @encrypt: Encryption options to be amended
 #
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 5/6] qapi: convert intro sections with "TODO" markers
  2026-09-11 17:21 [PATCH 0/6] qapi: convert remaining "simple" intro sections John Snow
                   ` (3 preceding siblings ...)
  2026-09-11 17:21 ` [PATCH 4/6] qapi: convert remaining simple intros for block-core.json John Snow
@ 2026-09-11 17:21 ` John Snow
  2026-09-12  6:58   ` Markus Armbruster
  2026-09-11 17:22 ` [PATCH 6/6] qapi: convert intro sections followed by notes/examples John Snow
  2026-09-12  7:36 ` [PATCH 0/6] qapi: convert remaining "simple" intro sections Markus Armbruster
  6 siblings, 1 reply; 12+ messages in thread
From: John Snow @ 2026-09-11 17:21 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-block, Kevin Wolf, Philippe Mathieu-Daudé, Eric Blake,
	Jonathan Cameron, Lukas Straub, Paolo Bonzini, Zhao Liu,
	linux-cxl, Jason Wang, Hanna Reitz, Markus Armbruster,
	Fabiano Rosas, Peter Xu, John Snow

This patch converts intro sections that are immediately followed by a
"TODO:" that was formerly used to demarcate the stub member insertion
point.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 qapi/machine.json   |  7 ++-----
 qapi/migration.json | 10 ++--------
 qapi/net.json       |  9 +++------
 qapi/yank.json      |  5 +----
 4 files changed, 8 insertions(+), 23 deletions(-)

diff --git a/qapi/machine.json b/qapi/machine.json
index 13875fc4642..108033b6d64 100644
--- a/qapi/machine.json
+++ b/qapi/machine.json
@@ -1216,11 +1216,8 @@
 
 ##
 # @query-memory-size-summary:
-#
-# Return the amount of initially allocated and present hotpluggable
-# (if enabled) memory in bytes.
-#
-# TODO: This line is a hack to separate the example from the body
+#     Return the amount of initially allocated and present
+#     hotpluggable (if enabled) memory in bytes.
 #
 # .. qmp-example::
 #
diff --git a/qapi/migration.json b/qapi/migration.json
index 8096ef64682..70a1854fb73 100644
--- a/qapi/migration.json
+++ b/qapi/migration.json
@@ -1604,10 +1604,7 @@
 
 ##
 # @query-xen-replication-status:
-#
-# Query replication status while the vm is running.
-#
-# TODO: This line is a hack to separate the example from the body
+#     Query replication status while the vm is running.
 #
 # .. qmp-example::
 #
@@ -1657,10 +1654,7 @@
 
 ##
 # @query-colo-status:
-#
-# Query COLO status while the vm is running.
-#
-# TODO: This line is a hack to separate the example from the body
+#     Query COLO status while the vm is running.
 #
 # .. qmp-example::
 #
diff --git a/qapi/net.json b/qapi/net.json
index 7aabd8b9260..7a809d9a8a6 100644
--- a/qapi/net.json
+++ b/qapi/net.json
@@ -1113,12 +1113,9 @@
 
 ##
 # @announce-self:
-#
-# Trigger generation of broadcast RARP frames to update network
-# switches.  This can be useful when network bonds fail-over the
-# active slave.
-#
-# TODO: This line is a hack to separate the example from the body
+#     Trigger generation of broadcast RARP frames to update network
+#     switches.  This can be useful when network bonds fail-over the
+#     active slave.
 #
 # .. qmp-example::
 #
diff --git a/qapi/yank.json b/qapi/yank.json
index 8ac4b773653..187a0952e66 100644
--- a/qapi/yank.json
+++ b/qapi/yank.json
@@ -96,10 +96,7 @@
 
 ##
 # @query-yank:
-#
-# Query yank instances.  See `YankInstance` for more information.
-#
-# TODO: This line is a hack to separate the example from the body
+#     Query yank instances.  See `YankInstance` for more information.
 #
 # .. qmp-example::
 #
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 6/6] qapi: convert intro sections followed by notes/examples
  2026-09-11 17:21 [PATCH 0/6] qapi: convert remaining "simple" intro sections John Snow
                   ` (4 preceding siblings ...)
  2026-09-11 17:21 ` [PATCH 5/6] qapi: convert intro sections with "TODO" markers John Snow
@ 2026-09-11 17:22 ` John Snow
  2026-09-12  7:36 ` [PATCH 0/6] qapi: convert remaining "simple" intro sections Markus Armbruster
  6 siblings, 0 replies; 12+ messages in thread
From: John Snow @ 2026-09-11 17:22 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-block, Kevin Wolf, Philippe Mathieu-Daudé, Eric Blake,
	Jonathan Cameron, Lukas Straub, Paolo Bonzini, Zhao Liu,
	linux-cxl, Jason Wang, Hanna Reitz, Markus Armbruster,
	Fabiano Rosas, Peter Xu, John Snow

These provide a rather natural cutoff point, but technically this does
introduce a new intro/details split to these documentation blocks.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 qapi/machine.json   |  5 ++---
 qapi/migration.json | 15 +++++++--------
 qapi/misc.json      |  3 +--
 qapi/run-state.json |  7 +++----
 4 files changed, 13 insertions(+), 17 deletions(-)

diff --git a/qapi/machine.json b/qapi/machine.json
index 108033b6d64..9a790da9db2 100644
--- a/qapi/machine.json
+++ b/qapi/machine.json
@@ -1181,9 +1181,8 @@
 
 ##
 # @HV_BALLOON_STATUS_REPORT:
-#
-# Emitted when the hv-balloon driver receives a "STATUS" message from
-# the guest.
+#     Emitted when the hv-balloon driver receives a "STATUS" message
+#     from the guest.
 #
 # .. note:: This event is rate-limited.
 #
diff --git a/qapi/migration.json b/qapi/migration.json
index 70a1854fb73..c831e692feb 100644
--- a/qapi/migration.json
+++ b/qapi/migration.json
@@ -1241,10 +1241,10 @@
 
 ##
 # @migrate_cancel:
-#
-# Cancel the currently executing migration process.  Allows a new
-# migration to be started right after.  When postcopy-ram is in use,
-# cancelling is not allowed after the postcopy phase has started.
+#     Cancel the currently executing migration process.  Allows a new
+#     migration to be started right after.  When postcopy-ram is in
+#     use, cancelling is not allowed after the postcopy phase has
+#     started.
 #
 # .. note:: This command succeeds even if there is no migration
 #    process running.
@@ -1619,8 +1619,8 @@
 
 ##
 # @xen-colo-do-checkpoint:
-#
-# Xen uses this command to notify replication to trigger a checkpoint.
+#     Xen uses this command to notify replication to trigger a
+#     checkpoint.
 #
 # .. qmp-example::
 #
@@ -1687,8 +1687,7 @@
 
 ##
 # @migrate-pause:
-#
-# Pause a migration.  Currently it only supports postcopy.
+#     Pause a migration.  Currently it only supports postcopy.
 #
 # .. qmp-example::
 #
diff --git a/qapi/misc.json b/qapi/misc.json
index b3c2a1421f3..ec783c067c9 100644
--- a/qapi/misc.json
+++ b/qapi/misc.json
@@ -103,8 +103,7 @@
 
 ##
 # @query-iothreads:
-#
-# Return a list of information about each iothread.
+#     Return a list of information about each iothread.
 #
 # .. note:: This list excludes the QEMU main loop thread, which is not
 #    declared using the ``-object iothread`` command-line option.  It
diff --git a/qapi/run-state.json b/qapi/run-state.json
index 703ca1bb5b9..8bbd9884087 100644
--- a/qapi/run-state.json
+++ b/qapi/run-state.json
@@ -232,10 +232,9 @@
 
 ##
 # @SUSPEND_DISK:
-#
-# Emitted when guest enters a hardware suspension state with data
-# saved on disk, for example, S4 state, which is sometimes called
-# hibernate state
+#     Emitted when guest enters a hardware suspension state with data
+#     saved on disk, for example, S4 state, which is sometimes called
+#     hibernate state
 #
 # .. note:: QEMU shuts down (similar to event `SHUTDOWN`) when
 #    entering this state.
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 5/6] qapi: convert intro sections with "TODO" markers
  2026-09-11 17:21 ` [PATCH 5/6] qapi: convert intro sections with "TODO" markers John Snow
@ 2026-09-12  6:58   ` Markus Armbruster
  0 siblings, 0 replies; 12+ messages in thread
From: Markus Armbruster @ 2026-09-12  6:58 UTC (permalink / raw)
  To: John Snow
  Cc: qemu-devel, qemu-block, Kevin Wolf, Philippe Mathieu-Daudé,
	Eric Blake, Jonathan Cameron, Lukas Straub, Paolo Bonzini,
	Zhao Liu, linux-cxl, Jason Wang, Hanna Reitz, Fabiano Rosas,
	Peter Xu

John Snow <jsnow@redhat.com> writes:

> This patch converts intro sections that are immediately followed by a
> "TODO:" that was formerly used to demarcate the stub member insertion
> point.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>  qapi/machine.json   |  7 ++-----
>  qapi/migration.json | 10 ++--------
>  qapi/net.json       |  9 +++------
>  qapi/yank.json      |  5 +----
>  4 files changed, 8 insertions(+), 23 deletions(-)
>
> diff --git a/qapi/machine.json b/qapi/machine.json
> index 13875fc4642..108033b6d64 100644
> --- a/qapi/machine.json
> +++ b/qapi/machine.json
> @@ -1216,11 +1216,8 @@
>  
>  ##
>  # @query-memory-size-summary:
> -#
> -# Return the amount of initially allocated and present hotpluggable
> -# (if enabled) memory in bytes.
> -#
> -# TODO: This line is a hack to separate the example from the body
> +#     Return the amount of initially allocated and present
> +#     hotpluggable (if enabled) memory in bytes.
>  #
>  # .. qmp-example::
>  #

I see output change from

    Command query-memory-size-summary (Since: 2.11)

       Return the amount of initially allocated and present hotpluggable
       (if enabled) memory in bytes.

       Return:
          "MemoryInfo"

       Example::

          -> { "execute": "query-memory-size-summary" }
          <- { "return": { "base-memory": 4294967296, "plugged-memory": 0 } }

to

    Command query-memory-size-summary (Since: 2.11)

       Return the amount of initially allocated and present hotpluggable
       (if enabled) memory in bytes.

       Example::

          -> { "execute": "query-memory-size-summary" }
          <- { "return": { "base-memory": 4294967296, "plugged-memory": 0 } }

       Return:
          "MemoryInfo"

Similar for the other hunks.  Surprising.  What's going on?

[...]


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/6] qapi: convert remaining simple intros for block-export.json
  2026-09-11 17:21 ` [PATCH 1/6] qapi: convert remaining simple intros for block-export.json John Snow
@ 2026-09-12  7:34   ` Markus Armbruster
  0 siblings, 0 replies; 12+ messages in thread
From: Markus Armbruster @ 2026-09-12  7:34 UTC (permalink / raw)
  To: John Snow
  Cc: qemu-devel, qemu-block, Kevin Wolf, Philippe Mathieu-Daudé,
	Eric Blake, Jonathan Cameron, Lukas Straub, Paolo Bonzini,
	Zhao Liu, linux-cxl, Jason Wang, Hanna Reitz, Fabiano Rosas,
	Peter Xu

John Snow <jsnow@redhat.com> writes:

> These are either structs or unions that are used in an inlinable
> context: i.e. the generated documentation is likely to feature a
> version of this documentation block that does not include the intro in
> context of another command, event, or structure.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>  qapi/block-export.json | 19 ++++++++-----------
>  1 file changed, 8 insertions(+), 11 deletions(-)
>
> diff --git a/qapi/block-export.json b/qapi/block-export.json
> index 2893c6456d5..e9f7e72c8ee 100644
> --- a/qapi/block-export.json
> +++ b/qapi/block-export.json
> @@ -37,10 +37,9 @@
>  
>  ##
>  # @NbdServerOptions:
> -#
> -# Keep this type consistent with the `NbdServerOptionsLegacy` type.
> -# The only intended difference is using `SocketAddress` instead of
> -# `SocketAddressLegacy`.
> +#     Keep this type consistent with the `NbdServerOptionsLegacy`
> +#     type.  The only intended difference is using `SocketAddress`
> +#     instead of `SocketAddressLegacy`.

"Keep this consistent" is for developers, and should not go into user
reference documentation.

Let's leave this for another day, just take note of future work:

6. Move comments for developers out of doc comments

>  #
>  # @addr: Address on which to listen (since 4.2).
>  ##
> @@ -50,10 +49,9 @@
>  
>  ##
>  # @NbdServerOptionsLegacy:
> -#
> -# Keep this type consistent with the `NbdServerOptions` type.  The
> -# only intended difference is using `SocketAddressLegacy` instead of
> -# `SocketAddress`.
> +#     Keep this type consistent with the `NbdServerOptions` type.  The
> +#     only intended difference is using `SocketAddressLegacy` instead
> +#     of `SocketAddress`.

Likewise.

>  #
>  # @addr: Address on which to listen (since 1.3).
>  ##
> @@ -339,9 +337,8 @@
>  
>  ##
>  # @BlockExportOptions:
> -#
> -# Describes a block export, i.e. how single node should be exported on
> -# an external interface.
> +#     Describes a block export, i.e. how single node should be
> +#     exported on an external interface.
>  #
>  # @type: Block export type
>  #


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 3/6] qapi: convert remaining simple intros for machine.json
  2026-09-11 17:21 ` [PATCH 3/6] qapi: convert remaining simple intros for machine.json John Snow
@ 2026-09-12  7:34   ` Markus Armbruster
  0 siblings, 0 replies; 12+ messages in thread
From: Markus Armbruster @ 2026-09-12  7:34 UTC (permalink / raw)
  To: John Snow
  Cc: qemu-devel, qemu-block, Kevin Wolf, Philippe Mathieu-Daudé,
	Eric Blake, Jonathan Cameron, Lukas Straub, Paolo Bonzini,
	Zhao Liu, linux-cxl, Jason Wang, Hanna Reitz, Fabiano Rosas,
	Peter Xu

John Snow <jsnow@redhat.com> writes:

> These are either structs or unions that are used in an inlinable
> context: i.e. the generated documentation is likely to feature a
> version of this documentation block that does not include the intro in
> context of another command, event, or structure.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>  qapi/machine.json | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/qapi/machine.json b/qapi/machine.json
> index 0516112f8e8..13875fc4642 100644
> --- a/qapi/machine.json
> +++ b/qapi/machine.json
> @@ -449,8 +449,7 @@
>  
>  ##
>  # @NumaOptions:
> -#
> -# A discriminated record of NUMA options.  (for OptsVisitor)
> +#     A discriminated record of NUMA options.  (for OptsVisitor)
>  #
>  # @type: NUMA option type
>  #

Trivial conflict with my "[PATCH 1/2] qapi/machine: Drop misleading (for
OptsVisitor) doc".  I'll take care of it.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 4/6] qapi: convert remaining simple intros for block-core.json
  2026-09-11 17:21 ` [PATCH 4/6] qapi: convert remaining simple intros for block-core.json John Snow
@ 2026-09-12  7:35   ` Markus Armbruster
  0 siblings, 0 replies; 12+ messages in thread
From: Markus Armbruster @ 2026-09-12  7:35 UTC (permalink / raw)
  To: John Snow
  Cc: qemu-devel, qemu-block, Kevin Wolf, Philippe Mathieu-Daudé,
	Eric Blake, Jonathan Cameron, Lukas Straub, Paolo Bonzini,
	Zhao Liu, linux-cxl, Jason Wang, Hanna Reitz, Fabiano Rosas,
	Peter Xu

John Snow <jsnow@redhat.com> writes:

> These are either structs or unions that are used in an inlinable
> context: i.e. the generated documentation is likely to feature a
> version of this documentation block that does not include the intro in
> context of another command, event, or structure.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
>  qapi/block-core.json | 45 +++++++++++++++++++-------------------------
>  1 file changed, 19 insertions(+), 26 deletions(-)
>
> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index 1ca147285e7..88218e38d02 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
> @@ -4462,9 +4462,8 @@
>  
>  ##
>  # @BlockdevOptionsCurlHttp:
> -#
> -# Driver specific block device options for HTTP connections over the
> -# curl backend.  URLs must start with "http://".
> +#     Driver specific block device options for HTTP connections over
> +#     the curl backend.  URLs must start with "http://".
>  #
>  # @cookie: List of cookies to set; format is "name1=content1;
>  #     name2=content2;" as explained by CURLOPT_COOKIE(3).  Defaults to

Not this patch's problem, but here goes anyway.

"URLs must start" applies to BlockdevOptionsCurlBase member @url.  We
should turn this into a proper link eventually.

Pattern: the base type's documentation needs to be amended somehow.
Here, we need to amend it to restrict the values os the base's member
@url.

This splits the documentation for @url.  Amendments are easy to miss.
At some point, we might want to think of ways to avoid this.

> @@ -4488,9 +4487,8 @@
>  
>  ##
>  # @BlockdevOptionsCurlHttps:
> -#
> -# Driver specific block device options for HTTPS connections over the
> -# curl backend.  URLs must start with "https://".
> +#     Driver specific block device options for HTTPS connections over
> +#     the curl backend.  URLs must start with "https://".
>  #
>  # @sslverify: Whether to verify the SSL certificate's validity
>  #     (defaults to true)
> @@ -4503,9 +4501,8 @@
>  
>  ##
>  # @BlockdevOptionsCurlFtp:
> -#
> -# Driver specific block device options for FTP connections over the
> -# curl backend.  URLs must start with "ftp://".
> +#     Driver specific block device options for FTP connections over
> +#     the curl backend.  URLs must start with "ftp://".
>  #
>  # Since: 2.9
>  ##
> @@ -4515,9 +4512,8 @@
>  
>  ##
>  # @BlockdevOptionsCurlFtps:
> -#
> -# Driver specific block device options for FTPS connections over the
> -# curl backend.  URLs must start with "ftps://".
> +#     Driver specific block device options for FTPS connections over
> +#     the curl backend.  URLs must start with "ftps://".
>  #
>  # @sslverify: Whether to verify the SSL certificate's validity
>  #     (defaults to true)
> @@ -4643,14 +4639,13 @@
>  
>  ##
>  # @BlockdevOptionsCbw:
> -#
> -# Driver specific block device options for the copy-before-write
> -# driver, which does so called copy-before-write operations: when data
> -# is written to the filter, the filter first reads corresponding
> -# blocks from its file child and copies them to @target child.  After
> -# successfully copying, the write request is propagated to file child.
> -# If copying fails, the original write request is failed too and no
> -# data is written to file child.
> +#     Driver specific block device options for the copy-before-write
> +#     driver, which does so called copy-before-write operations: when
> +#     data is written to the filter, the filter first reads
> +#     corresponding blocks from its file child and copies them to
> +#     @target child.  After successfully copying, the write request is
> +#     propagated to file child.  If copying fails, the original write
> +#     request is failed too and no data is written to file child.
>  #
>  # @target: The target for copy-before-write operations.
>  #
> @@ -4686,9 +4681,8 @@
>  
>  ##
>  # @BlockdevOptions:
> -#
> -# Options for creating a block device.  Many options are available for
> -# all block devices, independent of the block driver:
> +#     Options for creating a block device.  Many options are available
> +#     for all block devices, independent of the block driver:

Intro ends with colon, which is unusual, and doesn't really work with
the way documentation gets rendered:

   Options for creating a block device.  Many options are available
   for all block devices, independent of the block driver:

   Members:
      * driver ("BlockdevDriver") -- block driver name

      [More non-variant members...]

      * force-share ("boolean", *optional*) -- force share all
        permission on added nodes.  Requires read-only=true.  (Since
        2.10)

      * When "driver" is "blkdebug": The members of
        "BlockdevOptionsBlkdebug".

      [More variants...]

>  #
>  # @driver: block driver name
>  #
> @@ -5473,9 +5467,8 @@
>  
>  ##
>  # @BlockdevAmendOptionsQcow2:
> -#
> -# Driver specific image amend options for qcow2.  For now, only
> -# encryption options can be amended
> +#     Driver specific image amend options for qcow2.  For now, only
> +#     encryption options can be amended

The second sentence lacks a period.

Let's leave both of these for another day, just take note of future
work:

7. Clean up intros to consist of sentences.  Sentences start with a
capital letter and end with a period.

>  #
>  # @encrypt: Encryption options to be amended
>  #


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/6] qapi: convert remaining "simple" intro sections
  2026-09-11 17:21 [PATCH 0/6] qapi: convert remaining "simple" intro sections John Snow
                   ` (5 preceding siblings ...)
  2026-09-11 17:22 ` [PATCH 6/6] qapi: convert intro sections followed by notes/examples John Snow
@ 2026-09-12  7:36 ` Markus Armbruster
  6 siblings, 0 replies; 12+ messages in thread
From: Markus Armbruster @ 2026-09-12  7:36 UTC (permalink / raw)
  To: John Snow
  Cc: qemu-devel, qemu-block, Kevin Wolf, Philippe Mathieu-Daudé,
	Eric Blake, Jonathan Cameron, Lukas Straub, Paolo Bonzini,
	Zhao Liu, linux-cxl, Jason Wang, Hanna Reitz, Fabiano Rosas,
	Peter Xu

PATCH 1-4,6
Reviewed-by: Markus Armbruster <armbru@redhat.com>


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-09-12  7:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-11 17:21 [PATCH 0/6] qapi: convert remaining "simple" intro sections John Snow
2026-09-11 17:21 ` [PATCH 1/6] qapi: convert remaining simple intros for block-export.json John Snow
2026-09-12  7:34   ` Markus Armbruster
2026-09-11 17:21 ` [PATCH 2/6] qapi: convert remaining simple intros for cxl.json John Snow
2026-09-11 17:21 ` [PATCH 3/6] qapi: convert remaining simple intros for machine.json John Snow
2026-09-12  7:34   ` Markus Armbruster
2026-09-11 17:21 ` [PATCH 4/6] qapi: convert remaining simple intros for block-core.json John Snow
2026-09-12  7:35   ` Markus Armbruster
2026-09-11 17:21 ` [PATCH 5/6] qapi: convert intro sections with "TODO" markers John Snow
2026-09-12  6:58   ` Markus Armbruster
2026-09-11 17:22 ` [PATCH 6/6] qapi: convert intro sections followed by notes/examples John Snow
2026-09-12  7:36 ` [PATCH 0/6] qapi: convert remaining "simple" intro sections Markus Armbruster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).