qapi: Restrict '(p)memsave' command to machine code
[qemu/ar7.git] / qapi / misc.json
blob9fa702b0f661e7bc2e7c96e43199c0df2f5a7fd9
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.0
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.0
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.0
63 # Example:
65 # -> { "execute": "query-name" }
66 # <- { "return": { "name": "qemu-name" } }
69 { 'command': 'query-name', 'returns': 'NameInfo', 'allow-preconfig': true }
72 # @KvmInfo:
74 # Information about support for KVM acceleration
76 # @enabled: true if KVM acceleration is active
78 # @present: true if KVM acceleration is built into this executable
80 # Since: 0.14.0
82 { 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
85 # @query-kvm:
87 # Returns information about KVM acceleration
89 # Returns: @KvmInfo
91 # Since: 0.14.0
93 # Example:
95 # -> { "execute": "query-kvm" }
96 # <- { "return": { "enabled": true, "present": true } }
99 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
102 # @IOThreadInfo:
104 # Information about an iothread
106 # @id: the identifier of the iothread
108 # @thread-id: ID of the underlying host thread
110 # @poll-max-ns: maximum polling time in ns, 0 means polling is disabled
111 #               (since 2.9)
113 # @poll-grow: how many ns will be added to polling time, 0 means that it's not
114 #             configured (since 2.9)
116 # @poll-shrink: how many ns will be removed from polling time, 0 means that
117 #               it's not configured (since 2.9)
119 # Since: 2.0
121 { 'struct': 'IOThreadInfo',
122   'data': {'id': 'str',
123            'thread-id': 'int',
124            'poll-max-ns': 'int',
125            'poll-grow': 'int',
126            'poll-shrink': 'int' } }
129 # @query-iothreads:
131 # Returns a list of information about each iothread.
133 # Note: this list excludes the QEMU main loop thread, which is not declared
134 #       using the -object iothread command-line option.  It is always the main thread
135 #       of the process.
137 # Returns: a list of @IOThreadInfo for each iothread
139 # Since: 2.0
141 # Example:
143 # -> { "execute": "query-iothreads" }
144 # <- { "return": [
145 #          {
146 #             "id":"iothread0",
147 #             "thread-id":3134
148 #          },
149 #          {
150 #             "id":"iothread1",
151 #             "thread-id":3135
152 #          }
153 #       ]
154 #    }
157 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'],
158   'allow-preconfig': true }
161 # @stop:
163 # Stop all guest VCPU execution.
165 # Since:  0.14.0
167 # Notes: This function will succeed even if the guest is already in the stopped
168 #        state.  In "inmigrate" state, it will ensure that the guest
169 #        remains paused once migration finishes, as if the -S option was
170 #        passed on the command line.
172 # Example:
174 # -> { "execute": "stop" }
175 # <- { "return": {} }
178 { 'command': 'stop' }
181 # @cont:
183 # Resume guest VCPU execution.
185 # Since:  0.14.0
187 # Returns:  If successful, nothing
189 # Notes: This command will succeed if the guest is currently running.  It
190 #        will also succeed if the guest is in the "inmigrate" state; in
191 #        this case, the effect of the command is to make sure the guest
192 #        starts once migration finishes, removing the effect of the -S
193 #        command line option if it was passed.
195 # Example:
197 # -> { "execute": "cont" }
198 # <- { "return": {} }
201 { 'command': 'cont' }
204 # @x-exit-preconfig:
206 # Exit from "preconfig" state
208 # This command makes QEMU exit the preconfig state and proceed with
209 # VM initialization using configuration data provided on the command line
210 # and via the QMP monitor during the preconfig state. The command is only
211 # available during the preconfig state (i.e. when the --preconfig command
212 # line option was in use).
214 # Since 3.0
216 # Returns: nothing
218 # Example:
220 # -> { "execute": "x-exit-preconfig" }
221 # <- { "return": {} }
224 { 'command': 'x-exit-preconfig', 'allow-preconfig': true }
227 # @human-monitor-command:
229 # Execute a command on the human monitor and return the output.
231 # @command-line: the command to execute in the human monitor
233 # @cpu-index: The CPU to use for commands that require an implicit CPU
235 # Features:
236 # @savevm-monitor-nodes: If present, HMP command savevm only snapshots
237 #                        monitor-owned nodes if they have no parents.
238 #                        This allows the use of 'savevm' with
239 #                        -blockdev. (since 4.2)
241 # Returns: the output of the command as a string
243 # Since: 0.14.0
245 # Notes: This command only exists as a stop-gap.  Its use is highly
246 #        discouraged.  The semantics of this command are not
247 #        guaranteed: this means that command names, arguments and
248 #        responses can change or be removed at ANY time.  Applications
249 #        that rely on long term stability guarantees should NOT
250 #        use this command.
252 #        Known limitations:
254 #        * This command is stateless, this means that commands that depend
255 #          on state information (such as getfd) might not work
257 #        * Commands that prompt the user for data don't currently work
259 # Example:
261 # -> { "execute": "human-monitor-command",
262 #      "arguments": { "command-line": "info kvm" } }
263 # <- { "return": "kvm support: enabled\r\n" }
266 { 'command': 'human-monitor-command',
267   'data': {'command-line': 'str', '*cpu-index': 'int'},
268   'returns': 'str',
269   'features': [ 'savevm-monitor-nodes' ] }
272 # @change:
274 # This command is multiple commands multiplexed together.
276 # @device: This is normally the name of a block device but it may also be 'vnc'.
277 #          when it's 'vnc', then sub command depends on @target
279 # @target: If @device is a block device, then this is the new filename.
280 #          If @device is 'vnc', then if the value 'password' selects the vnc
281 #          change password command.   Otherwise, this specifies a new server URI
282 #          address to listen to for VNC connections.
284 # @arg: If @device is a block device, then this is an optional format to open
285 #       the device with.
286 #       If @device is 'vnc' and @target is 'password', this is the new VNC
287 #       password to set.  See change-vnc-password for additional notes.
289 # Features:
290 # @deprecated: This command is deprecated.  For changing block
291 #              devices, use 'blockdev-change-medium' instead; for changing VNC
292 #              parameters, use 'change-vnc-password' instead.
294 # Returns: - Nothing on success.
295 #          - If @device is not a valid block device, DeviceNotFound
297 # Since: 0.14.0
299 # Example:
301 # 1. Change a removable medium
303 # -> { "execute": "change",
304 #      "arguments": { "device": "ide1-cd0",
305 #                     "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } }
306 # <- { "return": {} }
308 # 2. Change VNC password
310 # -> { "execute": "change",
311 #      "arguments": { "device": "vnc", "target": "password",
312 #                     "arg": "foobar1" } }
313 # <- { "return": {} }
316 { 'command': 'change',
317   'data': {'device': 'str', 'target': 'str', '*arg': 'str'},
318   'features': [ 'deprecated' ] }
321 # @xen-set-global-dirty-log:
323 # Enable or disable the global dirty log mode.
325 # @enable: true to enable, false to disable.
327 # Returns: nothing
329 # Since: 1.3
331 # Example:
333 # -> { "execute": "xen-set-global-dirty-log",
334 #      "arguments": { "enable": true } }
335 # <- { "return": {} }
338 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
341 # @getfd:
343 # Receive a file descriptor via SCM rights and assign it a name
345 # @fdname: file descriptor name
347 # Returns: Nothing on success
349 # Since: 0.14.0
351 # Notes: If @fdname already exists, the file descriptor assigned to
352 #        it will be closed and replaced by the received file
353 #        descriptor.
355 #        The 'closefd' command can be used to explicitly close the
356 #        file descriptor when it is no longer needed.
358 # Example:
360 # -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
361 # <- { "return": {} }
364 { 'command': 'getfd', 'data': {'fdname': 'str'} }
367 # @closefd:
369 # Close a file descriptor previously passed via SCM rights
371 # @fdname: file descriptor name
373 # Returns: Nothing on success
375 # Since: 0.14.0
377 # Example:
379 # -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
380 # <- { "return": {} }
383 { 'command': 'closefd', 'data': {'fdname': 'str'} }
386 # @AddfdInfo:
388 # Information about a file descriptor that was added to an fd set.
390 # @fdset-id: The ID of the fd set that @fd was added to.
392 # @fd: The file descriptor that was received via SCM rights and
393 #      added to the fd set.
395 # Since: 1.2.0
397 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
400 # @add-fd:
402 # Add a file descriptor, that was passed via SCM rights, to an fd set.
404 # @fdset-id: The ID of the fd set to add the file descriptor to.
406 # @opaque: A free-form string that can be used to describe the fd.
408 # Returns: - @AddfdInfo on success
409 #          - If file descriptor was not received, FdNotSupplied
410 #          - If @fdset-id is a negative value, InvalidParameterValue
412 # Notes: The list of fd sets is shared by all monitor connections.
414 #        If @fdset-id is not specified, a new fd set will be created.
416 # Since: 1.2.0
418 # Example:
420 # -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
421 # <- { "return": { "fdset-id": 1, "fd": 3 } }
424 { 'command': 'add-fd',
425   'data': { '*fdset-id': 'int',
426             '*opaque': 'str' },
427   'returns': 'AddfdInfo' }
430 # @remove-fd:
432 # Remove a file descriptor from an fd set.
434 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
436 # @fd: The file descriptor that is to be removed.
438 # Returns: - Nothing on success
439 #          - If @fdset-id or @fd is not found, FdNotFound
441 # Since: 1.2.0
443 # Notes: The list of fd sets is shared by all monitor connections.
445 #        If @fd is not specified, all file descriptors in @fdset-id
446 #        will be removed.
448 # Example:
450 # -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
451 # <- { "return": {} }
454 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
457 # @FdsetFdInfo:
459 # Information about a file descriptor that belongs to an fd set.
461 # @fd: The file descriptor value.
463 # @opaque: A free-form string that can be used to describe the fd.
465 # Since: 1.2.0
467 { 'struct': 'FdsetFdInfo',
468   'data': {'fd': 'int', '*opaque': 'str'} }
471 # @FdsetInfo:
473 # Information about an fd set.
475 # @fdset-id: The ID of the fd set.
477 # @fds: A list of file descriptors that belong to this fd set.
479 # Since: 1.2.0
481 { 'struct': 'FdsetInfo',
482   'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
485 # @query-fdsets:
487 # Return information describing all fd sets.
489 # Returns: A list of @FdsetInfo
491 # Since: 1.2.0
493 # Note: The list of fd sets is shared by all monitor connections.
495 # Example:
497 # -> { "execute": "query-fdsets" }
498 # <- { "return": [
499 #        {
500 #          "fds": [
501 #            {
502 #              "fd": 30,
503 #              "opaque": "rdonly:/path/to/file"
504 #            },
505 #            {
506 #              "fd": 24,
507 #              "opaque": "rdwr:/path/to/file"
508 #            }
509 #          ],
510 #          "fdset-id": 1
511 #        },
512 #        {
513 #          "fds": [
514 #            {
515 #              "fd": 28
516 #            },
517 #            {
518 #              "fd": 29
519 #            }
520 #          ],
521 #          "fdset-id": 0
522 #        }
523 #      ]
524 #    }
527 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
530 # @CommandLineParameterType:
532 # Possible types for an option parameter.
534 # @string: accepts a character string
536 # @boolean: accepts "on" or "off"
538 # @number: accepts a number
540 # @size: accepts a number followed by an optional suffix (K)ilo,
541 #        (M)ega, (G)iga, (T)era
543 # Since: 1.5
545 { 'enum': 'CommandLineParameterType',
546   'data': ['string', 'boolean', 'number', 'size'] }
549 # @CommandLineParameterInfo:
551 # Details about a single parameter of a command line option.
553 # @name: parameter name
555 # @type: parameter @CommandLineParameterType
557 # @help: human readable text string, not suitable for parsing.
559 # @default: default value string (since 2.1)
561 # Since: 1.5
563 { 'struct': 'CommandLineParameterInfo',
564   'data': { 'name': 'str',
565             'type': 'CommandLineParameterType',
566             '*help': 'str',
567             '*default': 'str' } }
570 # @CommandLineOptionInfo:
572 # Details about a command line option, including its list of parameter details
574 # @option: option name
576 # @parameters: an array of @CommandLineParameterInfo
578 # Since: 1.5
580 { 'struct': 'CommandLineOptionInfo',
581   'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
584 # @query-command-line-options:
586 # Query command line option schema.
588 # @option: option name
590 # Returns: list of @CommandLineOptionInfo for all options (or for the given
591 #          @option).  Returns an error if the given @option doesn't exist.
593 # Since: 1.5
595 # Example:
597 # -> { "execute": "query-command-line-options",
598 #      "arguments": { "option": "option-rom" } }
599 # <- { "return": [
600 #         {
601 #             "parameters": [
602 #                 {
603 #                     "name": "romfile",
604 #                     "type": "string"
605 #                 },
606 #                 {
607 #                     "name": "bootindex",
608 #                     "type": "number"
609 #                 }
610 #             ],
611 #             "option": "option-rom"
612 #         }
613 #      ]
614 #    }
617 {'command': 'query-command-line-options',
618  'data': { '*option': 'str' },
619  'returns': ['CommandLineOptionInfo'],
620  'allow-preconfig': true }
623 # @xen-load-devices-state:
625 # Load the state of all devices from file. The RAM and the block devices
626 # of the VM are not loaded by this command.
628 # @filename: the file to load the state of the devices from as binary
629 #            data. See xen-save-devices-state.txt for a description of the binary
630 #            format.
632 # Since: 2.7
634 # Example:
636 # -> { "execute": "xen-load-devices-state",
637 #      "arguments": { "filename": "/tmp/resume" } }
638 # <- { "return": {} }
641 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }