ps2: migration support for command reply queue
[qemu/ar7.git] / qapi / misc.json
blob5c2ca3b55663e354280603bfca0e82495df16209
1 # -*- Mode: Python -*-
2 # vim: filetype=python
5 ##
6 # = Miscellanea
7 ##
9 { 'include': 'common.json' }
12 # @add_client:
14 # Allow client connections for VNC, Spice and socket based
15 # character devices to be passed in to QEMU via SCM_RIGHTS.
17 # @protocol: protocol name. Valid names are "vnc", "spice" or the
18 #            name of a character device (eg. from -chardev id=XXXX)
20 # @fdname: file descriptor name previously passed via 'getfd' command
22 # @skipauth: whether to skip authentication. Only applies
23 #            to "vnc" and "spice" protocols
25 # @tls: whether to perform TLS. Only applies to the "spice"
26 #       protocol
28 # Returns: nothing on success.
30 # Since: 0.14
32 # Example:
34 # -> { "execute": "add_client", "arguments": { "protocol": "vnc",
35 #                                              "fdname": "myclient" } }
36 # <- { "return": {} }
39 { 'command': 'add_client',
40   'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
41             '*tls': 'bool' } }
44 # @NameInfo:
46 # Guest name information.
48 # @name: The name of the guest
50 # Since: 0.14
52 { 'struct': 'NameInfo', 'data': {'*name': 'str'} }
55 # @query-name:
57 # Return the name information of a guest.
59 # Returns: @NameInfo of the guest
61 # Since: 0.14
63 # Example:
65 # -> { "execute": "query-name" }
66 # <- { "return": { "name": "qemu-name" } }
69 { 'command': 'query-name', 'returns': 'NameInfo', 'allow-preconfig': true }
72 # @IOThreadInfo:
74 # Information about an iothread
76 # @id: the identifier of the iothread
78 # @thread-id: ID of the underlying host thread
80 # @poll-max-ns: maximum polling time in ns, 0 means polling is disabled
81 #               (since 2.9)
83 # @poll-grow: how many ns will be added to polling time, 0 means that it's not
84 #             configured (since 2.9)
86 # @poll-shrink: how many ns will be removed from polling time, 0 means that
87 #               it's not configured (since 2.9)
89 # @aio-max-batch: maximum number of requests in a batch for the AIO engine,
90 #                 0 means that the engine will use its default (since 6.1)
92 # Since: 2.0
94 { 'struct': 'IOThreadInfo',
95   'data': {'id': 'str',
96            'thread-id': 'int',
97            'poll-max-ns': 'int',
98            'poll-grow': 'int',
99            'poll-shrink': 'int',
100            'aio-max-batch': 'int' } }
103 # @query-iothreads:
105 # Returns a list of information about each iothread.
107 # Note: this list excludes the QEMU main loop thread, which is not declared
108 #       using the -object iothread command-line option.  It is always the main thread
109 #       of the process.
111 # Returns: a list of @IOThreadInfo for each iothread
113 # Since: 2.0
115 # Example:
117 # -> { "execute": "query-iothreads" }
118 # <- { "return": [
119 #          {
120 #             "id":"iothread0",
121 #             "thread-id":3134
122 #          },
123 #          {
124 #             "id":"iothread1",
125 #             "thread-id":3135
126 #          }
127 #       ]
128 #    }
131 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'],
132   'allow-preconfig': true }
135 # @stop:
137 # Stop all guest VCPU execution.
139 # Since:  0.14
141 # Notes: This function will succeed even if the guest is already in the stopped
142 #        state.  In "inmigrate" state, it will ensure that the guest
143 #        remains paused once migration finishes, as if the -S option was
144 #        passed on the command line.
146 # Example:
148 # -> { "execute": "stop" }
149 # <- { "return": {} }
152 { 'command': 'stop' }
155 # @cont:
157 # Resume guest VCPU execution.
159 # Since:  0.14
161 # Returns:  If successful, nothing
163 # Notes: This command will succeed if the guest is currently running.  It
164 #        will also succeed if the guest is in the "inmigrate" state; in
165 #        this case, the effect of the command is to make sure the guest
166 #        starts once migration finishes, removing the effect of the -S
167 #        command line option if it was passed.
169 # Example:
171 # -> { "execute": "cont" }
172 # <- { "return": {} }
175 { 'command': 'cont' }
178 # @x-exit-preconfig:
180 # Exit from "preconfig" state
182 # This command makes QEMU exit the preconfig state and proceed with
183 # VM initialization using configuration data provided on the command line
184 # and via the QMP monitor during the preconfig state. The command is only
185 # available during the preconfig state (i.e. when the --preconfig command
186 # line option was in use).
188 # Since 3.0
190 # Returns: nothing
192 # Example:
194 # -> { "execute": "x-exit-preconfig" }
195 # <- { "return": {} }
198 { 'command': 'x-exit-preconfig', 'allow-preconfig': true }
201 # @human-monitor-command:
203 # Execute a command on the human monitor and return the output.
205 # @command-line: the command to execute in the human monitor
207 # @cpu-index: The CPU to use for commands that require an implicit CPU
209 # Features:
210 # @savevm-monitor-nodes: If present, HMP command savevm only snapshots
211 #                        monitor-owned nodes if they have no parents.
212 #                        This allows the use of 'savevm' with
213 #                        -blockdev. (since 4.2)
215 # Returns: the output of the command as a string
217 # Since: 0.14
219 # Notes: This command only exists as a stop-gap.  Its use is highly
220 #        discouraged.  The semantics of this command are not
221 #        guaranteed: this means that command names, arguments and
222 #        responses can change or be removed at ANY time.  Applications
223 #        that rely on long term stability guarantees should NOT
224 #        use this command.
226 #        Known limitations:
228 #        * This command is stateless, this means that commands that depend
229 #          on state information (such as getfd) might not work
231 #        * Commands that prompt the user for data don't currently work
233 # Example:
235 # -> { "execute": "human-monitor-command",
236 #      "arguments": { "command-line": "info kvm" } }
237 # <- { "return": "kvm support: enabled\r\n" }
240 { 'command': 'human-monitor-command',
241   'data': {'command-line': 'str', '*cpu-index': 'int'},
242   'returns': 'str',
243   'features': [ 'savevm-monitor-nodes' ] }
246 # @getfd:
248 # Receive a file descriptor via SCM rights and assign it a name
250 # @fdname: file descriptor name
252 # Returns: Nothing on success
254 # Since: 0.14
256 # Notes: If @fdname already exists, the file descriptor assigned to
257 #        it will be closed and replaced by the received file
258 #        descriptor.
260 #        The 'closefd' command can be used to explicitly close the
261 #        file descriptor when it is no longer needed.
263 # Example:
265 # -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
266 # <- { "return": {} }
269 { 'command': 'getfd', 'data': {'fdname': 'str'} }
272 # @closefd:
274 # Close a file descriptor previously passed via SCM rights
276 # @fdname: file descriptor name
278 # Returns: Nothing on success
280 # Since: 0.14
282 # Example:
284 # -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
285 # <- { "return": {} }
288 { 'command': 'closefd', 'data': {'fdname': 'str'} }
291 # @AddfdInfo:
293 # Information about a file descriptor that was added to an fd set.
295 # @fdset-id: The ID of the fd set that @fd was added to.
297 # @fd: The file descriptor that was received via SCM rights and
298 #      added to the fd set.
300 # Since: 1.2
302 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
305 # @add-fd:
307 # Add a file descriptor, that was passed via SCM rights, to an fd set.
309 # @fdset-id: The ID of the fd set to add the file descriptor to.
311 # @opaque: A free-form string that can be used to describe the fd.
313 # Returns: - @AddfdInfo on success
314 #          - If file descriptor was not received, FdNotSupplied
315 #          - If @fdset-id is a negative value, InvalidParameterValue
317 # Notes: The list of fd sets is shared by all monitor connections.
319 #        If @fdset-id is not specified, a new fd set will be created.
321 # Since: 1.2
323 # Example:
325 # -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
326 # <- { "return": { "fdset-id": 1, "fd": 3 } }
329 { 'command': 'add-fd',
330   'data': { '*fdset-id': 'int',
331             '*opaque': 'str' },
332   'returns': 'AddfdInfo' }
335 # @remove-fd:
337 # Remove a file descriptor from an fd set.
339 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
341 # @fd: The file descriptor that is to be removed.
343 # Returns: - Nothing on success
344 #          - If @fdset-id or @fd is not found, FdNotFound
346 # Since: 1.2
348 # Notes: The list of fd sets is shared by all monitor connections.
350 #        If @fd is not specified, all file descriptors in @fdset-id
351 #        will be removed.
353 # Example:
355 # -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
356 # <- { "return": {} }
359 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
362 # @FdsetFdInfo:
364 # Information about a file descriptor that belongs to an fd set.
366 # @fd: The file descriptor value.
368 # @opaque: A free-form string that can be used to describe the fd.
370 # Since: 1.2
372 { 'struct': 'FdsetFdInfo',
373   'data': {'fd': 'int', '*opaque': 'str'} }
376 # @FdsetInfo:
378 # Information about an fd set.
380 # @fdset-id: The ID of the fd set.
382 # @fds: A list of file descriptors that belong to this fd set.
384 # Since: 1.2
386 { 'struct': 'FdsetInfo',
387   'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
390 # @query-fdsets:
392 # Return information describing all fd sets.
394 # Returns: A list of @FdsetInfo
396 # Since: 1.2
398 # Note: The list of fd sets is shared by all monitor connections.
400 # Example:
402 # -> { "execute": "query-fdsets" }
403 # <- { "return": [
404 #        {
405 #          "fds": [
406 #            {
407 #              "fd": 30,
408 #              "opaque": "rdonly:/path/to/file"
409 #            },
410 #            {
411 #              "fd": 24,
412 #              "opaque": "rdwr:/path/to/file"
413 #            }
414 #          ],
415 #          "fdset-id": 1
416 #        },
417 #        {
418 #          "fds": [
419 #            {
420 #              "fd": 28
421 #            },
422 #            {
423 #              "fd": 29
424 #            }
425 #          ],
426 #          "fdset-id": 0
427 #        }
428 #      ]
429 #    }
432 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
435 # @CommandLineParameterType:
437 # Possible types for an option parameter.
439 # @string: accepts a character string
441 # @boolean: accepts "on" or "off"
443 # @number: accepts a number
445 # @size: accepts a number followed by an optional suffix (K)ilo,
446 #        (M)ega, (G)iga, (T)era
448 # Since: 1.5
450 { 'enum': 'CommandLineParameterType',
451   'data': ['string', 'boolean', 'number', 'size'] }
454 # @CommandLineParameterInfo:
456 # Details about a single parameter of a command line option.
458 # @name: parameter name
460 # @type: parameter @CommandLineParameterType
462 # @help: human readable text string, not suitable for parsing.
464 # @default: default value string (since 2.1)
466 # Since: 1.5
468 { 'struct': 'CommandLineParameterInfo',
469   'data': { 'name': 'str',
470             'type': 'CommandLineParameterType',
471             '*help': 'str',
472             '*default': 'str' } }
475 # @CommandLineOptionInfo:
477 # Details about a command line option, including its list of parameter details
479 # @option: option name
481 # @parameters: an array of @CommandLineParameterInfo
483 # Since: 1.5
485 { 'struct': 'CommandLineOptionInfo',
486   'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
489 # @query-command-line-options:
491 # Query command line option schema.
493 # @option: option name
495 # Returns: list of @CommandLineOptionInfo for all options (or for the given
496 #          @option).  Returns an error if the given @option doesn't exist.
498 # Since: 1.5
500 # Example:
502 # -> { "execute": "query-command-line-options",
503 #      "arguments": { "option": "option-rom" } }
504 # <- { "return": [
505 #         {
506 #             "parameters": [
507 #                 {
508 #                     "name": "romfile",
509 #                     "type": "string"
510 #                 },
511 #                 {
512 #                     "name": "bootindex",
513 #                     "type": "number"
514 #                 }
515 #             ],
516 #             "option": "option-rom"
517 #         }
518 #      ]
519 #    }
522 {'command': 'query-command-line-options',
523  'data': { '*option': 'str' },
524  'returns': ['CommandLineOptionInfo'],
525  'allow-preconfig': true }