configure: Bump the minimum required Python version to 3.6
[qemu/ar7.git] / qapi / misc.json
blob694d2142f378e8cccc197b731750a64f1ec0dbb2
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 # @system_reset:
183 # Performs a hard reset of a guest.
185 # Since: 0.14.0
187 # Example:
189 # -> { "execute": "system_reset" }
190 # <- { "return": {} }
193 { 'command': 'system_reset' }
196 # @system_powerdown:
198 # Requests that a guest perform a powerdown operation.
200 # Since: 0.14.0
202 # Notes: A guest may or may not respond to this command.  This command
203 #        returning does not indicate that a guest has accepted the request or
204 #        that it has shut down.  Many guests will respond to this command by
205 #        prompting the user in some way.
206 # Example:
208 # -> { "execute": "system_powerdown" }
209 # <- { "return": {} }
212 { 'command': 'system_powerdown' }
215 # @memsave:
217 # Save a portion of guest memory to a file.
219 # @val: the virtual address of the guest to start from
221 # @size: the size of memory region to save
223 # @filename: the file to save the memory to as binary data
225 # @cpu-index: the index of the virtual CPU to use for translating the
226 #             virtual address (defaults to CPU 0)
228 # Returns: Nothing on success
230 # Since: 0.14.0
232 # Notes: Errors were not reliably returned until 1.1
234 # Example:
236 # -> { "execute": "memsave",
237 #      "arguments": { "val": 10,
238 #                     "size": 100,
239 #                     "filename": "/tmp/virtual-mem-dump" } }
240 # <- { "return": {} }
243 { 'command': 'memsave',
244   'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
247 # @pmemsave:
249 # Save a portion of guest physical memory to a file.
251 # @val: the physical address of the guest to start from
253 # @size: the size of memory region to save
255 # @filename: the file to save the memory to as binary data
257 # Returns: Nothing on success
259 # Since: 0.14.0
261 # Notes: Errors were not reliably returned until 1.1
263 # Example:
265 # -> { "execute": "pmemsave",
266 #      "arguments": { "val": 10,
267 #                     "size": 100,
268 #                     "filename": "/tmp/physical-mem-dump" } }
269 # <- { "return": {} }
272 { 'command': 'pmemsave',
273   'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
276 # @cont:
278 # Resume guest VCPU execution.
280 # Since:  0.14.0
282 # Returns:  If successful, nothing
284 # Notes: This command will succeed if the guest is currently running.  It
285 #        will also succeed if the guest is in the "inmigrate" state; in
286 #        this case, the effect of the command is to make sure the guest
287 #        starts once migration finishes, removing the effect of the -S
288 #        command line option if it was passed.
290 # Example:
292 # -> { "execute": "cont" }
293 # <- { "return": {} }
296 { 'command': 'cont' }
299 # @x-exit-preconfig:
301 # Exit from "preconfig" state
303 # This command makes QEMU exit the preconfig state and proceed with
304 # VM initialization using configuration data provided on the command line
305 # and via the QMP monitor during the preconfig state. The command is only
306 # available during the preconfig state (i.e. when the --preconfig command
307 # line option was in use).
309 # Since 3.0
311 # Returns: nothing
313 # Example:
315 # -> { "execute": "x-exit-preconfig" }
316 # <- { "return": {} }
319 { 'command': 'x-exit-preconfig', 'allow-preconfig': true }
322 # @system_wakeup:
324 # Wake up guest from suspend. If the guest has wake-up from suspend
325 # support enabled (wakeup-suspend-support flag from
326 # query-current-machine), wake-up guest from suspend if the guest is
327 # in SUSPENDED state. Return an error otherwise.
329 # Since:  1.1
331 # Returns:  nothing.
333 # Note: prior to 4.0, this command does nothing in case the guest
334 #       isn't suspended.
336 # Example:
338 # -> { "execute": "system_wakeup" }
339 # <- { "return": {} }
342 { 'command': 'system_wakeup' }
345 # @inject-nmi:
347 # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
348 # The command fails when the guest doesn't support injecting.
350 # Returns:  If successful, nothing
352 # Since:  0.14.0
354 # Note: prior to 2.1, this command was only supported for x86 and s390 VMs
356 # Example:
358 # -> { "execute": "inject-nmi" }
359 # <- { "return": {} }
362 { 'command': 'inject-nmi' }
365 # @human-monitor-command:
367 # Execute a command on the human monitor and return the output.
369 # @command-line: the command to execute in the human monitor
371 # @cpu-index: The CPU to use for commands that require an implicit CPU
373 # Features:
374 # @savevm-monitor-nodes: If present, HMP command savevm only snapshots
375 #                        monitor-owned nodes if they have no parents.
376 #                        This allows the use of 'savevm' with
377 #                        -blockdev. (since 4.2)
379 # Returns: the output of the command as a string
381 # Since: 0.14.0
383 # Notes: This command only exists as a stop-gap.  Its use is highly
384 #        discouraged.  The semantics of this command are not
385 #        guaranteed: this means that command names, arguments and
386 #        responses can change or be removed at ANY time.  Applications
387 #        that rely on long term stability guarantees should NOT
388 #        use this command.
390 #        Known limitations:
392 #        * This command is stateless, this means that commands that depend
393 #          on state information (such as getfd) might not work
395 #        * Commands that prompt the user for data don't currently work
397 # Example:
399 # -> { "execute": "human-monitor-command",
400 #      "arguments": { "command-line": "info kvm" } }
401 # <- { "return": "kvm support: enabled\r\n" }
404 { 'command': 'human-monitor-command',
405   'data': {'command-line': 'str', '*cpu-index': 'int'},
406   'returns': 'str',
407   'features': [ 'savevm-monitor-nodes' ] }
410 # @change:
412 # This command is multiple commands multiplexed together.
414 # @device: This is normally the name of a block device but it may also be 'vnc'.
415 #          when it's 'vnc', then sub command depends on @target
417 # @target: If @device is a block device, then this is the new filename.
418 #          If @device is 'vnc', then if the value 'password' selects the vnc
419 #          change password command.   Otherwise, this specifies a new server URI
420 #          address to listen to for VNC connections.
422 # @arg: If @device is a block device, then this is an optional format to open
423 #       the device with.
424 #       If @device is 'vnc' and @target is 'password', this is the new VNC
425 #       password to set.  See change-vnc-password for additional notes.
427 # Features:
428 # @deprecated: This command is deprecated.  For changing block
429 #              devices, use 'blockdev-change-medium' instead; for changing VNC
430 #              parameters, use 'change-vnc-password' instead.
432 # Returns: - Nothing on success.
433 #          - If @device is not a valid block device, DeviceNotFound
435 # Since: 0.14.0
437 # Example:
439 # 1. Change a removable medium
441 # -> { "execute": "change",
442 #      "arguments": { "device": "ide1-cd0",
443 #                     "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } }
444 # <- { "return": {} }
446 # 2. Change VNC password
448 # -> { "execute": "change",
449 #      "arguments": { "device": "vnc", "target": "password",
450 #                     "arg": "foobar1" } }
451 # <- { "return": {} }
454 { 'command': 'change',
455   'data': {'device': 'str', 'target': 'str', '*arg': 'str'},
456   'features': [ 'deprecated' ] }
459 # @xen-set-global-dirty-log:
461 # Enable or disable the global dirty log mode.
463 # @enable: true to enable, false to disable.
465 # Returns: nothing
467 # Since: 1.3
469 # Example:
471 # -> { "execute": "xen-set-global-dirty-log",
472 #      "arguments": { "enable": true } }
473 # <- { "return": {} }
476 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
479 # @getfd:
481 # Receive a file descriptor via SCM rights and assign it a name
483 # @fdname: file descriptor name
485 # Returns: Nothing on success
487 # Since: 0.14.0
489 # Notes: If @fdname already exists, the file descriptor assigned to
490 #        it will be closed and replaced by the received file
491 #        descriptor.
493 #        The 'closefd' command can be used to explicitly close the
494 #        file descriptor when it is no longer needed.
496 # Example:
498 # -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
499 # <- { "return": {} }
502 { 'command': 'getfd', 'data': {'fdname': 'str'} }
505 # @closefd:
507 # Close a file descriptor previously passed via SCM rights
509 # @fdname: file descriptor name
511 # Returns: Nothing on success
513 # Since: 0.14.0
515 # Example:
517 # -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
518 # <- { "return": {} }
521 { 'command': 'closefd', 'data': {'fdname': 'str'} }
524 # @AddfdInfo:
526 # Information about a file descriptor that was added to an fd set.
528 # @fdset-id: The ID of the fd set that @fd was added to.
530 # @fd: The file descriptor that was received via SCM rights and
531 #      added to the fd set.
533 # Since: 1.2.0
535 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
538 # @add-fd:
540 # Add a file descriptor, that was passed via SCM rights, to an fd set.
542 # @fdset-id: The ID of the fd set to add the file descriptor to.
544 # @opaque: A free-form string that can be used to describe the fd.
546 # Returns: - @AddfdInfo on success
547 #          - If file descriptor was not received, FdNotSupplied
548 #          - If @fdset-id is a negative value, InvalidParameterValue
550 # Notes: The list of fd sets is shared by all monitor connections.
552 #        If @fdset-id is not specified, a new fd set will be created.
554 # Since: 1.2.0
556 # Example:
558 # -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
559 # <- { "return": { "fdset-id": 1, "fd": 3 } }
562 { 'command': 'add-fd',
563   'data': { '*fdset-id': 'int',
564             '*opaque': 'str' },
565   'returns': 'AddfdInfo' }
568 # @remove-fd:
570 # Remove a file descriptor from an fd set.
572 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
574 # @fd: The file descriptor that is to be removed.
576 # Returns: - Nothing on success
577 #          - If @fdset-id or @fd is not found, FdNotFound
579 # Since: 1.2.0
581 # Notes: The list of fd sets is shared by all monitor connections.
583 #        If @fd is not specified, all file descriptors in @fdset-id
584 #        will be removed.
586 # Example:
588 # -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
589 # <- { "return": {} }
592 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
595 # @FdsetFdInfo:
597 # Information about a file descriptor that belongs to an fd set.
599 # @fd: The file descriptor value.
601 # @opaque: A free-form string that can be used to describe the fd.
603 # Since: 1.2.0
605 { 'struct': 'FdsetFdInfo',
606   'data': {'fd': 'int', '*opaque': 'str'} }
609 # @FdsetInfo:
611 # Information about an fd set.
613 # @fdset-id: The ID of the fd set.
615 # @fds: A list of file descriptors that belong to this fd set.
617 # Since: 1.2.0
619 { 'struct': 'FdsetInfo',
620   'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
623 # @query-fdsets:
625 # Return information describing all fd sets.
627 # Returns: A list of @FdsetInfo
629 # Since: 1.2.0
631 # Note: The list of fd sets is shared by all monitor connections.
633 # Example:
635 # -> { "execute": "query-fdsets" }
636 # <- { "return": [
637 #        {
638 #          "fds": [
639 #            {
640 #              "fd": 30,
641 #              "opaque": "rdonly:/path/to/file"
642 #            },
643 #            {
644 #              "fd": 24,
645 #              "opaque": "rdwr:/path/to/file"
646 #            }
647 #          ],
648 #          "fdset-id": 1
649 #        },
650 #        {
651 #          "fds": [
652 #            {
653 #              "fd": 28
654 #            },
655 #            {
656 #              "fd": 29
657 #            }
658 #          ],
659 #          "fdset-id": 0
660 #        }
661 #      ]
662 #    }
665 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
668 # @CommandLineParameterType:
670 # Possible types for an option parameter.
672 # @string: accepts a character string
674 # @boolean: accepts "on" or "off"
676 # @number: accepts a number
678 # @size: accepts a number followed by an optional suffix (K)ilo,
679 #        (M)ega, (G)iga, (T)era
681 # Since: 1.5
683 { 'enum': 'CommandLineParameterType',
684   'data': ['string', 'boolean', 'number', 'size'] }
687 # @CommandLineParameterInfo:
689 # Details about a single parameter of a command line option.
691 # @name: parameter name
693 # @type: parameter @CommandLineParameterType
695 # @help: human readable text string, not suitable for parsing.
697 # @default: default value string (since 2.1)
699 # Since: 1.5
701 { 'struct': 'CommandLineParameterInfo',
702   'data': { 'name': 'str',
703             'type': 'CommandLineParameterType',
704             '*help': 'str',
705             '*default': 'str' } }
708 # @CommandLineOptionInfo:
710 # Details about a command line option, including its list of parameter details
712 # @option: option name
714 # @parameters: an array of @CommandLineParameterInfo
716 # Since: 1.5
718 { 'struct': 'CommandLineOptionInfo',
719   'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
722 # @query-command-line-options:
724 # Query command line option schema.
726 # @option: option name
728 # Returns: list of @CommandLineOptionInfo for all options (or for the given
729 #          @option).  Returns an error if the given @option doesn't exist.
731 # Since: 1.5
733 # Example:
735 # -> { "execute": "query-command-line-options",
736 #      "arguments": { "option": "option-rom" } }
737 # <- { "return": [
738 #         {
739 #             "parameters": [
740 #                 {
741 #                     "name": "romfile",
742 #                     "type": "string"
743 #                 },
744 #                 {
745 #                     "name": "bootindex",
746 #                     "type": "number"
747 #                 }
748 #             ],
749 #             "option": "option-rom"
750 #         }
751 #      ]
752 #    }
755 {'command': 'query-command-line-options',
756  'data': { '*option': 'str' },
757  'returns': ['CommandLineOptionInfo'],
758  'allow-preconfig': true }
761 # @ReplayMode:
763 # Mode of the replay subsystem.
765 # @none: normal execution mode. Replay or record are not enabled.
767 # @record: record mode. All non-deterministic data is written into the
768 #          replay log.
770 # @play: replay mode. Non-deterministic data required for system execution
771 #        is read from the log.
773 # Since: 2.5
775 { 'enum': 'ReplayMode',
776   'data': [ 'none', 'record', 'play' ] }
779 # @xen-load-devices-state:
781 # Load the state of all devices from file. The RAM and the block devices
782 # of the VM are not loaded by this command.
784 # @filename: the file to load the state of the devices from as binary
785 #            data. See xen-save-devices-state.txt for a description of the binary
786 #            format.
788 # Since: 2.7
790 # Example:
792 # -> { "execute": "xen-load-devices-state",
793 #      "arguments": { "filename": "/tmp/resume" } }
794 # <- { "return": {} }
797 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }