Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20210330' into...
[qemu/ar7.git] / qapi / control.json
blob71a838d49ec58702901a87e49a509b47f28de0e2
1 # -*- Mode: Python -*-
2 # vim: filetype=python
5 ##
6 # = QMP monitor control
7 ##
9 ##
10 # @qmp_capabilities:
12 # Enable QMP capabilities.
14 # Arguments:
16 # @enable: An optional list of QMPCapability values to enable.  The
17 #          client must not enable any capability that is not
18 #          mentioned in the QMP greeting message.  If the field is not
19 #          provided, it means no QMP capabilities will be enabled.
20 #          (since 2.12)
22 # Example:
24 # -> { "execute": "qmp_capabilities",
25 #      "arguments": { "enable": [ "oob" ] } }
26 # <- { "return": {} }
28 # Notes: This command is valid exactly when first connecting: it must be
29 #        issued before any other command will be accepted, and will fail once the
30 #        monitor is accepting other commands. (see qemu docs/interop/qmp-spec.txt)
32 #        The QMP client needs to explicitly enable QMP capabilities, otherwise
33 #        all the QMP capabilities will be turned off by default.
35 # Since: 0.13
38 { 'command': 'qmp_capabilities',
39   'data': { '*enable': [ 'QMPCapability' ] },
40   'allow-preconfig': true }
43 # @QMPCapability:
45 # Enumeration of capabilities to be advertised during initial client
46 # connection, used for agreeing on particular QMP extension behaviors.
48 # @oob: QMP ability to support out-of-band requests.
49 #       (Please refer to qmp-spec.txt for more information on OOB)
51 # Since: 2.12
54 { 'enum': 'QMPCapability',
55   'data': [ 'oob' ] }
58 # @VersionTriple:
60 # A three-part version number.
62 # @major: The major version number.
64 # @minor: The minor version number.
66 # @micro: The micro version number.
68 # Since: 2.4
70 { 'struct': 'VersionTriple',
71   'data': {'major': 'int', 'minor': 'int', 'micro': 'int'} }
75 # @VersionInfo:
77 # A description of QEMU's version.
79 # @qemu: The version of QEMU.  By current convention, a micro
80 #        version of 50 signifies a development branch.  A micro version
81 #        greater than or equal to 90 signifies a release candidate for
82 #        the next minor version.  A micro version of less than 50
83 #        signifies a stable release.
85 # @package: QEMU will always set this field to an empty string.  Downstream
86 #           versions of QEMU should set this to a non-empty string.  The
87 #           exact format depends on the downstream however it highly
88 #           recommended that a unique name is used.
90 # Since: 0.14
92 { 'struct': 'VersionInfo',
93   'data': {'qemu': 'VersionTriple', 'package': 'str'} }
96 # @query-version:
98 # Returns the current version of QEMU.
100 # Returns: A @VersionInfo object describing the current version of QEMU.
102 # Since: 0.14
104 # Example:
106 # -> { "execute": "query-version" }
107 # <- {
108 #       "return":{
109 #          "qemu":{
110 #             "major":0,
111 #             "minor":11,
112 #             "micro":5
113 #          },
114 #          "package":""
115 #       }
116 #    }
119 { 'command': 'query-version', 'returns': 'VersionInfo',
120   'allow-preconfig': true }
123 # @CommandInfo:
125 # Information about a QMP command
127 # @name: The command name
129 # Since: 0.14
131 { 'struct': 'CommandInfo', 'data': {'name': 'str'} }
134 # @query-commands:
136 # Return a list of supported QMP commands by this server
138 # Returns: A list of @CommandInfo for all supported commands
140 # Since: 0.14
142 # Example:
144 # -> { "execute": "query-commands" }
145 # <- {
146 #      "return":[
147 #         {
148 #            "name":"query-balloon"
149 #         },
150 #         {
151 #            "name":"system_powerdown"
152 #         }
153 #      ]
154 #    }
156 # Note: This example has been shortened as the real response is too long.
159 { 'command': 'query-commands', 'returns': ['CommandInfo'],
160   'allow-preconfig': true }
163 # @quit:
165 # This command will cause the QEMU process to exit gracefully.  While every
166 # attempt is made to send the QMP response before terminating, this is not
167 # guaranteed.  When using this interface, a premature EOF would not be
168 # unexpected.
170 # Since: 0.14
172 # Example:
174 # -> { "execute": "quit" }
175 # <- { "return": {} }
177 { 'command': 'quit',
178   'allow-preconfig': true }
181 # @MonitorMode:
183 # An enumeration of monitor modes.
185 # @readline: HMP monitor (human-oriented command line interface)
187 # @control: QMP monitor (JSON-based machine interface)
189 # Since: 5.0
191 { 'enum': 'MonitorMode', 'data': [ 'readline', 'control' ] }
194 # @MonitorOptions:
196 # Options to be used for adding a new monitor.
198 # @id:          Name of the monitor
200 # @mode:        Selects the monitor mode (default: readline in the system
201 #               emulator, control in qemu-storage-daemon)
203 # @pretty:      Enables pretty printing (QMP only)
205 # @chardev:     Name of a character device to expose the monitor on
207 # Since: 5.0
209 { 'struct': 'MonitorOptions',
210   'data': {
211       '*id': 'str',
212       '*mode': 'MonitorMode',
213       '*pretty': 'bool',
214       'chardev': 'str'
215   } }