9 { 'include': 'common.json' }
14 # Allow client connections for VNC, Spice and socket based character
15 # devices to be passed in to QEMU via SCM_RIGHTS.
17 # If the FD associated with @fdname is not a socket, the command will
18 # fail and the FD will be closed.
20 # @protocol: protocol name. Valid names are "vnc", "spice",
21 # "@dbus-display" or the name of a character device (e.g. from
24 # @fdname: file descriptor name previously passed via 'getfd' command
26 # @skipauth: whether to skip authentication. Only applies to "vnc"
27 # and "spice" protocols
29 # @tls: whether to perform TLS. Only applies to the "spice" protocol
35 # -> { "execute": "add_client", "arguments": { "protocol": "vnc",
36 # "fdname": "myclient" } }
39 { 'command': 'add_client',
40 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
46 # Guest name information.
48 # @name: The name of the guest
52 { 'struct': 'NameInfo', 'data': {'*name': 'str'} }
57 # Return the name information of a guest.
59 # Returns: @NameInfo of the guest
65 # -> { "execute": "query-name" }
66 # <- { "return": { "name": "qemu-name" } }
68 { 'command': 'query-name', 'returns': 'NameInfo', 'allow-preconfig': true }
73 # Information about an iothread
75 # @id: the identifier of the iothread
77 # @thread-id: ID of the underlying host thread
79 # @poll-max-ns: maximum polling time in ns, 0 means polling is
80 # disabled (since 2.9)
82 # @poll-grow: how many ns will be added to polling time, 0 means that
83 # it's not configured (since 2.9)
85 # @poll-shrink: how many ns will be removed from polling time, 0 means
86 # that it's not configured (since 2.9)
88 # @aio-max-batch: maximum number of requests in a batch for the AIO
89 # engine, 0 means that the engine will use its default (since 6.1)
93 { 'struct': 'IOThreadInfo',
99 'aio-max-batch': 'int' } }
104 # Returns a list of information about each iothread.
106 # Note: this list excludes the QEMU main loop thread, which is not
107 # declared using the -object iothread command-line option. It is
108 # always the main thread of the process.
110 # Returns: a list of @IOThreadInfo for each iothread
116 # -> { "execute": "query-iothreads" }
129 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'],
130 'allow-preconfig': true }
135 # Stop guest VM execution.
139 # Notes: This function will succeed even if the guest is already in
140 # the stopped state. In "inmigrate" state, it will ensure that
141 # the guest remains paused once migration finishes, as if the -S
142 # option was passed on the command line.
144 # In the "suspended" state, it will completely stop the VM and
145 # cause a transition to the "paused" state. (Since 9.0)
149 # -> { "execute": "stop" }
150 # <- { "return": {} }
152 { 'command': 'stop' }
157 # Resume guest VM execution.
161 # Notes: This command will succeed if the guest is currently running.
162 # It will also succeed if the guest is in the "inmigrate" state;
163 # in this case, the effect of the command is to make sure the
164 # guest starts once migration finishes, removing the effect of the
165 # -S command line option if it was passed.
167 # If the VM was previously suspended, and not been reset or woken,
168 # this command will transition back to the "suspended" state.
173 # -> { "execute": "cont" }
174 # <- { "return": {} }
176 { 'command': 'cont' }
181 # Exit from "preconfig" state
183 # This command makes QEMU exit the preconfig state and proceed with VM
184 # initialization using configuration data provided on the command line
185 # and via the QMP monitor during the preconfig state. The command is
186 # only available during the preconfig state (i.e. when the --preconfig
187 # command line option was in use).
191 # @unstable: This command is experimental.
197 # -> { "execute": "x-exit-preconfig" }
198 # <- { "return": {} }
200 { 'command': 'x-exit-preconfig', 'allow-preconfig': true,
201 'features': [ 'unstable' ] }
204 # @human-monitor-command:
206 # Execute a command on the human monitor and return the output.
208 # @command-line: the command to execute in the human monitor
210 # @cpu-index: The CPU to use for commands that require an implicit CPU
214 # @savevm-monitor-nodes: If present, HMP command savevm only snapshots
215 # monitor-owned nodes if they have no parents. This allows the
216 # use of 'savevm' with -blockdev. (since 4.2)
218 # Returns: the output of the command as a string
222 # Notes: This command only exists as a stop-gap. Its use is highly
223 # discouraged. The semantics of this command are not guaranteed:
224 # this means that command names, arguments and responses can
225 # change or be removed at ANY time. Applications that rely on
226 # long term stability guarantees should NOT use this command.
230 # * This command is stateless, this means that commands that
231 # depend on state information (such as getfd) might not work
233 # * Commands that prompt the user for data don't currently work
237 # -> { "execute": "human-monitor-command",
238 # "arguments": { "command-line": "info kvm" } }
239 # <- { "return": "kvm support: enabled\r\n" }
241 { 'command': 'human-monitor-command',
242 'data': {'command-line': 'str', '*cpu-index': 'int'},
244 'features': [ 'savevm-monitor-nodes' ] }
249 # Receive a file descriptor via SCM rights and assign it a name
251 # @fdname: file descriptor name
255 # Notes: If @fdname already exists, the file descriptor assigned to it
256 # will be closed and replaced by the received file descriptor.
258 # The 'closefd' command can be used to explicitly close the file
259 # descriptor when it is no longer needed.
263 # -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
264 # <- { "return": {} }
266 { 'command': 'getfd', 'data': {'fdname': 'str'}, 'if': 'CONFIG_POSIX' }
271 # Add a socket that was duplicated to QEMU process with
272 # WSADuplicateSocketW() via WSASocket() & WSAPROTOCOL_INFOW structure
273 # and assign it a name (the SOCKET is associated with a CRT file
276 # @info: the WSAPROTOCOL_INFOW structure (encoded in base64)
278 # @fdname: file descriptor name
282 # Notes: If @fdname already exists, the file descriptor assigned to it
283 # will be closed and replaced by the received file descriptor.
285 # The 'closefd' command can be used to explicitly close the file
286 # descriptor when it is no longer needed.
290 # -> { "execute": "get-win32-socket", "arguments": { "info": "abcd123..", fdname": "skclient" } }
291 # <- { "return": {} }
293 { 'command': 'get-win32-socket', 'data': {'info': 'str', 'fdname': 'str'}, 'if': 'CONFIG_WIN32' }
298 # Close a file descriptor previously passed via SCM rights
300 # @fdname: file descriptor name
306 # -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
307 # <- { "return": {} }
309 { 'command': 'closefd', 'data': {'fdname': 'str'} }
314 # Information about a file descriptor that was added to an fd set.
316 # @fdset-id: The ID of the fd set that @fd was added to.
318 # @fd: The file descriptor that was received via SCM rights and added
323 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
328 # Add a file descriptor, that was passed via SCM rights, to an fd set.
330 # @fdset-id: The ID of the fd set to add the file descriptor to.
332 # @opaque: A free-form string that can be used to describe the fd.
338 # - If file descriptor was not received, GenericError
339 # - If @fdset-id is a negative value, GenericError
342 # The list of fd sets is shared by all monitor connections.
344 # If @fdset-id is not specified, a new fd set will be created.
350 # -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
351 # <- { "return": { "fdset-id": 1, "fd": 3 } }
353 { 'command': 'add-fd',
354 'data': { '*fdset-id': 'int',
356 'returns': 'AddfdInfo' }
361 # Remove a file descriptor from an fd set.
363 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
365 # @fd: The file descriptor that is to be removed.
368 # - If @fdset-id or @fd is not found, GenericError
373 # The list of fd sets is shared by all monitor connections.
375 # If @fd is not specified, all file descriptors in @fdset-id will
380 # -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
381 # <- { "return": {} }
383 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
388 # Information about a file descriptor that belongs to an fd set.
390 # @fd: The file descriptor value.
392 # @opaque: A free-form string that can be used to describe the fd.
396 { 'struct': 'FdsetFdInfo',
397 'data': {'fd': 'int', '*opaque': 'str'} }
402 # Information about an fd set.
404 # @fdset-id: The ID of the fd set.
406 # @fds: A list of file descriptors that belong to this fd set.
410 { 'struct': 'FdsetInfo',
411 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
416 # Return information describing all fd sets.
418 # Returns: A list of @FdsetInfo
422 # Note: The list of fd sets is shared by all monitor connections.
426 # -> { "execute": "query-fdsets" }
432 # "opaque": "rdonly:/path/to/file"
436 # "opaque": "rdwr:/path/to/file"
455 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
458 # @CommandLineParameterType:
460 # Possible types for an option parameter.
462 # @string: accepts a character string
464 # @boolean: accepts "on" or "off"
466 # @number: accepts a number
468 # @size: accepts a number followed by an optional suffix (K)ilo,
469 # (M)ega, (G)iga, (T)era
473 { 'enum': 'CommandLineParameterType',
474 'data': ['string', 'boolean', 'number', 'size'] }
477 # @CommandLineParameterInfo:
479 # Details about a single parameter of a command line option.
481 # @name: parameter name
483 # @type: parameter @CommandLineParameterType
485 # @help: human readable text string, not suitable for parsing.
487 # @default: default value string (since 2.1)
491 { 'struct': 'CommandLineParameterInfo',
492 'data': { 'name': 'str',
493 'type': 'CommandLineParameterType',
495 '*default': 'str' } }
498 # @CommandLineOptionInfo:
500 # Details about a command line option, including its list of parameter
503 # @option: option name
505 # @parameters: an array of @CommandLineParameterInfo
509 { 'struct': 'CommandLineOptionInfo',
510 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
513 # @query-command-line-options:
515 # Query command line option schema.
517 # @option: option name
519 # Returns: list of @CommandLineOptionInfo for all options (or for the
523 # - if the given @option doesn't exist
529 # -> { "execute": "query-command-line-options",
530 # "arguments": { "option": "option-rom" } }
539 # "name": "bootindex",
543 # "option": "option-rom"
548 {'command': 'query-command-line-options',
549 'data': {'*option': 'str'},
550 'returns': ['CommandLineOptionInfo'],
551 'allow-preconfig': true}
556 # Emitted when the guest changes the RTC time.
558 # @offset: offset in seconds between base RTC clock (as specified by
559 # -rtc base), and new RTC clock value
561 # @qom-path: path to the RTC object in the QOM tree
563 # Note: This event is rate-limited. It is not guaranteed that the RTC
564 # in the system implements this event, or even that the system has
571 # <- { "event": "RTC_CHANGE",
572 # "data": { "offset": 78 },
573 # "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
575 { 'event': 'RTC_CHANGE',
576 'data': { 'offset': 'int', 'qom-path': 'str' } }
579 # @VFU_CLIENT_HANGUP:
581 # Emitted when the client of a TYPE_VFIO_USER_SERVER closes the
582 # communication channel
584 # @vfu-id: ID of the TYPE_VFIO_USER_SERVER object. It is the last
585 # component of @vfu-qom-path referenced below
587 # @vfu-qom-path: path to the TYPE_VFIO_USER_SERVER object in the QOM
590 # @dev-id: ID of attached PCI device
592 # @dev-qom-path: path to attached PCI device in the QOM tree
598 # <- { "event": "VFU_CLIENT_HANGUP",
599 # "data": { "vfu-id": "vfu1",
600 # "vfu-qom-path": "/objects/vfu1",
602 # "dev-qom-path": "/machine/peripheral/sas1" },
603 # "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
605 { 'event': 'VFU_CLIENT_HANGUP',
606 'data': { 'vfu-id': 'str', 'vfu-qom-path': 'str',
607 'dev-id': 'str', 'dev-qom-path': 'str' } }