qapi/ui.json: Avoid `...' Texinfo style quoting
[qemu/ar7.git] / qapi / misc.json
blob46e0abdfe7c246e9f61572493f37e9413cd3c297
1 # -*- Mode: Python -*-
4 ##
5 # = Miscellanea
6 ##
8 { 'include': 'common.json' }
11 # @qmp_capabilities:
13 # Enable QMP capabilities.
15 # Arguments:
17 # @enable: An optional list of QMPCapability values to enable.  The
18 #          client must not enable any capability that is not
19 #          mentioned in the QMP greeting message.  If the field is not
20 #          provided, it means no QMP capabilities will be enabled.
21 #          (since 2.12)
23 # Example:
25 # -> { "execute": "qmp_capabilities",
26 #      "arguments": { "enable": [ "oob" ] } }
27 # <- { "return": {} }
29 # Notes: This command is valid exactly when first connecting: it must be
30 #        issued before any other command will be accepted, and will fail once the
31 #        monitor is accepting other commands. (see qemu docs/interop/qmp-spec.txt)
33 #        The QMP client needs to explicitly enable QMP capabilities, otherwise
34 #        all the QMP capabilities will be turned off by default.
36 # Since: 0.13
39 { 'command': 'qmp_capabilities',
40   'data': { '*enable': [ 'QMPCapability' ] },
41   'allow-preconfig': true }
44 # @QMPCapability:
46 # Enumeration of capabilities to be advertised during initial client
47 # connection, used for agreeing on particular QMP extension behaviors.
49 # @oob: QMP ability to support out-of-band requests.
50 #       (Please refer to qmp-spec.txt for more information on OOB)
52 # Since: 2.12
55 { 'enum': 'QMPCapability',
56   'data': [ 'oob' ] }
59 # @VersionTriple:
61 # A three-part version number.
63 # @major: The major version number.
65 # @minor: The minor version number.
67 # @micro: The micro version number.
69 # Since: 2.4
71 { 'struct': 'VersionTriple',
72   'data': {'major': 'int', 'minor': 'int', 'micro': 'int'} }
76 # @VersionInfo:
78 # A description of QEMU's version.
80 # @qemu: The version of QEMU.  By current convention, a micro
81 #        version of 50 signifies a development branch.  A micro version
82 #        greater than or equal to 90 signifies a release candidate for
83 #        the next minor version.  A micro version of less than 50
84 #        signifies a stable release.
86 # @package: QEMU will always set this field to an empty string.  Downstream
87 #           versions of QEMU should set this to a non-empty string.  The
88 #           exact format depends on the downstream however it highly
89 #           recommended that a unique name is used.
91 # Since: 0.14.0
93 { 'struct': 'VersionInfo',
94   'data': {'qemu': 'VersionTriple', 'package': 'str'} }
97 # @query-version:
99 # Returns the current version of QEMU.
101 # Returns: A @VersionInfo object describing the current version of QEMU.
103 # Since: 0.14.0
105 # Example:
107 # -> { "execute": "query-version" }
108 # <- {
109 #       "return":{
110 #          "qemu":{
111 #             "major":0,
112 #             "minor":11,
113 #             "micro":5
114 #          },
115 #          "package":""
116 #       }
117 #    }
120 { 'command': 'query-version', 'returns': 'VersionInfo',
121   'allow-preconfig': true }
124 # @CommandInfo:
126 # Information about a QMP command
128 # @name: The command name
130 # Since: 0.14.0
132 { 'struct': 'CommandInfo', 'data': {'name': 'str'} }
135 # @query-commands:
137 # Return a list of supported QMP commands by this server
139 # Returns: A list of @CommandInfo for all supported commands
141 # Since: 0.14.0
143 # Example:
145 # -> { "execute": "query-commands" }
146 # <- {
147 #      "return":[
148 #         {
149 #            "name":"query-balloon"
150 #         },
151 #         {
152 #            "name":"system_powerdown"
153 #         }
154 #      ]
155 #    }
157 # Note: This example has been shortened as the real response is too long.
160 { 'command': 'query-commands', 'returns': ['CommandInfo'],
161   'allow-preconfig': true }
164 # @LostTickPolicy:
166 # Policy for handling lost ticks in timer devices.  Ticks end up getting
167 # lost when, for example, the guest is paused.
169 # @discard: throw away the missed ticks and continue with future injection
170 #           normally.  The guest OS will see the timer jump ahead by a
171 #           potentially quite significant amount all at once, as if the
172 #           intervening chunk of time had simply not existed; needless to
173 #           say, such a sudden jump can easily confuse a guest OS which is
174 #           not specifically prepared to deal with it.  Assuming the guest
175 #           OS can deal correctly with the time jump, the time in the guest
176 #           and in the host should now match.
178 # @delay: continue to deliver ticks at the normal rate.  The guest OS will
179 #         not notice anything is amiss, as from its point of view time will
180 #         have continued to flow normally.  The time in the guest should now
181 #         be behind the time in the host by exactly the amount of time during
182 #         which ticks have been missed.
184 # @slew: deliver ticks at a higher rate to catch up with the missed ticks.
185 #        The guest OS will not notice anything is amiss, as from its point
186 #        of view time will have continued to flow normally.  Once the timer
187 #        has managed to catch up with all the missing ticks, the time in
188 #        the guest and in the host should match.
190 # Since: 2.0
192 { 'enum': 'LostTickPolicy',
193   'data': ['discard', 'delay', 'slew' ] }
196 # @add_client:
198 # Allow client connections for VNC, Spice and socket based
199 # character devices to be passed in to QEMU via SCM_RIGHTS.
201 # @protocol: protocol name. Valid names are "vnc", "spice" or the
202 #            name of a character device (eg. from -chardev id=XXXX)
204 # @fdname: file descriptor name previously passed via 'getfd' command
206 # @skipauth: whether to skip authentication. Only applies
207 #            to "vnc" and "spice" protocols
209 # @tls: whether to perform TLS. Only applies to the "spice"
210 #       protocol
212 # Returns: nothing on success.
214 # Since: 0.14.0
216 # Example:
218 # -> { "execute": "add_client", "arguments": { "protocol": "vnc",
219 #                                              "fdname": "myclient" } }
220 # <- { "return": {} }
223 { 'command': 'add_client',
224   'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
225             '*tls': 'bool' } }
228 # @NameInfo:
230 # Guest name information.
232 # @name: The name of the guest
234 # Since: 0.14.0
236 { 'struct': 'NameInfo', 'data': {'*name': 'str'} }
239 # @query-name:
241 # Return the name information of a guest.
243 # Returns: @NameInfo of the guest
245 # Since: 0.14.0
247 # Example:
249 # -> { "execute": "query-name" }
250 # <- { "return": { "name": "qemu-name" } }
253 { 'command': 'query-name', 'returns': 'NameInfo', 'allow-preconfig': true }
256 # @KvmInfo:
258 # Information about support for KVM acceleration
260 # @enabled: true if KVM acceleration is active
262 # @present: true if KVM acceleration is built into this executable
264 # Since: 0.14.0
266 { 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
269 # @query-kvm:
271 # Returns information about KVM acceleration
273 # Returns: @KvmInfo
275 # Since: 0.14.0
277 # Example:
279 # -> { "execute": "query-kvm" }
280 # <- { "return": { "enabled": true, "present": true } }
283 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
286 # @UuidInfo:
288 # Guest UUID information (Universally Unique Identifier).
290 # @UUID: the UUID of the guest
292 # Since: 0.14.0
294 # Notes: If no UUID was specified for the guest, a null UUID is returned.
296 { 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
299 # @query-uuid:
301 # Query the guest UUID information.
303 # Returns: The @UuidInfo for the guest
305 # Since: 0.14.0
307 # Example:
309 # -> { "execute": "query-uuid" }
310 # <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
313 { 'command': 'query-uuid', 'returns': 'UuidInfo', 'allow-preconfig': true }
316 # @EventInfo:
318 # Information about a QMP event
320 # @name: The event name
322 # Since: 1.2.0
324 { 'struct': 'EventInfo', 'data': {'name': 'str'} }
327 # @query-events:
329 # Return information on QMP events.
331 # Returns: A list of @EventInfo.
333 # Since: 1.2.0
335 # Note: This command is deprecated, because its output doesn't reflect
336 #       compile-time configuration.  Use query-qmp-schema instead.
338 # Example:
340 # -> { "execute": "query-events" }
341 # <- {
342 #      "return": [
343 #          {
344 #             "name":"SHUTDOWN"
345 #          },
346 #          {
347 #             "name":"RESET"
348 #          }
349 #       ]
350 #    }
352 # Note: This example has been shortened as the real response is too long.
355 { 'command': 'query-events', 'returns': ['EventInfo'] }
358 # @IOThreadInfo:
360 # Information about an iothread
362 # @id: the identifier of the iothread
364 # @thread-id: ID of the underlying host thread
366 # @poll-max-ns: maximum polling time in ns, 0 means polling is disabled
367 #               (since 2.9)
369 # @poll-grow: how many ns will be added to polling time, 0 means that it's not
370 #             configured (since 2.9)
372 # @poll-shrink: how many ns will be removed from polling time, 0 means that
373 #               it's not configured (since 2.9)
375 # Since: 2.0
377 { 'struct': 'IOThreadInfo',
378   'data': {'id': 'str',
379            'thread-id': 'int',
380            'poll-max-ns': 'int',
381            'poll-grow': 'int',
382            'poll-shrink': 'int' } }
385 # @query-iothreads:
387 # Returns a list of information about each iothread.
389 # Note: this list excludes the QEMU main loop thread, which is not declared
390 #       using the -object iothread command-line option.  It is always the main thread
391 #       of the process.
393 # Returns: a list of @IOThreadInfo for each iothread
395 # Since: 2.0
397 # Example:
399 # -> { "execute": "query-iothreads" }
400 # <- { "return": [
401 #          {
402 #             "id":"iothread0",
403 #             "thread-id":3134
404 #          },
405 #          {
406 #             "id":"iothread1",
407 #             "thread-id":3135
408 #          }
409 #       ]
410 #    }
413 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'],
414   'allow-preconfig': true }
417 # @BalloonInfo:
419 # Information about the guest balloon device.
421 # @actual: the number of bytes the balloon currently contains
423 # Since: 0.14.0
426 { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
429 # @query-balloon:
431 # Return information about the balloon device.
433 # Returns: @BalloonInfo on success
435 #          If the balloon driver is enabled but not functional because the KVM
436 #          kernel module cannot support it, KvmMissingCap
438 #          If no balloon device is present, DeviceNotActive
440 # Since: 0.14.0
442 # Example:
444 # -> { "execute": "query-balloon" }
445 # <- { "return": {
446 #          "actual": 1073741824,
447 #       }
448 #    }
451 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
454 # @BALLOON_CHANGE:
456 # Emitted when the guest changes the actual BALLOON level. This value is
457 # equivalent to the @actual field return by the 'query-balloon' command
459 # @actual: actual level of the guest memory balloon in bytes
461 # Note: this event is rate-limited.
463 # Since: 1.2
465 # Example:
467 # <- { "event": "BALLOON_CHANGE",
468 #      "data": { "actual": 944766976 },
469 #      "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
472 { 'event': 'BALLOON_CHANGE',
473   'data': { 'actual': 'int' } }
476 # @PciMemoryRange:
478 # A PCI device memory region
480 # @base: the starting address (guest physical)
482 # @limit: the ending address (guest physical)
484 # Since: 0.14.0
486 { 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
489 # @PciMemoryRegion:
491 # Information about a PCI device I/O region.
493 # @bar: the index of the Base Address Register for this region
495 # @type: 'io' if the region is a PIO region
496 #        'memory' if the region is a MMIO region
498 # @size: memory size
500 # @prefetch: if @type is 'memory', true if the memory is prefetchable
502 # @mem_type_64: if @type is 'memory', true if the BAR is 64-bit
504 # Since: 0.14.0
506 { 'struct': 'PciMemoryRegion',
507   'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
508            '*prefetch': 'bool', '*mem_type_64': 'bool' } }
511 # @PciBusInfo:
513 # Information about a bus of a PCI Bridge device
515 # @number: primary bus interface number.  This should be the number of the
516 #          bus the device resides on.
518 # @secondary: secondary bus interface number.  This is the number of the
519 #             main bus for the bridge
521 # @subordinate: This is the highest number bus that resides below the
522 #               bridge.
524 # @io_range: The PIO range for all devices on this bridge
526 # @memory_range: The MMIO range for all devices on this bridge
528 # @prefetchable_range: The range of prefetchable MMIO for all devices on
529 #                      this bridge
531 # Since: 2.4
533 { 'struct': 'PciBusInfo',
534   'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
535            'io_range': 'PciMemoryRange',
536            'memory_range': 'PciMemoryRange',
537            'prefetchable_range': 'PciMemoryRange' } }
540 # @PciBridgeInfo:
542 # Information about a PCI Bridge device
544 # @bus: information about the bus the device resides on
546 # @devices: a list of @PciDeviceInfo for each device on this bridge
548 # Since: 0.14.0
550 { 'struct': 'PciBridgeInfo',
551   'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
554 # @PciDeviceClass:
556 # Information about the Class of a PCI device
558 # @desc: a string description of the device's class
560 # @class: the class code of the device
562 # Since: 2.4
564 { 'struct': 'PciDeviceClass',
565   'data': {'*desc': 'str', 'class': 'int'} }
568 # @PciDeviceId:
570 # Information about the Id of a PCI device
572 # @device: the PCI device id
574 # @vendor: the PCI vendor id
576 # @subsystem: the PCI subsystem id (since 3.1)
578 # @subsystem-vendor: the PCI subsystem vendor id (since 3.1)
580 # Since: 2.4
582 { 'struct': 'PciDeviceId',
583   'data': {'device': 'int', 'vendor': 'int', '*subsystem': 'int',
584             '*subsystem-vendor': 'int'} }
587 # @PciDeviceInfo:
589 # Information about a PCI device
591 # @bus: the bus number of the device
593 # @slot: the slot the device is located in
595 # @function: the function of the slot used by the device
597 # @class_info: the class of the device
599 # @id: the PCI device id
601 # @irq: if an IRQ is assigned to the device, the IRQ number
603 # @qdev_id: the device name of the PCI device
605 # @pci_bridge: if the device is a PCI bridge, the bridge information
607 # @regions: a list of the PCI I/O regions associated with the device
609 # Notes: the contents of @class_info.desc are not stable and should only be
610 #        treated as informational.
612 # Since: 0.14.0
614 { 'struct': 'PciDeviceInfo',
615   'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
616            'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
617            '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
618            'regions': ['PciMemoryRegion']} }
621 # @PciInfo:
623 # Information about a PCI bus
625 # @bus: the bus index
627 # @devices: a list of devices on this bus
629 # Since: 0.14.0
631 { 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
634 # @query-pci:
636 # Return information about the PCI bus topology of the guest.
638 # Returns: a list of @PciInfo for each PCI bus. Each bus is
639 #          represented by a json-object, which has a key with a json-array of
640 #          all PCI devices attached to it. Each device is represented by a
641 #          json-object.
643 # Since: 0.14.0
645 # Example:
647 # -> { "execute": "query-pci" }
648 # <- { "return": [
649 #          {
650 #             "bus": 0,
651 #             "devices": [
652 #                {
653 #                   "bus": 0,
654 #                   "qdev_id": "",
655 #                   "slot": 0,
656 #                   "class_info": {
657 #                      "class": 1536,
658 #                      "desc": "Host bridge"
659 #                   },
660 #                   "id": {
661 #                      "device": 32902,
662 #                      "vendor": 4663
663 #                   },
664 #                   "function": 0,
665 #                   "regions": [
666 #                   ]
667 #                },
668 #                {
669 #                   "bus": 0,
670 #                   "qdev_id": "",
671 #                   "slot": 1,
672 #                   "class_info": {
673 #                      "class": 1537,
674 #                      "desc": "ISA bridge"
675 #                   },
676 #                   "id": {
677 #                      "device": 32902,
678 #                      "vendor": 28672
679 #                   },
680 #                   "function": 0,
681 #                   "regions": [
682 #                   ]
683 #                },
684 #                {
685 #                   "bus": 0,
686 #                   "qdev_id": "",
687 #                   "slot": 1,
688 #                   "class_info": {
689 #                      "class": 257,
690 #                      "desc": "IDE controller"
691 #                   },
692 #                   "id": {
693 #                      "device": 32902,
694 #                      "vendor": 28688
695 #                   },
696 #                   "function": 1,
697 #                   "regions": [
698 #                      {
699 #                         "bar": 4,
700 #                         "size": 16,
701 #                         "address": 49152,
702 #                         "type": "io"
703 #                      }
704 #                   ]
705 #                },
706 #                {
707 #                   "bus": 0,
708 #                   "qdev_id": "",
709 #                   "slot": 2,
710 #                   "class_info": {
711 #                      "class": 768,
712 #                      "desc": "VGA controller"
713 #                   },
714 #                   "id": {
715 #                      "device": 4115,
716 #                      "vendor": 184
717 #                   },
718 #                   "function": 0,
719 #                   "regions": [
720 #                      {
721 #                         "prefetch": true,
722 #                         "mem_type_64": false,
723 #                         "bar": 0,
724 #                         "size": 33554432,
725 #                         "address": 4026531840,
726 #                         "type": "memory"
727 #                      },
728 #                      {
729 #                         "prefetch": false,
730 #                         "mem_type_64": false,
731 #                         "bar": 1,
732 #                         "size": 4096,
733 #                         "address": 4060086272,
734 #                         "type": "memory"
735 #                      },
736 #                      {
737 #                         "prefetch": false,
738 #                         "mem_type_64": false,
739 #                         "bar": 6,
740 #                         "size": 65536,
741 #                         "address": -1,
742 #                         "type": "memory"
743 #                      }
744 #                   ]
745 #                },
746 #                {
747 #                   "bus": 0,
748 #                   "qdev_id": "",
749 #                   "irq": 11,
750 #                   "slot": 4,
751 #                   "class_info": {
752 #                      "class": 1280,
753 #                      "desc": "RAM controller"
754 #                   },
755 #                   "id": {
756 #                      "device": 6900,
757 #                      "vendor": 4098
758 #                   },
759 #                   "function": 0,
760 #                   "regions": [
761 #                      {
762 #                         "bar": 0,
763 #                         "size": 32,
764 #                         "address": 49280,
765 #                         "type": "io"
766 #                      }
767 #                   ]
768 #                }
769 #             ]
770 #          }
771 #       ]
772 #    }
774 # Note: This example has been shortened as the real response is too long.
777 { 'command': 'query-pci', 'returns': ['PciInfo'] }
780 # @quit:
782 # This command will cause the QEMU process to exit gracefully.  While every
783 # attempt is made to send the QMP response before terminating, this is not
784 # guaranteed.  When using this interface, a premature EOF would not be
785 # unexpected.
787 # Since: 0.14.0
789 # Example:
791 # -> { "execute": "quit" }
792 # <- { "return": {} }
794 { 'command': 'quit' }
797 # @stop:
799 # Stop all guest VCPU execution.
801 # Since:  0.14.0
803 # Notes: This function will succeed even if the guest is already in the stopped
804 #        state.  In "inmigrate" state, it will ensure that the guest
805 #        remains paused once migration finishes, as if the -S option was
806 #        passed on the command line.
808 # Example:
810 # -> { "execute": "stop" }
811 # <- { "return": {} }
814 { 'command': 'stop' }
817 # @system_reset:
819 # Performs a hard reset of a guest.
821 # Since: 0.14.0
823 # Example:
825 # -> { "execute": "system_reset" }
826 # <- { "return": {} }
829 { 'command': 'system_reset' }
832 # @system_powerdown:
834 # Requests that a guest perform a powerdown operation.
836 # Since: 0.14.0
838 # Notes: A guest may or may not respond to this command.  This command
839 #        returning does not indicate that a guest has accepted the request or
840 #        that it has shut down.  Many guests will respond to this command by
841 #        prompting the user in some way.
842 # Example:
844 # -> { "execute": "system_powerdown" }
845 # <- { "return": {} }
848 { 'command': 'system_powerdown' }
851 # @memsave:
853 # Save a portion of guest memory to a file.
855 # @val: the virtual address of the guest to start from
857 # @size: the size of memory region to save
859 # @filename: the file to save the memory to as binary data
861 # @cpu-index: the index of the virtual CPU to use for translating the
862 #             virtual address (defaults to CPU 0)
864 # Returns: Nothing on success
866 # Since: 0.14.0
868 # Notes: Errors were not reliably returned until 1.1
870 # Example:
872 # -> { "execute": "memsave",
873 #      "arguments": { "val": 10,
874 #                     "size": 100,
875 #                     "filename": "/tmp/virtual-mem-dump" } }
876 # <- { "return": {} }
879 { 'command': 'memsave',
880   'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
883 # @pmemsave:
885 # Save a portion of guest physical memory to a file.
887 # @val: the physical address of the guest to start from
889 # @size: the size of memory region to save
891 # @filename: the file to save the memory to as binary data
893 # Returns: Nothing on success
895 # Since: 0.14.0
897 # Notes: Errors were not reliably returned until 1.1
899 # Example:
901 # -> { "execute": "pmemsave",
902 #      "arguments": { "val": 10,
903 #                     "size": 100,
904 #                     "filename": "/tmp/physical-mem-dump" } }
905 # <- { "return": {} }
908 { 'command': 'pmemsave',
909   'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
912 # @cont:
914 # Resume guest VCPU execution.
916 # Since:  0.14.0
918 # Returns:  If successful, nothing
920 # Notes: This command will succeed if the guest is currently running.  It
921 #        will also succeed if the guest is in the "inmigrate" state; in
922 #        this case, the effect of the command is to make sure the guest
923 #        starts once migration finishes, removing the effect of the -S
924 #        command line option if it was passed.
926 # Example:
928 # -> { "execute": "cont" }
929 # <- { "return": {} }
932 { 'command': 'cont' }
935 # @x-exit-preconfig:
937 # Exit from "preconfig" state
939 # This command makes QEMU exit the preconfig state and proceed with
940 # VM initialization using configuration data provided on the command line
941 # and via the QMP monitor during the preconfig state. The command is only
942 # available during the preconfig state (i.e. when the --preconfig command
943 # line option was in use).
945 # Since 3.0
947 # Returns: nothing
949 # Example:
951 # -> { "execute": "x-exit-preconfig" }
952 # <- { "return": {} }
955 { 'command': 'x-exit-preconfig', 'allow-preconfig': true }
958 # @system_wakeup:
960 # Wake up guest from suspend. If the guest has wake-up from suspend
961 # support enabled (wakeup-suspend-support flag from
962 # query-current-machine), wake-up guest from suspend if the guest is
963 # in SUSPENDED state. Return an error otherwise.
965 # Since:  1.1
967 # Returns:  nothing.
969 # Note: prior to 4.0, this command does nothing in case the guest
970 #       isn't suspended.
972 # Example:
974 # -> { "execute": "system_wakeup" }
975 # <- { "return": {} }
978 { 'command': 'system_wakeup' }
981 # @inject-nmi:
983 # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
984 # The command fails when the guest doesn't support injecting.
986 # Returns:  If successful, nothing
988 # Since:  0.14.0
990 # Note: prior to 2.1, this command was only supported for x86 and s390 VMs
992 # Example:
994 # -> { "execute": "inject-nmi" }
995 # <- { "return": {} }
998 { 'command': 'inject-nmi' }
1001 # @balloon:
1003 # Request the balloon driver to change its balloon size.
1005 # @value: the target size of the balloon in bytes
1007 # Returns: Nothing on success
1008 #          If the balloon driver is enabled but not functional because the KVM
1009 #            kernel module cannot support it, KvmMissingCap
1010 #          If no balloon device is present, DeviceNotActive
1012 # Notes: This command just issues a request to the guest.  When it returns,
1013 #        the balloon size may not have changed.  A guest can change the balloon
1014 #        size independent of this command.
1016 # Since: 0.14.0
1018 # Example:
1020 # -> { "execute": "balloon", "arguments": { "value": 536870912 } }
1021 # <- { "return": {} }
1024 { 'command': 'balloon', 'data': {'value': 'int'} }
1027 # @human-monitor-command:
1029 # Execute a command on the human monitor and return the output.
1031 # @command-line: the command to execute in the human monitor
1033 # @cpu-index: The CPU to use for commands that require an implicit CPU
1035 # Features:
1036 # @savevm-monitor-nodes: If present, HMP command savevm only snapshots
1037 #                        monitor-owned nodes if they have no parents.
1038 #                        This allows the use of 'savevm' with
1039 #                        -blockdev. (since 4.2)
1041 # Returns: the output of the command as a string
1043 # Since: 0.14.0
1045 # Notes: This command only exists as a stop-gap.  Its use is highly
1046 #        discouraged.  The semantics of this command are not
1047 #        guaranteed: this means that command names, arguments and
1048 #        responses can change or be removed at ANY time.  Applications
1049 #        that rely on long term stability guarantees should NOT
1050 #        use this command.
1052 #        Known limitations:
1054 #        * This command is stateless, this means that commands that depend
1055 #          on state information (such as getfd) might not work
1057 #        * Commands that prompt the user for data don't currently work
1059 # Example:
1061 # -> { "execute": "human-monitor-command",
1062 #      "arguments": { "command-line": "info kvm" } }
1063 # <- { "return": "kvm support: enabled\r\n" }
1066 { 'command': 'human-monitor-command',
1067   'data': {'command-line': 'str', '*cpu-index': 'int'},
1068   'returns': 'str',
1069   'features': [ 'savevm-monitor-nodes' ] }
1072 # @change:
1074 # This command is multiple commands multiplexed together.
1076 # @device: This is normally the name of a block device but it may also be 'vnc'.
1077 #          when it's 'vnc', then sub command depends on @target
1079 # @target: If @device is a block device, then this is the new filename.
1080 #          If @device is 'vnc', then if the value 'password' selects the vnc
1081 #          change password command.   Otherwise, this specifies a new server URI
1082 #          address to listen to for VNC connections.
1084 # @arg: If @device is a block device, then this is an optional format to open
1085 #       the device with.
1086 #       If @device is 'vnc' and @target is 'password', this is the new VNC
1087 #       password to set.  See change-vnc-password for additional notes.
1089 # Returns: Nothing on success.
1090 #          If @device is not a valid block device, DeviceNotFound
1092 # Notes: This interface is deprecated, and it is strongly recommended that you
1093 #        avoid using it.  For changing block devices, use
1094 #        blockdev-change-medium; for changing VNC parameters, use
1095 #        change-vnc-password.
1097 # Since: 0.14.0
1099 # Example:
1101 # 1. Change a removable medium
1103 # -> { "execute": "change",
1104 #      "arguments": { "device": "ide1-cd0",
1105 #                     "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } }
1106 # <- { "return": {} }
1108 # 2. Change VNC password
1110 # -> { "execute": "change",
1111 #      "arguments": { "device": "vnc", "target": "password",
1112 #                     "arg": "foobar1" } }
1113 # <- { "return": {} }
1116 { 'command': 'change',
1117   'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
1120 # @xen-set-global-dirty-log:
1122 # Enable or disable the global dirty log mode.
1124 # @enable: true to enable, false to disable.
1126 # Returns: nothing
1128 # Since: 1.3
1130 # Example:
1132 # -> { "execute": "xen-set-global-dirty-log",
1133 #      "arguments": { "enable": true } }
1134 # <- { "return": {} }
1137 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
1140 # @getfd:
1142 # Receive a file descriptor via SCM rights and assign it a name
1144 # @fdname: file descriptor name
1146 # Returns: Nothing on success
1148 # Since: 0.14.0
1150 # Notes: If @fdname already exists, the file descriptor assigned to
1151 #        it will be closed and replaced by the received file
1152 #        descriptor.
1154 #        The 'closefd' command can be used to explicitly close the
1155 #        file descriptor when it is no longer needed.
1157 # Example:
1159 # -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
1160 # <- { "return": {} }
1163 { 'command': 'getfd', 'data': {'fdname': 'str'} }
1166 # @closefd:
1168 # Close a file descriptor previously passed via SCM rights
1170 # @fdname: file descriptor name
1172 # Returns: Nothing on success
1174 # Since: 0.14.0
1176 # Example:
1178 # -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
1179 # <- { "return": {} }
1182 { 'command': 'closefd', 'data': {'fdname': 'str'} }
1185 # @MemoryInfo:
1187 # Actual memory information in bytes.
1189 # @base-memory: size of "base" memory specified with command line
1190 #               option -m.
1192 # @plugged-memory: size of memory that can be hot-unplugged. This field
1193 #                  is omitted if target doesn't support memory hotplug
1194 #                  (i.e. CONFIG_MEM_DEVICE not defined at build time).
1196 # Since: 2.11.0
1198 { 'struct': 'MemoryInfo',
1199   'data'  : { 'base-memory': 'size', '*plugged-memory': 'size' } }
1202 # @query-memory-size-summary:
1204 # Return the amount of initially allocated and present hotpluggable (if
1205 # enabled) memory in bytes.
1207 # Example:
1209 # -> { "execute": "query-memory-size-summary" }
1210 # <- { "return": { "base-memory": 4294967296, "plugged-memory": 0 } }
1212 # Since: 2.11.0
1214 { 'command': 'query-memory-size-summary', 'returns': 'MemoryInfo' }
1218 # @AddfdInfo:
1220 # Information about a file descriptor that was added to an fd set.
1222 # @fdset-id: The ID of the fd set that @fd was added to.
1224 # @fd: The file descriptor that was received via SCM rights and
1225 #      added to the fd set.
1227 # Since: 1.2.0
1229 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
1232 # @add-fd:
1234 # Add a file descriptor, that was passed via SCM rights, to an fd set.
1236 # @fdset-id: The ID of the fd set to add the file descriptor to.
1238 # @opaque: A free-form string that can be used to describe the fd.
1240 # Returns: @AddfdInfo on success
1242 #          If file descriptor was not received, FdNotSupplied
1244 #          If @fdset-id is a negative value, InvalidParameterValue
1246 # Notes: The list of fd sets is shared by all monitor connections.
1248 #        If @fdset-id is not specified, a new fd set will be created.
1250 # Since: 1.2.0
1252 # Example:
1254 # -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
1255 # <- { "return": { "fdset-id": 1, "fd": 3 } }
1258 { 'command': 'add-fd',
1259   'data': { '*fdset-id': 'int',
1260             '*opaque': 'str' },
1261   'returns': 'AddfdInfo' }
1264 # @remove-fd:
1266 # Remove a file descriptor from an fd set.
1268 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
1270 # @fd: The file descriptor that is to be removed.
1272 # Returns: Nothing on success
1273 #          If @fdset-id or @fd is not found, FdNotFound
1275 # Since: 1.2.0
1277 # Notes: The list of fd sets is shared by all monitor connections.
1279 #        If @fd is not specified, all file descriptors in @fdset-id
1280 #        will be removed.
1282 # Example:
1284 # -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
1285 # <- { "return": {} }
1288 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
1291 # @FdsetFdInfo:
1293 # Information about a file descriptor that belongs to an fd set.
1295 # @fd: The file descriptor value.
1297 # @opaque: A free-form string that can be used to describe the fd.
1299 # Since: 1.2.0
1301 { 'struct': 'FdsetFdInfo',
1302   'data': {'fd': 'int', '*opaque': 'str'} }
1305 # @FdsetInfo:
1307 # Information about an fd set.
1309 # @fdset-id: The ID of the fd set.
1311 # @fds: A list of file descriptors that belong to this fd set.
1313 # Since: 1.2.0
1315 { 'struct': 'FdsetInfo',
1316   'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
1319 # @query-fdsets:
1321 # Return information describing all fd sets.
1323 # Returns: A list of @FdsetInfo
1325 # Since: 1.2.0
1327 # Note: The list of fd sets is shared by all monitor connections.
1329 # Example:
1331 # -> { "execute": "query-fdsets" }
1332 # <- { "return": [
1333 #        {
1334 #          "fds": [
1335 #            {
1336 #              "fd": 30,
1337 #              "opaque": "rdonly:/path/to/file"
1338 #            },
1339 #            {
1340 #              "fd": 24,
1341 #              "opaque": "rdwr:/path/to/file"
1342 #            }
1343 #          ],
1344 #          "fdset-id": 1
1345 #        },
1346 #        {
1347 #          "fds": [
1348 #            {
1349 #              "fd": 28
1350 #            },
1351 #            {
1352 #              "fd": 29
1353 #            }
1354 #          ],
1355 #          "fdset-id": 0
1356 #        }
1357 #      ]
1358 #    }
1361 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
1364 # @AcpiTableOptions:
1366 # Specify an ACPI table on the command line to load.
1368 # At most one of @file and @data can be specified. The list of files specified
1369 # by any one of them is loaded and concatenated in order. If both are omitted,
1370 # @data is implied.
1372 # Other fields / optargs can be used to override fields of the generic ACPI
1373 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
1374 # Description Table Header. If a header field is not overridden, then the
1375 # corresponding value from the concatenated blob is used (in case of @file), or
1376 # it is filled in with a hard-coded value (in case of @data).
1378 # String fields are copied into the matching ACPI member from lowest address
1379 # upwards, and silently truncated / NUL-padded to length.
1381 # @sig: table signature / identifier (4 bytes)
1383 # @rev: table revision number (dependent on signature, 1 byte)
1385 # @oem_id: OEM identifier (6 bytes)
1387 # @oem_table_id: OEM table identifier (8 bytes)
1389 # @oem_rev: OEM-supplied revision number (4 bytes)
1391 # @asl_compiler_id: identifier of the utility that created the table
1392 #                   (4 bytes)
1394 # @asl_compiler_rev: revision number of the utility that created the
1395 #                    table (4 bytes)
1397 # @file: colon (:) separated list of pathnames to load and
1398 #        concatenate as table data. The resultant binary blob is expected to
1399 #        have an ACPI table header. At least one file is required. This field
1400 #        excludes @data.
1402 # @data: colon (:) separated list of pathnames to load and
1403 #        concatenate as table data. The resultant binary blob must not have an
1404 #        ACPI table header. At least one file is required. This field excludes
1405 #        @file.
1407 # Since: 1.5
1409 { 'struct': 'AcpiTableOptions',
1410   'data': {
1411     '*sig':               'str',
1412     '*rev':               'uint8',
1413     '*oem_id':            'str',
1414     '*oem_table_id':      'str',
1415     '*oem_rev':           'uint32',
1416     '*asl_compiler_id':   'str',
1417     '*asl_compiler_rev':  'uint32',
1418     '*file':              'str',
1419     '*data':              'str' }}
1422 # @CommandLineParameterType:
1424 # Possible types for an option parameter.
1426 # @string: accepts a character string
1428 # @boolean: accepts "on" or "off"
1430 # @number: accepts a number
1432 # @size: accepts a number followed by an optional suffix (K)ilo,
1433 #        (M)ega, (G)iga, (T)era
1435 # Since: 1.5
1437 { 'enum': 'CommandLineParameterType',
1438   'data': ['string', 'boolean', 'number', 'size'] }
1441 # @CommandLineParameterInfo:
1443 # Details about a single parameter of a command line option.
1445 # @name: parameter name
1447 # @type: parameter @CommandLineParameterType
1449 # @help: human readable text string, not suitable for parsing.
1451 # @default: default value string (since 2.1)
1453 # Since: 1.5
1455 { 'struct': 'CommandLineParameterInfo',
1456   'data': { 'name': 'str',
1457             'type': 'CommandLineParameterType',
1458             '*help': 'str',
1459             '*default': 'str' } }
1462 # @CommandLineOptionInfo:
1464 # Details about a command line option, including its list of parameter details
1466 # @option: option name
1468 # @parameters: an array of @CommandLineParameterInfo
1470 # Since: 1.5
1472 { 'struct': 'CommandLineOptionInfo',
1473   'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
1476 # @query-command-line-options:
1478 # Query command line option schema.
1480 # @option: option name
1482 # Returns: list of @CommandLineOptionInfo for all options (or for the given
1483 #          @option).  Returns an error if the given @option doesn't exist.
1485 # Since: 1.5
1487 # Example:
1489 # -> { "execute": "query-command-line-options",
1490 #      "arguments": { "option": "option-rom" } }
1491 # <- { "return": [
1492 #         {
1493 #             "parameters": [
1494 #                 {
1495 #                     "name": "romfile",
1496 #                     "type": "string"
1497 #                 },
1498 #                 {
1499 #                     "name": "bootindex",
1500 #                     "type": "number"
1501 #                 }
1502 #             ],
1503 #             "option": "option-rom"
1504 #         }
1505 #      ]
1506 #    }
1509 {'command': 'query-command-line-options',
1510  'data': { '*option': 'str' },
1511  'returns': ['CommandLineOptionInfo'],
1512  'allow-preconfig': true }
1515 # @PCDIMMDeviceInfo:
1517 # PCDIMMDevice state information
1519 # @id: device's ID
1521 # @addr: physical address, where device is mapped
1523 # @size: size of memory that the device provides
1525 # @slot: slot number at which device is plugged in
1527 # @node: NUMA node number where device is plugged in
1529 # @memdev: memory backend linked with device
1531 # @hotplugged: true if device was hotplugged
1533 # @hotpluggable: true if device if could be added/removed while machine is running
1535 # Since: 2.1
1537 { 'struct': 'PCDIMMDeviceInfo',
1538   'data': { '*id': 'str',
1539             'addr': 'int',
1540             'size': 'int',
1541             'slot': 'int',
1542             'node': 'int',
1543             'memdev': 'str',
1544             'hotplugged': 'bool',
1545             'hotpluggable': 'bool'
1546           }
1550 # @VirtioPMEMDeviceInfo:
1552 # VirtioPMEM state information
1554 # @id: device's ID
1556 # @memaddr: physical address in memory, where device is mapped
1558 # @size: size of memory that the device provides
1560 # @memdev: memory backend linked with device
1562 # Since: 4.1
1564 { 'struct': 'VirtioPMEMDeviceInfo',
1565   'data': { '*id': 'str',
1566             'memaddr': 'size',
1567             'size': 'size',
1568             'memdev': 'str'
1569           }
1573 # @MemoryDeviceInfo:
1575 # Union containing information about a memory device
1577 # nvdimm is included since 2.12. virtio-pmem is included since 4.1.
1579 # Since: 2.1
1581 { 'union': 'MemoryDeviceInfo',
1582   'data': { 'dimm': 'PCDIMMDeviceInfo',
1583             'nvdimm': 'PCDIMMDeviceInfo',
1584             'virtio-pmem': 'VirtioPMEMDeviceInfo'
1585           }
1589 # @query-memory-devices:
1591 # Lists available memory devices and their state
1593 # Since: 2.1
1595 # Example:
1597 # -> { "execute": "query-memory-devices" }
1598 # <- { "return": [ { "data":
1599 #                       { "addr": 5368709120,
1600 #                         "hotpluggable": true,
1601 #                         "hotplugged": true,
1602 #                         "id": "d1",
1603 #                         "memdev": "/objects/memX",
1604 #                         "node": 0,
1605 #                         "size": 1073741824,
1606 #                         "slot": 0},
1607 #                    "type": "dimm"
1608 #                  } ] }
1611 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
1614 # @MEM_UNPLUG_ERROR:
1616 # Emitted when memory hot unplug error occurs.
1618 # @device: device name
1620 # @msg: Informative message
1622 # Since: 2.4
1624 # Example:
1626 # <- { "event": "MEM_UNPLUG_ERROR"
1627 #      "data": { "device": "dimm1",
1628 #                "msg": "acpi: device unplug for unsupported device"
1629 #      },
1630 #      "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
1633 { 'event': 'MEM_UNPLUG_ERROR',
1634   'data': { 'device': 'str', 'msg': 'str' } }
1637 # @ACPISlotType:
1639 # @DIMM: memory slot
1640 # @CPU: logical CPU slot (since 2.7)
1642 { 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
1645 # @ACPIOSTInfo:
1647 # OSPM Status Indication for a device
1648 # For description of possible values of @source and @status fields
1649 # see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
1651 # @device: device ID associated with slot
1653 # @slot: slot ID, unique per slot of a given @slot-type
1655 # @slot-type: type of the slot
1657 # @source: an integer containing the source event
1659 # @status: an integer containing the status code
1661 # Since: 2.1
1663 { 'struct': 'ACPIOSTInfo',
1664   'data'  : { '*device': 'str',
1665               'slot': 'str',
1666               'slot-type': 'ACPISlotType',
1667               'source': 'int',
1668               'status': 'int' } }
1671 # @query-acpi-ospm-status:
1673 # Return a list of ACPIOSTInfo for devices that support status
1674 # reporting via ACPI _OST method.
1676 # Since: 2.1
1678 # Example:
1680 # -> { "execute": "query-acpi-ospm-status" }
1681 # <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
1682 #                  { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
1683 #                  { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
1684 #                  { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
1685 #    ]}
1688 { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
1691 # @ACPI_DEVICE_OST:
1693 # Emitted when guest executes ACPI _OST method.
1695 # @info: OSPM Status Indication
1697 # Since: 2.1
1699 # Example:
1701 # <- { "event": "ACPI_DEVICE_OST",
1702 #      "data": { "device": "d1", "slot": "0",
1703 #                "slot-type": "DIMM", "source": 1, "status": 0 } }
1706 { 'event': 'ACPI_DEVICE_OST',
1707      'data': { 'info': 'ACPIOSTInfo' } }
1710 # @ReplayMode:
1712 # Mode of the replay subsystem.
1714 # @none: normal execution mode. Replay or record are not enabled.
1716 # @record: record mode. All non-deterministic data is written into the
1717 #          replay log.
1719 # @play: replay mode. Non-deterministic data required for system execution
1720 #        is read from the log.
1722 # Since: 2.5
1724 { 'enum': 'ReplayMode',
1725   'data': [ 'none', 'record', 'play' ] }
1728 # @xen-load-devices-state:
1730 # Load the state of all devices from file. The RAM and the block devices
1731 # of the VM are not loaded by this command.
1733 # @filename: the file to load the state of the devices from as binary
1734 #            data. See xen-save-devices-state.txt for a description of the binary
1735 #            format.
1737 # Since: 2.7
1739 # Example:
1741 # -> { "execute": "xen-load-devices-state",
1742 #      "arguments": { "filename": "/tmp/resume" } }
1743 # <- { "return": {} }
1746 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
1749 # @GuidInfo:
1751 # GUID information.
1753 # @guid: the globally unique identifier
1755 # Since: 2.9
1757 { 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
1760 # @query-vm-generation-id:
1762 # Show Virtual Machine Generation ID
1764 # Since: 2.9
1766 { 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }