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
31 # Returns: nothing on success.
37 # -> { "execute": "add_client", "arguments": { "protocol": "vnc",
38 # "fdname": "myclient" } }
41 { 'command': 'add_client',
42 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
48 # Guest name information.
50 # @name: The name of the guest
54 { 'struct': 'NameInfo', 'data': {'*name': 'str'} }
59 # Return the name information of a guest.
61 # Returns: @NameInfo of the guest
67 # -> { "execute": "query-name" }
68 # <- { "return": { "name": "qemu-name" } }
70 { 'command': 'query-name', 'returns': 'NameInfo', 'allow-preconfig': true }
75 # Information about an iothread
77 # @id: the identifier of the iothread
79 # @thread-id: ID of the underlying host thread
81 # @poll-max-ns: maximum polling time in ns, 0 means polling is
82 # disabled (since 2.9)
84 # @poll-grow: how many ns will be added to polling time, 0 means that
85 # it's not configured (since 2.9)
87 # @poll-shrink: how many ns will be removed from polling time, 0 means
88 # that it's not configured (since 2.9)
90 # @aio-max-batch: maximum number of requests in a batch for the AIO
91 # engine, 0 means that the engine will use its default (since 6.1)
95 { 'struct': 'IOThreadInfo',
100 'poll-shrink': 'int',
101 'aio-max-batch': 'int' } }
106 # Returns a list of information about each iothread.
108 # Note: this list excludes the QEMU main loop thread, which is not
109 # declared using the -object iothread command-line option. It is
110 # always the main thread of the process.
112 # Returns: a list of @IOThreadInfo for each iothread
118 # -> { "execute": "query-iothreads" }
131 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'],
132 'allow-preconfig': true }
137 # Stop all guest VCPU execution.
141 # Notes: This function will succeed even if the guest is already in
142 # the stopped state. In "inmigrate" state, it will ensure that
143 # the guest remains paused once migration finishes, as if the -S
144 # option was passed on the command line.
148 # -> { "execute": "stop" }
149 # <- { "return": {} }
151 { 'command': 'stop' }
156 # Resume guest VCPU execution.
160 # Returns: If successful, nothing
162 # Notes: This command will succeed if the guest is currently running.
163 # It will also succeed if the guest is in the "inmigrate" state;
164 # in this case, the effect of the command is to make sure the
165 # guest starts once migration finishes, removing the effect of the
166 # -S command line option if it was passed.
170 # -> { "execute": "cont" }
171 # <- { "return": {} }
173 { 'command': 'cont' }
178 # Exit from "preconfig" state
180 # This command makes QEMU exit the preconfig state and proceed with VM
181 # initialization using configuration data provided on the command line
182 # and via the QMP monitor during the preconfig state. The command is
183 # only available during the preconfig state (i.e. when the --preconfig
184 # command line option was in use).
188 # @unstable: This command is experimental.
196 # -> { "execute": "x-exit-preconfig" }
197 # <- { "return": {} }
199 { 'command': 'x-exit-preconfig', 'allow-preconfig': true,
200 'features': [ 'unstable' ] }
203 # @human-monitor-command:
205 # Execute a command on the human monitor and return the output.
207 # @command-line: the command to execute in the human monitor
209 # @cpu-index: The CPU to use for commands that require an implicit CPU
213 # @savevm-monitor-nodes: If present, HMP command savevm only snapshots
214 # monitor-owned nodes if they have no parents. This allows the
215 # use of 'savevm' with -blockdev. (since 4.2)
217 # Returns: the output of the command as a string
221 # Notes: This command only exists as a stop-gap. Its use is highly
222 # discouraged. The semantics of this command are not guaranteed:
223 # this means that command names, arguments and responses can
224 # change or be removed at ANY time. Applications that rely on
225 # long term stability guarantees should NOT use this command.
229 # * This command is stateless, this means that commands that
230 # depend on state information (such as getfd) might not work
232 # * Commands that prompt the user for data don't currently work
236 # -> { "execute": "human-monitor-command",
237 # "arguments": { "command-line": "info kvm" } }
238 # <- { "return": "kvm support: enabled\r\n" }
240 { 'command': 'human-monitor-command',
241 'data': {'command-line': 'str', '*cpu-index': 'int'},
243 'features': [ 'savevm-monitor-nodes' ] }
248 # Receive a file descriptor via SCM rights and assign it a name
250 # @fdname: file descriptor name
252 # Returns: Nothing on success
256 # Notes: If @fdname already exists, the file descriptor assigned to it
257 # will be closed and replaced by the received file descriptor.
259 # The 'closefd' command can be used to explicitly close the file
260 # descriptor when it is no longer needed.
264 # -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
265 # <- { "return": {} }
267 { 'command': 'getfd', 'data': {'fdname': 'str'}, 'if': 'CONFIG_POSIX' }
272 # Add a socket that was duplicated to QEMU process with
273 # WSADuplicateSocketW() via WSASocket() & WSAPROTOCOL_INFOW structure
274 # and assign it a name (the SOCKET is associated with a CRT file
277 # @info: the WSAPROTOCOL_INFOW structure (encoded in base64)
279 # @fdname: file descriptor name
281 # Returns: Nothing on success
285 # Notes: If @fdname already exists, the file descriptor assigned to it
286 # will be closed and replaced by the received file descriptor.
288 # The 'closefd' command can be used to explicitly close the file
289 # descriptor when it is no longer needed.
293 # -> { "execute": "get-win32-socket", "arguments": { "info": "abcd123..", fdname": "skclient" } }
294 # <- { "return": {} }
296 { 'command': 'get-win32-socket', 'data': {'info': 'str', 'fdname': 'str'}, 'if': 'CONFIG_WIN32' }
301 # Close a file descriptor previously passed via SCM rights
303 # @fdname: file descriptor name
305 # Returns: Nothing on success
311 # -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
312 # <- { "return": {} }
314 { 'command': 'closefd', 'data': {'fdname': 'str'} }
319 # Information about a file descriptor that was added to an fd set.
321 # @fdset-id: The ID of the fd set that @fd was added to.
323 # @fd: The file descriptor that was received via SCM rights and added
328 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
333 # Add a file descriptor, that was passed via SCM rights, to an fd set.
335 # @fdset-id: The ID of the fd set to add the file descriptor to.
337 # @opaque: A free-form string that can be used to describe the fd.
340 # - @AddfdInfo on success
341 # - If file descriptor was not received, GenericError
342 # - If @fdset-id is a negative value, GenericError
344 # Notes: The list of fd sets is shared by all monitor connections.
346 # If @fdset-id is not specified, a new fd set will be created.
352 # -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
353 # <- { "return": { "fdset-id": 1, "fd": 3 } }
355 { 'command': 'add-fd',
356 'data': { '*fdset-id': 'int',
358 'returns': 'AddfdInfo' }
363 # Remove a file descriptor from an fd set.
365 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
367 # @fd: The file descriptor that is to be removed.
370 # - Nothing on success
371 # - If @fdset-id or @fd is not found, GenericError
375 # Notes: The list of fd sets is shared by all monitor connections.
377 # If @fd is not specified, all file descriptors in @fdset-id will be
382 # -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
383 # <- { "return": {} }
385 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
390 # Information about a file descriptor that belongs to an fd set.
392 # @fd: The file descriptor value.
394 # @opaque: A free-form string that can be used to describe the fd.
398 { 'struct': 'FdsetFdInfo',
399 'data': {'fd': 'int', '*opaque': 'str'} }
404 # Information about an fd set.
406 # @fdset-id: The ID of the fd set.
408 # @fds: A list of file descriptors that belong to this fd set.
412 { 'struct': 'FdsetInfo',
413 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
418 # Return information describing all fd sets.
420 # Returns: A list of @FdsetInfo
424 # Note: The list of fd sets is shared by all monitor connections.
428 # -> { "execute": "query-fdsets" }
434 # "opaque": "rdonly:/path/to/file"
438 # "opaque": "rdwr:/path/to/file"
457 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
460 # @CommandLineParameterType:
462 # Possible types for an option parameter.
464 # @string: accepts a character string
466 # @boolean: accepts "on" or "off"
468 # @number: accepts a number
470 # @size: accepts a number followed by an optional suffix (K)ilo,
471 # (M)ega, (G)iga, (T)era
475 { 'enum': 'CommandLineParameterType',
476 'data': ['string', 'boolean', 'number', 'size'] }
479 # @CommandLineParameterInfo:
481 # Details about a single parameter of a command line option.
483 # @name: parameter name
485 # @type: parameter @CommandLineParameterType
487 # @help: human readable text string, not suitable for parsing.
489 # @default: default value string (since 2.1)
493 { 'struct': 'CommandLineParameterInfo',
494 'data': { 'name': 'str',
495 'type': 'CommandLineParameterType',
497 '*default': 'str' } }
500 # @CommandLineOptionInfo:
502 # Details about a command line option, including its list of parameter
505 # @option: option name
507 # @parameters: an array of @CommandLineParameterInfo
511 { 'struct': 'CommandLineOptionInfo',
512 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
515 # @query-command-line-options:
517 # Query command line option schema.
519 # @option: option name
521 # Returns: list of @CommandLineOptionInfo for all options (or for the
522 # given @option). Returns an error if the given @option doesn't
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' } }