6 # = QMP monitor control
12 # Enable QMP capabilities.
16 # @enable: An optional list of QMPCapability values to enable. The
17 # client must not enable any capability that is not mentioned in
18 # the QMP greeting message. If the field is not provided, it
19 # means no QMP capabilities will be enabled. (since 2.12)
23 # -> { "execute": "qmp_capabilities",
24 # "arguments": { "enable": [ "oob" ] } }
27 # Notes: This command is valid exactly when first connecting: it must
28 # be issued before any other command will be accepted, and will
29 # fail once the monitor is accepting other commands. (see qemu
30 # docs/interop/qmp-spec.rst)
32 # The QMP client needs to explicitly enable QMP capabilities,
33 # otherwise all the QMP capabilities will be turned off by
38 { 'command': 'qmp_capabilities',
39 'data': { '*enable': [ 'QMPCapability' ] },
40 'allow-preconfig': true }
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. (Please refer to
49 # qmp-spec.rst for more information on OOB)
53 { 'enum': 'QMPCapability',
59 # A three-part version number.
61 # @major: The major version number.
63 # @minor: The minor version number.
65 # @micro: The micro version number.
69 { 'struct': 'VersionTriple',
70 'data': {'major': 'int', 'minor': 'int', 'micro': 'int'} }
75 # A description of QEMU's version.
77 # @qemu: The version of QEMU. By current convention, a micro version
78 # of 50 signifies a development branch. A micro version greater
79 # than or equal to 90 signifies a release candidate for the next
80 # minor version. A micro version of less than 50 signifies a
83 # @package: QEMU will always set this field to an empty string.
84 # Downstream versions of QEMU should set this to a non-empty
85 # string. The exact format depends on the downstream however it
86 # highly recommended that a unique name is used.
90 { 'struct': 'VersionInfo',
91 'data': {'qemu': 'VersionTriple', 'package': 'str'} }
96 # Returns the current version of QEMU.
98 # Returns: A @VersionInfo object describing the current version of
105 # -> { "execute": "query-version" }
117 { 'command': 'query-version', 'returns': 'VersionInfo',
118 'allow-preconfig': true }
123 # Information about a QMP command
125 # @name: The command name
129 { 'struct': 'CommandInfo', 'data': {'name': 'str'} }
134 # Return a list of supported QMP commands by this server
136 # Returns: A list of @CommandInfo for all supported commands
142 # -> { "execute": "query-commands" }
146 # "name":"query-balloon"
149 # "name":"system_powerdown"
154 # Note: This example has been shortened as the real response is too
157 { 'command': 'query-commands', 'returns': ['CommandInfo'],
158 'allow-preconfig': true }
163 # This command will cause the QEMU process to exit gracefully. While
164 # every attempt is made to send the QMP response before terminating,
165 # this is not guaranteed. When using this interface, a premature EOF
166 # would not be unexpected.
172 # -> { "execute": "quit" }
173 # <- { "return": {} }
176 'allow-preconfig': true }
181 # An enumeration of monitor modes.
183 # @readline: HMP monitor (human-oriented command line interface)
185 # @control: QMP monitor (JSON-based machine interface)
189 { 'enum': 'MonitorMode', 'data': [ 'readline', 'control' ] }
194 # Options to be used for adding a new monitor.
196 # @id: Name of the monitor
198 # @mode: Selects the monitor mode (default: readline in the system
199 # emulator, control in qemu-storage-daemon)
201 # @pretty: Enables pretty printing (QMP only)
203 # @chardev: Name of a character device to expose the monitor on
207 { 'struct': 'MonitorOptions',
210 '*mode': 'MonitorMode',