]> git.proxmox.com Git - mirror_qemu.git/blobdiff - qapi/common.json
Merge remote-tracking branch 'remotes/vivier2/tags/trivial-branch-pull-request' into...
[mirror_qemu.git] / qapi / common.json
index 12431c691b778c3a291075df5a90bddc6f922d64..99d313ef3b59230c04bbfd88c10bfedb5ceadb8e 100644 (file)
@@ -1,9 +1,11 @@
 # -*- Mode: Python -*-
-#
-# QAPI common definitions
 
 ##
-# @ErrorClass
+# = Common data types
+##
+
+##
+# @QapiErrorClass:
 #
 # QEMU error classes
 #
@@ -12,9 +14,6 @@
 #
 # @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
 #
 # Since: 1.2
 ##
-{ 'enum': 'ErrorClass',
-  'data': [ 'GenericError', 'CommandNotFound', 'DeviceEncrypted',
+{ 'enum': 'QapiErrorClass',
+  # Keep this in sync with ErrorClass in error.h
+  'data': [ 'GenericError', 'CommandNotFound',
             'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] }
 
 ##
-# @VersionInfo:
+# @IoOperationType:
+#
+# An enumeration of the I/O operation types
+#
+# @read: read operation
+#
+# @write: write operation
+#
+# Since: 2.1
+##
+{ 'enum': 'IoOperationType',
+  'data': [ 'read', 'write' ] }
+
+##
+# @OnOffAuto:
 #
-# A description of QEMU's version.
+# An enumeration of three options: on, off, and auto
 #
-# @qemu.major:  The major version of QEMU
+# @auto: QEMU selects the value between on and off
 #
-# @qemu.minor:  The minor version of QEMU
+# @on: Enabled
 #
-# @qemu.micro:  The micro 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.
+# @off: Disabled
+#
+# Since: 2.2
+##
+{ 'enum': 'OnOffAuto',
+  'data': [ 'auto', 'on', 'off' ] }
+
+##
+# @OnOffSplit:
+#
+# An enumeration of three values: on, off, and split
+#
+# @on: Enabled
+#
+# @off: Disabled
+#
+# @split: Mixed
+#
+# Since: 2.6
+##
+{ 'enum': 'OnOffSplit',
+  'data': [ 'on', 'off', 'split' ] }
+
+##
+# @String:
 #
-# @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.
+# A fat type wrapping 'str', to be embedded in lists.
 #
-# Since: 0.14.0
+# Since: 1.2
 ##
-{ 'struct': 'VersionInfo',
-  'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'},
-           'package': 'str'} }
+{ 'struct': 'String',
+  'data': {
+    'str': 'str' } }
 
 ##
-# @query-version:
+# @StrOrNull:
 #
-# Returns the current version of QEMU.
+# 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.
 #
-# Returns:  A @VersionInfo object describing the current version of QEMU.
+# @s: the string value
+# @n: no string value
 #
-# Since: 0.14.0
+# Since: 2.10
 ##
-{ 'command': 'query-version', 'returns': 'VersionInfo' }
+{ 'alternate': 'StrOrNull',
+  'data': { 's': 'str',
+            'n': 'null' } }
 
 ##
-# @CommandInfo:
+# @OffAutoPCIBAR:
+#
+# An enumeration of options for specifying a PCI BAR
+#
+# @off: The specified feature is disabled
+#
+# @auto: The PCI BAR for the feature is automatically selected
+#
+# @bar0: PCI BAR0 is used for the feature
+#
+# @bar1: PCI BAR1 is used for the feature
 #
-# Information about a QMP command
+# @bar2: PCI BAR2 is used for the feature
 #
-# @name: The command name
+# @bar3: PCI BAR3 is used for the feature
 #
-# Since: 0.14.0
+# @bar4: PCI BAR4 is used for the feature
+#
+# @bar5: PCI BAR5 is used for the feature
+#
+# Since: 2.12
 ##
-{ 'struct': 'CommandInfo', 'data': {'name': 'str'} }
+{ 'enum': 'OffAutoPCIBAR',
+  'data': [ 'off', 'auto', 'bar0', 'bar1', 'bar2', 'bar3', 'bar4', 'bar5' ] }
 
 ##
-# @query-commands:
+# @PCIELinkSpeed:
+#
+# An enumeration of PCIe link speeds in units of GT/s
+#
+# @2_5: 2.5GT/s
 #
-# Return a list of supported QMP commands by this server
+# @5: 5.0GT/s
 #
-# Returns: A list of @CommandInfo for all supported commands
+# @8: 8.0GT/s
 #
-# Since: 0.14.0
+# @16: 16.0GT/s
+#
+# Since: 4.0
 ##
-{ 'command': 'query-commands', 'returns': ['CommandInfo'] }
+{ 'enum': 'PCIELinkSpeed',
+  'data': [ '2_5', '5', '8', '16' ] }
 
 ##
-# @OnOffAuto
+# @PCIELinkWidth:
 #
-# An enumeration of three options: on, off, and auto
+# An enumeration of PCIe link width
 #
-# @auto: QEMU selects the value between on and off
+# @1: x1
 #
-# @on: Enabled
+# @2: x2
 #
-# @off: Disabled
+# @4: x4
 #
-# Since: 2.2
+# @8: x8
+#
+# @12: x12
+#
+# @16: x16
+#
+# @32: x32
+#
+# Since: 4.0
 ##
-{ 'enum': 'OnOffAuto',
-  'data': [ 'auto', 'on', 'off' ] }
+{ 'enum': 'PCIELinkWidth',
+  'data': [ '1', '2', '4', '8', '12', '16', '32' ] }
+
+##
+# @SysEmuTarget:
+#
+# 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.
+#
+# 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".
+#
+# ppcemb: dropped in 3.1
+#
+# Since: 3.0
+##
+{ 'enum' : 'SysEmuTarget',
+  'data' : [ 'aarch64', 'alpha', 'arm', 'cris', 'hppa', 'i386', 'lm32',
+             'm68k', 'microblaze', 'microblazeel', 'mips', 'mips64',
+             'mips64el', 'mipsel', 'moxie', 'nios2', 'or1k', 'ppc',
+             'ppc64', 'riscv32', 'riscv64', 's390x', 'sh4',
+             'sh4eb', 'sparc', 'sparc64', 'tricore', 'unicore32',
+             'x86_64', 'xtensa', 'xtensaeb' ] }