target/mips: Simplify decode_opc_mxu() ifdef'ry
[qemu/ar7.git] / qapi / misc.json
blob156f98203ec9df391551721a77f9d45d571c571e
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 # Since: 2.0
91 { 'struct': 'IOThreadInfo',
92   'data': {'id': 'str',
93            'thread-id': 'int',
94            'poll-max-ns': 'int',
95            'poll-grow': 'int',
96            'poll-shrink': 'int' } }
99 # @query-iothreads:
101 # Returns a list of information about each iothread.
103 # Note: this list excludes the QEMU main loop thread, which is not declared
104 #       using the -object iothread command-line option.  It is always the main thread
105 #       of the process.
107 # Returns: a list of @IOThreadInfo for each iothread
109 # Since: 2.0
111 # Example:
113 # -> { "execute": "query-iothreads" }
114 # <- { "return": [
115 #          {
116 #             "id":"iothread0",
117 #             "thread-id":3134
118 #          },
119 #          {
120 #             "id":"iothread1",
121 #             "thread-id":3135
122 #          }
123 #       ]
124 #    }
127 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'],
128   'allow-preconfig': true }
131 # @stop:
133 # Stop all guest VCPU execution.
135 # Since:  0.14
137 # Notes: This function will succeed even if the guest is already in the stopped
138 #        state.  In "inmigrate" state, it will ensure that the guest
139 #        remains paused once migration finishes, as if the -S option was
140 #        passed on the command line.
142 # Example:
144 # -> { "execute": "stop" }
145 # <- { "return": {} }
148 { 'command': 'stop' }
151 # @cont:
153 # Resume guest VCPU execution.
155 # Since:  0.14
157 # Returns:  If successful, nothing
159 # Notes: This command will succeed if the guest is currently running.  It
160 #        will also succeed if the guest is in the "inmigrate" state; in
161 #        this case, the effect of the command is to make sure the guest
162 #        starts once migration finishes, removing the effect of the -S
163 #        command line option if it was passed.
165 # Example:
167 # -> { "execute": "cont" }
168 # <- { "return": {} }
171 { 'command': 'cont' }
174 # @x-exit-preconfig:
176 # Exit from "preconfig" state
178 # This command makes QEMU exit the preconfig state and proceed with
179 # VM initialization using configuration data provided on the command line
180 # and via the QMP monitor during the preconfig state. The command is only
181 # available during the preconfig state (i.e. when the --preconfig command
182 # line option was in use).
184 # Since 3.0
186 # Returns: nothing
188 # Example:
190 # -> { "execute": "x-exit-preconfig" }
191 # <- { "return": {} }
194 { 'command': 'x-exit-preconfig', 'allow-preconfig': true }
197 # @human-monitor-command:
199 # Execute a command on the human monitor and return the output.
201 # @command-line: the command to execute in the human monitor
203 # @cpu-index: The CPU to use for commands that require an implicit CPU
205 # Features:
206 # @savevm-monitor-nodes: If present, HMP command savevm only snapshots
207 #                        monitor-owned nodes if they have no parents.
208 #                        This allows the use of 'savevm' with
209 #                        -blockdev. (since 4.2)
211 # Returns: the output of the command as a string
213 # Since: 0.14
215 # Notes: This command only exists as a stop-gap.  Its use is highly
216 #        discouraged.  The semantics of this command are not
217 #        guaranteed: this means that command names, arguments and
218 #        responses can change or be removed at ANY time.  Applications
219 #        that rely on long term stability guarantees should NOT
220 #        use this command.
222 #        Known limitations:
224 #        * This command is stateless, this means that commands that depend
225 #          on state information (such as getfd) might not work
227 #        * Commands that prompt the user for data don't currently work
229 # Example:
231 # -> { "execute": "human-monitor-command",
232 #      "arguments": { "command-line": "info kvm" } }
233 # <- { "return": "kvm support: enabled\r\n" }
236 { 'command': 'human-monitor-command',
237   'data': {'command-line': 'str', '*cpu-index': 'int'},
238   'returns': 'str',
239   'features': [ 'savevm-monitor-nodes' ] }
242 # @getfd:
244 # Receive a file descriptor via SCM rights and assign it a name
246 # @fdname: file descriptor name
248 # Returns: Nothing on success
250 # Since: 0.14
252 # Notes: If @fdname already exists, the file descriptor assigned to
253 #        it will be closed and replaced by the received file
254 #        descriptor.
256 #        The 'closefd' command can be used to explicitly close the
257 #        file descriptor when it is no longer needed.
259 # Example:
261 # -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
262 # <- { "return": {} }
265 { 'command': 'getfd', 'data': {'fdname': 'str'} }
268 # @closefd:
270 # Close a file descriptor previously passed via SCM rights
272 # @fdname: file descriptor name
274 # Returns: Nothing on success
276 # Since: 0.14
278 # Example:
280 # -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
281 # <- { "return": {} }
284 { 'command': 'closefd', 'data': {'fdname': 'str'} }
287 # @AddfdInfo:
289 # Information about a file descriptor that was added to an fd set.
291 # @fdset-id: The ID of the fd set that @fd was added to.
293 # @fd: The file descriptor that was received via SCM rights and
294 #      added to the fd set.
296 # Since: 1.2
298 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
301 # @add-fd:
303 # Add a file descriptor, that was passed via SCM rights, to an fd set.
305 # @fdset-id: The ID of the fd set to add the file descriptor to.
307 # @opaque: A free-form string that can be used to describe the fd.
309 # Returns: - @AddfdInfo on success
310 #          - If file descriptor was not received, FdNotSupplied
311 #          - If @fdset-id is a negative value, InvalidParameterValue
313 # Notes: The list of fd sets is shared by all monitor connections.
315 #        If @fdset-id is not specified, a new fd set will be created.
317 # Since: 1.2
319 # Example:
321 # -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
322 # <- { "return": { "fdset-id": 1, "fd": 3 } }
325 { 'command': 'add-fd',
326   'data': { '*fdset-id': 'int',
327             '*opaque': 'str' },
328   'returns': 'AddfdInfo' }
331 # @remove-fd:
333 # Remove a file descriptor from an fd set.
335 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
337 # @fd: The file descriptor that is to be removed.
339 # Returns: - Nothing on success
340 #          - If @fdset-id or @fd is not found, FdNotFound
342 # Since: 1.2
344 # Notes: The list of fd sets is shared by all monitor connections.
346 #        If @fd is not specified, all file descriptors in @fdset-id
347 #        will be removed.
349 # Example:
351 # -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
352 # <- { "return": {} }
355 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
358 # @FdsetFdInfo:
360 # Information about a file descriptor that belongs to an fd set.
362 # @fd: The file descriptor value.
364 # @opaque: A free-form string that can be used to describe the fd.
366 # Since: 1.2
368 { 'struct': 'FdsetFdInfo',
369   'data': {'fd': 'int', '*opaque': 'str'} }
372 # @FdsetInfo:
374 # Information about an fd set.
376 # @fdset-id: The ID of the fd set.
378 # @fds: A list of file descriptors that belong to this fd set.
380 # Since: 1.2
382 { 'struct': 'FdsetInfo',
383   'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
386 # @query-fdsets:
388 # Return information describing all fd sets.
390 # Returns: A list of @FdsetInfo
392 # Since: 1.2
394 # Note: The list of fd sets is shared by all monitor connections.
396 # Example:
398 # -> { "execute": "query-fdsets" }
399 # <- { "return": [
400 #        {
401 #          "fds": [
402 #            {
403 #              "fd": 30,
404 #              "opaque": "rdonly:/path/to/file"
405 #            },
406 #            {
407 #              "fd": 24,
408 #              "opaque": "rdwr:/path/to/file"
409 #            }
410 #          ],
411 #          "fdset-id": 1
412 #        },
413 #        {
414 #          "fds": [
415 #            {
416 #              "fd": 28
417 #            },
418 #            {
419 #              "fd": 29
420 #            }
421 #          ],
422 #          "fdset-id": 0
423 #        }
424 #      ]
425 #    }
428 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
431 # @CommandLineParameterType:
433 # Possible types for an option parameter.
435 # @string: accepts a character string
437 # @boolean: accepts "on" or "off"
439 # @number: accepts a number
441 # @size: accepts a number followed by an optional suffix (K)ilo,
442 #        (M)ega, (G)iga, (T)era
444 # Since: 1.5
446 { 'enum': 'CommandLineParameterType',
447   'data': ['string', 'boolean', 'number', 'size'] }
450 # @CommandLineParameterInfo:
452 # Details about a single parameter of a command line option.
454 # @name: parameter name
456 # @type: parameter @CommandLineParameterType
458 # @help: human readable text string, not suitable for parsing.
460 # @default: default value string (since 2.1)
462 # Since: 1.5
464 { 'struct': 'CommandLineParameterInfo',
465   'data': { 'name': 'str',
466             'type': 'CommandLineParameterType',
467             '*help': 'str',
468             '*default': 'str' } }
471 # @CommandLineOptionInfo:
473 # Details about a command line option, including its list of parameter details
475 # @option: option name
477 # @parameters: an array of @CommandLineParameterInfo
479 # Since: 1.5
481 { 'struct': 'CommandLineOptionInfo',
482   'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
485 # @query-command-line-options:
487 # Query command line option schema.
489 # @option: option name
491 # Returns: list of @CommandLineOptionInfo for all options (or for the given
492 #          @option).  Returns an error if the given @option doesn't exist.
494 # Since: 1.5
496 # Example:
498 # -> { "execute": "query-command-line-options",
499 #      "arguments": { "option": "option-rom" } }
500 # <- { "return": [
501 #         {
502 #             "parameters": [
503 #                 {
504 #                     "name": "romfile",
505 #                     "type": "string"
506 #                 },
507 #                 {
508 #                     "name": "bootindex",
509 #                     "type": "number"
510 #                 }
511 #             ],
512 #             "option": "option-rom"
513 #         }
514 #      ]
515 #    }
518 {'command': 'query-command-line-options',
519  'data': { '*option': 'str' },
520  'returns': ['CommandLineOptionInfo'],
521  'allow-preconfig': true }