kvm: remove hard dependency on pci
[qemu.git] / qapi / common.json
blob8355d5a2f3f3121af52704c6368e6f8cfa3c6d2a
1 # -*- Mode: Python -*-
3 ##
4 # = QAPI common definitions
5 ##
7 ##
8 # @QapiErrorClass:
10 # QEMU error classes
12 # @GenericError: this is used for errors that don't require a specific error
13 #                class. This should be the default case for most errors
15 # @CommandNotFound: the requested command has not been found
17 # @DeviceNotActive: a device has failed to be become active
19 # @DeviceNotFound: the requested device has not been found
21 # @KVMMissingCap: the requested operation can't be fulfilled because a
22 #                 required KVM capability is missing
24 # Since: 1.2
26 { 'enum': 'QapiErrorClass',
27   # Keep this in sync with ErrorClass in error.h
28   'data': [ 'GenericError', 'CommandNotFound',
29             'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] }
32 # @VersionTriple:
34 # A three-part version number.
36 # @major:  The major version number.
38 # @minor:  The minor version number.
40 # @micro:  The micro version number.
42 # Since: 2.4
44 { 'struct': 'VersionTriple',
45   'data': {'major': 'int', 'minor': 'int', 'micro': 'int'} }
49 # @VersionInfo:
51 # A description of QEMU's version.
53 # @qemu:        The version of QEMU.  By current convention, a micro
54 #               version of 50 signifies a development branch.  A micro version
55 #               greater than or equal to 90 signifies a release candidate for
56 #               the next minor version.  A micro version of less than 50
57 #               signifies a stable release.
59 # @package:     QEMU will always set this field to an empty string.  Downstream
60 #               versions of QEMU should set this to a non-empty string.  The
61 #               exact format depends on the downstream however it highly
62 #               recommended that a unique name is used.
64 # Since: 0.14.0
66 { 'struct': 'VersionInfo',
67   'data': {'qemu': 'VersionTriple', 'package': 'str'} }
70 # @query-version:
72 # Returns the current version of QEMU.
74 # Returns:  A @VersionInfo object describing the current version of QEMU.
76 # Since: 0.14.0
78 # Example:
80 # -> { "execute": "query-version" }
81 # <- {
82 #       "return":{
83 #          "qemu":{
84 #             "major":0,
85 #             "minor":11,
86 #             "micro":5
87 #          },
88 #          "package":""
89 #       }
90 #    }
93 { 'command': 'query-version', 'returns': 'VersionInfo' }
96 # @CommandInfo:
98 # Information about a QMP command
100 # @name: The command name
102 # Since: 0.14.0
104 { 'struct': 'CommandInfo', 'data': {'name': 'str'} }
107 # @query-commands:
109 # Return a list of supported QMP commands by this server
111 # Returns: A list of @CommandInfo for all supported commands
113 # Since: 0.14.0
115 # Example:
117 # -> { "execute": "query-commands" }
118 # <- {
119 #      "return":[
120 #         {
121 #            "name":"query-balloon"
122 #         },
123 #         {
124 #            "name":"system_powerdown"
125 #         }
126 #      ]
127 #    }
129 # Note: This example has been shortened as the real response is too long.
132 { 'command': 'query-commands', 'returns': ['CommandInfo'] }
135 # @OnOffAuto:
137 # An enumeration of three options: on, off, and auto
139 # @auto: QEMU selects the value between on and off
141 # @on: Enabled
143 # @off: Disabled
145 # Since: 2.2
147 { 'enum': 'OnOffAuto',
148   'data': [ 'auto', 'on', 'off' ] }
151 # @OnOffSplit:
153 # An enumeration of three values: on, off, and split
155 # @on: Enabled
157 # @off: Disabled
159 # @split: Mixed
161 # Since: 2.6
163 { 'enum': 'OnOffSplit',
164   'data': [ 'on', 'off', 'split' ] }