qapi: convert/split remaining QAPI/QMP intro sections
v3 cover qapi: convert/split remaining QAPI/QMP intro sections
This series is the last batch of intro conversions.
V2:
- Address review comments
- Adjust commit messages, add S-O-B
This series covers the trickiest bits of qapi/qapi-schema.json, ones that involve multiple paragraphs and decisions over where exactly to place the split. Currently there are only some very minor prose rewrites the break apart intro statements from paragraphs where deemed appropriate.
If you are a non-QAPI maintainer, the TL:DR here is:
Take a look at what is being indented here and what is not. Anything that gets indented is text that is not eligible for
inlining: that is, the intro text is not copied into command/event documentation to replace "The members of ..." placeholders in our generated documentation.
If any text that you believe is important for end users to understand is in the indented section after these patches, please review and propose a different prose split.
(More info: The intro text is not guaranteed to be dropped from generated docs. For example, if a struct is used as a type for an argument in its own right, it is guaranteed to be included in the generated documentation. It is also always included for commands, events, and enums. It is only for structs which are *only* ever used as command/event arguments or as a branch type where this text is at risk of not being reproduced at all in the output documentation.)
John Snow (10):
qapi: split intro for HV_BALLOON_STATUS_REPORT
qapi: convert/split intros for block-core.json commands
qapi: convert/split intros for block commands
qapi: convert/split intros for job.json commands
qapi: convert/split intros for misc-i386.json commands
qapi: convert/split intros for commands
qapi: convert/split intros for enums
qapi: split intro sections for events
qapi: split intro sections for data structs
qapi: split intro sections for inlinable structs
qapi/acpi.json | 3 +- qapi/block-core.json | 131 +++++++++++++++++----------------------- qapi/block-export.json | 8 +-- qapi/block.json | 33 +++++----- qapi/compat.json | 5 +- qapi/control.json | 3 +- qapi/crypto.json | 3 +- qapi/introspect.json | 16 ++--- qapi/job.json | 42 ++++++------- qapi/machine-s390x.json | 3 +- qapi/machine.json | 78 +++++++++++------------- qapi/migration.json | 12 ++-- qapi/misc-arm.json | 5 +- qapi/misc-i386.json | 22 +++---- qapi/misc.json | 8 +-- qapi/net.json | 37 +++++------- qapi/qdev.json | 9 ++- qapi/qom.json | 9 +-- qapi/stats.json | 5 +- qapi/transaction.json | 7 +-- qapi/ui.json | 8 +-- 21 files changed, 193 insertions(+), 254 deletions(-)
Signature · 1 line
2.55.0
PATCH v3 5/10 qapi: convert/split intros for misc-i386.json commands
Convert or split apart the existing intro for commands in misc-i386.json into introduction and details sections. The introduction is indented, remaining plaintext/details paragraphs are not.
For commands that have automatically generated documentation inserted at parse time, these new split points serve as the new insertion point. This affects the rendered documentation for query-sev in particular, whose "Returns:" documentation is pushed upwards.
--- qapi/misc-i386.json | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-)
qapi/misc-i386.json +8 -14
@@ -5,10 +5,9 @@ ## # @rtc-reset-reinjection: -# -# Reset the RTC interrupt reinjection backlog. Can be used if another -# mechanism to synchronize guest time is in effect, for example QEMU -# guest agent's `guest-set-time` command. +# Reset the RTC interrupt reinjection backlog. Can be used if +# another mechanism to synchronize guest time is in effect, for +# example QEMU guest agent's `guest-set-time` command. # # Use of this command is only applicable for x86 machines with an RTC, # and on other machines will silently return without performing any
@@ -119,8 +118,7 @@ ## # @query-sev: -# -# Return information about SEV/SEV-ES/SEV-SNP. +# Return information about SEV/SEV-ES/SEV-SNP. # # If unavailable due to an incompatible configuration the returned # @enabled field is set to 'false' and the state of all other fields
@@ -149,8 +147,7 @@ ## # @query-sev-launch-measure: -# -# Query the SEV/SEV-ES guest launch information. +# Query the SEV/SEV-ES guest launch information. # # This is only valid on x86 machines configured with KVM and the # 'sev-guest' confidential virtualization object. The launch
@@ -199,8 +196,7 @@ ## # @query-sev-capabilities: -# -# Get SEV capabilities. +# Get SEV capabilities. # # This is only supported on AMD X86 platforms with KVM enabled. #
@@ -220,8 +216,7 @@ ## # @sev-inject-launch-secret: -# -# Inject a secret blob into a SEV/SEV-ES guest's memory. +# Inject a secret blob into a SEV/SEV-ES guest's memory. # # This is only valid on x86 machines configured with KVM and the # 'sev-guest' confidential virtualization object. SEV-SNP guests do
@@ -257,8 +252,7 @@ ## # @query-sev-attestation-report: -# -# Get the SEV attestation report. +# Get the SEV attestation report. # # This is only valid on x86 machines configured with KVM and the # 'sev-guest' confidential virtualization object. The attestation
Signature · 1 line
2.55.0
PATCH v3 1/10 qapi: split intro for HV_BALLOON_STATUS_REPORT
In reply to John SnowThis changes the rendering for this event by adding a new insertion point right after the introductory paragraph, before the ".. note::".
Because this event features auto-inserted member documentation ("The members of "HvBalloonInfo"), creating this new split point changes the rendered documentation - the ".. note::" now appears below the generated member documentation instead of above it.
--- qapi/machine.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
qapi/machine.json +2 -3
@@ -1215,9 +1215,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. #
Signature · 1 line
2.55.0
PATCH v3 10/10 qapi: split intro sections for inlinable structs
In reply to John SnowThis patch splits the intro/details section for structs which are used in an inlinable context; i.e. structs used either as arguments for a command/event, or used as a branch of a union. The QAPI documentation block for these entities will have their intro section left behind when inlined into other contexts, but will still display the intro section on standalone documentation for these types.
In general, this patch does not change how the rendered documentation currently looks, except:
1. MemoryBackendShmProperties and MemoryBackendEpcProperties see their member descriptions move upwards to just below their formalized introductory sections.
--- qapi/block-export.json | 5 ++--- qapi/crypto.json | 3 +-- qapi/machine.json | 11 ++++------- qapi/net.json | 34 +++++++++++++++------------------- qapi/qom.json | 9 +++------ 5 files changed, 25 insertions(+), 37 deletions(-)
qapi/block-export.json +2 -3
@@ -154,9 +154,8 @@ ## # @BlockExportOptionsFuse: -# -# Options for exporting a block graph node on some (file) mountpoint -# as a raw image. +# Options for exporting a block graph node on some (file) +# mountpoint as a raw image. # # Multi-threading note: The FUSE export supports multi-threading. # Currently, requests are distributed across these threads in a
qapi/crypto.json +1 -2
@@ -429,8 +429,7 @@ ## # @SecretProperties: -# -# Properties for secret objects. +# Properties for secret objects. # # Either @data or @file must be provided, but not both. #
qapi/machine.json +4 -7
@@ -690,9 +690,8 @@ ## # @NumaHmatLBOptions: -# -# Set the system locality latency and bandwidth information between -# Initiator and Target proximity Domains. +# Set the system locality latency and bandwidth information +# between Initiator and Target proximity Domains. # # For more information about `NumaHmatLBOptions`, see chapter # 5.2.27.4: Table 5-146 of ACPI 6.3 spec.
@@ -766,8 +765,7 @@ ## # @NumaHmatCacheOptions: -# -# Set the memory side cache information for a given memory domain. +# Set the memory side cache information for a given memory domain. # # For more information of `NumaHmatCacheOptions`, see chapter # 5.2.27.5: Table 5-147: Field "Cache Attributes" of ACPI 6.3 spec.
@@ -932,8 +930,7 @@ ## # @CpuInstanceProperties: -# -# Properties identifying a CPU. +# Properties identifying a CPU. # # Which members are optional and which mandatory depends on the # architecture and board.
qapi/net.json +15 -19
@@ -719,11 +719,10 @@ ## # @NetdevVhostVDPAOptions: +# Vhost-vdpa network backend # -# Vhost-vdpa network backend -# -# vDPA device is a device that uses a datapath which complies with the -# virtio specifications with a vendor specific control path. +# vDPA device is a device that uses a datapath which complies with +# the virtio specifications with a vendor specific control path. # # @vhostdev: path of vhost-vdpa device (default:'/dev/vhost-vdpa-0') #
@@ -750,11 +749,10 @@ ## # @NetdevVmnetHostOptions: +# vmnet (host mode) network backend. # -# vmnet (host mode) network backend. -# -# Allows the vmnet interface to communicate with other vmnet -# interfaces that are in host mode and also with the host. +# Allows the vmnet interface to communicate with other vmnet +# interfaces that are in host mode and also with the host. # # @start-address: The starting IPv4 address to use for the interface. # Must be in the private IP range (RFC 1918). Must be specified
@@ -793,15 +791,14 @@ ## # @NetdevVmnetSharedOptions: +# vmnet (shared mode) network backend. # -# vmnet (shared mode) network backend. -# -# Allows traffic originating from the vmnet interface to reach the -# Internet through a network address translator (NAT). The vmnet -# interface can communicate with the host and with other shared mode -# interfaces on the same subnet. If no DHCP settings, subnet mask and -# IPv6 prefix specified, the interface can communicate with any of -# other interfaces in shared mode. +# Allows traffic originating from the vmnet interface to reach the +# Internet through a network address translator (NAT). The vmnet +# interface can communicate with the host and with other shared +# mode interfaces on the same subnet. If no DHCP settings, subnet +# mask and IPv6 prefix specified, the interface can communicate +# with any of other interfaces in shared mode. # # @start-address: The starting IPv4 address to use for the interface. # Must be in the private IP range (RFC 1918). Must be specified
@@ -838,10 +835,9 @@ ## # @NetdevVmnetBridgedOptions: +# vmnet (bridged mode) network backend. # -# vmnet (bridged mode) network backend. -# -# Bridges the vmnet interface with a physical network interface. +# Bridges the vmnet interface with a physical network interface. # # @ifname: The name of the physical interface to be bridged. #
qapi/qom.json +3 -6
@@ -465,8 +465,7 @@ ## # @FilterRedirectorProperties: -# -# Properties for filter-redirector objects. +# Properties for filter-redirector objects. # # At least one of @indev or @outdev must be present. If both are # present, they must not refer to the same character device backend.
@@ -765,8 +764,7 @@ ## # @MemoryBackendShmProperties: -# -# Properties for memory-backend-shm objects. +# Properties for memory-backend-shm objects. # # This memory backend supports only shared memory, which is the # default.
@@ -780,8 +778,7 @@ ## # @MemoryBackendEpcProperties: -# -# Properties for memory-backend-epc objects. +# Properties for memory-backend-epc objects. # # The @merge boolean option is false by default with epc #
Signature · 1 line
2.55.0
PATCH v3 6/10 qapi: convert/split intros for commands
In reply to John SnowConvert or split apart the existing intro for any remaining commands in the QAPI schema into introduction and details sections. The introduction is indented, remaining plaintext/details paragraphs are not.
For commands that have automatically generated documentation inserted at parse time, these new split points serve as the new insertion point. This affects the rendered documentation for netdev_add in particular, whose arguments descriptions are pushed upwards.
Minor rephrasings are applied for query-qmp-schema to help the split flow better in rendered documentation.
--- qapi/control.json | 3 +-- qapi/introspect.json | 16 ++++++++-------- qapi/machine.json | 31 +++++++++++++++---------------- qapi/migration.json | 12 +++++------- qapi/misc-arm.json | 5 ++--- qapi/misc.json | 8 +++----- qapi/net.json | 3 +-- qapi/qdev.json | 9 ++++----- qapi/stats.json | 5 ++--- qapi/transaction.json | 7 +++---- qapi/ui.json | 3 +-- 11 files changed, 45 insertions(+), 57 deletions(-)
qapi/control.json +1 -2
@@ -152,8 +152,7 @@ ## # @quit: -# -# Request graceful QEMU process termination. +# Request graceful QEMU process termination. # # While every attempt is made to send the QMP response before # terminating, this is not guaranteed. When using this interface, a
qapi/introspect.json +8 -8
@@ -17,15 +17,15 @@ ## # @query-qmp-schema: +# Command `query-qmp-schema` exposes the QMP wire ABI as an array +# of `SchemaInfo`. This lets QMP clients figure out what commands +# and events are available in this QEMU, and their parameters and +# results. # -# Command `query-qmp-schema` exposes the QMP wire ABI as an array of -# `SchemaInfo`. This lets QMP clients figure out what commands and -# events are available in this QEMU, and their parameters and results. -# -# However, the `SchemaInfo` can't reflect all the rules and -# restrictions that apply to QMP. It's interface introspection -# (figuring out what's there), not interface specification. The -# specification is in the QAPI schema. +# The `SchemaInfo` can't reflect all the rules and restrictions that +# apply to QMP. It's interface introspection (figuring out what's +# there), not interface specification. The specification is in the +# QAPI schema. # # Furthermore, while we strive to keep the QMP wire format # backwards-compatible across QEMU versions, the introspection output
qapi/machine.json +15 -16
@@ -2007,13 +2007,13 @@ ## # @query-cpu-model-comparison: +# Compares two CPU models, @modela and @modelb, returning how they +# compare in a specific configuration. # -# Compares two CPU models, @modela and @modelb, returning how they -# compare in a specific configuration. The results indicates how both -# models compare regarding runnability. This result can be used by -# tooling to make decisions if a certain CPU model will run in a -# certain configuration or if a compatible CPU model has to be created -# by baselining. +# The results indicates how both models compare regarding runnability. +# This result can be used by tooling to make decisions if a certain +# CPU model will run in a certain configuration or if a compatible CPU +# model has to be created by baselining. # # Usually, a CPU model is compared against the maximum possible CPU # model of a certain configuration (e.g. the "host" model for KVM).
@@ -2063,11 +2063,10 @@ ## # @query-cpu-model-baseline: -# -# Baseline two CPU models, @modela and @modelb, creating a compatible -# third model. The created model will always be a static, -# migration-safe CPU model (see "static" CPU model expansion for -# details). +# Baseline two CPU models, @modela and @modelb, creating a +# compatible third model. The created model will always be a +# static, migration-safe CPU model (see "static" CPU model +# expansion for details). # # This interface can be used by tooling to create a compatible CPU # model out two CPU models. The created CPU model will be identical
@@ -2135,11 +2134,11 @@ ## # @query-cpu-model-expansion: -# -# Expands a given CPU model, @model, (or a combination of CPU model + -# additional options) to different granularities, specified by @type, -# allowing tooling to get an understanding what a specific CPU model -# looks like in QEMU under a certain configuration. +# Expands a given CPU model, @model, (or a combination of CPU +# model + additional options) to different granularities, +# specified by @type, allowing tooling to get an understanding +# what a specific CPU model looks like in QEMU under a certain +# configuration. # # This interface can be used to query the "host" CPU model. #
qapi/migration.json +5 -7
@@ -1826,9 +1826,9 @@ ## # @calc-dirty-rate: -# -# Start measuring dirty page rate of the VM. Results can be retrieved -# with `query-dirty-rate` after measurements are completed. +# Start measuring dirty page rate of the VM. Results can be +# retrieved with `query-dirty-rate` after measurements are +# completed. # # Dirty page rate is the number of pages changed in a given time # period expressed in MiB/s. The following methods of calculation are
@@ -1945,8 +1945,7 @@ ## # @set-vcpu-dirty-limit: -# -# Set the upper limit of dirty page rate for virtual CPUs. +# Set the upper limit of dirty page rate for virtual CPUs. # # Requires KVM with accelerator property "dirty-ring-size" set. A # virtual CPU's dirty page rate is a measure of its memory load. To
@@ -1971,8 +1970,7 @@ ## # @cancel-vcpu-dirty-limit: -# -# Cancel the upper limit of dirty page rate for virtual CPUs. +# Cancel the upper limit of dirty page rate for virtual CPUs. # # Cancel the dirty page limit for the vCPU which has been set with # `set-vcpu-dirty-limit` command. Note that this command requires
qapi/misc-arm.json +2 -3
@@ -28,9 +28,8 @@ ## # @query-gic-capabilities: -# -# It will return a list of `GICCapability` objects that describe its -# capability bits. +# It will return a list of `GICCapability` objects that describe +# its capability bits. # # On non-ARM targets this command will report an error as the GIC # technology is not applicable.
qapi/misc.json +3 -5
@@ -12,9 +12,8 @@ ## # @add_client: -# -# Allow client connections for VNC, Spice and socket based character -# devices to be passed in to QEMU via SCM_RIGHTS. +# Allow client connections for VNC, Spice and socket based +# character devices to be passed in to QEMU via SCM_RIGHTS. # # If the FD associated with @fdname is not a socket, the command will # fail and the FD will be closed.
@@ -185,8 +184,7 @@ ## # @x-exit-preconfig: -# -# Exit from "preconfig" state +# Exit from "preconfig" state # # This command makes QEMU exit the preconfig state and proceed with VM # initialization using configuration data provided on the command line
qapi/net.json +1 -2
@@ -37,8 +37,7 @@ ## # @netdev_add: -# -# Add a network backend. +# Add a network backend. # # Additional arguments depend on the type. #
qapi/qdev.json +4 -5
@@ -162,11 +162,10 @@ ## # @device-sync-config: -# -# Synchronize device configuration from host to guest part. First, -# copy the configuration from the host part (backend) to the guest -# part (frontend). Then notify guest software that device -# configuration changed. +# Synchronize device configuration from host to guest part. +# First, copy the configuration from the host part (backend) to +# the guest part (frontend). Then notify guest software that +# device configuration changed. # # The command may be used to notify the guest about block device # capacity change. Currently only vhost-user-blk device supports
qapi/stats.json +2 -3
@@ -175,9 +175,8 @@ ## # @query-stats: -# -# Return runtime-collected statistics for objects such as the VM or -# its vCPUs. +# Return runtime-collected statistics for objects such as the VM +# or its vCPUs. # # The arguments are a `StatsFilter` and specify the provider and # objects to return statistics about.
qapi/transaction.json +3 -4
@@ -197,10 +197,9 @@ ## # @transaction: -# -# Executes a number of transactionable QMP commands atomically. If -# any operation fails, then the entire set of actions will be -# abandoned and the appropriate error returned. +# Executes a number of transactionable QMP commands atomically. +# If any operation fails, then the entire set of actions will be +# abandoned and the appropriate error returned. # # For external snapshots, the dictionary contains the device, the file # to use for the new snapshot, and the format. The default format, if
qapi/ui.json +1 -2
@@ -1198,8 +1198,7 @@ ## # @input-send-event: -# -# Send input event(s) to guest. +# Send input event(s) to guest. # # The @device and @head parameters can be used to send the input event # to specific input devices in case (a) multiple input devices of the
Signature · 1 line
2.55.0
PATCH v3 7/10 qapi: convert/split intros for enums
In reply to John Snow--- qapi/machine.json | 22 ++++++++++------------ qapi/ui.json | 5 ++--- 2 files changed, 12 insertions(+), 15 deletions(-)
qapi/machine.json +10 -12
@@ -641,9 +641,9 @@ ## # @HmatLBMemoryHierarchy: -# -# The memory hierarchy in the System Locality Latency and Bandwidth -# Information Structure of HMAT (Heterogeneous Memory Attribute Table) +# The memory hierarchy in the System Locality Latency and +# Bandwidth Information Structure of HMAT (Heterogeneous Memory +# Attribute Table) # # For more information about `HmatLBMemoryHierarchy`, see chapter # 5.2.27.4: Table 5-146: Field "Flags" of ACPI 6.3 spec.
@@ -663,9 +663,9 @@ ## # @HmatLBDataType: -# -# Data type in the System Locality Latency and Bandwidth Information -# Structure of HMAT (Heterogeneous Memory Attribute Table) +# Data type in the System Locality Latency and Bandwidth +# Information Structure of HMAT (Heterogeneous Memory Attribute +# Table) # # For more information about `HmatLBDataType`, see chapter 5.2.27.4: # Table 5-146: Field "Data Type" of ACPI 6.3 spec.
@@ -726,9 +726,8 @@ ## # @HmatCacheAssociativity: -# -# Cache associativity in the Memory Side Cache Information Structure -# of HMAT +# Cache associativity in the Memory Side Cache Information +# Structure of HMAT # # For more information of `HmatCacheAssociativity`, see chapter # 5.2.27.5: Table 5-147 of ACPI 6.3 spec.
@@ -747,9 +746,8 @@ ## # @HmatCacheWritePolicy: -# -# Cache write policy in the Memory Side Cache Information Structure of -# HMAT +# Cache write policy in the Memory Side Cache Information +# Structure of HMAT # # For more information of `HmatCacheWritePolicy`, see chapter # 5.2.27.5: Table 5-147: Field "Cache Attributes" of ACPI 6.3 spec.
qapi/ui.json +2 -3
@@ -814,10 +814,9 @@ ## # @QKeyCode: +# An enumeration of key name. # -# An enumeration of key name. -# -# This is used by the `send-key` command. +# This is used by the `send-key` command. # # @unmapped: since 2.0 #
Signature · 1 line
2.55.0
PATCH v3 3/10 qapi: convert/split intros for block commands
In reply to John SnowConvert, or split off, intro sections for commands defined in block.json and block-export.json. In general, this does not currently impact the way these commands are rendered, except:
1. blockdev-open-tray and blockdev-close-tray see their opening paragraphs split apart, which is reflected in the rendered output, and
2. block_set_io_throttle and nbd-server-add see their argument definitions move up to just below the formalized introductory section.
--- qapi/block-export.json | 3 +-- qapi/block.json | 33 ++++++++++++++++----------------- 2 files changed, 17 insertions(+), 19 deletions(-)
qapi/block-export.json +1 -2
@@ -235,8 +235,7 @@ ## # @nbd-server-add: -# -# Export a block node to QEMU's embedded NBD server. +# Export a block node to QEMU's embedded NBD server. # # The export name will be used as the id for the resulting block # export.
qapi/block.json +16 -17
@@ -128,11 +128,12 @@ ## # @blockdev-open-tray: +# Opens a block device's tray. # -# Opens a block device's tray. If there is a block driver state tree -# inserted as a medium, it will become inaccessible to the guest (but -# it will remain associated to the block device, so closing the tray -# will make it accessible again). +# If there is a block driver state tree inserted as a medium, it will +# become inaccessible to the guest (but it will remain associated to +# the block device, so closing the tray will make it accessible +# again). # # If the tray was already open before, this will be a no-op. #
@@ -181,10 +182,11 @@ ## # @blockdev-close-tray: +# Closes a block device's tray. # -# Closes a block device's tray. If there is a block driver state tree -# associated with the block device (which is currently ejected), that -# tree will be loaded as the medium. +# If there is a block driver state tree associated with the block +# device (which is currently ejected), that tree will be loaded as the +# medium. # # If the tray was already closed before, this will be a no-op. #
@@ -218,13 +220,12 @@ ## # @blockdev-remove-medium: +# Removes a medium (a block driver state tree) from a block +# device. That block device's tray must currently be open +# (unless there is no attached guest device). # -# Removes a medium (a block driver state tree) from a block device. -# That block device's tray must currently be open (unless there is no -# attached guest device). -# -# If the tray is open and there is no medium inserted, this will be a -# no-op. +# If the tray is open and there is no medium inserted, this will +# be a no-op. # # @id: The name or QOM path of the guest device #
@@ -429,8 +430,7 @@ ## # @block_set_io_throttle: -# -# Change I/O throttle limits for a block drive. +# Change I/O throttle limits for a block drive. # # Since QEMU 2.4, each device with I/O limits is member of a throttle # group.
@@ -504,8 +504,7 @@ ## # @block-latency-histogram-set: -# -# Manage read, write and flush latency histograms for the device. +# Manage read, write and flush latency histograms for the device. # # If only @id parameter is specified, remove all present latency # histograms for the device. Otherwise, add/reset some of (or all)
Signature · 1 line
2.55.0
PATCH v3 4/10 qapi: convert/split intros for job.json commands
In reply to John SnowConvert or split apart the existing intro for commands in job.json into introduction and details sections. The introduction is indented, remaining plaintext/details paragraphs are not.
@job-dismiss has its text split apart a little more aggressively to help the documentation read more smoothly in the rendered version.
--- qapi/job.json | 42 +++++++++++++++++++----------------------- 1 file changed, 19 insertions(+), 23 deletions(-)
qapi/job.json +19 -23
@@ -128,8 +128,7 @@ ## # @job-pause: -# -# Pause an active job. +# Pause an active job. # # This command returns immediately after marking the active job for # pausing. Pausing an already paused job is an error.
@@ -148,8 +147,7 @@ ## # @job-resume: -# -# Resume a paused job. +# Resume a paused job. # # This command returns immediately after resuming a paused job. # Resuming an already running job is an error.
@@ -165,10 +163,9 @@ ## # @job-cancel: -# -# Instruct an active background job to cancel at the next opportunity. -# This command returns immediately after marking the active job for -# cancellation. +# Instruct an active background job to cancel at the next +# opportunity. This command returns immediately after marking the +# active job for cancellation. # # The job will cancel as soon as possible and then emit a # `JOB_STATUS_CHANGE` event. Usually, the status will change to
@@ -184,9 +181,9 @@ ## # @job-complete: -# -# Manually trigger completion of an active job in the READY or STANDBY -# state. Completing the job in any other state is an error. +# Manually trigger completion of an active job in the READY or +# STANDBY state. Completing the job in any other state is an +# error. # # This is supported only for drive mirroring, where it also switches # the device to write to the target path only. Note that drive
@@ -211,14 +208,14 @@ ## # @job-dismiss: +# Deletes a job that is in the CONCLUDED state. # -# Deletes a job that is in the CONCLUDED state. This command only -# needs to be run explicitly for jobs that don't have automatic -# dismiss enabled. In turn, automatic dismiss may be enabled only for -# jobs that have @auto-dismiss option, which are `drive-backup`, -# `blockdev-backup`, `drive-mirror`, `blockdev-mirror`, `block-commit` -# and `block-stream`. @auto-dismiss is enabled by default for these -# jobs. +# This command only needs to be run explicitly for jobs that don't +# have automatic dismiss enabled. In turn, automatic dismiss may be +# enabled only for jobs that have @auto-dismiss option, which are +# `drive-backup`, `blockdev-backup`, `drive-mirror`, +# `blockdev-mirror`, `block-commit` and `block-stream`. @auto-dismiss +# is enabled by default for these jobs. # # This command will refuse to operate on any job that has not yet # reached its terminal state, CONCLUDED. For jobs that make use of
@@ -233,11 +230,10 @@ ## # @job-finalize: -# -# Instructs all jobs in a transaction (or a single job if it is not -# part of any transaction) to finalize any graph changes and do any -# necessary cleanup. This command requires that all involved jobs are -# in the PENDING state. +# Instructs all jobs in a transaction (or a single job if it is +# not part of any transaction) to finalize any graph changes and +# do any necessary cleanup. This command requires that all +# involved jobs are in the PENDING state. # # For jobs in a transaction, instructing one job to finalize will # force ALL jobs in the transaction to finalize, so it is only
Signature · 1 line
2.55.0
PATCH v3 8/10 qapi: split intro sections for events
In reply to John Snow--- qapi/machine-s390x.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
qapi/machine-s390x.json +1 -2
@@ -57,8 +57,7 @@ ## # @CPU_POLARIZATION_CHANGE: -# -# Emitted when the guest asks to change the polarization. +# Emitted when the guest asks to change the polarization. # # The guest can tell the host (via the PTF instruction) whether the # CPUs should be provisioned using horizontal or vertical
Signature · 1 line
2.55.0
PATCH v3 2/10 qapi: convert/split intros for block-core.json commands
In reply to John SnowConvert, or split off, intro sections for commands defined in block-core.json. In general, this does not currently impact the way these commands are rendered, except:
1. blockdev-reopen sees its arguments shit up to just below the formalized introductory section.
--- qapi/block-core.json | 126 +++++++++++++++++++------------------------ 1 file changed, 55 insertions(+), 71 deletions(-)
qapi/block-core.json +55 -71
@@ -1556,8 +1556,7 @@ ## # @block_resize: -# -# Resize a block image while a guest is running. +# Resize a block image while a guest is running. # # Either @device or @node-name must be set but not both. #
@@ -1812,13 +1811,12 @@ ## # @blockdev-snapshot: +# Takes a snapshot of a block device. # -# Takes a snapshot of a block device. -# -# Take a snapshot, by installing 'node' as the backing image of -# 'overlay'. Additionally, if 'node' is associated with a block -# device, the block device changes to using 'overlay' as its new -# active image. +# Take a snapshot, by installing 'node' as the backing image of +# 'overlay'. Additionally, if 'node' is associated with a block +# device, the block device changes to using 'overlay' as its new +# active image. # # Features: #
@@ -1883,9 +1881,8 @@ ## # @block-commit: -# -# Live commit of data from overlay image nodes into backing nodes - -# i.e., writes data between 'top' and 'base' into 'base'. +# Live commit of data from overlay image nodes into backing nodes +# - i.e., writes data between 'top' and 'base' into 'base'. # # If top == base, that is an error. If top has no overlays on top of # it, or if it is in use by a writer, the job will not be completed by
@@ -2510,16 +2507,15 @@ ## # @block-dirty-bitmap-merge: +# Merge dirty bitmaps listed in @bitmaps to the @target dirty +# bitmap. Dirty bitmaps in @bitmaps will be unchanged, except if +# it also appears as the @target bitmap. Any bits already set in +# @target will still be set after the merge, i.e., this operation +# does not clear the target. On error, @target is unchanged. # -# Merge dirty bitmaps listed in @bitmaps to the @target dirty bitmap. -# Dirty bitmaps in @bitmaps will be unchanged, except if it also -# appears as the @target bitmap. Any bits already set in @target will -# still be set after the merge, i.e., this operation does not clear -# the target. On error, @target is unchanged. -# -# The resulting bitmap will count as dirty any clusters that were -# dirty in any of the source bitmaps. This can be used to achieve -# backup checkpoints, or in simpler usages, to copy bitmaps. +# The resulting bitmap will count as dirty any clusters that were +# dirty in any of the source bitmaps. This can be used to achieve +# backup checkpoints, or in simpler usages, to copy bitmaps. # # Errors: # - If @node is not a valid block device, DeviceNotFound
@@ -2865,8 +2861,7 @@ ## # @block-stream: -# -# Copy data from a backing file into a block device. +# Copy data from a backing file into a block device. # # The block streaming operation is performed in the background until # the entire backing file has been copied. This command returns
@@ -2977,8 +2972,7 @@ ## # @block-job-set-speed: -# -# Set maximum speed for a background block operation. +# Set maximum speed for a background block operation. # # This command can only be issued when there is an active block job. #
@@ -3003,8 +2997,7 @@ ## # @block-job-cancel: -# -# Stop an active background block operation. +# Stop an active background block operation. # # This command returns immediately after marking the active background # block operation for cancellation. It is an error to call this
@@ -3046,8 +3039,7 @@ ## # @block-job-pause: -# -# Pause an active background block operation. +# Pause an active background block operation. # # This command returns immediately after marking the active job for # pausing. Pausing an already paused job is an error.
@@ -3079,8 +3071,7 @@ ## # @block-job-resume: -# -# Resume an active background block operation. +# Resume an active background block operation. # # This command returns immediately after resuming a paused job. # Resuming an already running job is an error.
@@ -3108,9 +3099,9 @@ ## # @block-job-complete: -# -# Manually trigger completion of an active job in the READY or STANDBY -# state. Completing the job in any other state is an error. +# Manually trigger completion of an active job in the READY or +# STANDBY state. Completing the job in any other state is an +# error. # # This is supported only for drive mirroring, where it also switches # the device to write to the target path only. Note that drive
@@ -3148,14 +3139,13 @@ ## # @block-job-dismiss: -# -# Deletes a job that is in the CONCLUDED state. This command only -# needs to be run explicitly for jobs that don't have automatic -# dismiss enabled. In turn, automatic dismiss may be enabled only for -# jobs that have @auto-dismiss option, which are `drive-backup`, -# `blockdev-backup`, `drive-mirror`, `blockdev-mirror`, `block-commit` -# and `block-stream`. @auto-dismiss is enabled by default for these -# jobs. +# Deletes a job that is in the CONCLUDED state. This command only +# needs to be run explicitly for jobs that don't have automatic +# dismiss enabled. In turn, automatic dismiss may be enabled only +# for jobs that have @auto-dismiss option, which are +# `drive-backup`, `blockdev-backup`, `drive-mirror`, +# `blockdev-mirror`, `block-commit` and `block-stream`. +# @auto-dismiss is enabled by default for these jobs. # # This command will refuse to operate on any job that has not yet # reached its terminal state, CONCLUDED. For jobs that make use of
@@ -3177,11 +3167,10 @@ ## # @block-job-finalize: -# -# Instructs all jobs in a transaction (or a single job if it is not -# part of any transaction) to finalize any graph changes and do any -# necessary cleanup. This command requires that all involved jobs are -# in the PENDING state. +# Instructs all jobs in a transaction (or a single job if it is +# not part of any transaction) to finalize any graph changes and +# do any necessary cleanup. This command requires that all +# involved jobs are in the PENDING state. # # For jobs in a transaction, instructing one job to finalize will # force ALL jobs in the transaction to finalize, so it is only
@@ -4917,14 +4906,13 @@ ## # @blockdev-reopen: -# -# Reopens one or more block devices using the given set of options. -# Any option not specified will be reset to its default value -# regardless of its previous status. If an option cannot be changed -# or a particular driver does not support reopening then the command -# will return an error. All devices in the list are reopened in one -# transaction, so if one of them fails then the whole transaction is -# cancelled. +# Reopens one or more block devices using the given set of +# options. Any option not specified will be reset to its default +# value regardless of its previous status. If an option cannot be +# changed or a particular driver does not support reopening then +# the command will return an error. All devices in the list are +# reopened in one transaction, so if one of them fails then the +# whole transaction is cancelled. # # The command receives a list of block devices to reopen. For each # one of them, the top-level @node-name option (from
@@ -4996,9 +4984,8 @@ ## # @blockdev-set-active: -# -# Activate or deactivate a block device. Use this to manage the -# handover of block devices on migration with qemu-storage-daemon. +# Activate or deactivate a block device. Use this to manage the +# handover of block devices on migration with qemu-storage-daemon. # # Activating a node automatically activates all of its child nodes # first. Deactivating a node automatically deactivates any of its
@@ -5881,15 +5868,14 @@ ## # @block-set-write-threshold: +# Change the write threshold for a block drive. An event will be +# delivered if a write to this block drive crosses the configured +# threshold. The threshold is an offset, thus must be +# non-negative. Default is no write threshold. Setting the +# threshold to zero disables it. # -# Change the write threshold for a block drive. An event will be -# delivered if a write to this block drive crosses the configured -# threshold. The threshold is an offset, thus must be non-negative. -# Default is no write threshold. Setting the threshold to zero -# disables it. -# -# This is useful to transparently resize thin-provisioned drives -# without the guest OS noticing. +# This is useful to transparently resize thin-provisioned drives +# without the guest OS noticing. # # @node-name: graph node name on which the threshold must be set. #
@@ -5911,8 +5897,7 @@ ## # @x-blockdev-change: -# -# Dynamically reconfigure the block driver state graph. +# Dynamically reconfigure the block driver state graph. # # Currently only supports adding and deleting quorum children. A # child will be added at the end of the list of children. Its
@@ -5971,11 +5956,10 @@ ## # @x-blockdev-set-iothread: +# Move @node and its children into the @iothread. If @iothread is +# null then move @node and its children into the main loop. # -# Move @node and its children into the @iothread. If @iothread is -# null then move @node and its children into the main loop. -# -# The node must not be attached to a BlockBackend. +# The node must not be attached to a BlockBackend. # # @node-name: the name of the block driver node #
Signature · 1 line
2.55.0
PATCH v3 9/10 qapi: split intro sections for data structs
In reply to John SnowThe structs of concern in this patch are those for which no other QAPI definition (currently) uses as a data type to describe its own arguments or as a branch of a union: i.e. they are not currently eligible to be inlined and as such the precise semantics of their intro/details split is *currently* of less concern.
Of course, they could be inlined in the future, so the semantics of this split are still worth investigating.
--- qapi/acpi.json | 3 +-- qapi/block-core.json | 5 ++--- qapi/compat.json | 5 ++--- qapi/machine.json | 9 ++++----- 4 files changed, 9 insertions(+), 13 deletions(-)
qapi/acpi.json +1 -2
@@ -13,8 +13,7 @@ ## # @AcpiTableOptions: -# -# Specify an ACPI table on the command line to load. +# Specify an ACPI table on the command line to load. # # At most one of @file and @data can be specified. The list of files # specified by any one of them is loaded and concatenated in order.
qapi/block-core.json +2 -3
@@ -843,9 +843,8 @@ ## # @BlockMeasureInfo: -# -# Image file size calculation information. This structure describes -# the size requirements for creating a new image file. +# Image file size calculation information. This structure +# describes the size requirements for creating a new image file. # # The size requirements depend on the new image file format. File # size always equals virtual disk size for the 'raw' format, even for
qapi/compat.json +2 -3
@@ -53,10 +53,9 @@ ## # @CompatPolicy: +# Policy for handling deprecated management interfaces. # -# Policy for handling deprecated management interfaces. -# -# This is intended for testing users of the management interfaces. +# This is intended for testing users of the management interfaces. # # Limitation: covers only syntactic aspects of QMP, i.e. stuff tagged # with feature 'deprecated' or 'unstable'. We may want to extend it
qapi/machine.json +4 -5
@@ -1634,9 +1634,9 @@ ## # @SMPConfiguration: -# -# Schema for CPU topology configuration. A missing value lets QEMU -# figure out a suitable value based on the ones that are provided. +# Schema for CPU topology configuration. A missing value lets +# QEMU figure out a suitable value based on the ones that are +# provided. # # The members other than @cpus and @maxcpus define a topology of # containers.
@@ -1895,8 +1895,7 @@ ## # @CpuModelInfo: -# -# Virtual CPU model. +# Virtual CPU model. # # A CPU model consists of the name of a CPU definition, to which delta # changes are applied (e.g. features added/removed). Most magic
Signature · 1 line
2.55.0
Re: [PATCH v3 02/10] qapi: convert/split intros for block-core.json commands
In reply to John SnowQuoted 2 lines · John Snow
Convert, or split off, intro sections for commands defined in block-core.json. In general, this does not currently impact the way
Suggest to scratch "In general".
Quoted 3 lines
these commands are rendered, except:
1. blockdev-reopen sees its arguments shit up to just below the
I trust you meant "shift" ;)
Quoted 3 lines
formalized introductory section.
Signed-off-by John Snow <[email protected]>
Happy to adjust commit messages without a respin.
Re: [PATCH v3 03/10] qapi: convert/split intros for block commands
In reply to John SnowQuoted 2 lines · John Snow
Convert, or split off, intro sections for commands defined in block.json and block-export.json. In general, this does not currently
Suggest to scratch "In general".
Quoted 11 lines
impact the way these commands are rendered, except:
1. blockdev-open-tray and blockdev-close-tray see their opening paragraphs split apart, which is reflected in the rendered output, and
2.
block_set_io_throttleand nbd-server-add see their argument definitions move up to just below the formalized introductory section.Signed-off-by John Snow <[email protected]>
Re: [PATCH v3 06/10] qapi: convert/split intros for commands
In reply to John SnowQuoted 9 lines · John Snow
Convert or split apart the existing intro for any remaining commands in the QAPI schema into introduction and details sections. The introduction is indented, remaining plaintext/details paragraphs are not.
For commands that have automatically generated documentation inserted at parse time, these new split points serve as the new insertion point. This affects the rendered documentation for
netdev_addin particular, whose arguments descriptions are pushed upwards.
Missing: query-stats arguments and query-gic-capabilities "Return:" move up.
Quoted 5 lines
Minor rephrasings are applied for
query-qmp-schemato help the split flow better in rendered documentation.Signed-off-by John Snow <[email protected]>
Happy to adjust commit messages without a respin.
Re: [PATCH v3 10/10] qapi: split intro sections for inlinable structs
In reply to John SnowQuoted 9 lines · John Snow
This patch splits the intro/details section for structs which are used in an inlinable context; i.e. structs used either as arguments for a command/event, or used as a branch of a union. The QAPI documentation block for these entities will have their intro section left behind when inlined into other contexts, but will still display the intro section on standalone documentation for these types.
In general, this patch does not change how the rendered documentation currently looks, except:
Suggest to scratch "In general".
Quoted 5 lines
1. MemoryBackendShmProperties and MemoryBackendEpcProperties see their member descriptions move upwards to just below their formalized introductory sections.
Signed-off-by John Snow <[email protected]>
Happy to adjust commit messages without a respin.
I suggested a couple of commit message improvements. Happy to make the ones you like without a respin.
Series
Re: [PATCH v3 02/10] qapi: convert/split intros for block-core.json commands
In reply to Markus ArmbrusterQuoted 5 lines · Markus Armbruster
Quoted 2 lines · John Snow
Convert, or split off, intro sections for commands defined in block-core.json. In general, this does not currently impact the way
Quoted 8 lines
Suggest to scratch "In general".
Quoted 3 lines
these commands are rendered, except:
1. blockdev-reopen sees its arguments shit up to just below the
I trust you meant "shift" ;)
oh my god
Quoted 6 lines
Quoted 3 lines
formalized introductory section.
Signed-off-by John Snow <[email protected]>Happy to adjust commit messages without a respin.
ACK, yes please ...
Quoted 1 line
Re: [PATCH v3 03/10] qapi: convert/split intros for block commands
In reply to Markus ArmbrusterQuoted 7 lines · Markus Armbruster
Quoted 2 lines · John Snow
Convert, or split off, intro sections for commands defined in block.json and block-export.json. In general, this does not currently
Suggest to scratch "In general".
ACK
Quoted 13 lines
Quoted 11 lines
impact the way these commands are rendered, except:
1. blockdev-open-tray and blockdev-close-tray see their opening paragraphs split apart, which is reflected in the rendered output, and
2.
block_set_io_throttleand nbd-server-add see their argument definitions move up to just below the formalized introductory section.Signed-off-by John Snow <[email protected]>
Re: [PATCH v3 10/10] qapi: split intro sections for inlinable structs
In reply to Markus ArmbrusterQuoted 9 lines · Markus Armbruster
Quoted 7 lines · John Snow
This patch splits the intro/details section for structs which are used in an inlinable context; i.e. structs used either as arguments for a command/event, or used as a branch of a union. The QAPI documentation block for these entities will have their intro section left behind when inlined into other contexts, but will still display the intro section on standalone documentation for these types.
Quoted 5 lines
Quoted 2 lines
In general, this patch does not change how the rendered documentation currently looks, except:
Suggest to scratch "In general".
ACK
Quoted 8 lines
Quoted 5 lines
1. MemoryBackendShmProperties and MemoryBackendEpcProperties see their member descriptions move upwards to just below their formalized introductory sections.
Signed-off-by John Snow <[email protected]>Happy to adjust commit messages without a respin.
Yes, please!
Quoted 1 line
Re: [PATCH v3 06/10] qapi: convert/split intros for commands
In reply to Markus ArmbrusterQuoted 7 lines · Markus Armbruster
Quoted 5 lines · John Snow
Convert or split apart the existing intro for any remaining commands in the QAPI schema into introduction and details sections. The introduction is indented, remaining plaintext/details paragraphs are not.
Quoted 8 lines
Quoted 4 lines
For commands that have automatically generated documentation inserted at parse time, these new split points serve as the new insertion point. This affects the rendered documentation for
netdev_addin particular, whose arguments descriptions are pushed upwards.Missing: query-stats arguments and query-gic-capabilities "Return:" move up.
d'oh.
Quoted 8 lines
Quoted 5 lines
Minor rephrasings are applied for
query-qmp-schemato help the split flow better in rendered documentation.Signed-off-by John Snow <[email protected]>Happy to adjust commit messages without a respin.
Yes please.