]> git.proxmox.com Git - mirror_qemu.git/blobdiff - qapi/common.json
Merge tag 'pull-maintainer-may24-160524-2' of https://gitlab.com/stsquad/qemu into...
[mirror_qemu.git] / qapi / common.json
index 8355d5a2f3f3121af52704c6368e6f8cfa3c6d2a..7558ce5430d5cbccd11c03ba8296ea0618bc64c0 100644 (file)
 # -*- Mode: Python -*-
+# vim: filetype=python
 
 ##
-# = QAPI common definitions
+# = Common data types
 ##
 
 ##
-# @QapiErrorClass:
+# @IoOperationType:
 #
-# QEMU error classes
+# An enumeration of the I/O operation types
 #
-# @GenericError: this is used for errors that don't require a specific error
-#                class. This should be the default case for most errors
+# @read: read operation
 #
-# @CommandNotFound: the requested command has not been found
+# @write: write operation
 #
-# @DeviceNotActive: a device has failed to be become active
+# Since: 2.1
+##
+{ 'enum': 'IoOperationType',
+  'data': [ 'read', 'write' ] }
+
+##
+# @OnOffAuto:
 #
-# @DeviceNotFound: the requested device has not been found
+# An enumeration of three options: on, off, and auto
+#
+# @auto: QEMU selects the value between on and off
 #
-# @KVMMissingCap: the requested operation can't be fulfilled because a
-#                 required KVM capability is missing
+# @on: Enabled
 #
-# Since: 1.2
+# @off: Disabled
+#
+# Since: 2.2
 ##
-{ 'enum': 'QapiErrorClass',
-  # Keep this in sync with ErrorClass in error.h
-  'data': [ 'GenericError', 'CommandNotFound',
-            'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] }
+{ 'enum': 'OnOffAuto',
+  'data': [ 'auto', 'on', 'off' ] }
 
 ##
-# @VersionTriple:
+# @OnOffSplit:
 #
-# A three-part version number.
+# An enumeration of three values: on, off, and split
 #
-# @major:  The major version number.
+# @on: Enabled
 #
-# @minor:  The minor version number.
+# @off: Disabled
 #
-# @micro:  The micro version number.
+# @split: Mixed
 #
-# Since: 2.4
+# Since: 2.6
 ##
-{ 'struct': 'VersionTriple',
-  'data': {'major': 'int', 'minor': 'int', 'micro': 'int'} }
-
+{ 'enum': 'OnOffSplit',
+  'data': [ 'on', 'off', 'split' ] }
 
 ##
-# @VersionInfo:
+# @StrOrNull:
 #
-# A description of QEMU's version.
+# 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.
 #
-# @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.
+# @s: the string value
 #
-# @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.
+# @n: no string value
 #
-# Since: 0.14.0
+# Since: 2.10
 ##
-{ 'struct': 'VersionInfo',
-  'data': {'qemu': 'VersionTriple', 'package': 'str'} }
+{ 'alternate': 'StrOrNull',
+  'data': { 's': 'str',
+            'n': 'null' } }
 
 ##
-# @query-version:
+# @OffAutoPCIBAR:
+#
+# An enumeration of options for specifying a PCI BAR
 #
-# Returns the current version of QEMU.
+# @off: The specified feature is disabled
 #
-# Returns:  A @VersionInfo object describing the current version of QEMU.
+# @auto: The PCI BAR for the feature is automatically selected
 #
-# Since: 0.14.0
+# @bar0: PCI BAR0 is used for the feature
 #
-# Example:
+# @bar1: PCI BAR1 is used for the feature
 #
-# -> { "execute": "query-version" }
-# <- {
-#       "return":{
-#          "qemu":{
-#             "major":0,
-#             "minor":11,
-#             "micro":5
-#          },
-#          "package":""
-#       }
-#    }
+# @bar2: PCI BAR2 is used for the feature
 #
+# @bar3: PCI BAR3 is used for the feature
+#
+# @bar4: PCI BAR4 is used for the feature
+#
+# @bar5: PCI BAR5 is used for the feature
+#
+# Since: 2.12
 ##
-{ 'command': 'query-version', 'returns': 'VersionInfo' }
+{ 'enum': 'OffAutoPCIBAR',
+  'data': [ 'off', 'auto', 'bar0', 'bar1', 'bar2', 'bar3', 'bar4', 'bar5' ] }
 
 ##
-# @CommandInfo:
+# @PCIELinkSpeed:
+#
+# An enumeration of PCIe link speeds in units of GT/s
+#
+# @2_5: 2.5GT/s
+#
+# @5: 5.0GT/s
+#
+# @8: 8.0GT/s
 #
-# Information about a QMP command
+# @16: 16.0GT/s
 #
-# @name: The command name
+# @32: 32.0GT/s (since 9.0)
 #
-# Since: 0.14.0
+# @64: 64.0GT/s (since 9.0)
+#
+# Since: 4.0
 ##
-{ 'struct': 'CommandInfo', 'data': {'name': 'str'} }
+{ 'enum': 'PCIELinkSpeed',
+  'data': [ '2_5', '5', '8', '16', '32', '64' ] }
 
 ##
-# @query-commands:
+# @PCIELinkWidth:
+#
+# An enumeration of PCIe link width
 #
-# Return a list of supported QMP commands by this server
+# @1: x1
 #
-# Returns: A list of @CommandInfo for all supported commands
+# @2: x2
 #
-# Since: 0.14.0
+# @4: x4
 #
-# Example:
+# @8: x8
 #
-# -> { "execute": "query-commands" }
-# <- {
-#      "return":[
-#         {
-#            "name":"query-balloon"
-#         },
-#         {
-#            "name":"system_powerdown"
-#         }
-#      ]
-#    }
+# @12: x12
 #
-# Note: This example has been shortened as the real response is too long.
+# @16: x16
 #
+# @32: x32
+#
+# Since: 4.0
 ##
-{ 'command': 'query-commands', 'returns': ['CommandInfo'] }
+{ 'enum': 'PCIELinkWidth',
+  'data': [ '1', '2', '4', '8', '12', '16', '32' ] }
 
 ##
-# @OnOffAuto:
+# @HostMemPolicy:
 #
-# An enumeration of three options: on, off, and auto
+# Host memory policy types
 #
-# @auto: QEMU selects the value between on and off
+# @default: restore default policy, remove any nondefault policy
 #
-# @on: Enabled
+# @preferred: set the preferred host nodes for allocation
 #
-# @off: Disabled
+# @bind: a strict policy that restricts memory allocation to the host
+#     nodes specified
 #
-# Since: 2.2
+# @interleave: memory allocations are interleaved across the set of
+#     host nodes specified
+#
+# Since: 2.1
 ##
-{ 'enum': 'OnOffAuto',
-  'data': [ 'auto', 'on', 'off' ] }
+{ 'enum': 'HostMemPolicy',
+  'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
 
 ##
-# @OnOffSplit:
+# @NetFilterDirection:
 #
-# An enumeration of three values: on, off, and split
+# Indicates whether a netfilter is attached to a netdev's transmit
+# queue or receive queue or both.
 #
-# @on: Enabled
+# @all: the filter is attached both to the receive and the transmit
+#     queue of the netdev (default).
 #
-# @off: Disabled
+# @rx: the filter is attached to the receive queue of the netdev,
+#     where it will receive packets sent to the netdev.
 #
-# @split: Mixed
+# @tx: the filter is attached to the transmit queue of the netdev,
+#     where it will receive packets sent by the netdev.
 #
-# Since: 2.6
+# Since: 2.5
 ##
-{ 'enum': 'OnOffSplit',
-  'data': [ 'on', 'off', 'split' ] }
+{ 'enum': 'NetFilterDirection',
+  'data': [ 'all', 'rx', 'tx' ] }
+
+##
+# @GrabToggleKeys:
+#
+# Keys to toggle input-linux between host and guest.
+#
+# Since: 4.0
+##
+{ 'enum': 'GrabToggleKeys',
+  'data': [ 'ctrl-ctrl', 'alt-alt', 'shift-shift','meta-meta', 'scrolllock',
+            'ctrl-scrolllock' ] }
+
+##
+# @HumanReadableText:
+#
+# @human-readable-text: Formatted output intended for humans.
+#
+# Since: 6.2
+##
+{ 'struct': 'HumanReadableText',
+  'data': { 'human-readable-text': 'str' } }