# -*- Mode: Python -*-
##
-# = QAPI common definitions
+# = Common data types
##
##
#
# @CommandNotFound: the requested command has not been found
#
-# @DeviceEncrypted: the requested operation can't be fulfilled because the
-# selected device is encrypted
-#
# @DeviceNotActive: a device has failed to be become active
#
# @DeviceNotFound: the requested device has not been found
##
{ 'enum': 'QapiErrorClass',
# Keep this in sync with ErrorClass in error.h
- 'data': [ 'GenericError', 'CommandNotFound', 'DeviceEncrypted',
+ 'data': [ 'GenericError', 'CommandNotFound',
'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] }
##
-# @VersionTriple:
-#
-# A three-part version number.
+# @IoOperationType:
#
-# @major: The major version number.
+# An enumeration of the I/O operation types
#
-# @minor: The minor version number.
+# @read: read operation
#
-# @micro: The micro version number.
+# @write: write operation
#
-# Since: 2.4
+# Since: 2.1
##
-{ 'struct': 'VersionTriple',
- 'data': {'major': 'int', 'minor': 'int', 'micro': 'int'} }
-
+{ 'enum': 'IoOperationType',
+ 'data': [ 'read', 'write' ] }
##
-# @VersionInfo:
+# @OnOffAuto:
+#
+# An enumeration of three options: on, off, and auto
#
-# A description of QEMU's version.
+# @auto: QEMU selects the value between on and off
#
-# @qemu: The version of QEMU. By current convention, a micro
-# version of 50 signifies a development branch. A micro version
-# greater than or equal to 90 signifies a release candidate for
-# the next minor version. A micro version of less than 50
-# signifies a stable release.
+# @on: Enabled
#
-# @package: QEMU will always set this field to an empty string. Downstream
-# versions of QEMU should set this to a non-empty string. The
-# exact format depends on the downstream however it highly
-# recommended that a unique name is used.
+# @off: Disabled
#
-# Since: 0.14.0
+# Since: 2.2
##
-{ 'struct': 'VersionInfo',
- 'data': {'qemu': 'VersionTriple', 'package': 'str'} }
+{ 'enum': 'OnOffAuto',
+ 'data': [ 'auto', 'on', 'off' ] }
##
-# @query-version:
-#
-# Returns the current version of QEMU.
+# @OnOffSplit:
#
-# Returns: A @VersionInfo object describing the current version of QEMU.
+# An enumeration of three values: on, off, and split
#
-# Since: 0.14.0
+# @on: Enabled
#
-# Example:
+# @off: Disabled
#
-# -> { "execute": "query-version" }
-# <- {
-# "return":{
-# "qemu":{
-# "major":0,
-# "minor":11,
-# "micro":5
-# },
-# "package":""
-# }
-# }
+# @split: Mixed
#
+# Since: 2.6
##
-{ 'command': 'query-version', 'returns': 'VersionInfo' }
+{ 'enum': 'OnOffSplit',
+ 'data': [ 'on', 'off', 'split' ] }
##
-# @CommandInfo:
+# @String:
#
-# Information about a QMP command
+# A fat type wrapping 'str', to be embedded in lists.
#
-# @name: The command name
-#
-# Since: 0.14.0
+# Since: 1.2
##
-{ 'struct': 'CommandInfo', 'data': {'name': 'str'} }
+{ 'struct': 'String',
+ 'data': {
+ 'str': 'str' } }
##
-# @query-commands:
+# @StrOrNull:
+#
+# This is a string value or the explicit lack of a string (null
+# pointer in C). Intended for cases when 'optional absent' already
+# has a different meaning.
#
-# Return a list of supported QMP commands by this server
+# @s: the string value
+# @n: no string value
#
-# Returns: A list of @CommandInfo for all supported commands
+# Since: 2.10
+##
+{ 'alternate': 'StrOrNull',
+ 'data': { 's': 'str',
+ 'n': 'null' } }
+
+##
+# @OffAutoPCIBAR:
#
-# Since: 0.14.0
+# An enumeration of options for specifying a PCI BAR
#
-# Example:
+# @off: The specified feature is disabled
#
-# -> { "execute": "query-commands" }
-# <- {
-# "return":[
-# {
-# "name":"query-balloon"
-# },
-# {
-# "name":"system_powerdown"
-# }
-# ]
-# }
+# @auto: The PCI BAR for the feature is automatically selected
#
-# Note: This example has been shortened as the real response is too long.
+# @bar0: PCI BAR0 is used for the feature
#
-##
-{ 'command': 'query-commands', 'returns': ['CommandInfo'] }
-
-##
-# @OnOffAuto:
+# @bar1: PCI BAR1 is used for the feature
#
-# An enumeration of three options: on, off, and auto
+# @bar2: PCI BAR2 is used for the feature
#
-# @auto: QEMU selects the value between on and off
+# @bar3: PCI BAR3 is used for the feature
#
-# @on: Enabled
+# @bar4: PCI BAR4 is used for the feature
#
-# @off: Disabled
+# @bar5: PCI BAR5 is used for the feature
#
-# Since: 2.2
+# Since: 2.12
##
-{ 'enum': 'OnOffAuto',
- 'data': [ 'auto', 'on', 'off' ] }
+{ 'enum': 'OffAutoPCIBAR',
+ 'data': [ 'off', 'auto', 'bar0', 'bar1', 'bar2', 'bar3', 'bar4', 'bar5' ] }
##
-# @OnOffSplit:
-#
-# An enumeration of three values: on, off, and split
-#
-# @on: Enabled
+# @SysEmuTarget:
#
-# @off: Disabled
+# The comprehensive enumeration of QEMU system emulation ("softmmu")
+# 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.
#
-# @split: Mixed
+# Notes: The resulting QMP strings can be appended to the "qemu-system-"
+# prefix to produce the corresponding QEMU executable name. This
+# is true even for "qemu-system-x86_64".
#
-# Since: 2.6
+# Since: 3.0
##
-{ 'enum': 'OnOffSplit',
- 'data': [ 'on', 'off', 'split' ] }
+{ 'enum' : 'SysEmuTarget',
+ 'data' : [ 'aarch64', 'alpha', 'arm', 'cris', 'hppa', 'i386', 'lm32',
+ 'm68k', 'microblaze', 'microblazeel', 'mips', 'mips64',
+ 'mips64el', 'mipsel', 'moxie', 'nios2', 'or1k', 'ppc',
+ 'ppc64', 'ppcemb', 'riscv32', 'riscv64', 's390x', 'sh4',
+ 'sh4eb', 'sparc', 'sparc64', 'tricore', 'unicore32',
+ 'x86_64', 'xtensa', 'xtensaeb' ] }