A QAPI schema doc markup fix, and style cleanup
v2 cover A QAPI schema doc markup fix, and style cleanup
Vladimir Sementsov-Ogievskiy recently posted
Subject: [PATCH v2 00/33] qapi: docs: width=70 and two spaces between sentences
Date: Sat, 11 Oct 2025 17:04:06 +0300
Message-ID: <[email protected]>His series refills doc comments to conform to the 70 width limit, tidies up spaces between sentences, and adds code to enforce both going forward.
In review, we agreed to only refill prose, not the examples, at least for now. Vladimir volunteered to adjust his validation code, accordingly. I volunteered to take care of the doc comment cleanup.
I decided redoing the cleanup would be less work than splitting. While doing so, I found a markup bug: PATCH 1. PATCH 2+4 are the cleanup. PATCH 3+5 additionally clean up blank lines.
Testing this with his validation code failed:docs/interop/firmware.json also needs the treatment, and docs/interop/vhost-user.json would if we bothered to test it. PATCH 6+7 take care of both. PATCH 8 adds proper markup to literal blocks, so that the validation code can skip them. PATCH 9 adds the missing test.
Vladimir's revised validation code is here:
Subject: [PATCH v5] qapi: Add documentation format validation
Date: Fri, 31 Oct 2025 21:31:29 +0300
Message-ID: <[email protected]>It builds fine when applied it on top of this series.
v2:
* Rebased
* [PATCH 1]: Commit message tidied up [Vladimir]
* [PATCH 6+7]: "Example" section conversion split off [Vladimir]
Markus Armbruster (9):
qapi/audio: Fix description markup of AudiodevDBusOptions @nsamples
qapi: Refill doc comments to conform to conventions
qapi: Clean up whitespace between definitions qga/qapi-schema: Refill doc comments to conform to conventions qga/qapi-schema: Clean up whitespace between definitions docs/interop: Refill QAPI doc comments to conform to conventions docs/interop/firmware: Belatedly convert "Example" section docs/interop/firmware: Literal block markup docs/interop: Add test to keep vhost-user.json sane
docs/interop/firmware.json | 454 +++++++++++++++++------------------ docs/interop/vhost-user.json | 59 +++-- docs/meson.build | 9 +- qapi/accelerator.json | 3 +- qapi/acpi-hest.json | 5 +- qapi/audio.json | 4 +- qapi/block-core.json | 158 ++++++------ qapi/block-export.json | 26 +- qapi/char.json | 1 - qapi/crypto.json | 8 +- qapi/cxl.json | 1 - qapi/introspect.json | 8 +- qapi/job.json | 30 +-- qapi/machine-common.json | 4 +- qapi/machine-s390x.json | 4 +- qapi/machine.json | 49 ++-- qapi/migration.json | 126 +++++----- qapi/misc-i386.json | 2 - qapi/net.json | 26 +- qapi/qdev.json | 4 +- qapi/qom.json | 47 ++-- qapi/run-state.json | 20 +- qapi/sockets.json | 30 +-- qapi/stats.json | 4 +- qapi/ui.json | 17 +- qapi/virtio.json | 6 +- qga/qapi-schema.json | 96 ++++---- 27 files changed, 623 insertions(+), 578 deletions(-)
Signature · 1 line
2.49.0
PATCH v2 1/9 qapi/audio: Fix description markup of AudiodevDBusOptions @nsamples
The description of Member @nsamples is indented incorrectly. Comes out like
Members:
[...]
nsamples (int, optional) – set the number of samples per read/write calls (default to 480,
10ms at 48kHz).
Fixing the indentation makes it come out like
Members:
[...]
nsamples (int, optional) – set the number of samples per read/write calls (default to 480, 10ms at 48kHz).
--- qapi/audio.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
qapi/audio.json +2 -2
@@ -76,8 +76,8 @@ # # @out: options of the playback stream # -# @nsamples: set the number of samples per read/write calls (default to 480, -# 10ms at 48kHz). +# @nsamples: set the number of samples per read/write calls +# (default to 480, 10ms at 48kHz). # # Since: 10.0 ##
Signature · 1 line
2.49.0
PATCH v2 2/9 qapi: Refill doc comments to conform to conventions
In reply to Markus ArmbrusterSweep the entire documentation again. Last done in commit 01bed0ff14b (qapi: Refill doc comments to conform to conventions).
To check the generated documentation does not change, I compared the generated HTML before and after this commit with "wdiff -3". Finds no differences. Comparing with diff is not useful, as the reflown paragraphs are visible there.
--- qapi/accelerator.json | 3 +- qapi/acpi-hest.json | 4 +- qapi/block-core.json | 158 ++++++++++++++++++++------------------- qapi/block-export.json | 26 ++++--- qapi/crypto.json | 7 +- qapi/introspect.json | 8 +- qapi/job.json | 30 ++++---- qapi/machine-common.json | 4 +- qapi/machine-s390x.json | 4 +- qapi/machine.json | 49 ++++++------ qapi/migration.json | 123 +++++++++++++++--------------- qapi/net.json | 23 +++--- qapi/qdev.json | 4 +- qapi/qom.json | 44 +++++------ qapi/run-state.json | 19 ++--- qapi/sockets.json | 30 ++++---- qapi/stats.json | 4 +- qapi/ui.json | 15 ++-- qapi/virtio.json | 4 +- 19 files changed, 293 insertions(+), 266 deletions(-)
qapi/accelerator.json +2 -1
@@ -87,7 +87,8 @@ # # @enabled: the accelerator that is in use # -# @present: the list of accelerators that are built into this executable +# @present: the list of accelerators that are built into this +# executable # # Since: 10.2.0 ##
qapi/acpi-hest.json +2 -2
@@ -5,8 +5,8 @@ ## # == GHESv2 CPER Error Injection # -# Defined since ACPI Specification 6.1, -# section 18.3.2.8 Generic Hardware Error Source version 2. See: +# Defined since ACPI Specification 6.1, section 18.3.2.8 Generic +# Hardware Error Source version 2. See: # # https://uefi.org/sites/default/files/resources/ACPI_6_1.pdf ##
qapi/block-core.json +82 -76
305 lines not on this page · raw message
qapi/block-export.json +14 -12
@@ -38,8 +38,8 @@ ## # @NbdServerOptions: # -# Keep this type consistent with the `NbdServerOptionsLegacy` type. The -# only intended difference is using `SocketAddress` instead of +# 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).
@@ -51,8 +51,8 @@ ## # @NbdServerOptionsLegacy: # -# Keep this type consistent with the `NbdServerOptions` type. The only -# intended difference is using `SocketAddressLegacy` instead of +# 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).
@@ -125,8 +125,8 @@ # A vhost-user-blk block export. # # @addr: The vhost-user socket on which to listen. Both 'unix' and -# 'fd' `SocketAddress` types are supported. Passed fds must be UNIX -# domain sockets. +# 'fd' `SocketAddress` types are supported. Passed fds must be +# UNIX domain sockets. # # @logical-block-size: Logical block size in bytes. Defaults to 512 # bytes.
@@ -373,11 +373,12 @@ # cannot be moved to the iothread. The default is false. # (since: 5.2) # -# @allow-inactive: If true, the export allows the exported node to be inactive. -# If it is created for an inactive block node, the node remains inactive. If -# the export type doesn't support running on an inactive node, an error is -# returned. If false, inactive block nodes are automatically activated before -# creating the export and trying to inactivate them later fails. +# @allow-inactive: If true, the export allows the exported node to be +# inactive. If it is created for an inactive block node, the node +# remains inactive. If the export type doesn't support running on +# an inactive node, an error is returned. If false, inactive +# block nodes are automatically activated before creating the +# export and trying to inactivate them later fails. # (since: 10.0; default: false) # # Since: 4.2
@@ -460,7 +461,8 @@ # @node-name: The node name of the block node that is exported # # @shutting-down: True if the export is shutting down (e.g. after a -# `block-export-del` command, but before the shutdown has completed) +# `block-export-del` command, but before the shutdown has +# completed) # # Since: 5.2 ##
qapi/crypto.json +4 -3
@@ -46,7 +46,8 @@ # # @md5: MD5. Should not be used in any new code, legacy compat only # -# @sha1: SHA-1. Should not be used in any new code, legacy compat only +# @sha1: SHA-1. Should not be used in any new code, legacy compat +# only # # @sha224: SHA-224. (since 2.7) #
@@ -377,8 +378,8 @@ # deactivate all keyslots that match password located in # QCryptoSecret with this ID # -# @iter-time: Optional (for activation only). Number of milliseconds to -# spend in PBKDF passphrase processing for the newly activated +# @iter-time: Optional (for activation only). Number of milliseconds +# to spend in PBKDF passphrase processing for the newly activated # keyslot. Currently defaults to 2000. # # @keyslot: Optional. ID of the keyslot to activate/deactivate. For
qapi/introspect.json +4 -4
@@ -22,10 +22,10 @@ # `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. +# 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. # # Furthermore, while we strive to keep the QMP wire format # backwards-compatible across QEMU versions, the introspection output
qapi/job.json +15 -15
@@ -194,16 +194,16 @@ # # This is supported only for drive mirroring, where it also switches # the device to write to the target path only. Note that drive -# mirroring includes `drive-mirror`, `blockdev-mirror` and `block-commit` -# job (only in case of "active commit", when the node being commited -# is used by the guest). The ability to complete is signaled with a -# `BLOCK_JOB_READY` event. +# mirroring includes `drive-mirror`, `blockdev-mirror` and +# `block-commit` job (only in case of "active commit", when the node +# being commited is used by the guest). The ability to complete is +# signaled with a `BLOCK_JOB_READY` event. # # This command completes an active background block operation # synchronously. The ordering of this command's return with the -# `BLOCK_JOB_COMPLETED` event is not defined. Note that if an I/O error -# occurs during the processing of this command: 1) the command itself -# will fail; 2) the error will be processed according to the +# `BLOCK_JOB_COMPLETED` event is not defined. Note that if an I/O +# error occurs during the processing of this command: 1) the command +# itself will fail; 2) the error will be processed according to the # rerror/werror arguments that were specified when starting the # operation. #
@@ -218,16 +218,16 @@ # # 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 +# 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 -# the JOB_READY event, `job-cancel` or `job-complete` will still need to -# be used as appropriate. +# the JOB_READY event, `job-cancel` or `job-complete` will still need +# to be used as appropriate. # # @id: The job identifier. #
@@ -247,8 +247,8 @@ # force ALL jobs in the transaction to finalize, so it is only # necessary to instruct a single member job to finalize. # -# The command is applicable only to jobs which have @auto-finalize option -# and only when this option is set to false. +# The command is applicable only to jobs which have @auto-finalize +# option and only when this option is set to false. # # @id: The identifier of any job in the transaction, or of a job that # is not part of any transaction.
qapi/machine-common.json +2 -2
@@ -87,8 +87,8 @@ # # Cache information for SMP system. # -# @cache: Cache name, which is the combination of cache level -# and cache type. +# @cache: Cache name, which is the combination of cache level and +# cache type. # # @topology: Cache topology level. It accepts the CPU topology # enumeration as the parameter, i.e., CPUs in the same
qapi/machine-s390x.json +2 -2
@@ -123,8 +123,8 @@ ## # @SCLP_CPI_INFO_AVAILABLE: # -# Emitted when the Control-Program Identification data is available -# in the QOM tree. +# Emitted when the Control-Program Identification data is available in +# the QOM tree. # # Features: #
qapi/machine.json +26 -23
127 lines not on this page · raw message
qapi/migration.json +64 -59
229 lines not on this page · raw message
qapi/net.json +14 -9
@@ -119,9 +119,11 @@ # # Unprivileged user-mode network connectivity using passt # -# @path: Filename of the passt program to run (by default 'passt', and use PATH) +# @path: Filename of the passt program to run (by default 'passt', and +# use PATH) # -# @quiet: don't print informational messages (default, passed as '--quiet') +# @quiet: don't print informational messages (default, passed as +# '--quiet') # # @vhost-user: enable vhost-user #
@@ -281,8 +283,8 @@ # # @smbserver: IP address of the built-in SMB server # -# @hostfwd: redirect incoming TCP, UDP or UNIX host connections to guest -# endpoints +# @hostfwd: redirect incoming TCP, UDP or UNIX host connections to +# guest endpoints # # @guestfwd: forward guest TCP connections #
@@ -569,7 +571,8 @@ # (default: 0). # # @inhibit: Don't load a default XDP program, use one already loaded -# to the interface (default: false). Requires @sock-fds or @map-path. +# to the interface (default: false). Requires @sock-fds or +# @map-path. # # @sock-fds: A colon (:) separated list of file descriptors for # already open but not bound AF_XDP sockets in the queue order.
@@ -582,7 +585,8 @@ # mutually exclusive. Requires @inhibit. (Since 10.1) # # @map-start-index: Use @map-path to insert xsk sockets starting from -# this index number (default: 0). Requires @map-path. (Since 10.1) +# this index number (default: 0). Requires @map-path. +# (Since 10.1) # # Since: 8.2 ##
@@ -770,9 +774,10 @@ # # @server: create server socket (default: false) # -# @reconnect-ms: For a client socket, if a socket is disconnected, then -# attempt a reconnect after the given number of milliseconds. Setting -# this to zero disables this function. (default: 0) (Since: 9.2) +# @reconnect-ms: For a client socket, if a socket is disconnected, +# then attempt a reconnect after the given number of milliseconds. +# Setting this to zero disables this function. +# (default: 0) (Since: 9.2) # # Only `SocketAddress` types 'unix', 'inet' and 'fd' are supported. #
qapi/qdev.json +2 -2
@@ -100,8 +100,8 @@ # process is signaled with a `DEVICE_DELETED` event. Guest reset # will automatically complete removal for all devices. If a # guest-side error in the hot removal process is detected, the -# device will not be removed and a `DEVICE_UNPLUG_GUEST_ERROR` event -# is sent. Some errors cannot be detected. +# device will not be removed and a `DEVICE_UNPLUG_GUEST_ERROR` +# event is sent. Some errors cannot be detected. # # Since: 0.14 #
qapi/qom.json +22 -22
83 lines not on this page · raw message
qapi/run-state.json +10 -9
@@ -247,8 +247,8 @@ # 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. +# .. note:: QEMU shuts down (similar to event `SHUTDOWN`) when +# entering this state. # # Since: 1.2 #
@@ -281,9 +281,9 @@ # # @action: action that has been taken # -# .. note:: If action is "reset", "shutdown", or "pause" the `WATCHDOG` -# event is followed respectively by the `RESET`, `SHUTDOWN`, or `STOP` -# events. +# .. note:: If action is "reset", "shutdown", or "pause" the +# `WATCHDOG` event is followed respectively by the `RESET`, +# `SHUTDOWN`, or `STOP` events. # # .. note:: This event is rate-limited. #
@@ -402,7 +402,8 @@ # # @panic: `PanicAction` action taken on guest panic. # -# @watchdog: `WatchdogAction` action taken when watchdog timer expires. +# @watchdog: `WatchdogAction` action taken when watchdog timer +# expires. # # Since: 6.0 #
@@ -542,8 +543,8 @@ # @arg4: for Windows, third argument of the `STOP`. For Linux, the # RAX register (x86) or the stack pointer (aarch64) of the guest. # -# @arg5: for Windows, fourth argument of the `STOP`. For x86 Linux, the -# stack pointer of the guest. +# @arg5: for Windows, fourth argument of the `STOP`. For x86 Linux, +# the stack pointer of the guest. # # Since: 2.9 ##
@@ -610,7 +611,7 @@ # # @error-code: TD-specific error code # -# @message: Human-readable error message provided by the guest. Not +# @message: Human-readable error message provided by the guest. Not # to be trusted. # # @gpa: guest-physical address of a page that contains more verbose
qapi/sockets.json +16 -14
@@ -58,24 +58,26 @@ # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and # IPv6 # -# @keep-alive: enable keep-alive when connecting to/listening on this socket. +# @keep-alive: enable keep-alive when connecting to/listening on this +# socket. # (Since 4.2, not supported for listening sockets until 10.1) # -# @keep-alive-count: number of keep-alive packets sent before the connection is -# closed. Only supported for TCP sockets on systems where TCP_KEEPCNT -# socket option is defined (this includes Linux, Windows, macOS, FreeBSD, -# but not OpenBSD). When set to 0, system setting is used. (Since 10.1) +# @keep-alive-count: number of keep-alive packets sent before the +# connection is closed. Only supported for TCP sockets on systems +# where TCP_KEEPCNT socket option is defined (this includes Linux, +# Windows, macOS, FreeBSD, but not OpenBSD). When set to 0, +# system setting is used. (Since 10.1) # -# @keep-alive-idle: time in seconds the connection needs to be idle before -# sending a keepalive packet. Only supported for TCP sockets on systems -# where TCP_KEEPIDLE socket option is defined (this includes Linux, -# Windows, macOS, FreeBSD, but not OpenBSD). When set to 0, system setting -# is used. (Since 10.1) +# @keep-alive-idle: time in seconds the connection needs to be idle +# before sending a keepalive packet. Only supported for TCP +# sockets on systems where TCP_KEEPIDLE socket option is defined +# (this includes Linux, Windows, macOS, FreeBSD, but not OpenBSD). +# When set to 0, system setting is used. (Since 10.1) # -# @keep-alive-interval: time in seconds between keep-alive packets. Only -# supported for TCP sockets on systems where TCP_KEEPINTVL is defined (this -# includes Linux, Windows, macOS, FreeBSD, but not OpenBSD). When set to -# 0, system setting is used. (Since 10.1) +# @keep-alive-interval: time in seconds between keep-alive packets. +# Only supported for TCP sockets on systems where TCP_KEEPINTVL is +# defined (this includes Linux, Windows, macOS, FreeBSD, but not +# OpenBSD). When set to 0, system setting is used. (Since 10.1) # # @mptcp: enable multi-path TCP. (Since 6.1) #
qapi/stats.json +2 -2
@@ -185,8 +185,8 @@ # 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. +# The arguments are a `StatsFilter` and specify the provider and +# objects to return statistics about. # # Returns: a list of statistics, one for each provider and object # (e.g., for each vCPU).
qapi/ui.json +8 -7
@@ -1023,10 +1023,10 @@ # # Send keys to guest. # -# @keys: An array of `KeyValue` elements. All @KeyValues in this array -# are simultaneously sent to the guest. A `KeyValue`.number value -# is sent directly to the guest, while `KeyValue`.qcode must be a -# valid `QKeyCode` value +# @keys: An array of `KeyValue` elements. All @KeyValues in this +# array are simultaneously sent to the guest. A `KeyValue`.number +# value is sent directly to the guest, while `KeyValue`.qcode must +# be a valid `QKeyCode` value # # @hold-time: time to delay key up events, milliseconds. Defaults to # 100
@@ -1335,10 +1335,11 @@ # @show-menubar: Display the main window menubar. Defaults to "on". # (Since 8.0) # -# @keep-aspect-ratio: Keep width/height aspect ratio of guest content when -# resizing host window. Defaults to "on". (Since 10.1) +# @keep-aspect-ratio: Keep width/height aspect ratio of guest content +# when resizing host window. Defaults to "on". (Since 10.1) # -# @scale: Set preferred scale of the display. Defaults to 1.0. (Since 10.1) +# @scale: Set preferred scale of the display. Defaults to 1.0. +# (Since 10.1) # # Since: 2.12 ##
qapi/virtio.json +2 -2
@@ -984,8 +984,8 @@ ## # @DummyVirtioForceArrays: # -# Not used by QMP; hack to let us use IOThreadVirtQueueMappingList -# and VirtIOGPUOutputList internally +# Not used by QMP; hack to let us use IOThreadVirtQueueMappingList and +# VirtIOGPUOutputList internally # # Since: 9.0 ##
Signature · 1 line
2.49.0
PATCH v2 3/9 qapi: Clean up whitespace between definitions
In reply to Markus ArmbrusterConsistently separate definitions with a single blank line. Consistently separate member descriptions with a blank line.
--- qapi/acpi-hest.json | 1 - qapi/char.json | 1 - qapi/crypto.json | 1 + qapi/cxl.json | 1 - qapi/migration.json | 3 +++ qapi/misc-i386.json | 2 -- qapi/net.json | 3 --- qapi/qom.json | 3 --- qapi/run-state.json | 1 - qapi/ui.json | 2 +- qapi/virtio.json | 2 -- 11 files changed, 5 insertions(+), 15 deletions(-)
qapi/acpi-hest.json +0 -1
@@ -11,7 +11,6 @@ # https://uefi.org/sites/default/files/resources/ACPI_6_1.pdf ## - ## # @inject-ghes-v2-error: #
qapi/char.json +0 -1
@@ -681,7 +681,6 @@ { 'struct': 'ChardevRingbufWrapper', 'data': { 'data': 'ChardevRingbuf' } } - ## # @ChardevPtyWrapper: #
qapi/crypto.json +1 -0
@@ -547,6 +547,7 @@ 'base': 'TlsCredsProperties', 'data': { '*sanity-check': 'bool', '*passwordid': 'str' } } + ## # @QCryptoAkCipherAlgo: #
qapi/cxl.json +0 -1
@@ -262,7 +262,6 @@ # # Since: 8.0 ## - { 'enum': 'CxlUncorErrorType', 'data': ['cache-data-parity', 'cache-address-parity',
qapi/migration.json +3 -0
@@ -177,6 +177,7 @@ 'postcopy-recover-setup', 'postcopy-recover', 'completed', 'failed', 'colo', 'pre-switchover', 'device', 'wait-unplug' ] } + ## # @VfioStats: #
@@ -523,6 +524,7 @@ # Features: # # @unstable: Members @x-colo and @x-ignore-shared are experimental. +# # @deprecated: Member @zero-blocks is deprecated as being part of # block migration which was already removed. #
@@ -1702,6 +1704,7 @@ # The migration channel-type request options. # # @main: Main outbound migration channel. +# # @cpr: Checkpoint and restart state channel. # # Since: 8.1
qapi/misc-i386.json +0 -2
@@ -122,7 +122,6 @@ 'sev': 'SevGuestInfo', 'sev-snp': 'SevSnpGuestInfo' } } - ## # @query-sev: #
@@ -418,7 +417,6 @@ 'pending': 'bool', 'masked': 'bool'} } - ## # @xen-event-list: #
qapi/net.json +0 -3
@@ -1055,7 +1055,6 @@ # # Since: 4.0 ## - { 'struct': 'AnnounceParameters', 'data': { 'initial': 'int', 'max': 'int',
@@ -1171,7 +1170,6 @@ # <- { "timestamp": {"seconds": 1739538638, "microseconds": 354181 }, # "event": "NETDEV_VHOST_USER_CONNECTED", # "data": { "netdev-id": "netdev0", "chardev-id": "chr0" } } -# ## { 'event': 'NETDEV_VHOST_USER_CONNECTED', 'data': { 'netdev-id': 'str', 'chardev-id': 'str' } }
@@ -1190,7 +1188,6 @@ # <- { "timestamp": { "seconds": 1739538634, "microseconds": 920450 }, # "event": "NETDEV_VHOST_USER_DISCONNECTED", # "data": { "netdev-id": "netdev0" } } -# ## { 'event': 'NETDEV_VHOST_USER_DISCONNECTED', 'data': { 'netdev-id': 'str' } }
qapi/qom.json +0 -3
@@ -75,7 +75,6 @@ { 'struct': 'ObjectPropertiesValues', 'data': { 'properties': [ 'ObjectPropertyValue' ] }} - ## # @qom-list: #
@@ -244,7 +243,6 @@ # # @typename: the type name of an object # -# # .. note:: Objects can create properties at runtime, for example to # describe links between different devices and/or objects. These # properties are not included in the output of this command.
@@ -1169,7 +1167,6 @@ 'data': { '*cpu-affinity': ['uint16'], '*node-affinity': ['uint16'] } } - ## # @ObjectType: #
qapi/run-state.json +0 -1
@@ -618,7 +618,6 @@ # error information, as zero-terminated string. Present when the # "GPA valid" bit (bit 63) is set in @error-code. # -# # Since: 10.1 ## {'struct': 'GuestPanicInformationTdx',
qapi/ui.json +1 -1
@@ -682,6 +682,7 @@ ## { 'command': 'query-vnc', 'returns': 'VncInfo', 'if': 'CONFIG_VNC' } + ## # @query-vnc-servers: #
@@ -1094,7 +1095,6 @@ { 'enum' : 'InputMultiTouchType', 'data' : [ 'begin', 'update', 'end', 'cancel', 'data' ] } - ## # @InputKeyEvent: #
qapi/virtio.json +0 -2
@@ -964,7 +964,6 @@ # # Since: 9.0 ## - { 'struct': 'IOThreadVirtQueueMapping', 'data': { 'iothread': 'str', '*vqs': ['uint16'] } }
@@ -989,7 +988,6 @@ # # Since: 9.0 ## - { 'struct': 'DummyVirtioForceArrays', 'data': { 'unused-iothread-vq-mapping': ['IOThreadVirtQueueMapping'], 'unused-virtio-gpu-output': ['VirtIOGPUOutput'] } }
Signature · 1 line
2.49.0
PATCH v2 4/9 qga/qapi-schema: Refill doc comments to conform to conventions
In reply to Markus ArmbrusterSweep the entire documentation again. Last done in commit 7270819384c (qga/qapi-schema: Refill doc comments to conform to current conventions).
To check the generated documentation does not change, I compared the generated HTML before and after this commit with "wdiff -3". Finds no differences. Comparing with diff is not useful, as the reflown paragraphs are visible there.
--- qga/qapi-schema.json | 87 ++++++++++++++++++++++++-------------------- 1 file changed, 47 insertions(+), 40 deletions(-)
qga/qapi-schema.json +47 -40
@@ -2,8 +2,8 @@ # vim: filetype=python ## -# This manual describes the commands supported by the QEMU Guest -# Agent Protocol. +# This manual describes the commands supported by the QEMU Guest Agent +# Protocol. # # For locating a particular item, please see the `qapi-qga-index`. #
@@ -96,8 +96,8 @@ # In cases where a partial stale response was previously received by # the client, this cannot always be done reliably. One particular # scenario being if qemu-ga responses are fed character-by-character -# into a JSON parser. In these situations, using `guest-sync-delimited` -# may be optimal. +# into a JSON parser. In these situations, using +# `guest-sync-delimited` may be optimal. # # For clients that fetch responses line by line and convert them to # JSON objects, `guest-sync` should be sufficient, but note that in
@@ -153,9 +153,9 @@ # This command tries to set guest's System Time to the given value, # then sets the Hardware Clock (RTC) to the current System Time. This # will make it easier for a guest to resynchronize without waiting for -# NTP. If no @time is specified, then the time to set is read from -# RTC. However, this may not be supported on all platforms (i.e. -# Windows). If that's the case users are advised to always pass a +# NTP. If no @time is specified, then the time to set is read from +# RTC. However, this may not be supported on all platforms (i.e. +# Windows). If that's the case users are advised to always pass a # value. # # @time: time of nanoseconds, relative to the Epoch of 1970-01-01 in
@@ -444,8 +444,8 @@ # Returns: Number of file systems currently frozen. # # .. note:: On Windows, the command is implemented with the help of a -# Volume Shadow-copy Service DLL helper. The frozen state is limited -# for up to 10 seconds by VSS. +# Volume Shadow-copy Service DLL helper. The frozen state is +# limited for up to 10 seconds by VSS. # # Since: 0.15.0 ##
@@ -482,9 +482,9 @@ # Returns: Number of file systems thawed by this call # # .. 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. +# `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. # # Since: 0.15.0 ##
@@ -513,7 +513,8 @@ ## # @GuestFilesystemTrimResponse: # -# @paths: list of `GuestFilesystemTrimResult` per path that was trimmed +# @paths: list of `GuestFilesystemTrimResult` per path that was +# trimmed # # Since: 2.4 ##
@@ -557,16 +558,16 @@ # # This command does NOT return a response on success. There is a high # chance the command succeeded if the VM exits with a zero exit status -# or, when running with --no-shutdown, by issuing the `query-status` QMP -# command to to confirm the VM status is "shutdown". However, the VM -# could also exit (or set its status to "shutdown") due to other +# or, when running with --no-shutdown, by issuing the `query-status` +# QMP command to to confirm the VM status is "shutdown". However, the +# VM could also exit (or set its status to "shutdown") due to other # reasons. # # Errors: # - If suspend to disk is not supported, Unsupported # -# .. note:: It's strongly recommended to issue the `guest-sync` command -# before sending commands when the guest resumes. +# .. note:: It's strongly recommended to issue the `guest-sync` +# command before sending commands when the guest resumes. # # Since: 1.1 ##
@@ -586,7 +587,7 @@ # - manual write into sysfs # # IMPORTANT: `guest-suspend-ram` requires working wakeup support in -# QEMU. You should check QMP command `query-current-machine` returns +# QEMU. You should check QMP command `query-current-machine` returns # wakeup-suspend-support: true before issuing this command. Failure # in doing so can result in a suspended guest that QEMU will not be # able to awaken, forcing the user to power cycle the guest to bring
@@ -602,8 +603,8 @@ # Errors: # - If suspend to ram is not supported, Unsupported # -# .. note:: It's strongly recommended to issue the `guest-sync` command -# before sending commands when the guest resumes. +# .. note:: It's strongly recommended to issue the `guest-sync` +# command before sending commands when the guest resumes. # # Since: 1.1 ##
@@ -622,7 +623,7 @@ # - pm-utils (via pm-suspend-hybrid) # # IMPORTANT: `guest-suspend-hybrid` requires working wakeup support in -# QEMU. You should check QMP command `query-current-machine` returns +# QEMU. You should check QMP command `query-current-machine` returns # wakeup-suspend-support: true before issuing this command. Failure # in doing so can result in a suspended guest that QEMU will not be # able to awaken, forcing the user to power cycle the guest to bring
@@ -638,8 +639,8 @@ # Errors: # - If hybrid suspend is not supported, Unsupported # -# .. note:: It's strongly recommended to issue the `guest-sync` command -# before sending commands when the guest resumes. +# .. note:: It's strongly recommended to issue the `guest-sync` +# command before sending commands when the guest resumes. # # Since: 1.1 ##
@@ -1048,10 +1049,11 @@ # # @used-bytes: file system used bytes (since 3.0) # -# @total-bytes: filesystem capacity in bytes for unprivileged users (since 3.0) +# @total-bytes: filesystem capacity in bytes for unprivileged users +# (since 3.0) # -# @total-bytes-privileged: filesystem capacity in bytes for privileged users -# (since 9.1) +# @total-bytes-privileged: filesystem capacity in bytes for privileged +# users (since 9.1) # # @disk: an array of disk hardware information that the volume lies # on, which may be empty if the disk type is not supported
@@ -1171,7 +1173,8 @@ ## # @GuestMemoryBlockResponse: # -# @phys-index: same with the 'phys-index' member of `GuestMemoryBlock`. +# @phys-index: same with the 'phys-index' member of +# `GuestMemoryBlock`. # # @response: the result of memory block operation. #
@@ -1491,10 +1494,11 @@ # # .. note:: On POSIX systems the fields @id, @name, @pretty-name, # @version, @version-id, @variant and @variant-id follow the -# definition specified in os-release(5). Refer to the manual page for -# exact description of the fields. Their values are taken from the -# os-release file. If the file is not present in the system, or the -# values are not present in the file, the fields are not included. +# definition specified in os-release(5). Refer to the manual page +# for exact description of the fields. Their values are taken from +# the os-release file. If the file is not present in the system, +# or the values are not present in the file, the fields are not +# included. # # On Windows the values are filled from information gathered from # the system.
@@ -1639,7 +1643,7 @@ # @guest-ssh-remove-authorized-keys: # # Remove public keys from the user .ssh/authorized_keys on Unix -# systems (not implemented for other systems). It's not an error if +# systems (not implemented for other systems). It's not an error if # the key is already missing. # # @username: the user account to remove the authorized keys
@@ -1862,10 +1866,10 @@ # # Retrieve CPU process load information # -# .. note:: Windows does not have load average API, so QGA emulates it by -# calculating the average CPU usage in the last 1, 5, 15 minutes -# similar as Linux does this. -# Calculation starts from the first time this command is called. +# .. note:: Windows does not have load average API, so QGA emulates it +# by calculating the average CPU usage in the last 1, 5, 15 minutes +# similar as Linux does this. Calculation starts from the first +# time this command is called. # # Returns: load information #
@@ -1881,9 +1885,11 @@ # # Route information, currently, only linux supported. # -# @iface: The destination network or host's egress network interface in the routing table +# @iface: The destination network or host's egress network interface +# in the routing table # -# @destination: The IP address of the target network or host, The final destination of the packet +# @destination: The IP address of the target network or host, The +# final destination of the packet # # @metric: Route metric #
@@ -1899,7 +1905,8 @@ # # @use: Route usage count (not for windows) # -# @window: TCP window size, used for flow control (not for windows, IPv4 only) +# @window: TCP window size, used for flow control (not for windows, +# IPv4 only) # # @mtu: Data link layer maximum packet size (not for windows) #
Signature · 1 line
2.49.0
PATCH v2 5/9 qga/qapi-schema: Clean up whitespace between definitions
In reply to Markus ArmbrusterConsistently separate definitions with a single blank line.
--- qga/qapi-schema.json | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
qga/qapi-schema.json +2 -7
@@ -197,6 +197,7 @@ { 'struct': 'GuestAgentInfo', 'data': { 'version': 'str', 'supported_commands': ['GuestAgentCommandInfo'] } } + ## # @guest-info: #
@@ -322,7 +323,6 @@ 'data': { 'handle': 'int', 'buf-b64': 'str', '*count': 'int' }, 'returns': 'GuestFileWrite' } - ## # @GuestFileSeek: #
@@ -876,7 +876,6 @@ 'sas', 'mmc', 'virtual', 'file-backed-virtual', 'nvme' ], 'if': { 'any': [ 'CONFIG_WIN32', 'CONFIG_LINUX' ] } } - ## # @GuestPCIAddress: #
@@ -1276,6 +1275,7 @@ 'data': { 'exited': 'bool', '*exitcode': 'int', '*signal': 'int', '*out-data': 'str', '*err-data': 'str', '*out-truncated': 'bool', '*err-truncated': 'bool' }} + ## # @guest-exec-status: #
@@ -1365,7 +1365,6 @@ '*input-data': 'str', '*capture-output': 'GuestExecCaptureOutput' }, 'returns': 'GuestExec' } - ## # @GuestHostName: #
@@ -1392,7 +1391,6 @@ { 'command': 'guest-get-host-name', 'returns': 'GuestHostName' } - ## # @GuestUser: #
@@ -1763,7 +1761,6 @@ 'data': [ 'linux' ], 'if': 'CONFIG_LINUX' } - ## # @GuestLinuxCpuStats: #
@@ -1838,7 +1835,6 @@ 'if': 'CONFIG_LINUX' } - ## # @GuestLoadAverage: #
@@ -1921,7 +1917,6 @@ # @version: IP version (4 or 6) # # Since: 9.1 - ## { 'struct': 'GuestNetworkRoute', 'data': {'iface': 'str',
Signature · 1 line
2.49.0
PATCH v2 6/9 docs/interop: Refill QAPI doc comments to conform to conventions
In reply to Markus ArmbrusterFor legibility, wrap text paragraphs so every line is at most 70 characters long. Consistently separate sentences with two spaces. Consistently separate member descriptions with a blank line.
--- docs/interop/firmware.json | 440 +++++++++++++++++------------------ docs/interop/vhost-user.json | 57 +++-- 2 files changed, 252 insertions(+), 245 deletions(-)
docs/interop/firmware.json +213 -227
@@ -27,18 +27,18 @@ # Lists the firmware-OS interface types provided by various firmware # that is commonly used with QEMU virtual machines. # -# @bios: Traditional x86 BIOS interface. For example, firmware built -# from the SeaBIOS project usually provides this interface. +# @bios: Traditional x86 BIOS interface. For example, firmware built +# from the SeaBIOS project usually provides this interface. # # @openfirmware: The interface is defined by the (historical) IEEE -# 1275-1994 standard. Examples for firmware projects that -# provide this interface are: OpenBIOS and SLOF. +# 1275-1994 standard. Examples for firmware projects that provide +# this interface are: OpenBIOS and SLOF. # # @uboot: Firmware interface defined by the U-Boot project. # -# @uefi: Firmware interface defined by the UEFI specification. For -# example, firmware built from the edk2 (EFI Development Kit II) -# project usually provides this interface. +# @uefi: Firmware interface defined by the UEFI specification. For +# example, firmware built from the edk2 (EFI Development Kit II) +# project usually provides this interface. # # Since: 3.0 ##
@@ -50,21 +50,21 @@ # # Defines the device types that firmware can be mapped into. # -# @flash: The firmware executable and its accompanying NVRAM file are to -# be mapped into a pflash chip each. +# @flash: The firmware executable and its accompanying NVRAM file are +# to be mapped into a pflash chip each. # -# @kernel: The firmware is to be loaded like a Linux kernel. This is -# similar to @memory but may imply additional processing that -# is specific to the target architecture and machine type. +# @kernel: The firmware is to be loaded like a Linux kernel. This is +# similar to @memory but may imply additional processing that is +# specific to the target architecture and machine type. # # @memory: The firmware is to be mapped into memory. # # @igvm: The firmware is defined by a file conforming to the IGVM -# specification and mapped into memory according to directives -# defined in the file. This is similar to @memory but may -# include additional processing defined by the IGVM file -# including initial CPU state or population of metadata into -# the guest address space. Since: 10.1 +# specification and mapped into memory according to directives +# defined in the file. This is similar to @memory but may include +# additional processing defined by the IGVM file including initial +# CPU state or population of metadata into the guest address +# space. Since: 10.1 # # Since: 3.0 ##
@@ -74,8 +74,8 @@ ## # @FirmwareArchitecture: # -# Enumeration of architectures for which Qemu uses additional -# firmware files. +# Enumeration of architectures for which Qemu uses additional firmware +# files. # # @aarch64: 64-bit Arm. #
@@ -83,7 +83,7 @@ # # @i386: 32-bit x86. # -# @loongarch64: 64-bit LoongArch. (since: 7.1) +# @loongarch64: 64-bit LoongArch. (since: 7.1) # # @riscv64: 64-bit RISC-V. #
@@ -100,17 +100,16 @@ # Defines the machine types that firmware may execute on. # # @architecture: Determines the emulation target (the QEMU system -# emulator) that can execute the firmware. +# emulator) that can execute the firmware. # # @machines: Lists the machine types (known by the emulator that is -# specified through @architecture) that can execute the -# firmware. Elements of @machines are supposed to be concrete -# machine types, not aliases. Glob patterns are understood, -# which is especially useful for versioned machine types. -# (For example, the glob pattern "pc-i440fx-*" matches -# "pc-i440fx-2.12".) On the QEMU command line, "-machine -# type=..." specifies the requested machine type (but that -# option does not accept glob patterns). +# specified through @architecture) that can execute the firmware. +# Elements of @machines are supposed to be concrete machine types, +# not aliases. Glob patterns are understood, which is especially +# useful for versioned machine types. (For example, the glob +# pattern "pc-i440fx-*" matches "pc-i440fx-2.12".) On the QEMU +# command line, "-machine type=..." specifies the requested +# machine type (but that option does not accept glob patterns). # # Since: 3.0 ##
@@ -124,115 +123,104 @@ # Defines the features that firmware may support, and the platform # requirements that firmware may present. # -# @acpi-s3: The firmware supports S3 sleep (suspend to RAM), as defined -# in the ACPI specification. On the "pc-i440fx-*" machine -# types of the @i386 and @x86_64 emulation targets, S3 can be -# enabled with "-global PIIX4_PM.disable_s3=0" and disabled -# with "-global PIIX4_PM.disable_s3=1". On the "pc-q35-*" -# machine types of the @i386 and @x86_64 emulation targets, S3 -# can be enabled with "-global ICH9-LPC.disable_s3=0" and -# disabled with "-global ICH9-LPC.disable_s3=1". +# @acpi-s3: The firmware supports S3 sleep (suspend to RAM), as +# defined in the ACPI specification. On the "pc-i440fx-*" machine +# types of the @i386 and @x86_64 emulation targets, S3 can be +# enabled with "-global PIIX4_PM.disable_s3=0" and disabled with +# "-global PIIX4_PM.disable_s3=1". On the "pc-q35-*" machine +# types of the @i386 and @x86_64 emulation targets, S3 can be +# enabled with "-global ICH9-LPC.disable_s3=0" and disabled with +# "-global ICH9-LPC.disable_s3=1". # # @acpi-s4: The firmware supports S4 hibernation (suspend to disk), as -# defined in the ACPI specification. On the "pc-i440fx-*" -# machine types of the @i386 and @x86_64 emulation targets, S4 -# can be enabled with "-global PIIX4_PM.disable_s4=0" and -# disabled with "-global PIIX4_PM.disable_s4=1". On the -# "pc-q35-*" machine types of the @i386 and @x86_64 emulation -# targets, S4 can be enabled with "-global -# ICH9-LPC.disable_s4=0" and disabled with "-global -# ICH9-LPC.disable_s4=1". +# defined in the ACPI specification. On the "pc-i440fx-*" machine +# types of the @i386 and @x86_64 emulation targets, S4 can be +# enabled with "-global PIIX4_PM.disable_s4=0" and disabled with +# "-global PIIX4_PM.disable_s4=1". On the "pc-q35-*" machine +# types of the @i386 and @x86_64 emulation targets, S4 can be +# enabled with "-global ICH9-LPC.disable_s4=0" and disabled with +# "-global ICH9-LPC.disable_s4=1". # # @amd-sev: The firmware supports running under AMD Secure Encrypted -# Virtualization, as specified in the AMD64 Architecture -# Programmer's Manual. QEMU command line options related to -# this feature are documented in -# "docs/system/i386/amd-memory-encryption.rst". +# Virtualization, as specified in the AMD64 Architecture +# Programmer's Manual. QEMU command line options related to this +# feature are documented in +# "docs/system/i386/amd-memory-encryption.rst". # -# @amd-sev-es: The firmware supports running under AMD Secure Encrypted -# Virtualization - Encrypted State, as specified in the AMD64 -# Architecture Programmer's Manual. QEMU command line options -# related to this feature are documented in -# "docs/system/i386/amd-memory-encryption.rst". +# @amd-sev-es: The firmware supports running under AMD Secure +# Encrypted Virtualization - Encrypted State, as specified in the +# AMD64 Architecture Programmer's Manual. QEMU command line +# options related to this feature are documented in +# "docs/system/i386/amd-memory-encryption.rst". # -# @amd-sev-snp: The firmware supports running under AMD Secure Encrypted -# Virtualization - Secure Nested Paging, as specified in the -# AMD64 Architecture Programmer's Manual. QEMU command line -# options related to this feature are documented in -# "docs/system/i386/amd-memory-encryption.rst". +# @amd-sev-snp: The firmware supports running under AMD Secure +# Encrypted Virtualization - Secure Nested Paging, as specified in +# the AMD64 Architecture Programmer's Manual. QEMU command line +# options related to this feature are documented in +# "docs/system/i386/amd-memory-encryption.rst". # # @intel-tdx: The firmware supports running under Intel Trust Domain -# Extensions (TDX). +# Extensions (TDX). # # @enrolled-keys: The variable store (NVRAM) template associated with -# the firmware binary has the UEFI Secure Boot -# operational mode turned on, with certificates -# enrolled. +# the firmware binary has the UEFI Secure Boot operational mode +# turned on, with certificates enrolled. # # @requires-smm: The firmware requires the platform to emulate SMM -# (System Management Mode), as defined in the AMD64 -# Architecture Programmer's Manual, and in the Intel(R)64 -# and IA-32 Architectures Software Developer's Manual. On -# the "pc-q35-*" machine types of the @i386 and @x86_64 -# emulation targets, SMM emulation can be enabled with -# "-machine smm=on". (On the "pc-q35-*" machine types of -# the @i386 emulation target, @requires-smm presents -# further CPU requirements; one combination known to work -# is "-cpu coreduo,nx=off".) If the firmware is marked as -# both @secure-boot and @requires-smm, then write -# accesses to the pflash chip (NVRAM) that holds the UEFI -# variable store must be restricted to code that executes -# in SMM, using the additional option "-global -# driver=cfi.pflash01,property=secure,value=on". -# Furthermore, a large guest-physical address space -# (comprising guest RAM, memory hotplug range, and 64-bit -# PCI MMIO aperture), and/or a high VCPU count, may -# present high SMRAM requirements from the firmware. On -# the "pc-q35-*" machine types of the @i386 and @x86_64 -# emulation targets, the SMRAM size may be increased -# above the default 16MB with the "-global -# mch.extended-tseg-mbytes=uint16" option. As a rule of -# thumb, the default 16MB size suffices for 1TB of -# guest-phys address space and a few tens of VCPUs; for -# every further TB of guest-phys address space, add 8MB -# of SMRAM. 48MB should suffice for 4TB of guest-phys -# address space and 2-3 hundred VCPUs. +# (System Management Mode), as defined in the AMD64 Architecture +# Programmer's Manual, and in the Intel(R)64 and IA-32 +# Architectures Software Developer's Manual. On the "pc-q35-*" +# machine types of the @i386 and @x86_64 emulation targets, SMM +# emulation can be enabled with "-machine smm=on". (On the +# "pc-q35-*" machine types of the @i386 emulation target, +# @requires-smm presents further CPU requirements; one combination +# known to work is "-cpu coreduo,nx=off".) If the firmware is +# marked as both @secure-boot and @requires-smm, then write +# accesses to the pflash chip (NVRAM) that holds the UEFI variable +# store must be restricted to code that executes in SMM, using the +# additional option "-global +# driver=cfi.pflash01,property=secure,value=on". Furthermore, a +# large guest-physical address space (comprising guest RAM, memory +# hotplug range, and 64-bit PCI MMIO aperture), and/or a high VCPU +# count, may present high SMRAM requirements from the firmware. +# On the "pc-q35-*" machine types of the @i386 and @x86_64 +# emulation targets, the SMRAM size may be increased above the +# default 16MB with the "-global mch.extended-tseg-mbytes=uint16" +# option. As a rule of thumb, the default 16MB size suffices for +# 1TB of guest-phys address space and a few tens of VCPUs; for +# every further TB of guest-phys address space, add 8MB of SMRAM. +# 48MB should suffice for 4TB of guest-phys address space and 2-3 +# hundred VCPUs. # -# @secure-boot: The firmware implements the software interfaces for UEFI -# Secure Boot, as defined in the UEFI specification. Note -# that without @requires-smm, guest code running with -# kernel privileges can undermine the security of Secure -# Boot. +# @secure-boot: The firmware implements the software interfaces for +# UEFI Secure Boot, as defined in the UEFI specification. Note +# that without @requires-smm, guest code running with kernel +# privileges can undermine the security of Secure Boot. # # @verbose-dynamic: When firmware log capture is enabled, the firmware -# logs a large amount of debug messages, which may -# impact boot performance. With log capture disabled, -# there is no boot performance impact. On the -# "pc-i440fx-*" and "pc-q35-*" machine types of the -# @i386 and @x86_64 emulation targets, firmware log -# capture can be enabled with the QEMU command line -# options "-chardev file,id=fwdebug,path=LOGFILEPATH -# -device isa-debugcon,iobase=0x402,chardev=fwdebug". -# @verbose-dynamic is mutually exclusive with -# @verbose-static. +# logs a large amount of debug messages, which may impact boot +# performance. With log capture disabled, there is no boot +# performance impact. On the "pc-i440fx-*" and "pc-q35-*" machine +# types of the @i386 and @x86_64 emulation targets, firmware log +# capture can be enabled with the QEMU command line options +# "-chardev file,id=fwdebug,path=LOGFILEPATH -device +# isa-debugcon,iobase=0x402,chardev=fwdebug". @verbose-dynamic is +# mutually exclusive with @verbose-static. # -# @verbose-static: The firmware unconditionally produces a large amount -# of debug messages, which may impact boot performance. -# This feature may typically be carried by certain UEFI -# firmware for the "virt-*" machine types of the @arm -# and @aarch64 emulation targets, where the debug -# messages are written to the first (always present) -# PL011 UART. @verbose-static is mutually exclusive -# with @verbose-dynamic. +# @verbose-static: The firmware unconditionally produces a large +# amount of debug messages, which may impact boot performance. +# This feature may typically be carried by certain UEFI firmware +# for the "virt-*" machine types of the @arm and @aarch64 +# emulation targets, where the debug messages are written to the +# first (always present) PL011 UART. @verbose-static is mutually +# exclusive with @verbose-dynamic. # # @host-uefi-vars: The firmware expects the host to provide an uefi -# variable store. qemu supports that via -# "uefi-vars-sysbus" (aarch64, riscv64, loongarch64) -# or "uefi-vars-x64" (x86_64) devices. The firmware -# will not use flash for nvram. When loading the -# firmware into flash the 'stateless' setup should be -# used. It is recommened to load the firmware into -# memory though. +# variable store. qemu supports that via "uefi-vars-sysbus" +# (aarch64, riscv64, loongarch64) or "uefi-vars-x64" (x86_64) +# devices. The firmware will not use flash for nvram. When +# loading the firmware into flash the 'stateless' setup should be +# used. It is recommened to load the firmware into memory though. # # Since: 3.0 ##
@@ -262,16 +250,16 @@ # @FirmwareFlashFile: # # Defines common properties that are necessary for loading a firmware -# file into a pflash chip. The corresponding QEMU command line option is -# "-drive file=@filename,format=@format". Note however that the +# file into a pflash chip. The corresponding QEMU command line option +# is "-drive file=@filename,format=@format". Note however that the # option-argument shown here is incomplete; it is completed under # @FirmwareMappingFlash. # # @filename: Specifies the filename on the host filesystem where the -# firmware file can be found. +# firmware file can be found. # # @format: Specifies the block format of the file pointed-to by -# @filename, such as @raw or @qcow2. +# @filename, such as @raw or @qcow2. # # Since: 3.0 ##
@@ -286,22 +274,20 @@ # Describes how the firmware build handles code versus variable # persistence. # -# @split: the executable file contains code while the NVRAM -# template provides variable storage. The executable -# must be configured read-only and can be shared between -# multiple guests. The NVRAM template must be cloned -# for each new guest and configured read-write. +# @split: the executable file contains code while the NVRAM template +# provides variable storage. The executable must be configured +# read-only and can be shared between multiple guests. The NVRAM +# template must be cloned for each new guest and configured +# read-write. # -# @combined: the executable file contains both code and -# variable storage. The executable must be cloned -# for each new guest and configured read-write. -# No NVRAM template will be specified. +# @combined: the executable file contains both code and variable +# storage. The executable must be cloned for each new guest and +# configured read-write. No NVRAM template will be specified. # -# @stateless: the executable file contains code and variable -# storage is not persisted. The executable must -# be configured read-only and can be shared -# between multiple guests. No NVRAM template -# will be specified. +# @stateless: the executable file contains code and variable storage +# is not persisted. The executable must be configured read-only +# and can be shared between multiple guests. No NVRAM template +# will be specified. # # Since: 7.0.0 ##
@@ -315,39 +301,36 @@ # and its accompanying NVRAM file, when @FirmwareDevice is @flash. # # @mode: Describes how the firmware build handles code versus variable -# storage. If not present, it must be treated as if it was -# configured with value @split. Since: 7.0.0 +# storage. If not present, it must be treated as if it was +# configured with value @split. Since: 7.0.0 # -# @executable: Identifies the firmware executable. The @mode -# indicates whether there will be an associated -# NVRAM template present. The preferred -# corresponding QEMU command line options are -# -drive if=none,id=pflash0,readonly=on,file=@executable.@filename,format=@executable.@format -# -machine pflash0=pflash0 -# or equivalent -blockdev instead of -drive. When -# @mode is @combined the executable must be -# cloned before use and configured with readonly=off. -# With QEMU versions older than 4.0, you have to use -# -drive if=pflash,unit=0,readonly=on,file=@executable.@filename,format=@executable.@format +# @executable: Identifies the firmware executable. The @mode +# indicates whether there will be an associated NVRAM template +# present. The preferred corresponding QEMU command line options +# are +# -drive if=none,id=pflash0,readonly=on,file=@executable.@filename,format=@executable.@format +# -machine pflash0=pflash0 +# or equivalent -blockdev instead of -drive. When @mode is +# @combined the executable must be cloned before use and +# configured with readonly=off. With QEMU versions older than +# 4.0, you have to use +# -drive if=pflash,unit=0,readonly=on,file=@executable.@filename,format=@executable.@format # # @nvram-template: Identifies the NVRAM template compatible with -# @executable, when @mode is set to @split, -# otherwise it should not be present. -# Management software instantiates an -# individual copy -- a specific NVRAM file -- from -# @nvram-template.@filename for each new virtual -# machine definition created. @nvram-template.@filename -# itself is never mapped into virtual machines, only -# individual copies of it are. An NVRAM file is -# typically used for persistently storing the -# non-volatile UEFI variables of a virtual machine -# definition. The preferred corresponding QEMU -# command line options are -# -drive if=none,id=pflash1,readonly=off,file=FILENAME_OF_PRIVATE_NVRAM_FILE,format=@nvram-template.@format -# -machine pflash1=pflash1 -# or equivalent -blockdev instead of -drive. -# With QEMU versions older than 4.0, you have to use -# -drive if=pflash,unit=1,readonly=off,file=FILENAME_OF_PRIVATE_NVRAM_FILE,format=@nvram-template.@format +# @executable, when @mode is set to @split, otherwise it should +# not be present. Management software instantiates an individual +# copy -- a specific NVRAM file -- from @nvram-template.@filename +# for each new virtual machine definition created. +# @nvram-template.@filename itself is never mapped into virtual +# machines, only individual copies of it are. An NVRAM file is +# typically used for persistently storing the non-volatile UEFI +# variables of a virtual machine definition. The preferred +# corresponding QEMU command line options are +# -drive if=none,id=pflash1,readonly=off,file=FILENAME_OF_PRIVATE_NVRAM_FILE,format=@nvram-template.@format +# -machine pflash1=pflash1 +# or equivalent -blockdev instead of -drive. With QEMU versions +# older than 4.0, you have to use +# -drive if=pflash,unit=1,readonly=off,file=FILENAME_OF_PRIVATE_NVRAM_FILE,format=@nvram-template.@format # # Since: 3.0 ##
@@ -359,13 +342,13 @@ ## # @FirmwareMappingKernel: # -# Describes loading and mapping properties for the firmware executable, -# when @FirmwareDevice is @kernel. +# Describes loading and mapping properties for the firmware +# executable, when @FirmwareDevice is @kernel. # -# @filename: Identifies the firmware executable. The firmware executable -# may be shared by multiple virtual machine definitions. The -# corresponding QEMU command line option is "-kernel -# @filename". +# @filename: Identifies the firmware executable. The firmware +# executable may be shared by multiple virtual machine +# definitions. The corresponding QEMU command line option is +# "-kernel @filename". # # Since: 3.0 ##
@@ -375,13 +358,13 @@ ## # @FirmwareMappingMemory: # -# Describes loading and mapping properties for the firmware executable, -# when @FirmwareDevice is @memory. +# Describes loading and mapping properties for the firmware +# executable, when @FirmwareDevice is @memory. # -# @filename: Identifies the firmware executable. The firmware executable -# may be shared by multiple virtual machine definitions. The -# corresponding QEMU command line option is "-bios -# @filename". +# @filename: Identifies the firmware executable. The firmware +# executable may be shared by multiple virtual machine +# definitions. The corresponding QEMU command line option is +# "-bios @filename". # # Since: 3.0 ##
@@ -391,15 +374,15 @@ ## # @FirmwareMappingIgvm: # -# Describes loading and mapping properties for the firmware executable, -# when @FirmwareDevice is @igvm. +# Describes loading and mapping properties for the firmware +# executable, when @FirmwareDevice is @igvm. # -# @filename: Identifies the IGVM file containing the firmware executable -# along with other information used to configure the initial -# state of the guest. The IGVM file may be shared by multiple -# virtual machine definitions. This corresponds to creating -# an object on the command line with "-object igvm-cfg, -# file=@filename". +# @filename: Identifies the IGVM file containing the firmware +# executable along with other information used to configure the +# initial state of the guest. The IGVM file may be shared by +# multiple virtual machine definitions. This corresponds to +# creating an object on the command line with "-object igvm-cfg, +# file=@filename". # # Since: 10.1 ##
@@ -413,7 +396,7 @@ # loading / mapping properties. # # @device: Selects the device type that the firmware must be mapped -# into. +# into. # # Since: 3.0 ##
@@ -428,46 +411,49 @@ ## # @Firmware: # -# Describes a firmware (or a firmware use case) to management software. +# Describes a firmware (or a firmware use case) to management +# software. # # It is possible for multiple @Firmware elements to match the search -# criteria of management software. Applications thus need rules to pick -# one of the many matches, and users need the ability to override distro -# defaults. +# criteria of management software. Applications thus need rules to +# pick one of the many matches, and users need the ability to override +# distro defaults. # # It is recommended to create firmware JSON files (each containing a -# single @Firmware root element) with a double-digit prefix, for example -# "50-ovmf.json", "50-seabios-256k.json", etc, so they can be sorted in -# predictable order. The firmware JSON files should be searched for in -# three directories: +# single @Firmware root element) with a double-digit prefix, for +# example "50-ovmf.json", "50-seabios-256k.json", etc, so they can be +# sorted in predictable order. The firmware JSON files should be +# searched for in three directories: # -# - /usr/share/qemu/firmware -- populated by distro-provided firmware -# packages (XDG_DATA_DIRS covers -# /usr/share by default), +# - /usr/share/qemu/firmware -- populated by distro-provided firmware +# packages (XDG_DATA_DIRS covers +# /usr/share by default), # -# - /etc/qemu/firmware -- exclusively for sysadmins' local additions, +# - /etc/qemu/firmware -- exclusively for sysadmins' local additions, # -# - $XDG_CONFIG_HOME/qemu/firmware -- exclusively for per-user local -# additions (XDG_CONFIG_HOME -# defaults to $HOME/.config). +# - $XDG_CONFIG_HOME/qemu/firmware -- exclusively for per-user local +# additions (XDG_CONFIG_HOME +# defaults to $HOME/.config). # # Top-down, the list of directories goes from general to specific. # # Management software should build a list of files from all three # locations, then sort the list by filename (i.e., last pathname -# component). Management software should choose the first JSON file on -# the sorted list that matches the search criteria. If a more specific -# directory has a file with same name as a less specific directory, then -# the file in the more specific directory takes effect. If the more -# specific file is zero length, it hides the less specific one. +# component). Management software should choose the first JSON file +# on the sorted list that matches the search criteria. If a more +# specific directory has a file with same name as a less specific +# directory, then the file in the more specific directory takes +# effect. If the more specific file is zero length, it hides the less +# specific one. # # For example, if a distro ships # -# - /usr/share/qemu/firmware/50-ovmf.json +# - /usr/share/qemu/firmware/50-ovmf.json # -# - /usr/share/qemu/firmware/50-seabios-256k.json +# - /usr/share/qemu/firmware/50-seabios-256k.json # -# then the sysadmin can prevent the default OVMF being used at all with +# then the sysadmin can prevent the default OVMF being used at all +# with # # $ touch /etc/qemu/firmware/50-ovmf.json #
@@ -484,29 +470,29 @@ # $ vim /etc/qemu/firmware/99-ovmf.json # # @description: Provides a human-readable description of the firmware. -# Management software may or may not display @description. +# Management software may or may not display @description. # -# @interface-types: Lists the types of interfaces that the firmware can -# expose to the guest OS. This is a non-empty, ordered -# list; entries near the beginning of @interface-types -# are considered more native to the firmware, and/or -# to have a higher quality implementation in the -# firmware, than entries near the end of -# @interface-types. +# @interface-types: Lists the types of interfaces that the firmware +# can expose to the guest OS. This is a non-empty, ordered list; +# entries near the beginning of @interface-types are considered +# more native to the firmware, and/or to have a higher quality +# implementation in the firmware, than entries near the end of +# @interface-types. # -# @mapping: Describes the loading / mapping properties of the firmware. +# @mapping: Describes the loading / mapping properties of the +# firmware. # # @targets: Collects the target architectures (QEMU system emulators) -# and their machine types that may execute the firmware. +# and their machine types that may execute the firmware. # # @features: Lists the features that the firmware supports, and the -# platform requirements it presents. +# platform requirements it presents. # # @tags: A list of auxiliary strings associated with the firmware for -# which @description is not appropriate, due to the latter's -# possible exposure to the end-user. @tags serves development and -# debugging purposes only, and management software shall -# explicitly ignore it. +# which @description is not appropriate, due to the latter's +# possible exposure to the end-user. @tags serves development and +# debugging purposes only, and management software shall +# explicitly ignore it. # # Since: 3.0 #
docs/interop/vhost-user.json +39 -18
134 lines not on this page · raw message
Signature · 1 line
2.49.0
PATCH v2 7/9 docs/interop/firmware: Belatedly convert "Example" section
In reply to Markus ArmbrusterThese are gone since 3c5f6114d9f (qapi: remove "Example" doc section).
--- docs/interop/vhost-user.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
docs/interop/vhost-user.json +1 -1
@@ -266,7 +266,7 @@ # # Since: 4.0 # -# Example: +# .. qmp-example: # # { # "description": "QEMU vhost-user-gpu",
Signature · 1 line
2.49.0
Re: [PATCH v2 7/9] docs/interop/firmware: Belatedly convert "Example" section
Correction:
docs/interop/vhost-user: Belatedly convert "Example" section
PATCH v2 8/9 docs/interop/firmware: Literal block markup
In reply to Markus ArmbrusterA few doc comments show command line snippets. The snippets are indented, which is legible enough. Actually formatting these with Sphinx would fail with "Unexpected indentation", though. We don't so far. Add suitable markup anyway.
--- docs/interop/firmware.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
docs/interop/firmware.json +14 -0
@@ -308,12 +308,19 @@ # indicates whether there will be an associated NVRAM template # present. The preferred corresponding QEMU command line options # are +# +# :: +# # -drive if=none,id=pflash0,readonly=on,file=@executable.@filename,format=@executable.@format # -machine pflash0=pflash0 +# # or equivalent -blockdev instead of -drive. When @mode is # @combined the executable must be cloned before use and # configured with readonly=off. With QEMU versions older than # 4.0, you have to use +# +# :: +# # -drive if=pflash,unit=0,readonly=on,file=@executable.@filename,format=@executable.@format # # @nvram-template: Identifies the NVRAM template compatible with
@@ -326,10 +333,17 @@ # typically used for persistently storing the non-volatile UEFI # variables of a virtual machine definition. The preferred # corresponding QEMU command line options are +# +# :: +# # -drive if=none,id=pflash1,readonly=off,file=FILENAME_OF_PRIVATE_NVRAM_FILE,format=@nvram-template.@format # -machine pflash1=pflash1 +# # or equivalent -blockdev instead of -drive. With QEMU versions # older than 4.0, you have to use +# +# :: +# # -drive if=pflash,unit=1,readonly=off,file=FILENAME_OF_PRIVATE_NVRAM_FILE,format=@nvram-template.@format # # Since: 3.0
Signature · 1 line
2.49.0
PATCH v2 9/9 docs/interop: Add test to keep vhost-user.json sane
In reply to Markus ArmbrusterWe did this for firmware.json in commit d4181658dfb (docs: add test for firmware.json QAPI).
--- docs/meson.build | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
docs/meson.build +7 -2
@@ -99,7 +99,12 @@ if build_docs alias_target('man', sphinxmans) endif -test('QAPI firmware.json regression tests', qapi_gen, - args: ['-o', meson.current_build_dir() / 'qapi', +test('QAPI firmware.json regression test', qapi_gen, + args: ['-o', meson.current_build_dir() / 'qapi-firmware', meson.current_source_dir() / 'interop/firmware.json'], suite: ['qapi-schema', 'qapi-interop']) + +test('QAPI vhost-user.json regression test', qapi_gen, + args: ['-o', meson.current_build_dir() / 'qapi-vhost-user', + meson.current_source_dir() / 'interop/vhost-user.json'], + suite: ['qapi-schema', 'qapi-interop'])
Signature · 1 line
2.49.0
Queued.