2019-06-19 23:10:41 +03:00
|
|
|
# -*- Mode: Python -*-
|
2020-07-29 21:50:24 +03:00
|
|
|
# vim: filetype=python
|
2019-06-19 23:10:41 +03:00
|
|
|
#
|
|
|
|
# This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
|
|
# See the COPYING file in the top-level directory.
|
|
|
|
|
|
|
|
##
|
|
|
|
# = Machines
|
|
|
|
##
|
|
|
|
|
2020-10-20 13:47:58 +03:00
|
|
|
{ 'include': 'common.json' }
|
2023-10-16 21:39:06 +03:00
|
|
|
{ 'include': 'machine-common.json' }
|
2020-10-20 13:47:58 +03:00
|
|
|
|
2019-07-09 18:20:53 +03:00
|
|
|
##
|
|
|
|
# @SysEmuTarget:
|
|
|
|
#
|
|
|
|
# The comprehensive enumeration of QEMU system emulation ("softmmu")
|
2023-04-28 13:54:29 +03:00
|
|
|
# targets. Run "./configure --help" in the project root directory,
|
|
|
|
# and look for the \*-softmmu targets near the "--target-list" option.
|
|
|
|
# The individual target constants are not documented here, for the
|
|
|
|
# time being.
|
2019-07-09 18:20:53 +03:00
|
|
|
#
|
2019-01-21 16:18:59 +03:00
|
|
|
# @rx: since 5.0
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2020-01-24 03:51:21 +03:00
|
|
|
# @avr: since 5.1
|
2019-01-21 16:18:59 +03:00
|
|
|
#
|
2024-07-18 17:10:01 +03:00
|
|
|
# @loongarch64: since 7.1
|
|
|
|
#
|
qapi: convert "Note" sections to plain rST
We do not need a dedicated section for notes. By eliminating a specially
parsed section, these notes can be treated as normal rST paragraphs in
the new QMP reference manual, and can be placed and styled much more
flexibly.
Convert all existing "Note" and "Notes" sections to pure rST. As part of
the conversion, capitalize the first letter of each sentence and add
trailing punctuation where appropriate to ensure notes look sensible and
consistent in rendered HTML documentation. Markup is also re-aligned to
the de-facto standard of 3 spaces for directives.
Update docs/devel/qapi-code-gen.rst to reflect the new paradigm, and
update the QAPI parser to prohibit "Note" sections while suggesting a
new syntax. The exact formatting to use is a matter of taste, but a good
candidate is simply:
.. note:: lorem ipsum ...
... dolor sit amet ...
... consectetur adipiscing elit ...
... but there are other choices, too. The Sphinx readthedocs theme
offers theming for the following forms (capitalization unimportant); all
are adorned with a (!) symbol () in the title bar for rendered HTML
docs.
See
https://sphinx-rtd-theme.readthedocs.io/en/stable/demo/demo.html#admonitions
for examples of each directive/admonition in use.
These are rendered in orange:
.. Attention:: ...
.. Caution:: ...
.. WARNING:: ...
These are rendered in red:
.. DANGER:: ...
.. Error:: ...
These are rendered in green:
.. Hint:: ...
.. Important:: ...
.. Tip:: ...
These are rendered in blue:
.. Note:: ...
.. admonition:: custom title
admonition body text
This patch uses ".. note::" almost everywhere, with just two "caution"
directives. Several instances of "Notes:" have been converted to
merely ".. note::", or multiple ".. note::" where appropriate.
".. admonition:: notes" is used in a few places where we had an
ordered list of multiple notes that would not make sense as
standalone/separate admonitions. Two "Note:" following "Example:"
have been turned into ordinary paragraphs within the example.
NOTE: Because qapidoc.py does not attempt to preserve source ordering of
sections, the conversion of Notes from a "tagged section" to an
"untagged section" means that rendering order for some notes *may
change* as a result of this patch. The forthcoming qapidoc.py rewrite
strictly preserves source ordering in the rendered documentation, so
this issue will be rectified in the new generator.
Signed-off-by: John Snow <jsnow@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com> [for block*.json]
Message-ID: <20240626222128.406106-11-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Commit message clarified slightly, period added to one more note]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2024-06-27 01:21:16 +03:00
|
|
|
# .. note:: The resulting QMP strings can be appended to the
|
2024-07-29 09:52:20 +03:00
|
|
|
# "qemu-system-" prefix to produce the corresponding QEMU
|
|
|
|
# executable name. This is true even for "qemu-system-x86_64".
|
2019-07-09 18:20:53 +03:00
|
|
|
#
|
|
|
|
# Since: 3.0
|
|
|
|
##
|
|
|
|
{ 'enum' : 'SysEmuTarget',
|
2024-07-24 14:47:57 +03:00
|
|
|
'data' : [ 'aarch64', 'alpha', 'arm', 'avr', 'hppa', 'i386',
|
2022-06-06 15:43:20 +03:00
|
|
|
'loongarch64', 'm68k', 'microblaze', 'microblazeel', 'mips', 'mips64',
|
2024-03-27 14:10:58 +03:00
|
|
|
'mips64el', 'mipsel', 'or1k', 'ppc',
|
2019-01-21 16:18:59 +03:00
|
|
|
'ppc64', 'riscv32', 'riscv64', 'rx', 's390x', 'sh4',
|
2024-09-26 13:58:43 +03:00
|
|
|
'sparc', 'sparc64', 'tricore',
|
2019-07-09 18:20:53 +03:00
|
|
|
'x86_64', 'xtensa', 'xtensaeb' ] }
|
2019-06-19 23:10:41 +03:00
|
|
|
|
|
|
|
##
|
2024-09-04 14:18:26 +03:00
|
|
|
# @S390CpuState:
|
2019-06-19 23:10:41 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# An enumeration of cpu states that can be assumed by a virtual S390
|
|
|
|
# CPU
|
2019-06-19 23:10:41 +03:00
|
|
|
#
|
|
|
|
# Since: 2.12
|
|
|
|
##
|
2024-09-04 14:18:26 +03:00
|
|
|
{ 'enum': 'S390CpuState',
|
2019-06-19 23:10:41 +03:00
|
|
|
'data': [ 'uninitialized', 'stopped', 'check-stop', 'operating', 'load' ] }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @CpuInfoS390:
|
|
|
|
#
|
|
|
|
# Additional information about a virtual S390 CPU
|
|
|
|
#
|
|
|
|
# @cpu-state: the virtual CPU's state
|
|
|
|
#
|
2023-10-16 21:39:14 +03:00
|
|
|
# @dedicated: the virtual CPU's dedication (since 8.2)
|
|
|
|
#
|
|
|
|
# @entitlement: the virtual CPU's entitlement (since 8.2)
|
|
|
|
#
|
2019-06-19 23:10:41 +03:00
|
|
|
# Since: 2.12
|
|
|
|
##
|
2023-10-16 21:39:14 +03:00
|
|
|
{ 'struct': 'CpuInfoS390',
|
2024-09-04 14:18:26 +03:00
|
|
|
'data': { 'cpu-state': 'S390CpuState',
|
2023-10-16 21:39:14 +03:00
|
|
|
'*dedicated': 'bool',
|
2024-09-04 14:18:26 +03:00
|
|
|
'*entitlement': 'S390CpuEntitlement' } }
|
2019-06-19 23:10:41 +03:00
|
|
|
|
|
|
|
##
|
|
|
|
# @CpuInfoFast:
|
|
|
|
#
|
|
|
|
# Information about a virtual CPU
|
|
|
|
#
|
|
|
|
# @cpu-index: index of the virtual CPU
|
|
|
|
#
|
|
|
|
# @qom-path: path to the CPU object in the QOM tree
|
|
|
|
#
|
|
|
|
# @thread-id: ID of the underlying host thread
|
|
|
|
#
|
2023-10-16 21:39:05 +03:00
|
|
|
# @props: properties associated with a virtual CPU, e.g. the socket id
|
2019-06-19 23:10:41 +03:00
|
|
|
#
|
|
|
|
# @target: the QEMU system emulation target, which determines which
|
2023-04-28 13:54:29 +03:00
|
|
|
# additional fields will be listed (since 3.0)
|
2019-06-19 23:10:41 +03:00
|
|
|
#
|
|
|
|
# Since: 2.12
|
|
|
|
##
|
|
|
|
{ 'union' : 'CpuInfoFast',
|
|
|
|
'base' : { 'cpu-index' : 'int',
|
|
|
|
'qom-path' : 'str',
|
|
|
|
'thread-id' : 'int',
|
|
|
|
'*props' : 'CpuInstanceProperties',
|
|
|
|
'target' : 'SysEmuTarget' },
|
|
|
|
'discriminator' : 'target',
|
|
|
|
'data' : { 's390x' : 'CpuInfoS390' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @query-cpus-fast:
|
|
|
|
#
|
2021-02-22 15:54:55 +03:00
|
|
|
# Returns information about all virtual CPUs.
|
2019-06-19 23:10:41 +03:00
|
|
|
#
|
|
|
|
# Returns: list of @CpuInfoFast
|
|
|
|
#
|
|
|
|
# Since: 2.12
|
|
|
|
#
|
2024-07-17 05:13:08 +03:00
|
|
|
# .. qmp-example::
|
2019-06-19 23:10:41 +03:00
|
|
|
#
|
2024-02-16 17:58:34 +03:00
|
|
|
# -> { "execute": "query-cpus-fast" }
|
|
|
|
# <- { "return": [
|
|
|
|
# {
|
|
|
|
# "thread-id": 25627,
|
|
|
|
# "props": {
|
|
|
|
# "core-id": 0,
|
|
|
|
# "thread-id": 0,
|
|
|
|
# "socket-id": 0
|
|
|
|
# },
|
|
|
|
# "qom-path": "/machine/unattached/device[0]",
|
|
|
|
# "target":"x86_64",
|
|
|
|
# "cpu-index": 0
|
2019-06-19 23:10:41 +03:00
|
|
|
# },
|
2024-02-16 17:58:34 +03:00
|
|
|
# {
|
|
|
|
# "thread-id": 25628,
|
|
|
|
# "props": {
|
|
|
|
# "core-id": 0,
|
|
|
|
# "thread-id": 0,
|
|
|
|
# "socket-id": 1
|
|
|
|
# },
|
|
|
|
# "qom-path": "/machine/unattached/device[2]",
|
|
|
|
# "target":"x86_64",
|
|
|
|
# "cpu-index": 1
|
|
|
|
# }
|
|
|
|
# ]
|
|
|
|
# }
|
2019-06-19 23:10:41 +03:00
|
|
|
##
|
|
|
|
{ 'command': 'query-cpus-fast', 'returns': [ 'CpuInfoFast' ] }
|
|
|
|
|
2024-03-19 00:35:48 +03:00
|
|
|
##
|
|
|
|
# @CompatProperty:
|
|
|
|
#
|
|
|
|
# Property default values specific to a machine type, for use by
|
|
|
|
# scripts/compare-machine-types.
|
|
|
|
#
|
|
|
|
# @qom-type: name of the QOM type to which the default applies
|
|
|
|
#
|
|
|
|
# @property: name of its property to which the default applies
|
|
|
|
#
|
|
|
|
# @value: the default value (machine-specific default can overwrite
|
|
|
|
# the "default" default, to avoid this use -machine none)
|
|
|
|
#
|
|
|
|
# Since: 9.1
|
|
|
|
##
|
|
|
|
{ 'struct': 'CompatProperty',
|
|
|
|
'data': { 'qom-type': 'str',
|
|
|
|
'property': 'str',
|
|
|
|
'value': 'str' } }
|
|
|
|
|
2019-06-19 23:10:41 +03:00
|
|
|
##
|
|
|
|
# @MachineInfo:
|
|
|
|
#
|
|
|
|
# Information describing a machine.
|
|
|
|
#
|
|
|
|
# @name: the name of the machine
|
|
|
|
#
|
|
|
|
# @alias: an alias for the machine name
|
|
|
|
#
|
|
|
|
# @is-default: whether the machine is default
|
|
|
|
#
|
|
|
|
# @cpu-max: maximum number of CPUs supported by the machine type
|
2023-04-28 13:54:29 +03:00
|
|
|
# (since 1.5)
|
2019-06-19 23:10:41 +03:00
|
|
|
#
|
2020-11-18 09:41:58 +03:00
|
|
|
# @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7)
|
2019-06-19 23:10:41 +03:00
|
|
|
#
|
2019-06-10 16:10:07 +03:00
|
|
|
# @numa-mem-supported: true if '-numa node,mem' option is supported by
|
2023-04-28 13:54:29 +03:00
|
|
|
# the machine type and false otherwise (since 4.1)
|
2019-06-10 16:10:07 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @deprecated: if true, the machine type is deprecated and may be
|
|
|
|
# removed in future versions of QEMU according to the QEMU
|
|
|
|
# deprecation policy (since 4.1)
|
2019-06-09 02:34:47 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @default-cpu-type: default CPU model typename if none is requested
|
|
|
|
# via the -cpu argument. (since 4.2)
|
2019-08-22 13:04:12 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @default-ram-id: the default ID of initial RAM memory backend (since
|
|
|
|
# 5.2)
|
2020-05-26 11:25:35 +03:00
|
|
|
#
|
2023-02-28 11:12:34 +03:00
|
|
|
# @acpi: machine type supports ACPI (since 8.0)
|
|
|
|
#
|
2024-03-19 00:35:48 +03:00
|
|
|
# @compat-props: The machine type's compatibility properties. Only
|
|
|
|
# present when query-machines argument @compat-props is true.
|
|
|
|
# (since 9.1)
|
|
|
|
#
|
|
|
|
# Features:
|
|
|
|
#
|
|
|
|
# @unstable: Member @compat-props is experimental.
|
|
|
|
#
|
2020-11-18 09:41:58 +03:00
|
|
|
# Since: 1.2
|
2019-06-19 23:10:41 +03:00
|
|
|
##
|
|
|
|
{ 'struct': 'MachineInfo',
|
|
|
|
'data': { 'name': 'str', '*alias': 'str',
|
|
|
|
'*is-default': 'bool', 'cpu-max': 'int',
|
2019-06-09 02:34:47 +03:00
|
|
|
'hotpluggable-cpus': 'bool', 'numa-mem-supported': 'bool',
|
2020-05-26 11:25:35 +03:00
|
|
|
'deprecated': 'bool', '*default-cpu-type': 'str',
|
2024-03-19 00:35:48 +03:00
|
|
|
'*default-ram-id': 'str', 'acpi': 'bool',
|
|
|
|
'*compat-props': { 'type': ['CompatProperty'],
|
|
|
|
'features': ['unstable'] } } }
|
2019-06-19 23:10:41 +03:00
|
|
|
|
|
|
|
##
|
|
|
|
# @query-machines:
|
|
|
|
#
|
|
|
|
# Return a list of supported machines
|
|
|
|
#
|
2024-03-19 00:35:48 +03:00
|
|
|
# @compat-props: if true, also return compatibility properties.
|
|
|
|
# (default: false) (since 9.1)
|
|
|
|
#
|
|
|
|
# Features:
|
|
|
|
#
|
|
|
|
# @unstable: Argument @compat-props is experimental.
|
|
|
|
#
|
2019-06-19 23:10:41 +03:00
|
|
|
# Returns: a list of MachineInfo
|
|
|
|
#
|
2020-11-18 09:41:58 +03:00
|
|
|
# Since: 1.2
|
2024-03-19 00:35:48 +03:00
|
|
|
#
|
2024-07-17 05:13:08 +03:00
|
|
|
# .. qmp-example::
|
2024-03-19 00:35:48 +03:00
|
|
|
#
|
|
|
|
# -> { "execute": "query-machines", "arguments": { "compat-props": true } }
|
|
|
|
# <- { "return": [
|
|
|
|
# {
|
|
|
|
# "hotpluggable-cpus": true,
|
|
|
|
# "name": "pc-q35-6.2",
|
|
|
|
# "compat-props": [
|
|
|
|
# {
|
|
|
|
# "qom-type": "virtio-mem",
|
|
|
|
# "property": "unplugged-inaccessible",
|
|
|
|
# "value": "off"
|
|
|
|
# }
|
|
|
|
# ],
|
|
|
|
# "numa-mem-supported": false,
|
|
|
|
# "default-cpu-type": "qemu64-x86_64-cpu",
|
|
|
|
# "cpu-max": 288,
|
|
|
|
# "deprecated": false,
|
|
|
|
# "default-ram-id": "pc.ram"
|
|
|
|
# },
|
|
|
|
# ...
|
|
|
|
# }
|
2019-06-19 23:10:41 +03:00
|
|
|
##
|
2024-03-19 00:35:48 +03:00
|
|
|
{ 'command': 'query-machines',
|
|
|
|
'data': { '*compat-props': { 'type': 'bool',
|
|
|
|
'features': [ 'unstable' ] } },
|
|
|
|
'returns': ['MachineInfo'] }
|
2019-06-19 23:10:41 +03:00
|
|
|
|
|
|
|
##
|
|
|
|
# @CurrentMachineParams:
|
|
|
|
#
|
|
|
|
# Information describing the running machine parameters.
|
|
|
|
#
|
|
|
|
# @wakeup-suspend-support: true if the machine supports wake up from
|
2023-04-28 13:54:29 +03:00
|
|
|
# suspend
|
2019-06-19 23:10:41 +03:00
|
|
|
#
|
|
|
|
# Since: 4.0
|
|
|
|
##
|
|
|
|
{ 'struct': 'CurrentMachineParams',
|
|
|
|
'data': { 'wakeup-suspend-support': 'bool'} }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @query-current-machine:
|
|
|
|
#
|
|
|
|
# Return information on the current virtual machine.
|
|
|
|
#
|
|
|
|
# Returns: CurrentMachineParams
|
|
|
|
#
|
|
|
|
# Since: 4.0
|
|
|
|
##
|
|
|
|
{ 'command': 'query-current-machine', 'returns': 'CurrentMachineParams' }
|
|
|
|
|
2019-07-09 18:20:53 +03:00
|
|
|
##
|
|
|
|
# @TargetInfo:
|
|
|
|
#
|
|
|
|
# Information describing the QEMU target.
|
|
|
|
#
|
|
|
|
# @arch: the target architecture
|
|
|
|
#
|
2020-11-18 09:41:58 +03:00
|
|
|
# Since: 1.2
|
2019-07-09 18:20:53 +03:00
|
|
|
##
|
|
|
|
{ 'struct': 'TargetInfo',
|
|
|
|
'data': { 'arch': 'SysEmuTarget' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @query-target:
|
|
|
|
#
|
|
|
|
# Return information about the target for this QEMU
|
|
|
|
#
|
|
|
|
# Returns: TargetInfo
|
|
|
|
#
|
2020-11-18 09:41:58 +03:00
|
|
|
# Since: 1.2
|
2019-07-09 18:20:53 +03:00
|
|
|
##
|
|
|
|
{ 'command': 'query-target', 'returns': 'TargetInfo' }
|
|
|
|
|
2020-09-13 22:53:45 +03:00
|
|
|
##
|
|
|
|
# @UuidInfo:
|
|
|
|
#
|
|
|
|
# Guest UUID information (Universally Unique Identifier).
|
|
|
|
#
|
|
|
|
# @UUID: the UUID of the guest
|
|
|
|
#
|
2020-11-18 09:41:58 +03:00
|
|
|
# Since: 0.14
|
2020-09-13 22:53:45 +03:00
|
|
|
#
|
2024-07-11 14:22:26 +03:00
|
|
|
# .. note:: If no UUID was specified for the guest, the nil UUID (all
|
|
|
|
# zeroes) is returned.
|
2020-09-13 22:53:45 +03:00
|
|
|
##
|
|
|
|
{ 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @query-uuid:
|
|
|
|
#
|
|
|
|
# Query the guest UUID information.
|
|
|
|
#
|
|
|
|
# Returns: The @UuidInfo for the guest
|
|
|
|
#
|
2020-11-18 09:41:58 +03:00
|
|
|
# Since: 0.14
|
2020-09-13 22:53:45 +03:00
|
|
|
#
|
2024-07-17 05:13:08 +03:00
|
|
|
# .. qmp-example::
|
2020-09-13 22:53:45 +03:00
|
|
|
#
|
2024-02-16 17:58:34 +03:00
|
|
|
# -> { "execute": "query-uuid" }
|
|
|
|
# <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
|
2020-09-13 22:53:45 +03:00
|
|
|
##
|
|
|
|
{ 'command': 'query-uuid', 'returns': 'UuidInfo', 'allow-preconfig': true }
|
|
|
|
|
2020-09-13 22:53:44 +03:00
|
|
|
##
|
|
|
|
# @GuidInfo:
|
|
|
|
#
|
|
|
|
# GUID information.
|
|
|
|
#
|
|
|
|
# @guid: the globally unique identifier
|
|
|
|
#
|
|
|
|
# Since: 2.9
|
|
|
|
##
|
|
|
|
{ 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @query-vm-generation-id:
|
|
|
|
#
|
|
|
|
# Show Virtual Machine Generation ID
|
|
|
|
#
|
|
|
|
# Since: 2.9
|
|
|
|
##
|
|
|
|
{ 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }
|
|
|
|
|
2020-10-12 15:15:33 +03:00
|
|
|
##
|
|
|
|
# @system_reset:
|
|
|
|
#
|
|
|
|
# Performs a hard reset of a guest.
|
|
|
|
#
|
2020-11-18 09:41:58 +03:00
|
|
|
# Since: 0.14
|
2020-10-12 15:15:33 +03:00
|
|
|
#
|
2024-07-17 05:13:08 +03:00
|
|
|
# .. qmp-example::
|
2020-10-12 15:15:33 +03:00
|
|
|
#
|
2024-02-16 17:58:34 +03:00
|
|
|
# -> { "execute": "system_reset" }
|
|
|
|
# <- { "return": {} }
|
2020-10-12 15:15:33 +03:00
|
|
|
##
|
|
|
|
{ 'command': 'system_reset' }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @system_powerdown:
|
|
|
|
#
|
|
|
|
# Requests that a guest perform a powerdown operation.
|
|
|
|
#
|
2020-11-18 09:41:58 +03:00
|
|
|
# Since: 0.14
|
2020-10-12 15:15:33 +03:00
|
|
|
#
|
qapi: convert "Note" sections to plain rST
We do not need a dedicated section for notes. By eliminating a specially
parsed section, these notes can be treated as normal rST paragraphs in
the new QMP reference manual, and can be placed and styled much more
flexibly.
Convert all existing "Note" and "Notes" sections to pure rST. As part of
the conversion, capitalize the first letter of each sentence and add
trailing punctuation where appropriate to ensure notes look sensible and
consistent in rendered HTML documentation. Markup is also re-aligned to
the de-facto standard of 3 spaces for directives.
Update docs/devel/qapi-code-gen.rst to reflect the new paradigm, and
update the QAPI parser to prohibit "Note" sections while suggesting a
new syntax. The exact formatting to use is a matter of taste, but a good
candidate is simply:
.. note:: lorem ipsum ...
... dolor sit amet ...
... consectetur adipiscing elit ...
... but there are other choices, too. The Sphinx readthedocs theme
offers theming for the following forms (capitalization unimportant); all
are adorned with a (!) symbol () in the title bar for rendered HTML
docs.
See
https://sphinx-rtd-theme.readthedocs.io/en/stable/demo/demo.html#admonitions
for examples of each directive/admonition in use.
These are rendered in orange:
.. Attention:: ...
.. Caution:: ...
.. WARNING:: ...
These are rendered in red:
.. DANGER:: ...
.. Error:: ...
These are rendered in green:
.. Hint:: ...
.. Important:: ...
.. Tip:: ...
These are rendered in blue:
.. Note:: ...
.. admonition:: custom title
admonition body text
This patch uses ".. note::" almost everywhere, with just two "caution"
directives. Several instances of "Notes:" have been converted to
merely ".. note::", or multiple ".. note::" where appropriate.
".. admonition:: notes" is used in a few places where we had an
ordered list of multiple notes that would not make sense as
standalone/separate admonitions. Two "Note:" following "Example:"
have been turned into ordinary paragraphs within the example.
NOTE: Because qapidoc.py does not attempt to preserve source ordering of
sections, the conversion of Notes from a "tagged section" to an
"untagged section" means that rendering order for some notes *may
change* as a result of this patch. The forthcoming qapidoc.py rewrite
strictly preserves source ordering in the rendered documentation, so
this issue will be rectified in the new generator.
Signed-off-by: John Snow <jsnow@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com> [for block*.json]
Message-ID: <20240626222128.406106-11-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Commit message clarified slightly, period added to one more note]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2024-06-27 01:21:16 +03:00
|
|
|
# .. note:: A guest may or may not respond to this command. This
|
|
|
|
# command returning does not indicate that a guest has accepted the
|
2024-07-29 09:52:20 +03:00
|
|
|
# request or that it has shut down. Many guests will respond to
|
|
|
|
# this command by prompting the user in some way.
|
2022-05-03 10:37:32 +03:00
|
|
|
#
|
2024-07-17 05:13:08 +03:00
|
|
|
# .. qmp-example::
|
2020-10-12 15:15:33 +03:00
|
|
|
#
|
2024-02-16 17:58:34 +03:00
|
|
|
# -> { "execute": "system_powerdown" }
|
|
|
|
# <- { "return": {} }
|
2020-10-12 15:15:33 +03:00
|
|
|
##
|
|
|
|
{ 'command': 'system_powerdown' }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @system_wakeup:
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# Wake up guest from suspend. If the guest has wake-up from suspend
|
2020-10-12 15:15:33 +03:00
|
|
|
# support enabled (wakeup-suspend-support flag from
|
|
|
|
# query-current-machine), wake-up guest from suspend if the guest is
|
2023-04-28 13:54:29 +03:00
|
|
|
# in SUSPENDED state. Return an error otherwise.
|
2020-10-12 15:15:33 +03:00
|
|
|
#
|
2022-05-03 10:37:35 +03:00
|
|
|
# Since: 1.1
|
2020-10-12 15:15:33 +03:00
|
|
|
#
|
qapi: convert "Note" sections to plain rST
We do not need a dedicated section for notes. By eliminating a specially
parsed section, these notes can be treated as normal rST paragraphs in
the new QMP reference manual, and can be placed and styled much more
flexibly.
Convert all existing "Note" and "Notes" sections to pure rST. As part of
the conversion, capitalize the first letter of each sentence and add
trailing punctuation where appropriate to ensure notes look sensible and
consistent in rendered HTML documentation. Markup is also re-aligned to
the de-facto standard of 3 spaces for directives.
Update docs/devel/qapi-code-gen.rst to reflect the new paradigm, and
update the QAPI parser to prohibit "Note" sections while suggesting a
new syntax. The exact formatting to use is a matter of taste, but a good
candidate is simply:
.. note:: lorem ipsum ...
... dolor sit amet ...
... consectetur adipiscing elit ...
... but there are other choices, too. The Sphinx readthedocs theme
offers theming for the following forms (capitalization unimportant); all
are adorned with a (!) symbol () in the title bar for rendered HTML
docs.
See
https://sphinx-rtd-theme.readthedocs.io/en/stable/demo/demo.html#admonitions
for examples of each directive/admonition in use.
These are rendered in orange:
.. Attention:: ...
.. Caution:: ...
.. WARNING:: ...
These are rendered in red:
.. DANGER:: ...
.. Error:: ...
These are rendered in green:
.. Hint:: ...
.. Important:: ...
.. Tip:: ...
These are rendered in blue:
.. Note:: ...
.. admonition:: custom title
admonition body text
This patch uses ".. note::" almost everywhere, with just two "caution"
directives. Several instances of "Notes:" have been converted to
merely ".. note::", or multiple ".. note::" where appropriate.
".. admonition:: notes" is used in a few places where we had an
ordered list of multiple notes that would not make sense as
standalone/separate admonitions. Two "Note:" following "Example:"
have been turned into ordinary paragraphs within the example.
NOTE: Because qapidoc.py does not attempt to preserve source ordering of
sections, the conversion of Notes from a "tagged section" to an
"untagged section" means that rendering order for some notes *may
change* as a result of this patch. The forthcoming qapidoc.py rewrite
strictly preserves source ordering in the rendered documentation, so
this issue will be rectified in the new generator.
Signed-off-by: John Snow <jsnow@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com> [for block*.json]
Message-ID: <20240626222128.406106-11-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Commit message clarified slightly, period added to one more note]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2024-06-27 01:21:16 +03:00
|
|
|
# .. note:: Prior to 4.0, this command does nothing in case the guest
|
|
|
|
# isn't suspended.
|
2020-10-12 15:15:33 +03:00
|
|
|
#
|
2024-07-17 05:13:08 +03:00
|
|
|
# .. qmp-example::
|
2020-10-12 15:15:33 +03:00
|
|
|
#
|
2024-02-16 17:58:34 +03:00
|
|
|
# -> { "execute": "system_wakeup" }
|
|
|
|
# <- { "return": {} }
|
2020-10-12 15:15:33 +03:00
|
|
|
##
|
|
|
|
{ 'command': 'system_wakeup' }
|
|
|
|
|
2020-09-13 22:53:41 +03:00
|
|
|
##
|
|
|
|
# @LostTickPolicy:
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# Policy for handling lost ticks in timer devices. Ticks end up
|
|
|
|
# getting lost when, for example, the guest is paused.
|
|
|
|
#
|
|
|
|
# @discard: throw away the missed ticks and continue with future
|
|
|
|
# injection normally. The guest OS will see the timer jump ahead
|
|
|
|
# by a potentially quite significant amount all at once, as if the
|
|
|
|
# intervening chunk of time had simply not existed; needless to
|
|
|
|
# say, such a sudden jump can easily confuse a guest OS which is
|
|
|
|
# not specifically prepared to deal with it. Assuming the guest
|
|
|
|
# OS can deal correctly with the time jump, the time in the guest
|
|
|
|
# and in the host should now match.
|
|
|
|
#
|
|
|
|
# @delay: continue to deliver ticks at the normal rate. The guest OS
|
|
|
|
# will not notice anything is amiss, as from its point of view
|
|
|
|
# time will have continued to flow normally. The time in the
|
|
|
|
# guest should now be behind the time in the host by exactly the
|
|
|
|
# amount of time during which ticks have been missed.
|
|
|
|
#
|
|
|
|
# @slew: deliver ticks at a higher rate to catch up with the missed
|
|
|
|
# ticks. The guest OS will not notice anything is amiss, as from
|
|
|
|
# its point of view time will have continued to flow normally.
|
|
|
|
# Once the timer has managed to catch up with all the missing
|
|
|
|
# ticks, the time in the guest and in the host should match.
|
2020-09-13 22:53:41 +03:00
|
|
|
#
|
|
|
|
# Since: 2.0
|
|
|
|
##
|
|
|
|
{ 'enum': 'LostTickPolicy',
|
|
|
|
'data': ['discard', 'delay', 'slew' ] }
|
|
|
|
|
2020-10-12 15:15:32 +03:00
|
|
|
##
|
|
|
|
# @inject-nmi:
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or
|
2024-07-29 09:52:20 +03:00
|
|
|
# all CPUs (ppc64). The command fails when the guest doesn't support
|
2023-04-28 13:54:29 +03:00
|
|
|
# injecting.
|
2020-10-12 15:15:32 +03:00
|
|
|
#
|
2022-05-03 10:37:35 +03:00
|
|
|
# Since: 0.14
|
2020-10-12 15:15:32 +03:00
|
|
|
#
|
qapi: convert "Note" sections to plain rST
We do not need a dedicated section for notes. By eliminating a specially
parsed section, these notes can be treated as normal rST paragraphs in
the new QMP reference manual, and can be placed and styled much more
flexibly.
Convert all existing "Note" and "Notes" sections to pure rST. As part of
the conversion, capitalize the first letter of each sentence and add
trailing punctuation where appropriate to ensure notes look sensible and
consistent in rendered HTML documentation. Markup is also re-aligned to
the de-facto standard of 3 spaces for directives.
Update docs/devel/qapi-code-gen.rst to reflect the new paradigm, and
update the QAPI parser to prohibit "Note" sections while suggesting a
new syntax. The exact formatting to use is a matter of taste, but a good
candidate is simply:
.. note:: lorem ipsum ...
... dolor sit amet ...
... consectetur adipiscing elit ...
... but there are other choices, too. The Sphinx readthedocs theme
offers theming for the following forms (capitalization unimportant); all
are adorned with a (!) symbol () in the title bar for rendered HTML
docs.
See
https://sphinx-rtd-theme.readthedocs.io/en/stable/demo/demo.html#admonitions
for examples of each directive/admonition in use.
These are rendered in orange:
.. Attention:: ...
.. Caution:: ...
.. WARNING:: ...
These are rendered in red:
.. DANGER:: ...
.. Error:: ...
These are rendered in green:
.. Hint:: ...
.. Important:: ...
.. Tip:: ...
These are rendered in blue:
.. Note:: ...
.. admonition:: custom title
admonition body text
This patch uses ".. note::" almost everywhere, with just two "caution"
directives. Several instances of "Notes:" have been converted to
merely ".. note::", or multiple ".. note::" where appropriate.
".. admonition:: notes" is used in a few places where we had an
ordered list of multiple notes that would not make sense as
standalone/separate admonitions. Two "Note:" following "Example:"
have been turned into ordinary paragraphs within the example.
NOTE: Because qapidoc.py does not attempt to preserve source ordering of
sections, the conversion of Notes from a "tagged section" to an
"untagged section" means that rendering order for some notes *may
change* as a result of this patch. The forthcoming qapidoc.py rewrite
strictly preserves source ordering in the rendered documentation, so
this issue will be rectified in the new generator.
Signed-off-by: John Snow <jsnow@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com> [for block*.json]
Message-ID: <20240626222128.406106-11-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Commit message clarified slightly, period added to one more note]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2024-06-27 01:21:16 +03:00
|
|
|
# .. note:: Prior to 2.1, this command was only supported for x86 and
|
|
|
|
# s390 VMs.
|
2020-10-12 15:15:32 +03:00
|
|
|
#
|
2024-07-17 05:13:08 +03:00
|
|
|
# .. qmp-example::
|
2020-10-12 15:15:32 +03:00
|
|
|
#
|
2024-02-16 17:58:34 +03:00
|
|
|
# -> { "execute": "inject-nmi" }
|
|
|
|
# <- { "return": {} }
|
2020-10-12 15:15:32 +03:00
|
|
|
##
|
|
|
|
{ 'command': 'inject-nmi' }
|
|
|
|
|
2020-10-12 15:15:35 +03:00
|
|
|
##
|
|
|
|
# @KvmInfo:
|
|
|
|
#
|
|
|
|
# Information about support for KVM acceleration
|
|
|
|
#
|
|
|
|
# @enabled: true if KVM acceleration is active
|
|
|
|
#
|
|
|
|
# @present: true if KVM acceleration is built into this executable
|
|
|
|
#
|
2020-11-18 09:41:58 +03:00
|
|
|
# Since: 0.14
|
2020-10-12 15:15:35 +03:00
|
|
|
##
|
|
|
|
{ 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @query-kvm:
|
|
|
|
#
|
|
|
|
# Returns information about KVM acceleration
|
|
|
|
#
|
|
|
|
# Returns: @KvmInfo
|
|
|
|
#
|
2020-11-18 09:41:58 +03:00
|
|
|
# Since: 0.14
|
2020-10-12 15:15:35 +03:00
|
|
|
#
|
2024-07-17 05:13:08 +03:00
|
|
|
# .. qmp-example::
|
2020-10-12 15:15:35 +03:00
|
|
|
#
|
2024-02-16 17:58:34 +03:00
|
|
|
# -> { "execute": "query-kvm" }
|
|
|
|
# <- { "return": { "enabled": true, "present": true } }
|
2020-10-12 15:15:35 +03:00
|
|
|
##
|
|
|
|
{ 'command': 'query-kvm', 'returns': 'KvmInfo' }
|
|
|
|
|
2019-06-19 23:10:41 +03:00
|
|
|
##
|
|
|
|
# @NumaOptionsType:
|
|
|
|
#
|
|
|
|
# @node: NUMA nodes configuration
|
|
|
|
#
|
|
|
|
# @dist: NUMA distance configuration (since 2.10)
|
|
|
|
#
|
|
|
|
# @cpu: property based CPU(s) to node mapping (Since: 2.10)
|
|
|
|
#
|
2019-12-13 04:19:23 +03:00
|
|
|
# @hmat-lb: memory latency and bandwidth information (Since: 5.0)
|
|
|
|
#
|
2019-12-13 04:19:24 +03:00
|
|
|
# @hmat-cache: memory side cache information (Since: 5.0)
|
|
|
|
#
|
2019-06-19 23:10:41 +03:00
|
|
|
# Since: 2.1
|
|
|
|
##
|
|
|
|
{ 'enum': 'NumaOptionsType',
|
2019-12-13 04:19:24 +03:00
|
|
|
'data': [ 'node', 'dist', 'cpu', 'hmat-lb', 'hmat-cache' ] }
|
2019-06-19 23:10:41 +03:00
|
|
|
|
|
|
|
##
|
|
|
|
# @NumaOptions:
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# A discriminated record of NUMA options. (for OptsVisitor)
|
2019-06-19 23:10:41 +03:00
|
|
|
#
|
2024-02-05 10:47:09 +03:00
|
|
|
# @type: NUMA option type
|
|
|
|
#
|
2019-06-19 23:10:41 +03:00
|
|
|
# Since: 2.1
|
|
|
|
##
|
|
|
|
{ 'union': 'NumaOptions',
|
|
|
|
'base': { 'type': 'NumaOptionsType' },
|
|
|
|
'discriminator': 'type',
|
|
|
|
'data': {
|
|
|
|
'node': 'NumaNodeOptions',
|
|
|
|
'dist': 'NumaDistOptions',
|
2019-12-13 04:19:23 +03:00
|
|
|
'cpu': 'NumaCpuOptions',
|
2019-12-13 04:19:24 +03:00
|
|
|
'hmat-lb': 'NumaHmatLBOptions',
|
|
|
|
'hmat-cache': 'NumaHmatCacheOptions' }}
|
2019-06-19 23:10:41 +03:00
|
|
|
|
|
|
|
##
|
|
|
|
# @NumaNodeOptions:
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# Create a guest NUMA node. (for OptsVisitor)
|
2019-06-19 23:10:41 +03:00
|
|
|
#
|
|
|
|
# @nodeid: NUMA node ID (increase by 1 from 0 if omitted)
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @cpus: VCPUs belonging to this node (assign VCPUS round-robin if
|
|
|
|
# omitted)
|
2019-06-19 23:10:41 +03:00
|
|
|
#
|
|
|
|
# @mem: memory size of this node; mutually exclusive with @memdev.
|
2023-04-28 13:54:29 +03:00
|
|
|
# Equally divide total memory among nodes if both @mem and @memdev
|
|
|
|
# are omitted.
|
2019-06-19 23:10:41 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @memdev: memory backend object. If specified for one node, it must
|
|
|
|
# be specified for all nodes.
|
2019-06-19 23:10:41 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @initiator: defined in ACPI 6.3 Chapter 5.2.27.3 Table 5-145, points
|
|
|
|
# to the nodeid which has the memory controller responsible for
|
|
|
|
# this NUMA node. This field provides additional information as
|
|
|
|
# to the initiator node that is closest (as in directly attached)
|
|
|
|
# to this node, and therefore has the best performance (since 5.0)
|
2019-12-13 04:19:22 +03:00
|
|
|
#
|
2019-06-19 23:10:41 +03:00
|
|
|
# Since: 2.1
|
|
|
|
##
|
|
|
|
{ 'struct': 'NumaNodeOptions',
|
|
|
|
'data': {
|
|
|
|
'*nodeid': 'uint16',
|
|
|
|
'*cpus': ['uint16'],
|
|
|
|
'*mem': 'size',
|
2019-12-13 04:19:22 +03:00
|
|
|
'*memdev': 'str',
|
|
|
|
'*initiator': 'uint16' }}
|
2019-06-19 23:10:41 +03:00
|
|
|
|
|
|
|
##
|
|
|
|
# @NumaDistOptions:
|
|
|
|
#
|
|
|
|
# Set the distance between 2 NUMA nodes.
|
|
|
|
#
|
|
|
|
# @src: source NUMA node.
|
|
|
|
#
|
|
|
|
# @dst: destination NUMA node.
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @val: NUMA distance from source node to destination node. When a
|
|
|
|
# node is unreachable from another node, set the distance between
|
|
|
|
# them to 255.
|
2019-06-19 23:10:41 +03:00
|
|
|
#
|
|
|
|
# Since: 2.10
|
|
|
|
##
|
|
|
|
{ 'struct': 'NumaDistOptions',
|
|
|
|
'data': {
|
|
|
|
'src': 'uint16',
|
|
|
|
'dst': 'uint16',
|
|
|
|
'val': 'uint8' }}
|
|
|
|
|
hw/cxl/host: Add support for CXL Fixed Memory Windows.
The concept of these is introduced in [1] in terms of the
description the CEDT ACPI table. The principal is more general.
Unlike once traffic hits the CXL root bridges, the host system
memory address routing is implementation defined and effectively
static once observable by standard / generic system software.
Each CXL Fixed Memory Windows (CFMW) is a region of PA space
which has fixed system dependent routing configured so that
accesses can be routed to the CXL devices below a set of target
root bridges. The accesses may be interleaved across multiple
root bridges.
For QEMU we could have fully specified these regions in terms
of a base PA + size, but as the absolute address does not matter
it is simpler to let individual platforms place the memory regions.
ExampleS:
-cxl-fixed-memory-window targets.0=cxl.0,size=128G
-cxl-fixed-memory-window targets.0=cxl.1,size=128G
-cxl-fixed-memory-window targets.0=cxl0,targets.1=cxl.1,size=256G,interleave-granularity=2k
Specifies
* 2x 128G regions not interleaved across root bridges, one for each of
the root bridges with ids cxl.0 and cxl.1
* 256G region interleaved across root bridges with ids cxl.0 and cxl.1
with a 2k interleave granularity.
When system software enumerates the devices below a given root bridge
it can then decide which CFMW to use. If non interleave is desired
(or possible) it can use the appropriate CFMW for the root bridge in
question. If there are suitable devices to interleave across the
two root bridges then it may use the 3rd CFMS.
A number of other designs were considered but the following constraints
made it hard to adapt existing QEMU approaches to this particular problem.
1) The size must be known before a specific architecture / board brings
up it's PA memory map. We need to set up an appropriate region.
2) Using links to the host bridges provides a clean command line interface
but these links cannot be established until command line devices have
been added.
Hence the two step process used here of first establishing the size,
interleave-ways and granularity + caching the ids of the host bridges
and then, once available finding the actual host bridges so they can
be used later to support interleave decoding.
[1] CXL 2.0 ECN: CEDT CFMWS & QTG DSM (computeexpresslink.org / specifications)
Signed-off-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Acked-by: Markus Armbruster <armbru@redhat.com> # QAPI Schema
Message-Id: <20220429144110.25167-28-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-04-29 17:40:52 +03:00
|
|
|
##
|
|
|
|
# @CXLFixedMemoryWindowOptions:
|
|
|
|
#
|
|
|
|
# Create a CXL Fixed Memory Window
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @size: Size of the Fixed Memory Window in bytes. Must be a multiple
|
|
|
|
# of 256MiB.
|
|
|
|
#
|
hw/cxl/host: Add support for CXL Fixed Memory Windows.
The concept of these is introduced in [1] in terms of the
description the CEDT ACPI table. The principal is more general.
Unlike once traffic hits the CXL root bridges, the host system
memory address routing is implementation defined and effectively
static once observable by standard / generic system software.
Each CXL Fixed Memory Windows (CFMW) is a region of PA space
which has fixed system dependent routing configured so that
accesses can be routed to the CXL devices below a set of target
root bridges. The accesses may be interleaved across multiple
root bridges.
For QEMU we could have fully specified these regions in terms
of a base PA + size, but as the absolute address does not matter
it is simpler to let individual platforms place the memory regions.
ExampleS:
-cxl-fixed-memory-window targets.0=cxl.0,size=128G
-cxl-fixed-memory-window targets.0=cxl.1,size=128G
-cxl-fixed-memory-window targets.0=cxl0,targets.1=cxl.1,size=256G,interleave-granularity=2k
Specifies
* 2x 128G regions not interleaved across root bridges, one for each of
the root bridges with ids cxl.0 and cxl.1
* 256G region interleaved across root bridges with ids cxl.0 and cxl.1
with a 2k interleave granularity.
When system software enumerates the devices below a given root bridge
it can then decide which CFMW to use. If non interleave is desired
(or possible) it can use the appropriate CFMW for the root bridge in
question. If there are suitable devices to interleave across the
two root bridges then it may use the 3rd CFMS.
A number of other designs were considered but the following constraints
made it hard to adapt existing QEMU approaches to this particular problem.
1) The size must be known before a specific architecture / board brings
up it's PA memory map. We need to set up an appropriate region.
2) Using links to the host bridges provides a clean command line interface
but these links cannot be established until command line devices have
been added.
Hence the two step process used here of first establishing the size,
interleave-ways and granularity + caching the ids of the host bridges
and then, once available finding the actual host bridges so they can
be used later to support interleave decoding.
[1] CXL 2.0 ECN: CEDT CFMWS & QTG DSM (computeexpresslink.org / specifications)
Signed-off-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Acked-by: Markus Armbruster <armbru@redhat.com> # QAPI Schema
Message-Id: <20220429144110.25167-28-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-04-29 17:40:52 +03:00
|
|
|
# @interleave-granularity: Number of contiguous bytes for which
|
2023-04-28 13:54:29 +03:00
|
|
|
# accesses will go to a given interleave target. Accepted values
|
|
|
|
# [256, 512, 1k, 2k, 4k, 8k, 16k]
|
|
|
|
#
|
|
|
|
# @targets: Target root bridge IDs from -device ...,id=<ID> for each
|
|
|
|
# root bridge.
|
hw/cxl/host: Add support for CXL Fixed Memory Windows.
The concept of these is introduced in [1] in terms of the
description the CEDT ACPI table. The principal is more general.
Unlike once traffic hits the CXL root bridges, the host system
memory address routing is implementation defined and effectively
static once observable by standard / generic system software.
Each CXL Fixed Memory Windows (CFMW) is a region of PA space
which has fixed system dependent routing configured so that
accesses can be routed to the CXL devices below a set of target
root bridges. The accesses may be interleaved across multiple
root bridges.
For QEMU we could have fully specified these regions in terms
of a base PA + size, but as the absolute address does not matter
it is simpler to let individual platforms place the memory regions.
ExampleS:
-cxl-fixed-memory-window targets.0=cxl.0,size=128G
-cxl-fixed-memory-window targets.0=cxl.1,size=128G
-cxl-fixed-memory-window targets.0=cxl0,targets.1=cxl.1,size=256G,interleave-granularity=2k
Specifies
* 2x 128G regions not interleaved across root bridges, one for each of
the root bridges with ids cxl.0 and cxl.1
* 256G region interleaved across root bridges with ids cxl.0 and cxl.1
with a 2k interleave granularity.
When system software enumerates the devices below a given root bridge
it can then decide which CFMW to use. If non interleave is desired
(or possible) it can use the appropriate CFMW for the root bridge in
question. If there are suitable devices to interleave across the
two root bridges then it may use the 3rd CFMS.
A number of other designs were considered but the following constraints
made it hard to adapt existing QEMU approaches to this particular problem.
1) The size must be known before a specific architecture / board brings
up it's PA memory map. We need to set up an appropriate region.
2) Using links to the host bridges provides a clean command line interface
but these links cannot be established until command line devices have
been added.
Hence the two step process used here of first establishing the size,
interleave-ways and granularity + caching the ids of the host bridges
and then, once available finding the actual host bridges so they can
be used later to support interleave decoding.
[1] CXL 2.0 ECN: CEDT CFMWS & QTG DSM (computeexpresslink.org / specifications)
Signed-off-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Acked-by: Markus Armbruster <armbru@redhat.com> # QAPI Schema
Message-Id: <20220429144110.25167-28-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-04-29 17:40:52 +03:00
|
|
|
#
|
2023-04-25 09:42:21 +03:00
|
|
|
# Since: 7.1
|
hw/cxl/host: Add support for CXL Fixed Memory Windows.
The concept of these is introduced in [1] in terms of the
description the CEDT ACPI table. The principal is more general.
Unlike once traffic hits the CXL root bridges, the host system
memory address routing is implementation defined and effectively
static once observable by standard / generic system software.
Each CXL Fixed Memory Windows (CFMW) is a region of PA space
which has fixed system dependent routing configured so that
accesses can be routed to the CXL devices below a set of target
root bridges. The accesses may be interleaved across multiple
root bridges.
For QEMU we could have fully specified these regions in terms
of a base PA + size, but as the absolute address does not matter
it is simpler to let individual platforms place the memory regions.
ExampleS:
-cxl-fixed-memory-window targets.0=cxl.0,size=128G
-cxl-fixed-memory-window targets.0=cxl.1,size=128G
-cxl-fixed-memory-window targets.0=cxl0,targets.1=cxl.1,size=256G,interleave-granularity=2k
Specifies
* 2x 128G regions not interleaved across root bridges, one for each of
the root bridges with ids cxl.0 and cxl.1
* 256G region interleaved across root bridges with ids cxl.0 and cxl.1
with a 2k interleave granularity.
When system software enumerates the devices below a given root bridge
it can then decide which CFMW to use. If non interleave is desired
(or possible) it can use the appropriate CFMW for the root bridge in
question. If there are suitable devices to interleave across the
two root bridges then it may use the 3rd CFMS.
A number of other designs were considered but the following constraints
made it hard to adapt existing QEMU approaches to this particular problem.
1) The size must be known before a specific architecture / board brings
up it's PA memory map. We need to set up an appropriate region.
2) Using links to the host bridges provides a clean command line interface
but these links cannot be established until command line devices have
been added.
Hence the two step process used here of first establishing the size,
interleave-ways and granularity + caching the ids of the host bridges
and then, once available finding the actual host bridges so they can
be used later to support interleave decoding.
[1] CXL 2.0 ECN: CEDT CFMWS & QTG DSM (computeexpresslink.org / specifications)
Signed-off-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Acked-by: Markus Armbruster <armbru@redhat.com> # QAPI Schema
Message-Id: <20220429144110.25167-28-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-04-29 17:40:52 +03:00
|
|
|
##
|
|
|
|
{ 'struct': 'CXLFixedMemoryWindowOptions',
|
|
|
|
'data': {
|
|
|
|
'size': 'size',
|
|
|
|
'*interleave-granularity': 'size',
|
|
|
|
'targets': ['str'] }}
|
|
|
|
|
2022-06-08 17:54:33 +03:00
|
|
|
##
|
|
|
|
# @CXLFMWProperties:
|
|
|
|
#
|
|
|
|
# List of CXL Fixed Memory Windows.
|
|
|
|
#
|
|
|
|
# @cxl-fmw: List of CXLFixedMemoryWindowOptions
|
|
|
|
#
|
2023-04-25 09:42:21 +03:00
|
|
|
# Since: 7.1
|
2022-06-08 17:54:33 +03:00
|
|
|
##
|
|
|
|
{ 'struct' : 'CXLFMWProperties',
|
|
|
|
'data': { 'cxl-fmw': ['CXLFixedMemoryWindowOptions'] }
|
|
|
|
}
|
|
|
|
|
2019-06-19 23:10:41 +03:00
|
|
|
##
|
|
|
|
# @X86CPURegister32:
|
|
|
|
#
|
|
|
|
# A X86 32-bit register
|
|
|
|
#
|
|
|
|
# Since: 1.5
|
|
|
|
##
|
|
|
|
{ 'enum': 'X86CPURegister32',
|
|
|
|
'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @X86CPUFeatureWordInfo:
|
|
|
|
#
|
|
|
|
# Information about a X86 CPU feature word
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @cpuid-input-eax: Input EAX value for CPUID instruction for that
|
|
|
|
# feature word
|
2019-06-19 23:10:41 +03:00
|
|
|
#
|
|
|
|
# @cpuid-input-ecx: Input ECX value for CPUID instruction for that
|
2023-04-28 13:54:29 +03:00
|
|
|
# feature word
|
2019-06-19 23:10:41 +03:00
|
|
|
#
|
|
|
|
# @cpuid-register: Output register containing the feature bits
|
|
|
|
#
|
|
|
|
# @features: value of output register, containing the feature bits
|
|
|
|
#
|
|
|
|
# Since: 1.5
|
|
|
|
##
|
|
|
|
{ 'struct': 'X86CPUFeatureWordInfo',
|
|
|
|
'data': { 'cpuid-input-eax': 'int',
|
|
|
|
'*cpuid-input-ecx': 'int',
|
|
|
|
'cpuid-register': 'X86CPURegister32',
|
|
|
|
'features': 'int' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @DummyForceArrays:
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# Not used by QMP; hack to let us use X86CPUFeatureWordInfoList
|
|
|
|
# internally
|
2019-06-19 23:10:41 +03:00
|
|
|
#
|
|
|
|
# Since: 2.5
|
|
|
|
##
|
|
|
|
{ 'struct': 'DummyForceArrays',
|
|
|
|
'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @NumaCpuOptions:
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# Option "-numa cpu" overrides default cpu to node mapping. It
|
|
|
|
# accepts the same set of cpu properties as returned by
|
2019-06-19 23:10:41 +03:00
|
|
|
# query-hotpluggable-cpus[].props, where node-id could be used to
|
|
|
|
# override default node mapping.
|
|
|
|
#
|
|
|
|
# Since: 2.10
|
|
|
|
##
|
|
|
|
{ 'struct': 'NumaCpuOptions',
|
|
|
|
'base': 'CpuInstanceProperties',
|
|
|
|
'data' : {} }
|
|
|
|
|
2019-12-13 04:19:23 +03:00
|
|
|
##
|
|
|
|
# @HmatLBMemoryHierarchy:
|
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
# @memory: the structure represents the memory performance
|
|
|
|
#
|
|
|
|
# @first-level: first level of memory side cache
|
|
|
|
#
|
|
|
|
# @second-level: second level of memory side cache
|
|
|
|
#
|
|
|
|
# @third-level: third level of memory side cache
|
|
|
|
#
|
|
|
|
# Since: 5.0
|
|
|
|
##
|
|
|
|
{ 'enum': 'HmatLBMemoryHierarchy',
|
|
|
|
'data': [ 'memory', 'first-level', 'second-level', 'third-level' ] }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @HmatLBDataType:
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# Data type in the System Locality Latency and Bandwidth Information
|
|
|
|
# Structure of HMAT (Heterogeneous Memory Attribute Table)
|
2019-12-13 04:19:23 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# For more information about @HmatLBDataType, see chapter 5.2.27.4:
|
|
|
|
# Table 5-146: Field "Data Type" of ACPI 6.3 spec.
|
2019-12-13 04:19:23 +03:00
|
|
|
#
|
|
|
|
# @access-latency: access latency (nanoseconds)
|
|
|
|
#
|
|
|
|
# @read-latency: read latency (nanoseconds)
|
|
|
|
#
|
|
|
|
# @write-latency: write latency (nanoseconds)
|
|
|
|
#
|
|
|
|
# @access-bandwidth: access bandwidth (Bytes per second)
|
|
|
|
#
|
|
|
|
# @read-bandwidth: read bandwidth (Bytes per second)
|
|
|
|
#
|
|
|
|
# @write-bandwidth: write bandwidth (Bytes per second)
|
|
|
|
#
|
|
|
|
# Since: 5.0
|
|
|
|
##
|
|
|
|
{ 'enum': 'HmatLBDataType',
|
|
|
|
'data': [ 'access-latency', 'read-latency', 'write-latency',
|
|
|
|
'access-bandwidth', 'read-bandwidth', 'write-bandwidth' ] }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @NumaHmatLBOptions:
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# Set the system locality latency and bandwidth information between
|
|
|
|
# Initiator and Target proximity Domains.
|
2019-12-13 04:19:23 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# For more information about @NumaHmatLBOptions, see chapter 5.2.27.4:
|
|
|
|
# Table 5-146 of ACPI 6.3 spec.
|
2019-12-13 04:19:23 +03:00
|
|
|
#
|
|
|
|
# @initiator: the Initiator Proximity Domain.
|
|
|
|
#
|
|
|
|
# @target: the Target Proximity Domain.
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @hierarchy: the Memory Hierarchy. Indicates the performance of
|
|
|
|
# memory or side cache.
|
2019-12-13 04:19:23 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @data-type: presents the type of data, access/read/write latency or
|
|
|
|
# hit latency.
|
2019-12-13 04:19:23 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @latency: the value of latency from @initiator to @target proximity
|
|
|
|
# domain, the latency unit is "ns(nanosecond)".
|
2019-12-13 04:19:23 +03:00
|
|
|
#
|
|
|
|
# @bandwidth: the value of bandwidth between @initiator and @target
|
2023-04-28 13:54:29 +03:00
|
|
|
# proximity domain, the bandwidth unit is "Bytes per second".
|
2019-12-13 04:19:23 +03:00
|
|
|
#
|
|
|
|
# Since: 5.0
|
|
|
|
##
|
|
|
|
{ 'struct': 'NumaHmatLBOptions',
|
|
|
|
'data': {
|
|
|
|
'initiator': 'uint16',
|
|
|
|
'target': 'uint16',
|
|
|
|
'hierarchy': 'HmatLBMemoryHierarchy',
|
|
|
|
'data-type': 'HmatLBDataType',
|
|
|
|
'*latency': 'uint64',
|
|
|
|
'*bandwidth': 'size' }}
|
|
|
|
|
2019-12-13 04:19:24 +03:00
|
|
|
##
|
|
|
|
# @HmatCacheAssociativity:
|
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @none: None (no memory side cache in this proximity domain, or cache
|
|
|
|
# associativity unknown)
|
2019-12-13 04:19:24 +03:00
|
|
|
#
|
|
|
|
# @direct: Direct Mapped
|
|
|
|
#
|
|
|
|
# @complex: Complex Cache Indexing (implementation specific)
|
|
|
|
#
|
|
|
|
# Since: 5.0
|
|
|
|
##
|
|
|
|
{ 'enum': 'HmatCacheAssociativity',
|
|
|
|
'data': [ 'none', 'direct', 'complex' ] }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @HmatCacheWritePolicy:
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# Cache write policy in the Memory Side Cache Information Structure of
|
|
|
|
# HMAT
|
2019-12-13 04:19:24 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# For more information of @HmatCacheWritePolicy, see chapter 5.2.27.5:
|
|
|
|
# Table 5-147: Field "Cache Attributes" of ACPI 6.3 spec.
|
2019-12-13 04:19:24 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @none: None (no memory side cache in this proximity domain, or cache
|
|
|
|
# write policy unknown)
|
2019-12-13 04:19:24 +03:00
|
|
|
#
|
|
|
|
# @write-back: Write Back (WB)
|
|
|
|
#
|
|
|
|
# @write-through: Write Through (WT)
|
|
|
|
#
|
|
|
|
# Since: 5.0
|
|
|
|
##
|
|
|
|
{ 'enum': 'HmatCacheWritePolicy',
|
|
|
|
'data': [ 'none', 'write-back', 'write-through' ] }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @NumaHmatCacheOptions:
|
|
|
|
#
|
|
|
|
# Set the memory side cache information for a given memory domain.
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# For more information of @NumaHmatCacheOptions, see chapter 5.2.27.5:
|
|
|
|
# Table 5-147: Field "Cache Attributes" of ACPI 6.3 spec.
|
2019-12-13 04:19:24 +03:00
|
|
|
#
|
|
|
|
# @node-id: the memory proximity domain to which the memory belongs.
|
|
|
|
#
|
|
|
|
# @size: the size of memory side cache in bytes.
|
|
|
|
#
|
|
|
|
# @level: the cache level described in this structure.
|
|
|
|
#
|
|
|
|
# @associativity: the cache associativity,
|
2023-04-28 13:54:29 +03:00
|
|
|
# none/direct-mapped/complex(complex cache indexing).
|
2019-12-13 04:19:24 +03:00
|
|
|
#
|
|
|
|
# @policy: the write policy, none/write-back/write-through.
|
|
|
|
#
|
|
|
|
# @line: the cache Line size in bytes.
|
|
|
|
#
|
|
|
|
# Since: 5.0
|
|
|
|
##
|
|
|
|
{ 'struct': 'NumaHmatCacheOptions',
|
|
|
|
'data': {
|
|
|
|
'node-id': 'uint32',
|
|
|
|
'size': 'size',
|
|
|
|
'level': 'uint8',
|
|
|
|
'associativity': 'HmatCacheAssociativity',
|
|
|
|
'policy': 'HmatCacheWritePolicy',
|
|
|
|
'line': 'uint16' }}
|
|
|
|
|
2020-10-12 15:15:34 +03:00
|
|
|
##
|
|
|
|
# @memsave:
|
|
|
|
#
|
|
|
|
# Save a portion of guest memory to a file.
|
|
|
|
#
|
|
|
|
# @val: the virtual address of the guest to start from
|
|
|
|
#
|
|
|
|
# @size: the size of memory region to save
|
|
|
|
#
|
|
|
|
# @filename: the file to save the memory to as binary data
|
|
|
|
#
|
|
|
|
# @cpu-index: the index of the virtual CPU to use for translating the
|
2023-04-28 13:54:29 +03:00
|
|
|
# virtual address (defaults to CPU 0)
|
2020-10-12 15:15:34 +03:00
|
|
|
#
|
2020-11-18 09:41:58 +03:00
|
|
|
# Since: 0.14
|
2020-10-12 15:15:34 +03:00
|
|
|
#
|
qapi: convert "Note" sections to plain rST
We do not need a dedicated section for notes. By eliminating a specially
parsed section, these notes can be treated as normal rST paragraphs in
the new QMP reference manual, and can be placed and styled much more
flexibly.
Convert all existing "Note" and "Notes" sections to pure rST. As part of
the conversion, capitalize the first letter of each sentence and add
trailing punctuation where appropriate to ensure notes look sensible and
consistent in rendered HTML documentation. Markup is also re-aligned to
the de-facto standard of 3 spaces for directives.
Update docs/devel/qapi-code-gen.rst to reflect the new paradigm, and
update the QAPI parser to prohibit "Note" sections while suggesting a
new syntax. The exact formatting to use is a matter of taste, but a good
candidate is simply:
.. note:: lorem ipsum ...
... dolor sit amet ...
... consectetur adipiscing elit ...
... but there are other choices, too. The Sphinx readthedocs theme
offers theming for the following forms (capitalization unimportant); all
are adorned with a (!) symbol () in the title bar for rendered HTML
docs.
See
https://sphinx-rtd-theme.readthedocs.io/en/stable/demo/demo.html#admonitions
for examples of each directive/admonition in use.
These are rendered in orange:
.. Attention:: ...
.. Caution:: ...
.. WARNING:: ...
These are rendered in red:
.. DANGER:: ...
.. Error:: ...
These are rendered in green:
.. Hint:: ...
.. Important:: ...
.. Tip:: ...
These are rendered in blue:
.. Note:: ...
.. admonition:: custom title
admonition body text
This patch uses ".. note::" almost everywhere, with just two "caution"
directives. Several instances of "Notes:" have been converted to
merely ".. note::", or multiple ".. note::" where appropriate.
".. admonition:: notes" is used in a few places where we had an
ordered list of multiple notes that would not make sense as
standalone/separate admonitions. Two "Note:" following "Example:"
have been turned into ordinary paragraphs within the example.
NOTE: Because qapidoc.py does not attempt to preserve source ordering of
sections, the conversion of Notes from a "tagged section" to an
"untagged section" means that rendering order for some notes *may
change* as a result of this patch. The forthcoming qapidoc.py rewrite
strictly preserves source ordering in the rendered documentation, so
this issue will be rectified in the new generator.
Signed-off-by: John Snow <jsnow@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com> [for block*.json]
Message-ID: <20240626222128.406106-11-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Commit message clarified slightly, period added to one more note]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2024-06-27 01:21:16 +03:00
|
|
|
# .. caution:: Errors were not reliably returned until 1.1.
|
2020-10-12 15:15:34 +03:00
|
|
|
#
|
2024-07-17 05:13:08 +03:00
|
|
|
# .. qmp-example::
|
2020-10-12 15:15:34 +03:00
|
|
|
#
|
2024-02-16 17:58:34 +03:00
|
|
|
# -> { "execute": "memsave",
|
|
|
|
# "arguments": { "val": 10,
|
|
|
|
# "size": 100,
|
|
|
|
# "filename": "/tmp/virtual-mem-dump" } }
|
|
|
|
# <- { "return": {} }
|
2020-10-12 15:15:34 +03:00
|
|
|
##
|
|
|
|
{ 'command': 'memsave',
|
2024-08-02 17:07:03 +03:00
|
|
|
'data': {
|
|
|
|
'val': 'uint64',
|
|
|
|
'size': 'size',
|
|
|
|
'filename': 'str',
|
|
|
|
'*cpu-index': 'int' } }
|
2020-10-12 15:15:34 +03:00
|
|
|
|
|
|
|
##
|
|
|
|
# @pmemsave:
|
|
|
|
#
|
|
|
|
# Save a portion of guest physical memory to a file.
|
|
|
|
#
|
|
|
|
# @val: the physical address of the guest to start from
|
|
|
|
#
|
|
|
|
# @size: the size of memory region to save
|
|
|
|
#
|
|
|
|
# @filename: the file to save the memory to as binary data
|
|
|
|
#
|
2020-11-18 09:41:58 +03:00
|
|
|
# Since: 0.14
|
2020-10-12 15:15:34 +03:00
|
|
|
#
|
qapi: convert "Note" sections to plain rST
We do not need a dedicated section for notes. By eliminating a specially
parsed section, these notes can be treated as normal rST paragraphs in
the new QMP reference manual, and can be placed and styled much more
flexibly.
Convert all existing "Note" and "Notes" sections to pure rST. As part of
the conversion, capitalize the first letter of each sentence and add
trailing punctuation where appropriate to ensure notes look sensible and
consistent in rendered HTML documentation. Markup is also re-aligned to
the de-facto standard of 3 spaces for directives.
Update docs/devel/qapi-code-gen.rst to reflect the new paradigm, and
update the QAPI parser to prohibit "Note" sections while suggesting a
new syntax. The exact formatting to use is a matter of taste, but a good
candidate is simply:
.. note:: lorem ipsum ...
... dolor sit amet ...
... consectetur adipiscing elit ...
... but there are other choices, too. The Sphinx readthedocs theme
offers theming for the following forms (capitalization unimportant); all
are adorned with a (!) symbol () in the title bar for rendered HTML
docs.
See
https://sphinx-rtd-theme.readthedocs.io/en/stable/demo/demo.html#admonitions
for examples of each directive/admonition in use.
These are rendered in orange:
.. Attention:: ...
.. Caution:: ...
.. WARNING:: ...
These are rendered in red:
.. DANGER:: ...
.. Error:: ...
These are rendered in green:
.. Hint:: ...
.. Important:: ...
.. Tip:: ...
These are rendered in blue:
.. Note:: ...
.. admonition:: custom title
admonition body text
This patch uses ".. note::" almost everywhere, with just two "caution"
directives. Several instances of "Notes:" have been converted to
merely ".. note::", or multiple ".. note::" where appropriate.
".. admonition:: notes" is used in a few places where we had an
ordered list of multiple notes that would not make sense as
standalone/separate admonitions. Two "Note:" following "Example:"
have been turned into ordinary paragraphs within the example.
NOTE: Because qapidoc.py does not attempt to preserve source ordering of
sections, the conversion of Notes from a "tagged section" to an
"untagged section" means that rendering order for some notes *may
change* as a result of this patch. The forthcoming qapidoc.py rewrite
strictly preserves source ordering in the rendered documentation, so
this issue will be rectified in the new generator.
Signed-off-by: John Snow <jsnow@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com> [for block*.json]
Message-ID: <20240626222128.406106-11-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Commit message clarified slightly, period added to one more note]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2024-06-27 01:21:16 +03:00
|
|
|
# .. caution:: Errors were not reliably returned until 1.1.
|
2020-10-12 15:15:34 +03:00
|
|
|
#
|
2024-07-17 05:13:08 +03:00
|
|
|
# .. qmp-example::
|
2020-10-12 15:15:34 +03:00
|
|
|
#
|
2024-02-16 17:58:34 +03:00
|
|
|
# -> { "execute": "pmemsave",
|
|
|
|
# "arguments": { "val": 10,
|
|
|
|
# "size": 100,
|
|
|
|
# "filename": "/tmp/physical-mem-dump" } }
|
|
|
|
# <- { "return": {} }
|
2020-10-12 15:15:34 +03:00
|
|
|
##
|
|
|
|
{ 'command': 'pmemsave',
|
2024-08-02 17:07:03 +03:00
|
|
|
'data': {
|
|
|
|
'val': 'uint64',
|
|
|
|
'size': 'size',
|
|
|
|
'filename': 'str' } }
|
2020-10-12 15:15:34 +03:00
|
|
|
|
2019-06-19 23:10:41 +03:00
|
|
|
##
|
|
|
|
# @Memdev:
|
|
|
|
#
|
|
|
|
# Information about memory backend
|
|
|
|
#
|
|
|
|
# @id: backend's ID if backend has 'id' property (since 2.9)
|
|
|
|
#
|
|
|
|
# @size: memory backend size
|
|
|
|
#
|
2021-05-10 14:43:24 +03:00
|
|
|
# @merge: whether memory merge support is enabled
|
2019-06-19 23:10:41 +03:00
|
|
|
#
|
2021-05-10 14:43:24 +03:00
|
|
|
# @dump: whether memory backend's memory is included in a core dump
|
2019-06-19 23:10:41 +03:00
|
|
|
#
|
2021-05-10 14:43:24 +03:00
|
|
|
# @prealloc: whether memory was preallocated
|
2019-06-19 23:10:41 +03:00
|
|
|
#
|
2021-05-10 14:43:25 +03:00
|
|
|
# @share: whether memory is private to QEMU or shared (since 6.1)
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @reserve: whether swap space (or huge pages) was reserved if
|
|
|
|
# applicable. This corresponds to the user configuration and not
|
|
|
|
# the actual behavior implemented in the OS to perform the
|
|
|
|
# reservation. For example, Linux will never reserve swap space
|
|
|
|
# for shared file mappings. (since 6.1)
|
2021-05-10 14:43:27 +03:00
|
|
|
#
|
2019-06-19 23:10:41 +03:00
|
|
|
# @host-nodes: host nodes for its memory policy
|
|
|
|
#
|
|
|
|
# @policy: memory policy of memory backend
|
|
|
|
#
|
|
|
|
# Since: 2.1
|
|
|
|
##
|
|
|
|
{ 'struct': 'Memdev',
|
|
|
|
'data': {
|
|
|
|
'*id': 'str',
|
|
|
|
'size': 'size',
|
|
|
|
'merge': 'bool',
|
|
|
|
'dump': 'bool',
|
|
|
|
'prealloc': 'bool',
|
2021-05-10 14:43:25 +03:00
|
|
|
'share': 'bool',
|
2021-05-10 14:43:27 +03:00
|
|
|
'*reserve': 'bool',
|
2019-06-19 23:10:41 +03:00
|
|
|
'host-nodes': ['uint16'],
|
|
|
|
'policy': 'HostMemPolicy' }}
|
|
|
|
|
|
|
|
##
|
|
|
|
# @query-memdev:
|
|
|
|
#
|
|
|
|
# Returns information for all memory backends.
|
|
|
|
#
|
|
|
|
# Returns: a list of @Memdev.
|
|
|
|
#
|
|
|
|
# Since: 2.1
|
|
|
|
#
|
2024-07-17 05:13:08 +03:00
|
|
|
# .. qmp-example::
|
2019-06-19 23:10:41 +03:00
|
|
|
#
|
2024-02-16 17:58:34 +03:00
|
|
|
# -> { "execute": "query-memdev" }
|
|
|
|
# <- { "return": [
|
|
|
|
# {
|
|
|
|
# "id": "mem1",
|
|
|
|
# "size": 536870912,
|
|
|
|
# "merge": false,
|
|
|
|
# "dump": true,
|
|
|
|
# "prealloc": false,
|
|
|
|
# "share": false,
|
|
|
|
# "host-nodes": [0, 1],
|
|
|
|
# "policy": "bind"
|
|
|
|
# },
|
|
|
|
# {
|
|
|
|
# "size": 536870912,
|
|
|
|
# "merge": false,
|
|
|
|
# "dump": true,
|
|
|
|
# "prealloc": true,
|
|
|
|
# "share": false,
|
|
|
|
# "host-nodes": [2, 3],
|
|
|
|
# "policy": "preferred"
|
|
|
|
# }
|
|
|
|
# ]
|
2019-06-19 23:10:41 +03:00
|
|
|
# }
|
|
|
|
##
|
|
|
|
{ 'command': 'query-memdev', 'returns': ['Memdev'], 'allow-preconfig': true }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @CpuInstanceProperties:
|
|
|
|
#
|
2024-07-11 14:22:25 +03:00
|
|
|
# Properties identifying a CPU.
|
2019-06-19 23:10:41 +03:00
|
|
|
#
|
2023-10-16 21:39:05 +03:00
|
|
|
# Which members are optional and which mandatory depends on the
|
|
|
|
# architecture and board.
|
|
|
|
#
|
2023-10-16 21:39:18 +03:00
|
|
|
# For s390x see :ref:`cpu-topology-s390x`.
|
|
|
|
#
|
2023-10-16 21:39:05 +03:00
|
|
|
# The ids other than the node-id specify the position of the CPU
|
|
|
|
# within the CPU topology (as defined by the machine property "smp",
|
|
|
|
# thus see also type @SMPConfiguration)
|
|
|
|
#
|
2019-06-19 23:10:41 +03:00
|
|
|
# @node-id: NUMA node ID the CPU belongs to
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2023-10-16 21:39:06 +03:00
|
|
|
# @drawer-id: drawer number within CPU topology the CPU belongs to
|
|
|
|
# (since 8.2)
|
|
|
|
#
|
|
|
|
# @book-id: book number within parent container the CPU belongs to
|
|
|
|
# (since 8.2)
|
|
|
|
#
|
|
|
|
# @socket-id: socket number within parent container the CPU belongs to
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2023-10-16 21:39:05 +03:00
|
|
|
# @die-id: die number within the parent container the CPU belongs to
|
2024-03-22 17:09:09 +03:00
|
|
|
# (since 4.1)
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2023-10-16 21:39:05 +03:00
|
|
|
# @cluster-id: cluster number within the parent container the CPU
|
|
|
|
# belongs to (since 7.1)
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2024-07-29 09:52:20 +03:00
|
|
|
# @module-id: module number within the parent container the CPU
|
|
|
|
# belongs to (since 9.1)
|
2024-04-24 18:49:11 +03:00
|
|
|
#
|
2024-03-22 17:09:08 +03:00
|
|
|
# @core-id: core number within the parent container the CPU belongs to
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2023-10-16 21:39:05 +03:00
|
|
|
# @thread-id: thread number within the core the CPU belongs to
|
2019-06-19 23:10:41 +03:00
|
|
|
#
|
|
|
|
# Since: 2.7
|
|
|
|
##
|
|
|
|
{ 'struct': 'CpuInstanceProperties',
|
2023-10-16 21:39:05 +03:00
|
|
|
# Keep these in sync with the properties device_add accepts
|
2019-06-19 23:10:41 +03:00
|
|
|
'data': { '*node-id': 'int',
|
2023-10-16 21:39:06 +03:00
|
|
|
'*drawer-id': 'int',
|
|
|
|
'*book-id': 'int',
|
2019-06-19 23:10:41 +03:00
|
|
|
'*socket-id': 'int',
|
2019-06-12 11:40:58 +03:00
|
|
|
'*die-id': 'int',
|
2022-05-03 17:02:59 +03:00
|
|
|
'*cluster-id': 'int',
|
2024-04-24 18:49:11 +03:00
|
|
|
'*module-id': 'int',
|
2019-06-19 23:10:41 +03:00
|
|
|
'*core-id': 'int',
|
|
|
|
'*thread-id': 'int'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
##
|
|
|
|
# @HotpluggableCPU:
|
|
|
|
#
|
|
|
|
# @type: CPU object type for usage with device_add command
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2024-07-11 14:22:25 +03:00
|
|
|
# @props: list of properties to pass for hotplugging a CPU with
|
|
|
|
# device_add
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
|
|
|
# @vcpus-count: number of logical VCPU threads @HotpluggableCPU
|
|
|
|
# provides
|
|
|
|
#
|
|
|
|
# @qom-path: link to existing CPU object if CPU is present or omitted
|
|
|
|
# if CPU is not present.
|
2019-06-19 23:10:41 +03:00
|
|
|
#
|
2024-07-11 14:22:25 +03:00
|
|
|
# .. note:: Management should be prepared to pass through additional
|
|
|
|
# properties with device_add.
|
|
|
|
#
|
2019-06-19 23:10:41 +03:00
|
|
|
# Since: 2.7
|
|
|
|
##
|
|
|
|
{ 'struct': 'HotpluggableCPU',
|
|
|
|
'data': { 'type': 'str',
|
|
|
|
'vcpus-count': 'int',
|
|
|
|
'props': 'CpuInstanceProperties',
|
|
|
|
'*qom-path': 'str'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
##
|
|
|
|
# @query-hotpluggable-cpus:
|
|
|
|
#
|
|
|
|
# TODO: Better documentation; currently there is none.
|
|
|
|
#
|
|
|
|
# Returns: a list of HotpluggableCPU objects.
|
|
|
|
#
|
|
|
|
# Since: 2.7
|
|
|
|
#
|
2024-07-17 05:13:10 +03:00
|
|
|
# .. qmp-example::
|
|
|
|
# :annotated:
|
2019-06-19 23:10:41 +03:00
|
|
|
#
|
2024-07-17 05:13:10 +03:00
|
|
|
# For pseries machine type started with
|
|
|
|
# ``-smp 2,cores=2,maxcpus=4 -cpu POWER8``::
|
2024-02-16 17:58:34 +03:00
|
|
|
#
|
|
|
|
# -> { "execute": "query-hotpluggable-cpus" }
|
|
|
|
# <- {"return": [
|
|
|
|
# { "props": { "core-id": 8 }, "type": "POWER8-spapr-cpu-core",
|
|
|
|
# "vcpus-count": 1 },
|
|
|
|
# { "props": { "core-id": 0 }, "type": "POWER8-spapr-cpu-core",
|
|
|
|
# "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"}
|
2024-06-27 01:21:14 +03:00
|
|
|
# ]}
|
2024-02-16 17:58:34 +03:00
|
|
|
#
|
2024-07-17 05:13:10 +03:00
|
|
|
# .. qmp-example::
|
|
|
|
# :annotated:
|
|
|
|
#
|
|
|
|
# For pc machine type started with ``-smp 1,maxcpus=2``::
|
2024-02-16 17:58:34 +03:00
|
|
|
#
|
|
|
|
# -> { "execute": "query-hotpluggable-cpus" }
|
|
|
|
# <- {"return": [
|
|
|
|
# {
|
|
|
|
# "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
|
|
|
|
# "props": {"core-id": 0, "socket-id": 1, "thread-id": 0}
|
|
|
|
# },
|
|
|
|
# {
|
|
|
|
# "qom-path": "/machine/unattached/device[0]",
|
|
|
|
# "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
|
|
|
|
# "props": {"core-id": 0, "socket-id": 0, "thread-id": 0}
|
|
|
|
# }
|
|
|
|
# ]}
|
|
|
|
#
|
2024-07-17 05:13:10 +03:00
|
|
|
# .. qmp-example::
|
|
|
|
# :annotated:
|
|
|
|
#
|
|
|
|
# For s390x-virtio-ccw machine type started with
|
|
|
|
# ``-smp 1,maxcpus=2 -cpu qemu`` (Since: 2.11)::
|
2024-02-16 17:58:34 +03:00
|
|
|
#
|
|
|
|
# -> { "execute": "query-hotpluggable-cpus" }
|
|
|
|
# <- {"return": [
|
|
|
|
# {
|
|
|
|
# "type": "qemu-s390x-cpu", "vcpus-count": 1,
|
|
|
|
# "props": { "core-id": 1 }
|
|
|
|
# },
|
|
|
|
# {
|
|
|
|
# "qom-path": "/machine/unattached/device[0]",
|
|
|
|
# "type": "qemu-s390x-cpu", "vcpus-count": 1,
|
|
|
|
# "props": { "core-id": 0 }
|
|
|
|
# }
|
|
|
|
# ]}
|
2019-06-19 23:10:41 +03:00
|
|
|
##
|
|
|
|
{ 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'],
|
|
|
|
'allow-preconfig': true }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @set-numa-node:
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# Runtime equivalent of '-numa' CLI option, available at preconfigure
|
|
|
|
# stage to configure numa mapping before initializing machine.
|
2019-06-19 23:10:41 +03:00
|
|
|
#
|
2022-04-22 16:28:07 +03:00
|
|
|
# Since: 3.0
|
2019-06-19 23:10:41 +03:00
|
|
|
##
|
|
|
|
{ 'command': 'set-numa-node', 'boxed': true,
|
|
|
|
'data': 'NumaOptions',
|
|
|
|
'allow-preconfig': true
|
|
|
|
}
|
2020-09-13 22:53:43 +03:00
|
|
|
|
|
|
|
##
|
|
|
|
# @balloon:
|
|
|
|
#
|
|
|
|
# Request the balloon driver to change its balloon size.
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @value: the target logical size of the VM in bytes. We can deduce
|
|
|
|
# the size of the balloon using this formula:
|
2020-09-25 19:22:56 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# logical_vm_size = vm_ram_size - balloon_size
|
2020-09-25 19:22:56 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# From it we have: balloon_size = vm_ram_size - @value
|
2020-09-13 22:53:43 +03:00
|
|
|
#
|
2024-02-27 14:39:12 +03:00
|
|
|
# Errors:
|
2024-01-20 12:53:26 +03:00
|
|
|
# - If the balloon driver is enabled but not functional because
|
|
|
|
# the KVM kernel module cannot support it, KVMMissingCap
|
|
|
|
# - If no balloon device is present, DeviceNotActive
|
2020-09-13 22:53:43 +03:00
|
|
|
#
|
qapi: convert "Note" sections to plain rST
We do not need a dedicated section for notes. By eliminating a specially
parsed section, these notes can be treated as normal rST paragraphs in
the new QMP reference manual, and can be placed and styled much more
flexibly.
Convert all existing "Note" and "Notes" sections to pure rST. As part of
the conversion, capitalize the first letter of each sentence and add
trailing punctuation where appropriate to ensure notes look sensible and
consistent in rendered HTML documentation. Markup is also re-aligned to
the de-facto standard of 3 spaces for directives.
Update docs/devel/qapi-code-gen.rst to reflect the new paradigm, and
update the QAPI parser to prohibit "Note" sections while suggesting a
new syntax. The exact formatting to use is a matter of taste, but a good
candidate is simply:
.. note:: lorem ipsum ...
... dolor sit amet ...
... consectetur adipiscing elit ...
... but there are other choices, too. The Sphinx readthedocs theme
offers theming for the following forms (capitalization unimportant); all
are adorned with a (!) symbol () in the title bar for rendered HTML
docs.
See
https://sphinx-rtd-theme.readthedocs.io/en/stable/demo/demo.html#admonitions
for examples of each directive/admonition in use.
These are rendered in orange:
.. Attention:: ...
.. Caution:: ...
.. WARNING:: ...
These are rendered in red:
.. DANGER:: ...
.. Error:: ...
These are rendered in green:
.. Hint:: ...
.. Important:: ...
.. Tip:: ...
These are rendered in blue:
.. Note:: ...
.. admonition:: custom title
admonition body text
This patch uses ".. note::" almost everywhere, with just two "caution"
directives. Several instances of "Notes:" have been converted to
merely ".. note::", or multiple ".. note::" where appropriate.
".. admonition:: notes" is used in a few places where we had an
ordered list of multiple notes that would not make sense as
standalone/separate admonitions. Two "Note:" following "Example:"
have been turned into ordinary paragraphs within the example.
NOTE: Because qapidoc.py does not attempt to preserve source ordering of
sections, the conversion of Notes from a "tagged section" to an
"untagged section" means that rendering order for some notes *may
change* as a result of this patch. The forthcoming qapidoc.py rewrite
strictly preserves source ordering in the rendered documentation, so
this issue will be rectified in the new generator.
Signed-off-by: John Snow <jsnow@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com> [for block*.json]
Message-ID: <20240626222128.406106-11-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Commit message clarified slightly, period added to one more note]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2024-06-27 01:21:16 +03:00
|
|
|
# .. note:: This command just issues a request to the guest. When it
|
2024-07-29 09:52:20 +03:00
|
|
|
# returns, the balloon size may not have changed. A guest can
|
|
|
|
# change the balloon size independent of this command.
|
2020-09-13 22:53:43 +03:00
|
|
|
#
|
2020-11-18 09:41:58 +03:00
|
|
|
# Since: 0.14
|
2020-09-13 22:53:43 +03:00
|
|
|
#
|
2024-07-17 05:13:10 +03:00
|
|
|
# .. qmp-example::
|
|
|
|
# :annotated:
|
|
|
|
#
|
|
|
|
# ::
|
2020-09-13 22:53:43 +03:00
|
|
|
#
|
2024-07-17 05:13:10 +03:00
|
|
|
# -> { "execute": "balloon", "arguments": { "value": 536870912 } }
|
|
|
|
# <- { "return": {} }
|
2020-09-13 22:53:43 +03:00
|
|
|
#
|
2024-07-17 05:13:10 +03:00
|
|
|
# With a 2.5GiB guest this command inflated the ballon to 3GiB.
|
2020-09-13 22:53:43 +03:00
|
|
|
##
|
|
|
|
{ 'command': 'balloon', 'data': {'value': 'int'} }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @BalloonInfo:
|
|
|
|
#
|
|
|
|
# Information about the guest balloon device.
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @actual: the logical size of the VM in bytes Formula used:
|
|
|
|
# logical_vm_size = vm_ram_size - balloon_size
|
2020-09-13 22:53:43 +03:00
|
|
|
#
|
2020-11-18 09:41:58 +03:00
|
|
|
# Since: 0.14
|
2020-09-13 22:53:43 +03:00
|
|
|
##
|
|
|
|
{ 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @query-balloon:
|
|
|
|
#
|
|
|
|
# Return information about the balloon device.
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# Returns:
|
2024-02-27 14:39:14 +03:00
|
|
|
# @BalloonInfo
|
2024-02-27 14:39:12 +03:00
|
|
|
#
|
|
|
|
# Errors:
|
2024-01-20 12:53:26 +03:00
|
|
|
# - If the balloon driver is enabled but not functional because
|
|
|
|
# the KVM kernel module cannot support it, KVMMissingCap
|
|
|
|
# - If no balloon device is present, DeviceNotActive
|
2020-09-13 22:53:43 +03:00
|
|
|
#
|
2020-11-18 09:41:58 +03:00
|
|
|
# Since: 0.14
|
2020-09-13 22:53:43 +03:00
|
|
|
#
|
2024-07-17 05:13:08 +03:00
|
|
|
# .. qmp-example::
|
2020-09-13 22:53:43 +03:00
|
|
|
#
|
2024-02-16 17:58:34 +03:00
|
|
|
# -> { "execute": "query-balloon" }
|
|
|
|
# <- { "return": {
|
|
|
|
# "actual": 1073741824
|
|
|
|
# }
|
|
|
|
# }
|
2020-09-13 22:53:43 +03:00
|
|
|
##
|
|
|
|
{ 'command': 'query-balloon', 'returns': 'BalloonInfo' }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @BALLOON_CHANGE:
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# Emitted when the guest changes the actual BALLOON level. This value
|
|
|
|
# is equivalent to the @actual field return by the 'query-balloon'
|
|
|
|
# command
|
2020-09-13 22:53:43 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @actual: the logical size of the VM in bytes Formula used:
|
|
|
|
# logical_vm_size = vm_ram_size - balloon_size
|
2020-09-13 22:53:43 +03:00
|
|
|
#
|
qapi: convert "Note" sections to plain rST
We do not need a dedicated section for notes. By eliminating a specially
parsed section, these notes can be treated as normal rST paragraphs in
the new QMP reference manual, and can be placed and styled much more
flexibly.
Convert all existing "Note" and "Notes" sections to pure rST. As part of
the conversion, capitalize the first letter of each sentence and add
trailing punctuation where appropriate to ensure notes look sensible and
consistent in rendered HTML documentation. Markup is also re-aligned to
the de-facto standard of 3 spaces for directives.
Update docs/devel/qapi-code-gen.rst to reflect the new paradigm, and
update the QAPI parser to prohibit "Note" sections while suggesting a
new syntax. The exact formatting to use is a matter of taste, but a good
candidate is simply:
.. note:: lorem ipsum ...
... dolor sit amet ...
... consectetur adipiscing elit ...
... but there are other choices, too. The Sphinx readthedocs theme
offers theming for the following forms (capitalization unimportant); all
are adorned with a (!) symbol () in the title bar for rendered HTML
docs.
See
https://sphinx-rtd-theme.readthedocs.io/en/stable/demo/demo.html#admonitions
for examples of each directive/admonition in use.
These are rendered in orange:
.. Attention:: ...
.. Caution:: ...
.. WARNING:: ...
These are rendered in red:
.. DANGER:: ...
.. Error:: ...
These are rendered in green:
.. Hint:: ...
.. Important:: ...
.. Tip:: ...
These are rendered in blue:
.. Note:: ...
.. admonition:: custom title
admonition body text
This patch uses ".. note::" almost everywhere, with just two "caution"
directives. Several instances of "Notes:" have been converted to
merely ".. note::", or multiple ".. note::" where appropriate.
".. admonition:: notes" is used in a few places where we had an
ordered list of multiple notes that would not make sense as
standalone/separate admonitions. Two "Note:" following "Example:"
have been turned into ordinary paragraphs within the example.
NOTE: Because qapidoc.py does not attempt to preserve source ordering of
sections, the conversion of Notes from a "tagged section" to an
"untagged section" means that rendering order for some notes *may
change* as a result of this patch. The forthcoming qapidoc.py rewrite
strictly preserves source ordering in the rendered documentation, so
this issue will be rectified in the new generator.
Signed-off-by: John Snow <jsnow@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com> [for block*.json]
Message-ID: <20240626222128.406106-11-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Commit message clarified slightly, period added to one more note]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2024-06-27 01:21:16 +03:00
|
|
|
# .. note:: This event is rate-limited.
|
2020-09-13 22:53:43 +03:00
|
|
|
#
|
|
|
|
# Since: 1.2
|
|
|
|
#
|
2024-07-17 05:13:08 +03:00
|
|
|
# .. qmp-example::
|
2020-09-13 22:53:43 +03:00
|
|
|
#
|
2024-02-16 17:58:34 +03:00
|
|
|
# <- { "event": "BALLOON_CHANGE",
|
|
|
|
# "data": { "actual": 944766976 },
|
|
|
|
# "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
|
2020-09-13 22:53:43 +03:00
|
|
|
##
|
|
|
|
{ 'event': 'BALLOON_CHANGE',
|
|
|
|
'data': { 'actual': 'int' } }
|
2020-09-13 22:53:46 +03:00
|
|
|
|
2023-08-24 00:34:14 +03:00
|
|
|
##
|
|
|
|
# @HvBalloonInfo:
|
|
|
|
#
|
|
|
|
# hv-balloon guest-provided memory status information.
|
|
|
|
#
|
|
|
|
# @committed: the amount of memory in use inside the guest plus the
|
|
|
|
# amount of the memory unusable inside the guest (ballooned out,
|
|
|
|
# offline, etc.)
|
|
|
|
#
|
|
|
|
# @available: the amount of the memory inside the guest available for
|
|
|
|
# new allocations ("free")
|
|
|
|
#
|
|
|
|
# Since: 8.2
|
|
|
|
##
|
|
|
|
{ 'struct': 'HvBalloonInfo',
|
|
|
|
'data': { 'committed': 'size', 'available': 'size' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @query-hv-balloon-status-report:
|
|
|
|
#
|
2024-03-22 17:09:08 +03:00
|
|
|
# Returns the hv-balloon driver data contained in the last received
|
|
|
|
# "STATUS" message from the guest.
|
2023-08-24 00:34:14 +03:00
|
|
|
#
|
|
|
|
# Returns:
|
2024-02-27 14:39:14 +03:00
|
|
|
# @HvBalloonInfo
|
2024-02-27 14:39:12 +03:00
|
|
|
#
|
|
|
|
# Errors:
|
2024-01-20 12:53:26 +03:00
|
|
|
# - If no hv-balloon device is present, guest memory status
|
|
|
|
# reporting is not enabled or no guest memory status report
|
|
|
|
# received yet, GenericError
|
2023-08-24 00:34:14 +03:00
|
|
|
#
|
|
|
|
# Since: 8.2
|
|
|
|
#
|
2024-07-17 05:13:08 +03:00
|
|
|
# .. qmp-example::
|
2023-08-24 00:34:14 +03:00
|
|
|
#
|
2024-02-16 17:58:34 +03:00
|
|
|
# -> { "execute": "query-hv-balloon-status-report" }
|
|
|
|
# <- { "return": {
|
|
|
|
# "committed": 816640000,
|
|
|
|
# "available": 3333054464
|
|
|
|
# }
|
|
|
|
# }
|
2023-08-24 00:34:14 +03:00
|
|
|
##
|
|
|
|
{ 'command': 'query-hv-balloon-status-report', 'returns': 'HvBalloonInfo' }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @HV_BALLOON_STATUS_REPORT:
|
|
|
|
#
|
|
|
|
# Emitted when the hv-balloon driver receives a "STATUS" message from
|
|
|
|
# the guest.
|
|
|
|
#
|
qapi: convert "Note" sections to plain rST
We do not need a dedicated section for notes. By eliminating a specially
parsed section, these notes can be treated as normal rST paragraphs in
the new QMP reference manual, and can be placed and styled much more
flexibly.
Convert all existing "Note" and "Notes" sections to pure rST. As part of
the conversion, capitalize the first letter of each sentence and add
trailing punctuation where appropriate to ensure notes look sensible and
consistent in rendered HTML documentation. Markup is also re-aligned to
the de-facto standard of 3 spaces for directives.
Update docs/devel/qapi-code-gen.rst to reflect the new paradigm, and
update the QAPI parser to prohibit "Note" sections while suggesting a
new syntax. The exact formatting to use is a matter of taste, but a good
candidate is simply:
.. note:: lorem ipsum ...
... dolor sit amet ...
... consectetur adipiscing elit ...
... but there are other choices, too. The Sphinx readthedocs theme
offers theming for the following forms (capitalization unimportant); all
are adorned with a (!) symbol () in the title bar for rendered HTML
docs.
See
https://sphinx-rtd-theme.readthedocs.io/en/stable/demo/demo.html#admonitions
for examples of each directive/admonition in use.
These are rendered in orange:
.. Attention:: ...
.. Caution:: ...
.. WARNING:: ...
These are rendered in red:
.. DANGER:: ...
.. Error:: ...
These are rendered in green:
.. Hint:: ...
.. Important:: ...
.. Tip:: ...
These are rendered in blue:
.. Note:: ...
.. admonition:: custom title
admonition body text
This patch uses ".. note::" almost everywhere, with just two "caution"
directives. Several instances of "Notes:" have been converted to
merely ".. note::", or multiple ".. note::" where appropriate.
".. admonition:: notes" is used in a few places where we had an
ordered list of multiple notes that would not make sense as
standalone/separate admonitions. Two "Note:" following "Example:"
have been turned into ordinary paragraphs within the example.
NOTE: Because qapidoc.py does not attempt to preserve source ordering of
sections, the conversion of Notes from a "tagged section" to an
"untagged section" means that rendering order for some notes *may
change* as a result of this patch. The forthcoming qapidoc.py rewrite
strictly preserves source ordering in the rendered documentation, so
this issue will be rectified in the new generator.
Signed-off-by: John Snow <jsnow@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com> [for block*.json]
Message-ID: <20240626222128.406106-11-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Commit message clarified slightly, period added to one more note]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2024-06-27 01:21:16 +03:00
|
|
|
# .. note:: This event is rate-limited.
|
2023-08-24 00:34:14 +03:00
|
|
|
#
|
|
|
|
# Since: 8.2
|
|
|
|
#
|
2024-07-17 05:13:08 +03:00
|
|
|
# .. qmp-example::
|
2023-08-24 00:34:14 +03:00
|
|
|
#
|
2024-02-16 17:58:34 +03:00
|
|
|
# <- { "event": "HV_BALLOON_STATUS_REPORT",
|
|
|
|
# "data": { "committed": 816640000, "available": 3333054464 },
|
|
|
|
# "timestamp": { "seconds": 1600295492, "microseconds": 661044 } }
|
2023-08-24 00:34:14 +03:00
|
|
|
##
|
|
|
|
{ 'event': 'HV_BALLOON_STATUS_REPORT',
|
|
|
|
'data': 'HvBalloonInfo' }
|
|
|
|
|
2020-09-13 22:53:46 +03:00
|
|
|
##
|
|
|
|
# @MemoryInfo:
|
|
|
|
#
|
|
|
|
# Actual memory information in bytes.
|
|
|
|
#
|
|
|
|
# @base-memory: size of "base" memory specified with command line
|
2023-04-28 13:54:29 +03:00
|
|
|
# option -m.
|
2020-09-13 22:53:46 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @plugged-memory: size of memory that can be hot-unplugged. This
|
|
|
|
# field is omitted if target doesn't support memory hotplug (i.e.
|
|
|
|
# CONFIG_MEM_DEVICE not defined at build time).
|
2020-09-13 22:53:46 +03:00
|
|
|
#
|
2020-11-18 09:41:58 +03:00
|
|
|
# Since: 2.11
|
2020-09-13 22:53:46 +03:00
|
|
|
##
|
|
|
|
{ 'struct': 'MemoryInfo',
|
|
|
|
'data' : { 'base-memory': 'size', '*plugged-memory': 'size' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @query-memory-size-summary:
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# Return the amount of initially allocated and present hotpluggable
|
|
|
|
# (if enabled) memory in bytes.
|
2020-09-13 22:53:46 +03:00
|
|
|
#
|
2024-07-17 05:13:08 +03:00
|
|
|
# .. qmp-example::
|
2020-09-13 22:53:46 +03:00
|
|
|
#
|
2024-02-16 17:58:34 +03:00
|
|
|
# -> { "execute": "query-memory-size-summary" }
|
|
|
|
# <- { "return": { "base-memory": 4294967296, "plugged-memory": 0 } }
|
2020-09-13 22:53:46 +03:00
|
|
|
#
|
2020-11-18 09:41:58 +03:00
|
|
|
# Since: 2.11
|
2020-09-13 22:53:46 +03:00
|
|
|
##
|
|
|
|
{ 'command': 'query-memory-size-summary', 'returns': 'MemoryInfo' }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @PCDIMMDeviceInfo:
|
|
|
|
#
|
|
|
|
# PCDIMMDevice state information
|
|
|
|
#
|
|
|
|
# @id: device's ID
|
|
|
|
#
|
|
|
|
# @addr: physical address, where device is mapped
|
|
|
|
#
|
|
|
|
# @size: size of memory that the device provides
|
|
|
|
#
|
|
|
|
# @slot: slot number at which device is plugged in
|
|
|
|
#
|
|
|
|
# @node: NUMA node number where device is plugged in
|
|
|
|
#
|
|
|
|
# @memdev: memory backend linked with device
|
|
|
|
#
|
|
|
|
# @hotplugged: true if device was hotplugged
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @hotpluggable: true if device if could be added/removed while
|
|
|
|
# machine is running
|
2020-09-13 22:53:46 +03:00
|
|
|
#
|
|
|
|
# Since: 2.1
|
|
|
|
##
|
|
|
|
{ 'struct': 'PCDIMMDeviceInfo',
|
|
|
|
'data': { '*id': 'str',
|
|
|
|
'addr': 'int',
|
|
|
|
'size': 'int',
|
|
|
|
'slot': 'int',
|
|
|
|
'node': 'int',
|
|
|
|
'memdev': 'str',
|
|
|
|
'hotplugged': 'bool',
|
|
|
|
'hotpluggable': 'bool'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
##
|
|
|
|
# @VirtioPMEMDeviceInfo:
|
|
|
|
#
|
|
|
|
# VirtioPMEM state information
|
|
|
|
#
|
|
|
|
# @id: device's ID
|
|
|
|
#
|
|
|
|
# @memaddr: physical address in memory, where device is mapped
|
|
|
|
#
|
|
|
|
# @size: size of memory that the device provides
|
|
|
|
#
|
|
|
|
# @memdev: memory backend linked with device
|
|
|
|
#
|
|
|
|
# Since: 4.1
|
|
|
|
##
|
|
|
|
{ 'struct': 'VirtioPMEMDeviceInfo',
|
|
|
|
'data': { '*id': 'str',
|
|
|
|
'memaddr': 'size',
|
|
|
|
'size': 'size',
|
|
|
|
'memdev': 'str'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
##
|
|
|
|
# @VirtioMEMDeviceInfo:
|
|
|
|
#
|
|
|
|
# VirtioMEMDevice state information
|
|
|
|
#
|
|
|
|
# @id: device's ID
|
|
|
|
#
|
|
|
|
# @memaddr: physical address in memory, where device is mapped
|
|
|
|
#
|
|
|
|
# @requested-size: the user requested size of the device
|
|
|
|
#
|
|
|
|
# @size: the (current) size of memory that the device provides
|
|
|
|
#
|
|
|
|
# @max-size: the maximum size of memory that the device can provide
|
|
|
|
#
|
|
|
|
# @block-size: the block size of memory that the device provides
|
|
|
|
#
|
|
|
|
# @node: NUMA node number where device is assigned to
|
|
|
|
#
|
|
|
|
# @memdev: memory backend linked with the region
|
|
|
|
#
|
|
|
|
# Since: 5.1
|
|
|
|
##
|
|
|
|
{ 'struct': 'VirtioMEMDeviceInfo',
|
|
|
|
'data': { '*id': 'str',
|
|
|
|
'memaddr': 'size',
|
|
|
|
'requested-size': 'size',
|
|
|
|
'size': 'size',
|
|
|
|
'max-size': 'size',
|
|
|
|
'block-size': 'size',
|
|
|
|
'node': 'int',
|
|
|
|
'memdev': 'str'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-19 14:21:35 +03:00
|
|
|
##
|
|
|
|
# @SgxEPCDeviceInfo:
|
|
|
|
#
|
|
|
|
# Sgx EPC state information
|
|
|
|
#
|
|
|
|
# @id: device's ID
|
|
|
|
#
|
|
|
|
# @memaddr: physical address in memory, where device is mapped
|
|
|
|
#
|
|
|
|
# @size: size of memory that the device provides
|
|
|
|
#
|
|
|
|
# @memdev: memory backend linked with device
|
|
|
|
#
|
2022-01-21 01:31:04 +03:00
|
|
|
# @node: the numa node (Since: 7.0)
|
numa: Enable numa for SGX EPC sections
The basic SGX did not enable numa for SGX EPC sections, which
result in all EPC sections located in numa node 0. This patch
enable SGX numa function in the guest and the EPC section can
work with RAM as one numa node.
The Guest kernel related log:
[ 0.009981] ACPI: SRAT: Node 0 PXM 0 [mem 0x180000000-0x183ffffff]
[ 0.009982] ACPI: SRAT: Node 1 PXM 1 [mem 0x184000000-0x185bfffff]
The SRAT table can normally show SGX EPC sections menory info in different
numa nodes.
The SGX EPC numa related command:
......
-m 4G,maxmem=20G \
-smp sockets=2,cores=2 \
-cpu host,+sgx-provisionkey \
-object memory-backend-ram,size=2G,host-nodes=0,policy=bind,id=node0 \
-object memory-backend-epc,id=mem0,size=64M,prealloc=on,host-nodes=0,policy=bind \
-numa node,nodeid=0,cpus=0-1,memdev=node0 \
-object memory-backend-ram,size=2G,host-nodes=1,policy=bind,id=node1 \
-object memory-backend-epc,id=mem1,size=28M,prealloc=on,host-nodes=1,policy=bind \
-numa node,nodeid=1,cpus=2-3,memdev=node1 \
-M sgx-epc.0.memdev=mem0,sgx-epc.0.node=0,sgx-epc.1.memdev=mem1,sgx-epc.1.node=1 \
......
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20211101162009.62161-2-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-11-01 19:20:05 +03:00
|
|
|
#
|
2021-07-19 14:21:35 +03:00
|
|
|
# Since: 6.2
|
|
|
|
##
|
|
|
|
{ 'struct': 'SgxEPCDeviceInfo',
|
|
|
|
'data': { '*id': 'str',
|
|
|
|
'memaddr': 'size',
|
|
|
|
'size': 'size',
|
numa: Enable numa for SGX EPC sections
The basic SGX did not enable numa for SGX EPC sections, which
result in all EPC sections located in numa node 0. This patch
enable SGX numa function in the guest and the EPC section can
work with RAM as one numa node.
The Guest kernel related log:
[ 0.009981] ACPI: SRAT: Node 0 PXM 0 [mem 0x180000000-0x183ffffff]
[ 0.009982] ACPI: SRAT: Node 1 PXM 1 [mem 0x184000000-0x185bfffff]
The SRAT table can normally show SGX EPC sections menory info in different
numa nodes.
The SGX EPC numa related command:
......
-m 4G,maxmem=20G \
-smp sockets=2,cores=2 \
-cpu host,+sgx-provisionkey \
-object memory-backend-ram,size=2G,host-nodes=0,policy=bind,id=node0 \
-object memory-backend-epc,id=mem0,size=64M,prealloc=on,host-nodes=0,policy=bind \
-numa node,nodeid=0,cpus=0-1,memdev=node0 \
-object memory-backend-ram,size=2G,host-nodes=1,policy=bind,id=node1 \
-object memory-backend-epc,id=mem1,size=28M,prealloc=on,host-nodes=1,policy=bind \
-numa node,nodeid=1,cpus=2-3,memdev=node1 \
-M sgx-epc.0.memdev=mem0,sgx-epc.0.node=0,sgx-epc.1.memdev=mem1,sgx-epc.1.node=1 \
......
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20211101162009.62161-2-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-11-01 19:20:05 +03:00
|
|
|
'node': 'int',
|
2021-07-19 14:21:35 +03:00
|
|
|
'memdev': 'str'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-24 00:31:35 +03:00
|
|
|
##
|
|
|
|
# @HvBalloonDeviceInfo:
|
|
|
|
#
|
|
|
|
# hv-balloon provided memory state information
|
|
|
|
#
|
|
|
|
# @id: device's ID
|
|
|
|
#
|
|
|
|
# @memaddr: physical address in memory, where device is mapped
|
|
|
|
#
|
|
|
|
# @max-size: the maximum size of memory that the device can provide
|
|
|
|
#
|
|
|
|
# @memdev: memory backend linked with device
|
|
|
|
#
|
|
|
|
# Since: 8.2
|
|
|
|
##
|
|
|
|
{ 'struct': 'HvBalloonDeviceInfo',
|
|
|
|
'data': { '*id': 'str',
|
|
|
|
'*memaddr': 'size',
|
|
|
|
'max-size': 'size',
|
|
|
|
'*memdev': 'str'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-09-17 17:31:17 +03:00
|
|
|
##
|
|
|
|
# @MemoryDeviceInfoKind:
|
|
|
|
#
|
2023-04-25 09:42:20 +03:00
|
|
|
# @nvdimm: since 2.12
|
|
|
|
#
|
|
|
|
# @virtio-pmem: since 4.1
|
|
|
|
#
|
|
|
|
# @virtio-mem: since 5.1
|
|
|
|
#
|
|
|
|
# @sgx-epc: since 6.2.
|
|
|
|
#
|
2023-08-24 00:31:35 +03:00
|
|
|
# @hv-balloon: since 8.2.
|
|
|
|
#
|
2021-09-17 17:31:17 +03:00
|
|
|
# Since: 2.1
|
|
|
|
##
|
|
|
|
{ 'enum': 'MemoryDeviceInfoKind',
|
2023-08-24 00:31:35 +03:00
|
|
|
'data': [ 'dimm', 'nvdimm', 'virtio-pmem', 'virtio-mem', 'sgx-epc',
|
|
|
|
'hv-balloon' ] }
|
2021-09-17 17:31:17 +03:00
|
|
|
|
|
|
|
##
|
|
|
|
# @PCDIMMDeviceInfoWrapper:
|
|
|
|
#
|
2024-02-05 10:47:06 +03:00
|
|
|
# @data: PCDIMMDevice state information
|
|
|
|
#
|
2021-09-17 17:31:17 +03:00
|
|
|
# Since: 2.1
|
|
|
|
##
|
|
|
|
{ 'struct': 'PCDIMMDeviceInfoWrapper',
|
|
|
|
'data': { 'data': 'PCDIMMDeviceInfo' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @VirtioPMEMDeviceInfoWrapper:
|
|
|
|
#
|
2024-02-05 10:47:06 +03:00
|
|
|
# @data: VirtioPMEM state information
|
|
|
|
#
|
2021-09-17 17:31:17 +03:00
|
|
|
# Since: 2.1
|
|
|
|
##
|
|
|
|
{ 'struct': 'VirtioPMEMDeviceInfoWrapper',
|
|
|
|
'data': { 'data': 'VirtioPMEMDeviceInfo' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @VirtioMEMDeviceInfoWrapper:
|
|
|
|
#
|
2024-02-05 10:47:06 +03:00
|
|
|
# @data: VirtioMEMDevice state information
|
|
|
|
#
|
2021-09-17 17:31:17 +03:00
|
|
|
# Since: 2.1
|
|
|
|
##
|
|
|
|
{ 'struct': 'VirtioMEMDeviceInfoWrapper',
|
|
|
|
'data': { 'data': 'VirtioMEMDeviceInfo' } }
|
|
|
|
|
2021-07-19 14:21:35 +03:00
|
|
|
##
|
|
|
|
# @SgxEPCDeviceInfoWrapper:
|
|
|
|
#
|
2024-02-05 10:47:06 +03:00
|
|
|
# @data: Sgx EPC state information
|
|
|
|
#
|
2021-07-19 14:21:35 +03:00
|
|
|
# Since: 6.2
|
|
|
|
##
|
|
|
|
{ 'struct': 'SgxEPCDeviceInfoWrapper',
|
|
|
|
'data': { 'data': 'SgxEPCDeviceInfo' } }
|
|
|
|
|
2023-08-24 00:31:35 +03:00
|
|
|
##
|
|
|
|
# @HvBalloonDeviceInfoWrapper:
|
|
|
|
#
|
2024-02-05 10:47:06 +03:00
|
|
|
# @data: hv-balloon provided memory state information
|
|
|
|
#
|
2023-08-24 00:31:35 +03:00
|
|
|
# Since: 8.2
|
|
|
|
##
|
|
|
|
{ 'struct': 'HvBalloonDeviceInfoWrapper',
|
|
|
|
'data': { 'data': 'HvBalloonDeviceInfo' } }
|
|
|
|
|
2020-09-13 22:53:46 +03:00
|
|
|
##
|
|
|
|
# @MemoryDeviceInfo:
|
|
|
|
#
|
|
|
|
# Union containing information about a memory device
|
|
|
|
#
|
2024-02-05 10:47:09 +03:00
|
|
|
# @type: memory device type
|
|
|
|
#
|
2020-09-13 22:53:46 +03:00
|
|
|
# Since: 2.1
|
|
|
|
##
|
|
|
|
{ 'union': 'MemoryDeviceInfo',
|
2021-09-17 17:31:17 +03:00
|
|
|
'base': { 'type': 'MemoryDeviceInfoKind' },
|
|
|
|
'discriminator': 'type',
|
|
|
|
'data': { 'dimm': 'PCDIMMDeviceInfoWrapper',
|
|
|
|
'nvdimm': 'PCDIMMDeviceInfoWrapper',
|
|
|
|
'virtio-pmem': 'VirtioPMEMDeviceInfoWrapper',
|
2021-07-19 14:21:35 +03:00
|
|
|
'virtio-mem': 'VirtioMEMDeviceInfoWrapper',
|
2023-08-24 00:31:35 +03:00
|
|
|
'sgx-epc': 'SgxEPCDeviceInfoWrapper',
|
|
|
|
'hv-balloon': 'HvBalloonDeviceInfoWrapper'
|
2020-09-13 22:53:46 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
vl: Add sgx compound properties to expose SGX EPC sections to guest
Because SGX EPC is enumerated through CPUID, EPC "devices" need to be
realized prior to realizing the vCPUs themselves, i.e. long before
generic devices are parsed and realized. From a virtualization
perspective, the CPUID aspect also means that EPC sections cannot be
hotplugged without paravirtualizing the guest kernel (hardware does
not support hotplugging as EPC sections must be locked down during
pre-boot to provide EPC's security properties).
So even though EPC sections could be realized through the generic
-devices command, they need to be created much earlier for them to
actually be usable by the guest. Place all EPC sections in a
contiguous block, somewhat arbitrarily starting after RAM above 4g.
Ensuring EPC is in a contiguous region simplifies calculations, e.g.
device memory base, PCI hole, etc..., allows dynamic calculation of the
total EPC size, e.g. exposing EPC to guests does not require -maxmem,
and last but not least allows all of EPC to be enumerated in a single
ACPI entry, which is expected by some kernels, e.g. Windows 7 and 8.
The new compound properties command for sgx like below:
......
-object memory-backend-epc,id=mem1,size=28M,prealloc=on \
-object memory-backend-epc,id=mem2,size=10M \
-M sgx-epc.0.memdev=mem1,sgx-epc.1.memdev=mem2
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20210719112136.57018-6-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-09-28 11:40:58 +03:00
|
|
|
##
|
|
|
|
# @SgxEPC:
|
|
|
|
#
|
|
|
|
# Sgx EPC cmdline information
|
|
|
|
#
|
|
|
|
# @memdev: memory backend linked with device
|
|
|
|
#
|
2022-01-21 01:31:04 +03:00
|
|
|
# @node: the numa node (Since: 7.0)
|
numa: Enable numa for SGX EPC sections
The basic SGX did not enable numa for SGX EPC sections, which
result in all EPC sections located in numa node 0. This patch
enable SGX numa function in the guest and the EPC section can
work with RAM as one numa node.
The Guest kernel related log:
[ 0.009981] ACPI: SRAT: Node 0 PXM 0 [mem 0x180000000-0x183ffffff]
[ 0.009982] ACPI: SRAT: Node 1 PXM 1 [mem 0x184000000-0x185bfffff]
The SRAT table can normally show SGX EPC sections menory info in different
numa nodes.
The SGX EPC numa related command:
......
-m 4G,maxmem=20G \
-smp sockets=2,cores=2 \
-cpu host,+sgx-provisionkey \
-object memory-backend-ram,size=2G,host-nodes=0,policy=bind,id=node0 \
-object memory-backend-epc,id=mem0,size=64M,prealloc=on,host-nodes=0,policy=bind \
-numa node,nodeid=0,cpus=0-1,memdev=node0 \
-object memory-backend-ram,size=2G,host-nodes=1,policy=bind,id=node1 \
-object memory-backend-epc,id=mem1,size=28M,prealloc=on,host-nodes=1,policy=bind \
-numa node,nodeid=1,cpus=2-3,memdev=node1 \
-M sgx-epc.0.memdev=mem0,sgx-epc.0.node=0,sgx-epc.1.memdev=mem1,sgx-epc.1.node=1 \
......
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20211101162009.62161-2-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-11-01 19:20:05 +03:00
|
|
|
#
|
vl: Add sgx compound properties to expose SGX EPC sections to guest
Because SGX EPC is enumerated through CPUID, EPC "devices" need to be
realized prior to realizing the vCPUs themselves, i.e. long before
generic devices are parsed and realized. From a virtualization
perspective, the CPUID aspect also means that EPC sections cannot be
hotplugged without paravirtualizing the guest kernel (hardware does
not support hotplugging as EPC sections must be locked down during
pre-boot to provide EPC's security properties).
So even though EPC sections could be realized through the generic
-devices command, they need to be created much earlier for them to
actually be usable by the guest. Place all EPC sections in a
contiguous block, somewhat arbitrarily starting after RAM above 4g.
Ensuring EPC is in a contiguous region simplifies calculations, e.g.
device memory base, PCI hole, etc..., allows dynamic calculation of the
total EPC size, e.g. exposing EPC to guests does not require -maxmem,
and last but not least allows all of EPC to be enumerated in a single
ACPI entry, which is expected by some kernels, e.g. Windows 7 and 8.
The new compound properties command for sgx like below:
......
-object memory-backend-epc,id=mem1,size=28M,prealloc=on \
-object memory-backend-epc,id=mem2,size=10M \
-M sgx-epc.0.memdev=mem1,sgx-epc.1.memdev=mem2
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20210719112136.57018-6-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-09-28 11:40:58 +03:00
|
|
|
# Since: 6.2
|
|
|
|
##
|
|
|
|
{ 'struct': 'SgxEPC',
|
numa: Enable numa for SGX EPC sections
The basic SGX did not enable numa for SGX EPC sections, which
result in all EPC sections located in numa node 0. This patch
enable SGX numa function in the guest and the EPC section can
work with RAM as one numa node.
The Guest kernel related log:
[ 0.009981] ACPI: SRAT: Node 0 PXM 0 [mem 0x180000000-0x183ffffff]
[ 0.009982] ACPI: SRAT: Node 1 PXM 1 [mem 0x184000000-0x185bfffff]
The SRAT table can normally show SGX EPC sections menory info in different
numa nodes.
The SGX EPC numa related command:
......
-m 4G,maxmem=20G \
-smp sockets=2,cores=2 \
-cpu host,+sgx-provisionkey \
-object memory-backend-ram,size=2G,host-nodes=0,policy=bind,id=node0 \
-object memory-backend-epc,id=mem0,size=64M,prealloc=on,host-nodes=0,policy=bind \
-numa node,nodeid=0,cpus=0-1,memdev=node0 \
-object memory-backend-ram,size=2G,host-nodes=1,policy=bind,id=node1 \
-object memory-backend-epc,id=mem1,size=28M,prealloc=on,host-nodes=1,policy=bind \
-numa node,nodeid=1,cpus=2-3,memdev=node1 \
-M sgx-epc.0.memdev=mem0,sgx-epc.0.node=0,sgx-epc.1.memdev=mem1,sgx-epc.1.node=1 \
......
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20211101162009.62161-2-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-11-01 19:20:05 +03:00
|
|
|
'data': { 'memdev': 'str',
|
|
|
|
'node': 'int'
|
|
|
|
}
|
|
|
|
}
|
vl: Add sgx compound properties to expose SGX EPC sections to guest
Because SGX EPC is enumerated through CPUID, EPC "devices" need to be
realized prior to realizing the vCPUs themselves, i.e. long before
generic devices are parsed and realized. From a virtualization
perspective, the CPUID aspect also means that EPC sections cannot be
hotplugged without paravirtualizing the guest kernel (hardware does
not support hotplugging as EPC sections must be locked down during
pre-boot to provide EPC's security properties).
So even though EPC sections could be realized through the generic
-devices command, they need to be created much earlier for them to
actually be usable by the guest. Place all EPC sections in a
contiguous block, somewhat arbitrarily starting after RAM above 4g.
Ensuring EPC is in a contiguous region simplifies calculations, e.g.
device memory base, PCI hole, etc..., allows dynamic calculation of the
total EPC size, e.g. exposing EPC to guests does not require -maxmem,
and last but not least allows all of EPC to be enumerated in a single
ACPI entry, which is expected by some kernels, e.g. Windows 7 and 8.
The new compound properties command for sgx like below:
......
-object memory-backend-epc,id=mem1,size=28M,prealloc=on \
-object memory-backend-epc,id=mem2,size=10M \
-M sgx-epc.0.memdev=mem1,sgx-epc.1.memdev=mem2
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20210719112136.57018-6-yang.zhong@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2021-09-28 11:40:58 +03:00
|
|
|
|
|
|
|
##
|
|
|
|
# @SgxEPCProperties:
|
|
|
|
#
|
|
|
|
# SGX properties of machine types.
|
|
|
|
#
|
|
|
|
# @sgx-epc: list of ids of memory-backend-epc objects.
|
|
|
|
#
|
|
|
|
# Since: 6.2
|
|
|
|
##
|
|
|
|
{ 'struct': 'SgxEPCProperties',
|
|
|
|
'data': { 'sgx-epc': ['SgxEPC'] }
|
|
|
|
}
|
|
|
|
|
2020-09-13 22:53:46 +03:00
|
|
|
##
|
|
|
|
# @query-memory-devices:
|
|
|
|
#
|
|
|
|
# Lists available memory devices and their state
|
|
|
|
#
|
|
|
|
# Since: 2.1
|
|
|
|
#
|
2024-07-17 05:13:08 +03:00
|
|
|
# .. qmp-example::
|
2020-09-13 22:53:46 +03:00
|
|
|
#
|
2024-02-16 17:58:34 +03:00
|
|
|
# -> { "execute": "query-memory-devices" }
|
|
|
|
# <- { "return": [ { "data":
|
|
|
|
# { "addr": 5368709120,
|
|
|
|
# "hotpluggable": true,
|
|
|
|
# "hotplugged": true,
|
|
|
|
# "id": "d1",
|
|
|
|
# "memdev": "/objects/memX",
|
|
|
|
# "node": 0,
|
|
|
|
# "size": 1073741824,
|
|
|
|
# "slot": 0},
|
|
|
|
# "type": "dimm"
|
|
|
|
# } ] }
|
2020-09-13 22:53:46 +03:00
|
|
|
##
|
|
|
|
{ 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @MEMORY_DEVICE_SIZE_CHANGE:
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# Emitted when the size of a memory device changes. Only emitted for
|
|
|
|
# memory devices that can actually change the size (e.g., virtio-mem
|
|
|
|
# due to guest action).
|
2020-09-13 22:53:46 +03:00
|
|
|
#
|
|
|
|
# @id: device's ID
|
2021-09-29 19:24:44 +03:00
|
|
|
#
|
2020-09-13 22:53:46 +03:00
|
|
|
# @size: the new size of memory that the device provides
|
|
|
|
#
|
2021-09-29 19:24:44 +03:00
|
|
|
# @qom-path: path to the device object in the QOM tree (since 6.2)
|
|
|
|
#
|
qapi: convert "Note" sections to plain rST
We do not need a dedicated section for notes. By eliminating a specially
parsed section, these notes can be treated as normal rST paragraphs in
the new QMP reference manual, and can be placed and styled much more
flexibly.
Convert all existing "Note" and "Notes" sections to pure rST. As part of
the conversion, capitalize the first letter of each sentence and add
trailing punctuation where appropriate to ensure notes look sensible and
consistent in rendered HTML documentation. Markup is also re-aligned to
the de-facto standard of 3 spaces for directives.
Update docs/devel/qapi-code-gen.rst to reflect the new paradigm, and
update the QAPI parser to prohibit "Note" sections while suggesting a
new syntax. The exact formatting to use is a matter of taste, but a good
candidate is simply:
.. note:: lorem ipsum ...
... dolor sit amet ...
... consectetur adipiscing elit ...
... but there are other choices, too. The Sphinx readthedocs theme
offers theming for the following forms (capitalization unimportant); all
are adorned with a (!) symbol () in the title bar for rendered HTML
docs.
See
https://sphinx-rtd-theme.readthedocs.io/en/stable/demo/demo.html#admonitions
for examples of each directive/admonition in use.
These are rendered in orange:
.. Attention:: ...
.. Caution:: ...
.. WARNING:: ...
These are rendered in red:
.. DANGER:: ...
.. Error:: ...
These are rendered in green:
.. Hint:: ...
.. Important:: ...
.. Tip:: ...
These are rendered in blue:
.. Note:: ...
.. admonition:: custom title
admonition body text
This patch uses ".. note::" almost everywhere, with just two "caution"
directives. Several instances of "Notes:" have been converted to
merely ".. note::", or multiple ".. note::" where appropriate.
".. admonition:: notes" is used in a few places where we had an
ordered list of multiple notes that would not make sense as
standalone/separate admonitions. Two "Note:" following "Example:"
have been turned into ordinary paragraphs within the example.
NOTE: Because qapidoc.py does not attempt to preserve source ordering of
sections, the conversion of Notes from a "tagged section" to an
"untagged section" means that rendering order for some notes *may
change* as a result of this patch. The forthcoming qapidoc.py rewrite
strictly preserves source ordering in the rendered documentation, so
this issue will be rectified in the new generator.
Signed-off-by: John Snow <jsnow@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com> [for block*.json]
Message-ID: <20240626222128.406106-11-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Commit message clarified slightly, period added to one more note]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2024-06-27 01:21:16 +03:00
|
|
|
# .. note:: This event is rate-limited.
|
2020-09-13 22:53:46 +03:00
|
|
|
#
|
|
|
|
# Since: 5.1
|
|
|
|
#
|
2024-07-17 05:13:08 +03:00
|
|
|
# .. qmp-example::
|
2020-09-13 22:53:46 +03:00
|
|
|
#
|
2024-02-16 17:58:34 +03:00
|
|
|
# <- { "event": "MEMORY_DEVICE_SIZE_CHANGE",
|
|
|
|
# "data": { "id": "vm0", "size": 1073741824,
|
|
|
|
# "qom-path": "/machine/unattached/device[2]" },
|
|
|
|
# "timestamp": { "seconds": 1588168529, "microseconds": 201316 } }
|
2020-09-13 22:53:46 +03:00
|
|
|
##
|
|
|
|
{ 'event': 'MEMORY_DEVICE_SIZE_CHANGE',
|
2021-09-29 19:24:44 +03:00
|
|
|
'data': { '*id': 'str', 'size': 'size', 'qom-path' : 'str'} }
|
2020-09-13 22:53:46 +03:00
|
|
|
|
2022-04-14 19:52:56 +03:00
|
|
|
##
|
|
|
|
# @BootConfiguration:
|
|
|
|
#
|
|
|
|
# Schema for virtual machine boot configuration.
|
|
|
|
#
|
|
|
|
# @order: Boot order (a=floppy, c=hard disk, d=CD-ROM, n=network)
|
|
|
|
#
|
|
|
|
# @once: Boot order to apply on first boot
|
|
|
|
#
|
|
|
|
# @menu: Whether to show a boot menu
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @splash: The name of the file to be passed to the firmware as logo
|
|
|
|
# picture, if @menu is true.
|
2022-04-14 19:52:56 +03:00
|
|
|
#
|
|
|
|
# @splash-time: How long to show the logo picture, in milliseconds
|
|
|
|
#
|
|
|
|
# @reboot-timeout: Timeout before guest reboots after boot fails
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @strict: Whether to attempt booting from devices not included in the
|
|
|
|
# boot order
|
2022-04-14 19:52:56 +03:00
|
|
|
#
|
|
|
|
# Since: 7.1
|
|
|
|
##
|
|
|
|
{ 'struct': 'BootConfiguration', 'data': {
|
|
|
|
'*order': 'str',
|
|
|
|
'*once': 'str',
|
|
|
|
'*menu': 'bool',
|
|
|
|
'*splash': 'str',
|
|
|
|
'*splash-time': 'int',
|
|
|
|
'*reboot-timeout': 'int',
|
|
|
|
'*strict': 'bool' } }
|
|
|
|
|
2021-06-17 18:53:06 +03:00
|
|
|
##
|
|
|
|
# @SMPConfiguration:
|
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# Schema for CPU topology configuration. A missing value lets QEMU
|
|
|
|
# figure out a suitable value based on the ones that are provided.
|
2021-06-17 18:53:06 +03:00
|
|
|
#
|
2023-10-16 21:39:05 +03:00
|
|
|
# The members other than @cpus and @maxcpus define a topology of
|
|
|
|
# containers.
|
2021-06-17 18:53:06 +03:00
|
|
|
#
|
2024-07-29 09:52:20 +03:00
|
|
|
# The ordering from highest/coarsest to lowest/finest is: @drawers,
|
|
|
|
# @books, @sockets, @dies, @clusters, @cores, @threads.
|
2021-06-17 18:53:06 +03:00
|
|
|
#
|
2023-10-16 21:39:05 +03:00
|
|
|
# Different architectures support different subsets of topology
|
|
|
|
# containers.
|
hw/core/machine: Introduce CPU cluster topology support
The new Cluster-Aware Scheduling support has landed in Linux 5.16,
which has been proved to benefit the scheduling performance (e.g.
load balance and wake_affine strategy) on both x86_64 and AArch64.
So now in Linux 5.16 we have four-level arch-neutral CPU topology
definition like below and a new scheduler level for clusters.
struct cpu_topology {
int thread_id;
int core_id;
int cluster_id;
int package_id;
int llc_id;
cpumask_t thread_sibling;
cpumask_t core_sibling;
cpumask_t cluster_sibling;
cpumask_t llc_sibling;
}
A cluster generally means a group of CPU cores which share L2 cache
or other mid-level resources, and it is the shared resources that
is used to improve scheduler's behavior. From the point of view of
the size range, it's between CPU die and CPU core. For example, on
some ARM64 Kunpeng servers, we have 6 clusters in each NUMA node,
and 4 CPU cores in each cluster. The 4 CPU cores share a separate
L2 cache and a L3 cache tag, which brings cache affinity advantage.
In virtualization, on the Hosts which have pClusters (physical
clusters), if we can design a vCPU topology with cluster level for
guest kernel and have a dedicated vCPU pinning. A Cluster-Aware
Guest kernel can also make use of the cache affinity of CPU clusters
to gain similar scheduling performance.
This patch adds infrastructure for CPU cluster level topology
configuration and parsing, so that the user can specify cluster
parameter if their machines support it.
Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
Message-Id: <20211228092221.21068-3-wangyanan55@huawei.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
[PMD: Added '(since 7.0)' to @clusters in qapi/machine.json]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2021-12-28 12:22:09 +03:00
|
|
|
#
|
2023-10-16 21:39:05 +03:00
|
|
|
# For example, s390x does not have clusters and dies, and the socket
|
|
|
|
# is the parent container of cores.
|
2021-06-17 18:53:06 +03:00
|
|
|
#
|
2023-10-16 21:39:05 +03:00
|
|
|
# @cpus: number of virtual CPUs in the virtual machine
|
2021-06-17 18:53:06 +03:00
|
|
|
#
|
2023-04-28 13:54:29 +03:00
|
|
|
# @maxcpus: maximum number of hotpluggable virtual CPUs in the virtual
|
|
|
|
# machine
|
2021-06-17 18:53:06 +03:00
|
|
|
#
|
2023-10-16 21:39:06 +03:00
|
|
|
# @drawers: number of drawers in the CPU topology (since 8.2)
|
|
|
|
#
|
|
|
|
# @books: number of books in the CPU topology (since 8.2)
|
|
|
|
#
|
|
|
|
# @sockets: number of sockets per parent container
|
2023-10-16 21:39:05 +03:00
|
|
|
#
|
|
|
|
# @dies: number of dies per parent container
|
|
|
|
#
|
|
|
|
# @clusters: number of clusters per parent container (since 7.0)
|
|
|
|
#
|
2024-04-24 18:49:10 +03:00
|
|
|
# @modules: number of modules per parent container (since 9.1)
|
|
|
|
#
|
2023-10-16 21:39:05 +03:00
|
|
|
# @cores: number of cores per parent container
|
|
|
|
#
|
|
|
|
# @threads: number of threads per core
|
|
|
|
#
|
2021-06-17 18:53:06 +03:00
|
|
|
# Since: 6.1
|
|
|
|
##
|
|
|
|
{ 'struct': 'SMPConfiguration', 'data': {
|
|
|
|
'*cpus': 'int',
|
2023-10-16 21:39:06 +03:00
|
|
|
'*drawers': 'int',
|
|
|
|
'*books': 'int',
|
2021-06-17 18:53:06 +03:00
|
|
|
'*sockets': 'int',
|
|
|
|
'*dies': 'int',
|
hw/core/machine: Introduce CPU cluster topology support
The new Cluster-Aware Scheduling support has landed in Linux 5.16,
which has been proved to benefit the scheduling performance (e.g.
load balance and wake_affine strategy) on both x86_64 and AArch64.
So now in Linux 5.16 we have four-level arch-neutral CPU topology
definition like below and a new scheduler level for clusters.
struct cpu_topology {
int thread_id;
int core_id;
int cluster_id;
int package_id;
int llc_id;
cpumask_t thread_sibling;
cpumask_t core_sibling;
cpumask_t cluster_sibling;
cpumask_t llc_sibling;
}
A cluster generally means a group of CPU cores which share L2 cache
or other mid-level resources, and it is the shared resources that
is used to improve scheduler's behavior. From the point of view of
the size range, it's between CPU die and CPU core. For example, on
some ARM64 Kunpeng servers, we have 6 clusters in each NUMA node,
and 4 CPU cores in each cluster. The 4 CPU cores share a separate
L2 cache and a L3 cache tag, which brings cache affinity advantage.
In virtualization, on the Hosts which have pClusters (physical
clusters), if we can design a vCPU topology with cluster level for
guest kernel and have a dedicated vCPU pinning. A Cluster-Aware
Guest kernel can also make use of the cache affinity of CPU clusters
to gain similar scheduling performance.
This patch adds infrastructure for CPU cluster level topology
configuration and parsing, so that the user can specify cluster
parameter if their machines support it.
Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
Message-Id: <20211228092221.21068-3-wangyanan55@huawei.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
[PMD: Added '(since 7.0)' to @clusters in qapi/machine.json]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2021-12-28 12:22:09 +03:00
|
|
|
'*clusters': 'int',
|
2024-04-24 18:49:10 +03:00
|
|
|
'*modules': 'int',
|
2021-06-17 18:53:06 +03:00
|
|
|
'*cores': 'int',
|
|
|
|
'*threads': 'int',
|
|
|
|
'*maxcpus': 'int' } }
|
2021-09-08 12:35:43 +03:00
|
|
|
|
2021-09-08 12:35:43 +03:00
|
|
|
##
|
|
|
|
# @x-query-irq:
|
|
|
|
#
|
|
|
|
# Query interrupt statistics
|
|
|
|
#
|
2021-11-09 17:55:59 +03:00
|
|
|
# Features:
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2021-11-09 17:55:59 +03:00
|
|
|
# @unstable: This command is meant for debugging.
|
|
|
|
#
|
2021-09-08 12:35:43 +03:00
|
|
|
# Returns: interrupt statistics
|
|
|
|
#
|
|
|
|
# Since: 6.2
|
|
|
|
##
|
|
|
|
{ 'command': 'x-query-irq',
|
2021-11-09 17:55:59 +03:00
|
|
|
'returns': 'HumanReadableText',
|
|
|
|
'features': [ 'unstable' ] }
|
2021-09-08 12:35:43 +03:00
|
|
|
|
2021-09-08 12:35:43 +03:00
|
|
|
##
|
|
|
|
# @x-query-jit:
|
|
|
|
#
|
|
|
|
# Query TCG compiler statistics
|
|
|
|
#
|
2021-11-09 17:55:59 +03:00
|
|
|
# Features:
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2021-11-09 17:55:59 +03:00
|
|
|
# @unstable: This command is meant for debugging.
|
|
|
|
#
|
2021-09-08 12:35:43 +03:00
|
|
|
# Returns: TCG compiler statistics
|
|
|
|
#
|
|
|
|
# Since: 6.2
|
|
|
|
##
|
|
|
|
{ 'command': 'x-query-jit',
|
|
|
|
'returns': 'HumanReadableText',
|
2021-11-09 17:55:59 +03:00
|
|
|
'if': 'CONFIG_TCG',
|
|
|
|
'features': [ 'unstable' ] }
|
2021-09-08 12:35:43 +03:00
|
|
|
|
2021-09-08 12:35:43 +03:00
|
|
|
##
|
|
|
|
# @x-query-numa:
|
|
|
|
#
|
|
|
|
# Query NUMA topology information
|
|
|
|
#
|
2021-11-09 17:55:59 +03:00
|
|
|
# Features:
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2021-11-09 17:55:59 +03:00
|
|
|
# @unstable: This command is meant for debugging.
|
|
|
|
#
|
2021-09-08 12:35:43 +03:00
|
|
|
# Returns: topology information
|
|
|
|
#
|
|
|
|
# Since: 6.2
|
|
|
|
##
|
|
|
|
{ 'command': 'x-query-numa',
|
2021-11-09 17:55:59 +03:00
|
|
|
'returns': 'HumanReadableText',
|
|
|
|
'features': [ 'unstable' ] }
|
2021-09-08 12:35:43 +03:00
|
|
|
|
2021-09-08 12:35:43 +03:00
|
|
|
##
|
|
|
|
# @x-query-opcount:
|
|
|
|
#
|
|
|
|
# Query TCG opcode counters
|
|
|
|
#
|
2021-11-09 17:55:59 +03:00
|
|
|
# Features:
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2021-11-09 17:55:59 +03:00
|
|
|
# @unstable: This command is meant for debugging.
|
|
|
|
#
|
2021-09-08 12:35:43 +03:00
|
|
|
# Returns: TCG opcode counters
|
|
|
|
#
|
|
|
|
# Since: 6.2
|
|
|
|
##
|
|
|
|
{ 'command': 'x-query-opcount',
|
|
|
|
'returns': 'HumanReadableText',
|
2021-11-09 17:55:59 +03:00
|
|
|
'if': 'CONFIG_TCG',
|
|
|
|
'features': [ 'unstable' ] }
|
2021-09-08 12:35:43 +03:00
|
|
|
|
2021-09-08 12:35:43 +03:00
|
|
|
##
|
|
|
|
# @x-query-ramblock:
|
|
|
|
#
|
|
|
|
# Query system ramblock information
|
|
|
|
#
|
2021-11-09 17:55:59 +03:00
|
|
|
# Features:
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2021-11-09 17:55:59 +03:00
|
|
|
# @unstable: This command is meant for debugging.
|
|
|
|
#
|
2021-09-08 12:35:43 +03:00
|
|
|
# Returns: system ramblock information
|
|
|
|
#
|
|
|
|
# Since: 6.2
|
|
|
|
##
|
|
|
|
{ 'command': 'x-query-ramblock',
|
2021-11-09 17:55:59 +03:00
|
|
|
'returns': 'HumanReadableText',
|
|
|
|
'features': [ 'unstable' ] }
|
2021-09-08 12:35:43 +03:00
|
|
|
|
2021-09-08 12:35:43 +03:00
|
|
|
##
|
|
|
|
# @x-query-roms:
|
|
|
|
#
|
|
|
|
# Query information on the registered ROMS
|
|
|
|
#
|
2021-11-09 17:55:59 +03:00
|
|
|
# Features:
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2021-11-09 17:55:59 +03:00
|
|
|
# @unstable: This command is meant for debugging.
|
|
|
|
#
|
2021-09-08 12:35:43 +03:00
|
|
|
# Returns: registered ROMs
|
|
|
|
#
|
|
|
|
# Since: 6.2
|
|
|
|
##
|
|
|
|
{ 'command': 'x-query-roms',
|
2021-11-09 17:55:59 +03:00
|
|
|
'returns': 'HumanReadableText',
|
|
|
|
'features': [ 'unstable' ] }
|
2021-09-08 12:35:43 +03:00
|
|
|
|
|
|
|
##
|
|
|
|
# @x-query-usb:
|
|
|
|
#
|
|
|
|
# Query information on the USB devices
|
|
|
|
#
|
2021-11-09 17:55:59 +03:00
|
|
|
# Features:
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2021-11-09 17:55:59 +03:00
|
|
|
# @unstable: This command is meant for debugging.
|
|
|
|
#
|
2021-09-08 12:35:43 +03:00
|
|
|
# Returns: USB device information
|
|
|
|
#
|
|
|
|
# Since: 6.2
|
|
|
|
##
|
|
|
|
{ 'command': 'x-query-usb',
|
2021-11-09 17:55:59 +03:00
|
|
|
'returns': 'HumanReadableText',
|
|
|
|
'features': [ 'unstable' ] }
|
2021-10-26 18:10:59 +03:00
|
|
|
|
|
|
|
##
|
|
|
|
# @SmbiosEntryPointType:
|
|
|
|
#
|
|
|
|
# @32: SMBIOS version 2.1 (32-bit) Entry Point
|
|
|
|
#
|
|
|
|
# @64: SMBIOS version 3.0 (64-bit) Entry Point
|
|
|
|
#
|
2024-03-14 18:22:56 +03:00
|
|
|
# @auto: Either 2.x or 3.x SMBIOS version, 2.x if configuration can be
|
|
|
|
# described by it and 3.x otherwise (since: 9.0)
|
|
|
|
#
|
2021-10-26 18:10:59 +03:00
|
|
|
# Since: 7.0
|
|
|
|
##
|
|
|
|
{ 'enum': 'SmbiosEntryPointType',
|
2024-03-14 18:22:56 +03:00
|
|
|
'data': [ '32', '64', 'auto' ] }
|
2022-04-14 19:52:58 +03:00
|
|
|
|
|
|
|
##
|
|
|
|
# @MemorySizeConfiguration:
|
|
|
|
#
|
|
|
|
# Schema for memory size configuration.
|
|
|
|
#
|
|
|
|
# @size: memory size in bytes
|
|
|
|
#
|
|
|
|
# @max-size: maximum hotpluggable memory size in bytes
|
|
|
|
#
|
|
|
|
# @slots: number of available memory slots for hotplug
|
|
|
|
#
|
|
|
|
# Since: 7.1
|
|
|
|
##
|
|
|
|
{ 'struct': 'MemorySizeConfiguration', 'data': {
|
|
|
|
'*size': 'size',
|
|
|
|
'*max-size': 'size',
|
|
|
|
'*slots': 'uint64' } }
|
2022-09-26 20:38:40 +03:00
|
|
|
|
|
|
|
##
|
|
|
|
# @dumpdtb:
|
|
|
|
#
|
|
|
|
# Save the FDT in dtb format.
|
|
|
|
#
|
|
|
|
# @filename: name of the dtb file to be created
|
|
|
|
#
|
|
|
|
# Since: 7.2
|
|
|
|
#
|
2024-07-17 05:13:08 +03:00
|
|
|
# .. qmp-example::
|
2023-04-28 13:54:29 +03:00
|
|
|
#
|
2024-02-16 17:58:34 +03:00
|
|
|
# -> { "execute": "dumpdtb" }
|
|
|
|
# "arguments": { "filename": "fdt.dtb" } }
|
|
|
|
# <- { "return": {} }
|
2022-09-26 20:38:40 +03:00
|
|
|
##
|
|
|
|
{ 'command': 'dumpdtb',
|
|
|
|
'data': { 'filename': 'str' },
|
|
|
|
'if': 'CONFIG_FDT' }
|
2024-06-07 17:37:24 +03:00
|
|
|
|
|
|
|
##
|
|
|
|
# @x-query-interrupt-controllers:
|
|
|
|
#
|
|
|
|
# Query information on interrupt controller devices
|
|
|
|
#
|
|
|
|
# Features:
|
|
|
|
#
|
|
|
|
# @unstable: This command is meant for debugging.
|
|
|
|
#
|
|
|
|
# Returns: Interrupt controller devices information
|
|
|
|
#
|
|
|
|
# Since: 9.1
|
|
|
|
##
|
|
|
|
{ 'command': 'x-query-interrupt-controllers',
|
|
|
|
'returns': 'HumanReadableText',
|
|
|
|
'features': [ 'unstable' ]}
|