8 { 'include': 'common.json' }
13 # Enable QMP capabilities.
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.
25 # -> { "execute": "qmp_capabilities",
26 # "arguments": { "enable": [ "oob" ] } }
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.
39 { 'command': 'qmp_capabilities',
40 'data': { '*enable': [ 'QMPCapability' ] } }
45 # Enumeration of capabilities to be advertised during initial client
46 # connection, used for agreeing on particular QMP extension behaviors.
48 # @oob: QMP ability to support Out-Of-Band requests.
49 # (Please refer to qmp-spec.txt for more information on OOB)
54 { 'enum': 'QMPCapability',
60 # A three-part version number.
62 # @major: The major version number.
64 # @minor: The minor version number.
66 # @micro: The micro version number.
70 { 'struct': 'VersionTriple',
71 'data': {'major': 'int', 'minor': 'int', 'micro': 'int'} }
77 # A description of QEMU's version.
79 # @qemu: The version of QEMU. By current convention, a micro
80 # version of 50 signifies a development branch. A micro version
81 # greater than or equal to 90 signifies a release candidate for
82 # the next minor version. A micro version of less than 50
83 # signifies a stable release.
85 # @package: QEMU will always set this field to an empty string. Downstream
86 # versions of QEMU should set this to a non-empty string. The
87 # exact format depends on the downstream however it highly
88 # recommended that a unique name is used.
92 { 'struct': 'VersionInfo',
93 'data': {'qemu': 'VersionTriple', 'package': 'str'} }
98 # Returns the current version of QEMU.
100 # Returns: A @VersionInfo object describing the current version of QEMU.
106 # -> { "execute": "query-version" }
119 { 'command': 'query-version', 'returns': 'VersionInfo' }
124 # Information about a QMP command
126 # @name: The command name
130 { 'struct': 'CommandInfo', 'data': {'name': 'str'} }
135 # Return a list of supported QMP commands by this server
137 # Returns: A list of @CommandInfo for all supported commands
143 # -> { "execute": "query-commands" }
147 # "name":"query-balloon"
150 # "name":"system_powerdown"
155 # Note: This example has been shortened as the real response is too long.
158 { 'command': 'query-commands', 'returns': ['CommandInfo'] }
163 # Policy for handling lost ticks in timer devices.
165 # @discard: throw away the missed tick(s) and continue with future injection
166 # normally. Guest time may be delayed, unless the OS has explicit
167 # handling of lost ticks
169 # @delay: continue to deliver ticks at the normal rate. Guest time will be
170 # delayed due to the late tick
172 # @merge: merge the missed tick(s) into one tick and inject. Guest time
173 # may be delayed, depending on how the OS reacts to the merging
176 # @slew: deliver ticks at a higher rate to catch up with the missed tick. The
177 # guest time should not be delayed once catchup is complete.
181 { 'enum': 'LostTickPolicy',
182 'data': ['discard', 'delay', 'merge', 'slew' ] }
187 # Allow client connections for VNC, Spice and socket based
188 # character devices to be passed in to QEMU via SCM_RIGHTS.
190 # @protocol: protocol name. Valid names are "vnc", "spice" or the
191 # name of a character device (eg. from -chardev id=XXXX)
193 # @fdname: file descriptor name previously passed via 'getfd' command
195 # @skipauth: whether to skip authentication. Only applies
196 # to "vnc" and "spice" protocols
198 # @tls: whether to perform TLS. Only applies to the "spice"
201 # Returns: nothing on success.
207 # -> { "execute": "add_client", "arguments": { "protocol": "vnc",
208 # "fdname": "myclient" } }
209 # <- { "return": {} }
212 { 'command': 'add_client',
213 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
219 # Guest name information.
221 # @name: The name of the guest
225 { 'struct': 'NameInfo', 'data': {'*name': 'str'} }
230 # Return the name information of a guest.
232 # Returns: @NameInfo of the guest
238 # -> { "execute": "query-name" }
239 # <- { "return": { "name": "qemu-name" } }
242 { 'command': 'query-name', 'returns': 'NameInfo' }
247 # Information about support for KVM acceleration
249 # @enabled: true if KVM acceleration is active
251 # @present: true if KVM acceleration is built into this executable
255 { 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
260 # Returns information about KVM acceleration
268 # -> { "execute": "query-kvm" }
269 # <- { "return": { "enabled": true, "present": true } }
272 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
277 # Guest UUID information (Universally Unique Identifier).
279 # @UUID: the UUID of the guest
283 # Notes: If no UUID was specified for the guest, a null UUID is returned.
285 { 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
290 # Query the guest UUID information.
292 # Returns: The @UuidInfo for the guest
298 # -> { "execute": "query-uuid" }
299 # <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
302 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
307 # Information about a QMP event
309 # @name: The event name
313 { 'struct': 'EventInfo', 'data': {'name': 'str'} }
318 # Return a list of supported QMP events by this server
320 # Returns: A list of @EventInfo for all supported events
326 # -> { "execute": "query-events" }
338 # Note: This example has been shortened as the real response is too long.
341 { 'command': 'query-events', 'returns': ['EventInfo'] }
346 # An enumeration of cpu types that enable additional information during
347 # @query-cpus and @query-cpus-fast.
355 { 'enum': 'CpuInfoArch',
356 'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 's390', 'riscv', 'other' ] }
361 # Information about a virtual CPU
363 # @CPU: the index of the virtual CPU
365 # @current: this only exists for backwards compatibility and should be ignored
367 # @halted: true if the virtual CPU is in the halt state. Halt usually refers
368 # to a processor specific low power mode.
370 # @qom_path: path to the CPU object in the QOM tree (since 2.4)
372 # @thread_id: ID of the underlying host thread
374 # @props: properties describing to which node/socket/core/thread
375 # virtual CPU belongs to, provided if supported by board (since 2.10)
377 # @arch: architecture of the cpu, which determines which additional fields
378 # will be listed (since 2.6)
382 # Notes: @halted is a transient state that changes frequently. By the time the
383 # data is sent to the client, the guest may no longer be halted.
385 { 'union': 'CpuInfo',
386 'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool',
387 'qom_path': 'str', 'thread_id': 'int',
388 '*props': 'CpuInstanceProperties', 'arch': 'CpuInfoArch' },
389 'discriminator': 'arch',
390 'data': { 'x86': 'CpuInfoX86',
391 'sparc': 'CpuInfoSPARC',
393 'mips': 'CpuInfoMIPS',
394 'tricore': 'CpuInfoTricore',
395 's390': 'CpuInfoS390',
396 'riscv': 'CpuInfoRISCV',
397 'other': 'CpuInfoOther' } }
402 # Additional information about a virtual i386 or x86_64 CPU
404 # @pc: the 64-bit instruction pointer
408 { 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } }
413 # Additional information about a virtual SPARC CPU
415 # @pc: the PC component of the instruction pointer
417 # @npc: the NPC component of the instruction pointer
421 { 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } }
426 # Additional information about a virtual PPC CPU
428 # @nip: the instruction pointer
432 { 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } }
437 # Additional information about a virtual MIPS CPU
439 # @PC: the instruction pointer
443 { 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } }
448 # Additional information about a virtual Tricore CPU
450 # @PC: the instruction pointer
454 { 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } }
459 # Additional information about a virtual RISCV CPU
461 # @pc: the instruction pointer
465 { 'struct': 'CpuInfoRISCV', 'data': { 'pc': 'int' } }
470 # No additional information is available about the virtual CPU
475 { 'struct': 'CpuInfoOther', 'data': { } }
480 # An enumeration of cpu states that can be assumed by a virtual
485 { 'enum': 'CpuS390State',
486 'prefix': 'S390_CPU_STATE',
487 'data': [ 'uninitialized', 'stopped', 'check-stop', 'operating', 'load' ] }
492 # Additional information about a virtual S390 CPU
494 # @cpu-state: the virtual CPU's state
498 { 'struct': 'CpuInfoS390', 'data': { 'cpu-state': 'CpuS390State' } }
503 # Returns a list of information about each virtual CPU.
505 # This command causes vCPU threads to exit to userspace, which causes
506 # a small interruption to guest CPU execution. This will have a negative
507 # impact on realtime guests and other latency sensitive guest workloads.
508 # It is recommended to use @query-cpus-fast instead of this command to
509 # avoid the vCPU interruption.
511 # Returns: a list of @CpuInfo for each virtual CPU
517 # -> { "execute": "query-cpus" }
523 # "qom_path":"/machine/unattached/device[0]",
532 # "qom_path":"/machine/unattached/device[2]",
540 # Notes: This interface is deprecated (since 2.12.0), and it is strongly
541 # recommended that you avoid using it. Use @query-cpus-fast to
542 # obtain information about virtual CPUs.
545 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
550 # Information about a virtual CPU
552 # @cpu-index: index of the virtual CPU
554 # @qom-path: path to the CPU object in the QOM tree
556 # @thread-id: ID of the underlying host thread
558 # @props: properties describing to which node/socket/core/thread
559 # virtual CPU belongs to, provided if supported by board
561 # @arch: base architecture of the cpu; deprecated since 2.13.0 in favor
564 # @target: the QEMU system emulation target, which determines which
565 # additional fields will be listed (since 2.13)
570 { 'union' : 'CpuInfoFast',
571 'base' : { 'cpu-index' : 'int',
574 '*props' : 'CpuInstanceProperties',
575 'arch' : 'CpuInfoArch',
576 'target' : 'SysEmuTarget' },
577 'discriminator' : 'target',
578 'data' : { 'aarch64' : 'CpuInfoOther',
579 'alpha' : 'CpuInfoOther',
580 'arm' : 'CpuInfoOther',
581 'cris' : 'CpuInfoOther',
582 'hppa' : 'CpuInfoOther',
583 'i386' : 'CpuInfoOther',
584 'lm32' : 'CpuInfoOther',
585 'm68k' : 'CpuInfoOther',
586 'microblaze' : 'CpuInfoOther',
587 'microblazeel' : 'CpuInfoOther',
588 'mips' : 'CpuInfoOther',
589 'mips64' : 'CpuInfoOther',
590 'mips64el' : 'CpuInfoOther',
591 'mipsel' : 'CpuInfoOther',
592 'moxie' : 'CpuInfoOther',
593 'nios2' : 'CpuInfoOther',
594 'or1k' : 'CpuInfoOther',
595 'ppc' : 'CpuInfoOther',
596 'ppc64' : 'CpuInfoOther',
597 'ppcemb' : 'CpuInfoOther',
598 'riscv32' : 'CpuInfoOther',
599 'riscv64' : 'CpuInfoOther',
600 's390x' : 'CpuInfoS390',
601 'sh4' : 'CpuInfoOther',
602 'sh4eb' : 'CpuInfoOther',
603 'sparc' : 'CpuInfoOther',
604 'sparc64' : 'CpuInfoOther',
605 'tricore' : 'CpuInfoOther',
606 'unicore32' : 'CpuInfoOther',
607 'x86_64' : 'CpuInfoOther',
608 'xtensa' : 'CpuInfoOther',
609 'xtensaeb' : 'CpuInfoOther' } }
614 # Returns information about all virtual CPUs. This command does not
615 # incur a performance penalty and should be used in production
616 # instead of query-cpus.
618 # Returns: list of @CpuInfoFast
624 # -> { "execute": "query-cpus-fast" }
627 # "thread-id": 25627,
633 # "qom-path": "/machine/unattached/device[0]",
639 # "thread-id": 25628,
645 # "qom-path": "/machine/unattached/device[2]",
653 { 'command': 'query-cpus-fast', 'returns': [ 'CpuInfoFast' ] }
658 # Information about an iothread
660 # @id: the identifier of the iothread
662 # @thread-id: ID of the underlying host thread
664 # @poll-max-ns: maximum polling time in ns, 0 means polling is disabled
667 # @poll-grow: how many ns will be added to polling time, 0 means that it's not
668 # configured (since 2.9)
670 # @poll-shrink: how many ns will be removed from polling time, 0 means that
671 # it's not configured (since 2.9)
675 { 'struct': 'IOThreadInfo',
676 'data': {'id': 'str',
678 'poll-max-ns': 'int',
680 'poll-shrink': 'int' } }
685 # Returns a list of information about each iothread.
687 # Note: this list excludes the QEMU main loop thread, which is not declared
688 # using the -object iothread command-line option. It is always the main thread
691 # Returns: a list of @IOThreadInfo for each iothread
697 # -> { "execute": "query-iothreads" }
711 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
716 # Information about the guest balloon device.
718 # @actual: the number of bytes the balloon currently contains
723 { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
728 # Return information about the balloon device.
730 # Returns: @BalloonInfo on success
732 # If the balloon driver is enabled but not functional because the KVM
733 # kernel module cannot support it, KvmMissingCap
735 # If no balloon device is present, DeviceNotActive
741 # -> { "execute": "query-balloon" }
743 # "actual": 1073741824,
748 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
753 # Emitted when the guest changes the actual BALLOON level. This value is
754 # equivalent to the @actual field return by the 'query-balloon' command
756 # @actual: actual level of the guest memory balloon in bytes
758 # Note: this event is rate-limited.
764 # <- { "event": "BALLOON_CHANGE",
765 # "data": { "actual": 944766976 },
766 # "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
769 { 'event': 'BALLOON_CHANGE',
770 'data': { 'actual': 'int' } }
775 # A PCI device memory region
777 # @base: the starting address (guest physical)
779 # @limit: the ending address (guest physical)
783 { 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
788 # Information about a PCI device I/O region.
790 # @bar: the index of the Base Address Register for this region
792 # @type: 'io' if the region is a PIO region
793 # 'memory' if the region is a MMIO region
797 # @prefetch: if @type is 'memory', true if the memory is prefetchable
799 # @mem_type_64: if @type is 'memory', true if the BAR is 64-bit
803 { 'struct': 'PciMemoryRegion',
804 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
805 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
810 # Information about a bus of a PCI Bridge device
812 # @number: primary bus interface number. This should be the number of the
813 # bus the device resides on.
815 # @secondary: secondary bus interface number. This is the number of the
816 # main bus for the bridge
818 # @subordinate: This is the highest number bus that resides below the
821 # @io_range: The PIO range for all devices on this bridge
823 # @memory_range: The MMIO range for all devices on this bridge
825 # @prefetchable_range: The range of prefetchable MMIO for all devices on
830 { 'struct': 'PciBusInfo',
831 'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
832 'io_range': 'PciMemoryRange',
833 'memory_range': 'PciMemoryRange',
834 'prefetchable_range': 'PciMemoryRange' } }
839 # Information about a PCI Bridge device
841 # @bus: information about the bus the device resides on
843 # @devices: a list of @PciDeviceInfo for each device on this bridge
847 { 'struct': 'PciBridgeInfo',
848 'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
853 # Information about the Class of a PCI device
855 # @desc: a string description of the device's class
857 # @class: the class code of the device
861 { 'struct': 'PciDeviceClass',
862 'data': {'*desc': 'str', 'class': 'int'} }
867 # Information about the Id of a PCI device
869 # @device: the PCI device id
871 # @vendor: the PCI vendor id
875 { 'struct': 'PciDeviceId',
876 'data': {'device': 'int', 'vendor': 'int'} }
881 # Information about a PCI device
883 # @bus: the bus number of the device
885 # @slot: the slot the device is located in
887 # @function: the function of the slot used by the device
889 # @class_info: the class of the device
891 # @id: the PCI device id
893 # @irq: if an IRQ is assigned to the device, the IRQ number
895 # @qdev_id: the device name of the PCI device
897 # @pci_bridge: if the device is a PCI bridge, the bridge information
899 # @regions: a list of the PCI I/O regions associated with the device
901 # Notes: the contents of @class_info.desc are not stable and should only be
902 # treated as informational.
906 { 'struct': 'PciDeviceInfo',
907 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
908 'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
909 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
910 'regions': ['PciMemoryRegion']} }
915 # Information about a PCI bus
917 # @bus: the bus index
919 # @devices: a list of devices on this bus
923 { 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
928 # Return information about the PCI bus topology of the guest.
930 # Returns: a list of @PciInfo for each PCI bus. Each bus is
931 # represented by a json-object, which has a key with a json-array of
932 # all PCI devices attached to it. Each device is represented by a
939 # -> { "execute": "query-pci" }
950 # "desc": "Host bridge"
966 # "desc": "ISA bridge"
982 # "desc": "IDE controller"
1004 # "desc": "VGA controller"
1014 # "mem_type_64": false,
1017 # "address": 4026531840,
1021 # "prefetch": false,
1022 # "mem_type_64": false,
1025 # "address": 4060086272,
1029 # "prefetch": false,
1030 # "mem_type_64": false,
1045 # "desc": "RAM controller"
1066 # Note: This example has been shortened as the real response is too long.
1069 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1074 # This command will cause the QEMU process to exit gracefully. While every
1075 # attempt is made to send the QMP response before terminating, this is not
1076 # guaranteed. When using this interface, a premature EOF would not be
1083 # -> { "execute": "quit" }
1084 # <- { "return": {} }
1086 { 'command': 'quit' }
1091 # Stop all guest VCPU execution.
1095 # Notes: This function will succeed even if the guest is already in the stopped
1096 # state. In "inmigrate" state, it will ensure that the guest
1097 # remains paused once migration finishes, as if the -S option was
1098 # passed on the command line.
1102 # -> { "execute": "stop" }
1103 # <- { "return": {} }
1106 { 'command': 'stop' }
1111 # Performs a hard reset of a guest.
1117 # -> { "execute": "system_reset" }
1118 # <- { "return": {} }
1121 { 'command': 'system_reset' }
1124 # @system_powerdown:
1126 # Requests that a guest perform a powerdown operation.
1130 # Notes: A guest may or may not respond to this command. This command
1131 # returning does not indicate that a guest has accepted the request or
1132 # that it has shut down. Many guests will respond to this command by
1133 # prompting the user in some way.
1136 # -> { "execute": "system_powerdown" }
1137 # <- { "return": {} }
1140 { 'command': 'system_powerdown' }
1145 # Adds CPU with specified ID
1147 # @id: ID of CPU to be created, valid values [0..max_cpus)
1149 # Returns: Nothing on success
1155 # -> { "execute": "cpu-add", "arguments": { "id": 2 } }
1156 # <- { "return": {} }
1159 { 'command': 'cpu-add', 'data': {'id': 'int'} }
1164 # Save a portion of guest memory to a file.
1166 # @val: the virtual address of the guest to start from
1168 # @size: the size of memory region to save
1170 # @filename: the file to save the memory to as binary data
1172 # @cpu-index: the index of the virtual CPU to use for translating the
1173 # virtual address (defaults to CPU 0)
1175 # Returns: Nothing on success
1179 # Notes: Errors were not reliably returned until 1.1
1183 # -> { "execute": "memsave",
1184 # "arguments": { "val": 10,
1186 # "filename": "/tmp/virtual-mem-dump" } }
1187 # <- { "return": {} }
1190 { 'command': 'memsave',
1191 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1196 # Save a portion of guest physical memory to a file.
1198 # @val: the physical address of the guest to start from
1200 # @size: the size of memory region to save
1202 # @filename: the file to save the memory to as binary data
1204 # Returns: Nothing on success
1208 # Notes: Errors were not reliably returned until 1.1
1212 # -> { "execute": "pmemsave",
1213 # "arguments": { "val": 10,
1215 # "filename": "/tmp/physical-mem-dump" } }
1216 # <- { "return": {} }
1219 { 'command': 'pmemsave',
1220 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1225 # Resume guest VCPU execution.
1229 # Returns: If successful, nothing
1231 # Notes: This command will succeed if the guest is currently running. It
1232 # will also succeed if the guest is in the "inmigrate" state; in
1233 # this case, the effect of the command is to make sure the guest
1234 # starts once migration finishes, removing the effect of the -S
1235 # command line option if it was passed.
1239 # -> { "execute": "cont" }
1240 # <- { "return": {} }
1243 { 'command': 'cont' }
1248 # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1256 # -> { "execute": "system_wakeup" }
1257 # <- { "return": {} }
1260 { 'command': 'system_wakeup' }
1265 # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
1266 # The command fails when the guest doesn't support injecting.
1268 # Returns: If successful, nothing
1272 # Note: prior to 2.1, this command was only supported for x86 and s390 VMs
1276 # -> { "execute": "inject-nmi" }
1277 # <- { "return": {} }
1280 { 'command': 'inject-nmi' }
1285 # Request the balloon driver to change its balloon size.
1287 # @value: the target size of the balloon in bytes
1289 # Returns: Nothing on success
1290 # If the balloon driver is enabled but not functional because the KVM
1291 # kernel module cannot support it, KvmMissingCap
1292 # If no balloon device is present, DeviceNotActive
1294 # Notes: This command just issues a request to the guest. When it returns,
1295 # the balloon size may not have changed. A guest can change the balloon
1296 # size independent of this command.
1302 # -> { "execute": "balloon", "arguments": { "value": 536870912 } }
1303 # <- { "return": {} }
1306 { 'command': 'balloon', 'data': {'value': 'int'} }
1309 # @human-monitor-command:
1311 # Execute a command on the human monitor and return the output.
1313 # @command-line: the command to execute in the human monitor
1315 # @cpu-index: The CPU to use for commands that require an implicit CPU
1317 # Returns: the output of the command as a string
1321 # Notes: This command only exists as a stop-gap. Its use is highly
1322 # discouraged. The semantics of this command are not
1323 # guaranteed: this means that command names, arguments and
1324 # responses can change or be removed at ANY time. Applications
1325 # that rely on long term stability guarantees should NOT
1328 # Known limitations:
1330 # * This command is stateless, this means that commands that depend
1331 # on state information (such as getfd) might not work
1333 # * Commands that prompt the user for data don't currently work
1337 # -> { "execute": "human-monitor-command",
1338 # "arguments": { "command-line": "info kvm" } }
1339 # <- { "return": "kvm support: enabled\r\n" }
1342 { 'command': 'human-monitor-command',
1343 'data': {'command-line': 'str', '*cpu-index': 'int'},
1347 # @ObjectPropertyInfo:
1349 # @name: the name of the property
1351 # @type: the type of the property. This will typically come in one of four
1354 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1355 # These types are mapped to the appropriate JSON type.
1357 # 2) A child type in the form 'child<subtype>' where subtype is a qdev
1358 # device type name. Child properties create the composition tree.
1360 # 3) A link type in the form 'link<subtype>' where subtype is a qdev
1361 # device type name. Link properties form the device model graph.
1363 # @description: if specified, the description of the property.
1367 { 'struct': 'ObjectPropertyInfo',
1368 'data': { 'name': 'str', 'type': 'str', '*description': 'str' } }
1373 # This command will list any properties of a object given a path in the object
1376 # @path: the path within the object model. See @qom-get for a description of
1379 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1384 { 'command': 'qom-list',
1385 'data': { 'path': 'str' },
1386 'returns': [ 'ObjectPropertyInfo' ] }
1391 # This command will get a property from a object model path and return the
1394 # @path: The path within the object model. There are two forms of supported
1395 # paths--absolute and partial paths.
1397 # Absolute paths are derived from the root object and can follow child<>
1398 # or link<> properties. Since they can follow link<> properties, they
1399 # can be arbitrarily long. Absolute paths look like absolute filenames
1400 # and are prefixed with a leading slash.
1402 # Partial paths look like relative filenames. They do not begin
1403 # with a prefix. The matching rules for partial paths are subtle but
1404 # designed to make specifying objects easy. At each level of the
1405 # composition tree, the partial path is matched as an absolute path.
1406 # The first match is not returned. At least two matches are searched
1407 # for. A successful result is only returned if only one match is
1408 # found. If more than one match is found, a flag is return to
1409 # indicate that the match was ambiguous.
1411 # @property: The property name to read
1413 # Returns: The property value. The type depends on the property
1414 # type. child<> and link<> properties are returned as #str
1415 # pathnames. All integer property types (u8, u16, etc) are
1420 { 'command': 'qom-get',
1421 'data': { 'path': 'str', 'property': 'str' },
1427 # This command will set a property from a object model path.
1429 # @path: see @qom-get for a description of this parameter
1431 # @property: the property name to set
1433 # @value: a value who's type is appropriate for the property type. See @qom-get
1434 # for a description of type mapping.
1438 { 'command': 'qom-set',
1439 'data': { 'path': 'str', 'property': 'str', 'value': 'any' } }
1444 # This command is multiple commands multiplexed together.
1446 # @device: This is normally the name of a block device but it may also be 'vnc'.
1447 # when it's 'vnc', then sub command depends on @target
1449 # @target: If @device is a block device, then this is the new filename.
1450 # If @device is 'vnc', then if the value 'password' selects the vnc
1451 # change password command. Otherwise, this specifies a new server URI
1452 # address to listen to for VNC connections.
1454 # @arg: If @device is a block device, then this is an optional format to open
1456 # If @device is 'vnc' and @target is 'password', this is the new VNC
1457 # password to set. See change-vnc-password for additional notes.
1459 # Returns: Nothing on success.
1460 # If @device is not a valid block device, DeviceNotFound
1462 # Notes: This interface is deprecated, and it is strongly recommended that you
1463 # avoid using it. For changing block devices, use
1464 # blockdev-change-medium; for changing VNC parameters, use
1465 # change-vnc-password.
1471 # 1. Change a removable medium
1473 # -> { "execute": "change",
1474 # "arguments": { "device": "ide1-cd0",
1475 # "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } }
1476 # <- { "return": {} }
1478 # 2. Change VNC password
1480 # -> { "execute": "change",
1481 # "arguments": { "device": "vnc", "target": "password",
1482 # "arg": "foobar1" } }
1483 # <- { "return": {} }
1486 { 'command': 'change',
1487 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
1492 # This structure describes a search result from @qom-list-types
1494 # @name: the type name found in the search
1496 # @abstract: the type is abstract and can't be directly instantiated.
1497 # Omitted if false. (since 2.10)
1499 # @parent: Name of parent type, if any (since 2.10)
1503 { 'struct': 'ObjectTypeInfo',
1504 'data': { 'name': 'str', '*abstract': 'bool', '*parent': 'str' } }
1509 # This command will return a list of types given search parameters
1511 # @implements: if specified, only return types that implement this type name
1513 # @abstract: if true, include abstract types in the results
1515 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
1519 { 'command': 'qom-list-types',
1520 'data': { '*implements': 'str', '*abstract': 'bool' },
1521 'returns': [ 'ObjectTypeInfo' ] }
1524 # @device-list-properties:
1526 # List properties associated with a device.
1528 # @typename: the type name of a device
1530 # Returns: a list of ObjectPropertyInfo describing a devices properties
1532 # Note: objects can create properties at runtime, for example to describe
1533 # links between different devices and/or objects. These properties
1534 # are not included in the output of this command.
1538 { 'command': 'device-list-properties',
1539 'data': { 'typename': 'str'},
1540 'returns': [ 'ObjectPropertyInfo' ] }
1543 # @qom-list-properties:
1545 # List properties associated with a QOM object.
1547 # @typename: the type name of an object
1549 # Note: objects can create properties at runtime, for example to describe
1550 # links between different devices and/or objects. These properties
1551 # are not included in the output of this command.
1553 # Returns: a list of ObjectPropertyInfo describing object properties
1557 { 'command': 'qom-list-properties',
1558 'data': { 'typename': 'str'},
1559 'returns': [ 'ObjectPropertyInfo' ] }
1562 # @xen-set-global-dirty-log:
1564 # Enable or disable the global dirty log mode.
1566 # @enable: true to enable, false to disable.
1574 # -> { "execute": "xen-set-global-dirty-log",
1575 # "arguments": { "enable": true } }
1576 # <- { "return": {} }
1579 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
1584 # @driver: the name of the new device's driver
1586 # @bus: the device's parent bus (device tree path)
1588 # @id: the device's ID, must be unique
1590 # Additional arguments depend on the type.
1595 # 1. For detailed information about this command, please refer to the
1596 # 'docs/qdev-device-use.txt' file.
1598 # 2. It's possible to list device properties by running QEMU with the
1599 # "-device DEVICE,help" command-line argument, where DEVICE is the
1604 # -> { "execute": "device_add",
1605 # "arguments": { "driver": "e1000", "id": "net1",
1607 # "mac": "52:54:00:12:34:56" } }
1608 # <- { "return": {} }
1610 # TODO: This command effectively bypasses QAPI completely due to its
1611 # "additional arguments" business. It shouldn't have been added to
1612 # the schema in this form. It should be qapified properly, or
1613 # replaced by a properly qapified command.
1617 { 'command': 'device_add',
1618 'data': {'driver': 'str', '*bus': 'str', '*id': 'str'},
1619 'gen': false } # so we can get the additional arguments
1624 # Remove a device from a guest
1626 # @id: the device's ID or QOM path
1628 # Returns: Nothing on success
1629 # If @id is not a valid device, DeviceNotFound
1631 # Notes: When this command completes, the device may not be removed from the
1632 # guest. Hot removal is an operation that requires guest cooperation.
1633 # This command merely requests that the guest begin the hot removal
1634 # process. Completion of the device removal process is signaled with a
1635 # DEVICE_DELETED event. Guest reset will automatically complete removal
1642 # -> { "execute": "device_del",
1643 # "arguments": { "id": "net1" } }
1644 # <- { "return": {} }
1646 # -> { "execute": "device_del",
1647 # "arguments": { "id": "/machine/peripheral-anon/device[0]" } }
1648 # <- { "return": {} }
1651 { 'command': 'device_del', 'data': {'id': 'str'} }
1656 # Emitted whenever the device removal completion is acknowledged by the guest.
1657 # At this point, it's safe to reuse the specified device ID. Device removal can
1658 # be initiated by the guest or by HMP/QMP commands.
1660 # @device: device name
1662 # @path: device path
1668 # <- { "event": "DEVICE_DELETED",
1669 # "data": { "device": "virtio-net-pci-0",
1670 # "path": "/machine/peripheral/virtio-net-pci-0" },
1671 # "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
1674 { 'event': 'DEVICE_DELETED',
1675 'data': { '*device': 'str', 'path': 'str' } }
1678 # @DumpGuestMemoryFormat:
1680 # An enumeration of guest-memory-dump's format.
1684 # @kdump-zlib: kdump-compressed format with zlib-compressed
1686 # @kdump-lzo: kdump-compressed format with lzo-compressed
1688 # @kdump-snappy: kdump-compressed format with snappy-compressed
1692 { 'enum': 'DumpGuestMemoryFormat',
1693 'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
1696 # @dump-guest-memory:
1698 # Dump guest's memory to vmcore. It is a synchronous operation that can take
1699 # very long depending on the amount of guest memory.
1701 # @paging: if true, do paging to get guest's memory mapping. This allows
1702 # using gdb to process the core file.
1704 # IMPORTANT: this option can make QEMU allocate several gigabytes
1705 # of RAM. This can happen for a large guest, or a
1706 # malicious guest pretending to be large.
1708 # Also, paging=true has the following limitations:
1710 # 1. The guest may be in a catastrophic state or can have corrupted
1711 # memory, which cannot be trusted
1712 # 2. The guest can be in real-mode even if paging is enabled. For
1713 # example, the guest uses ACPI to sleep, and ACPI sleep state
1715 # 3. Currently only supported on i386 and x86_64.
1717 # @protocol: the filename or file descriptor of the vmcore. The supported
1720 # 1. file: the protocol starts with "file:", and the following
1721 # string is the file's path.
1722 # 2. fd: the protocol starts with "fd:", and the following string
1725 # @detach: if true, QMP will return immediately rather than
1726 # waiting for the dump to finish. The user can track progress
1727 # using "query-dump". (since 2.6).
1729 # @begin: if specified, the starting physical address.
1731 # @length: if specified, the memory size, in bytes. If you don't
1732 # want to dump all guest's memory, please specify the start @begin
1735 # @format: if specified, the format of guest memory dump. But non-elf
1736 # format is conflict with paging and filter, ie. @paging, @begin and
1737 # @length is not allowed to be specified with non-elf @format at the
1738 # same time (since 2.0)
1740 # Note: All boolean arguments default to false
1742 # Returns: nothing on success
1748 # -> { "execute": "dump-guest-memory",
1749 # "arguments": { "protocol": "fd:dump" } }
1750 # <- { "return": {} }
1753 { 'command': 'dump-guest-memory',
1754 'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool',
1755 '*begin': 'int', '*length': 'int',
1756 '*format': 'DumpGuestMemoryFormat'} }
1761 # Describe the status of a long-running background guest memory dump.
1763 # @none: no dump-guest-memory has started yet.
1765 # @active: there is one dump running in background.
1767 # @completed: the last dump has finished successfully.
1769 # @failed: the last dump has failed.
1773 { 'enum': 'DumpStatus',
1774 'data': [ 'none', 'active', 'completed', 'failed' ] }
1779 # The result format for 'query-dump'.
1781 # @status: enum of @DumpStatus, which shows current dump status
1783 # @completed: bytes written in latest dump (uncompressed)
1785 # @total: total bytes to be written in latest dump (uncompressed)
1789 { 'struct': 'DumpQueryResult',
1790 'data': { 'status': 'DumpStatus',
1797 # Query latest dump status.
1799 # Returns: A @DumpStatus object showing the dump status.
1805 # -> { "execute": "query-dump" }
1806 # <- { "return": { "status": "active", "completed": 1024000,
1807 # "total": 2048000 } }
1810 { 'command': 'query-dump', 'returns': 'DumpQueryResult' }
1815 # Emitted when background dump has completed
1817 # @result: final dump status
1819 # @error: human-readable error string that provides
1820 # hint on why dump failed. Only presents on failure. The
1821 # user should not try to interpret the error string.
1827 # { "event": "DUMP_COMPLETED",
1828 # "data": {"result": {"total": 1090650112, "status": "completed",
1829 # "completed": 1090650112} } }
1832 { 'event': 'DUMP_COMPLETED' ,
1833 'data': { 'result': 'DumpQueryResult', '*error': 'str' } }
1836 # @DumpGuestMemoryCapability:
1838 # A list of the available formats for dump-guest-memory
1842 { 'struct': 'DumpGuestMemoryCapability',
1844 'formats': ['DumpGuestMemoryFormat'] } }
1847 # @query-dump-guest-memory-capability:
1849 # Returns the available formats for dump-guest-memory
1851 # Returns: A @DumpGuestMemoryCapability object listing available formats for
1858 # -> { "execute": "query-dump-guest-memory-capability" }
1859 # <- { "return": { "formats":
1860 # ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] }
1863 { 'command': 'query-dump-guest-memory-capability',
1864 'returns': 'DumpGuestMemoryCapability' }
1869 # Dump guest's storage keys
1871 # @filename: the path to the file to dump to
1873 # This command is only supported on s390 architecture.
1879 # -> { "execute": "dump-skeys",
1880 # "arguments": { "filename": "/tmp/skeys" } }
1881 # <- { "return": {} }
1884 { 'command': 'dump-skeys',
1885 'data': { 'filename': 'str' } }
1890 # Create a QOM object.
1892 # @qom-type: the class name for the object to be created
1894 # @id: the name of the new object
1896 # @props: a dictionary of properties to be passed to the backend
1898 # Returns: Nothing on success
1899 # Error if @qom-type is not a valid class name
1905 # -> { "execute": "object-add",
1906 # "arguments": { "qom-type": "rng-random", "id": "rng1",
1907 # "props": { "filename": "/dev/hwrng" } } }
1908 # <- { "return": {} }
1911 { 'command': 'object-add',
1912 'data': {'qom-type': 'str', 'id': 'str', '*props': 'any'} }
1917 # Remove a QOM object.
1919 # @id: the name of the QOM object to remove
1921 # Returns: Nothing on success
1922 # Error if @id is not a valid id for a QOM object
1928 # -> { "execute": "object-del", "arguments": { "id": "rng1" } }
1929 # <- { "return": {} }
1932 { 'command': 'object-del', 'data': {'id': 'str'} }
1937 # Receive a file descriptor via SCM rights and assign it a name
1939 # @fdname: file descriptor name
1941 # Returns: Nothing on success
1945 # Notes: If @fdname already exists, the file descriptor assigned to
1946 # it will be closed and replaced by the received file
1949 # The 'closefd' command can be used to explicitly close the
1950 # file descriptor when it is no longer needed.
1954 # -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
1955 # <- { "return": {} }
1958 { 'command': 'getfd', 'data': {'fdname': 'str'} }
1963 # Close a file descriptor previously passed via SCM rights
1965 # @fdname: file descriptor name
1967 # Returns: Nothing on success
1973 # -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
1974 # <- { "return": {} }
1977 { 'command': 'closefd', 'data': {'fdname': 'str'} }
1982 # Information describing a machine.
1984 # @name: the name of the machine
1986 # @alias: an alias for the machine name
1988 # @is-default: whether the machine is default
1990 # @cpu-max: maximum number of CPUs supported by the machine type
1993 # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
1997 { 'struct': 'MachineInfo',
1998 'data': { 'name': 'str', '*alias': 'str',
1999 '*is-default': 'bool', 'cpu-max': 'int',
2000 'hotpluggable-cpus': 'bool'} }
2005 # Return a list of supported machines
2007 # Returns: a list of MachineInfo
2011 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
2014 # @CpuDefinitionInfo:
2016 # Virtual CPU definition.
2018 # @name: the name of the CPU definition
2020 # @migration-safe: whether a CPU definition can be safely used for
2021 # migration in combination with a QEMU compatibility machine
2022 # when migrating between different QMU versions and between
2023 # hosts with different sets of (hardware or software)
2024 # capabilities. If not provided, information is not available
2025 # and callers should not assume the CPU definition to be
2026 # migration-safe. (since 2.8)
2028 # @static: whether a CPU definition is static and will not change depending on
2029 # QEMU version, machine type, machine options and accelerator options.
2030 # A static model is always migration-safe. (since 2.8)
2032 # @unavailable-features: List of properties that prevent
2033 # the CPU model from running in the current
2035 # @typename: Type name that can be used as argument to @device-list-properties,
2036 # to introspect properties configurable using -cpu or -global.
2039 # @unavailable-features is a list of QOM property names that
2040 # represent CPU model attributes that prevent the CPU from running.
2041 # If the QOM property is read-only, that means there's no known
2042 # way to make the CPU model run in the current host. Implementations
2043 # that choose not to provide specific information return the
2044 # property name "type".
2045 # If the property is read-write, it means that it MAY be possible
2046 # to run the CPU model in the current host if that property is
2047 # changed. Management software can use it as hints to suggest or
2048 # choose an alternative for the user, or just to generate meaningful
2049 # error messages explaining why the CPU model can't be used.
2050 # If @unavailable-features is an empty list, the CPU model is
2051 # runnable using the current host and machine-type.
2052 # If @unavailable-features is not present, runnability
2053 # information for the CPU is not available.
2057 { 'struct': 'CpuDefinitionInfo',
2058 'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool',
2059 '*unavailable-features': [ 'str' ], 'typename': 'str' } }
2064 # Actual memory information in bytes.
2066 # @base-memory: size of "base" memory specified with command line
2069 # @plugged-memory: size of memory that can be hot-unplugged. This field
2070 # is omitted if target doesn't support memory hotplug
2071 # (i.e. CONFIG_MEM_HOTPLUG not defined on build time).
2075 { 'struct': 'MemoryInfo',
2076 'data' : { 'base-memory': 'size', '*plugged-memory': 'size' } }
2079 # @query-memory-size-summary:
2081 # Return the amount of initially allocated and present hotpluggable (if
2082 # enabled) memory in bytes.
2086 # -> { "execute": "query-memory-size-summary" }
2087 # <- { "return": { "base-memory": 4294967296, "plugged-memory": 0 } }
2091 { 'command': 'query-memory-size-summary', 'returns': 'MemoryInfo' }
2094 # @query-cpu-definitions:
2096 # Return a list of supported virtual CPU definitions
2098 # Returns: a list of CpuDefInfo
2102 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
2107 # Virtual CPU model.
2109 # A CPU model consists of the name of a CPU definition, to which
2110 # delta changes are applied (e.g. features added/removed). Most magic values
2111 # that an architecture might require should be hidden behind the name.
2112 # However, if required, architectures can expose relevant properties.
2114 # @name: the name of the CPU definition the model is based on
2115 # @props: a dictionary of QOM properties to be applied
2119 { 'struct': 'CpuModelInfo',
2120 'data': { 'name': 'str',
2124 # @CpuModelExpansionType:
2126 # An enumeration of CPU model expansion types.
2128 # @static: Expand to a static CPU model, a combination of a static base
2129 # model name and property delta changes. As the static base model will
2130 # never change, the expanded CPU model will be the same, independent of
2131 # independent of QEMU version, machine type, machine options, and
2132 # accelerator options. Therefore, the resulting model can be used by
2133 # tooling without having to specify a compatibility machine - e.g. when
2134 # displaying the "host" model. static CPU models are migration-safe.
2136 # @full: Expand all properties. The produced model is not guaranteed to be
2137 # migration-safe, but allows tooling to get an insight and work with
2140 # Note: When a non-migration-safe CPU model is expanded in static mode, some
2141 # features enabled by the CPU model may be omitted, because they can't be
2142 # implemented by a static CPU model definition (e.g. cache info passthrough and
2143 # PMU passthrough in x86). If you need an accurate representation of the
2144 # features enabled by a non-migration-safe CPU model, use @full. If you need a
2145 # static representation that will keep ABI compatibility even when changing QEMU
2146 # version or machine-type, use @static (but keep in mind that some features may
2151 { 'enum': 'CpuModelExpansionType',
2152 'data': [ 'static', 'full' ] }
2156 # @CpuModelExpansionInfo:
2158 # The result of a cpu model expansion.
2160 # @model: the expanded CpuModelInfo.
2164 { 'struct': 'CpuModelExpansionInfo',
2165 'data': { 'model': 'CpuModelInfo' } }
2169 # @query-cpu-model-expansion:
2171 # Expands a given CPU model (or a combination of CPU model + additional options)
2172 # to different granularities, allowing tooling to get an understanding what a
2173 # specific CPU model looks like in QEMU under a certain configuration.
2175 # This interface can be used to query the "host" CPU model.
2177 # The data returned by this command may be affected by:
2179 # * QEMU version: CPU models may look different depending on the QEMU version.
2180 # (Except for CPU models reported as "static" in query-cpu-definitions.)
2181 # * machine-type: CPU model may look different depending on the machine-type.
2182 # (Except for CPU models reported as "static" in query-cpu-definitions.)
2183 # * machine options (including accelerator): in some architectures, CPU models
2184 # may look different depending on machine and accelerator options. (Except for
2185 # CPU models reported as "static" in query-cpu-definitions.)
2186 # * "-cpu" arguments and global properties: arguments to the -cpu option and
2187 # global properties may affect expansion of CPU models. Using
2188 # query-cpu-model-expansion while using these is not advised.
2190 # Some architectures may not support all expansion types. s390x supports
2191 # "full" and "static".
2193 # Returns: a CpuModelExpansionInfo. Returns an error if expanding CPU models is
2194 # not supported, if the model cannot be expanded, if the model contains
2195 # an unknown CPU definition name, unknown properties or properties
2196 # with a wrong type. Also returns an error if an expansion type is
2201 { 'command': 'query-cpu-model-expansion',
2202 'data': { 'type': 'CpuModelExpansionType',
2203 'model': 'CpuModelInfo' },
2204 'returns': 'CpuModelExpansionInfo' }
2207 # @CpuModelCompareResult:
2209 # An enumeration of CPU model comparison results. The result is usually
2210 # calculated using e.g. CPU features or CPU generations.
2212 # @incompatible: If model A is incompatible to model B, model A is not
2213 # guaranteed to run where model B runs and the other way around.
2215 # @identical: If model A is identical to model B, model A is guaranteed to run
2216 # where model B runs and the other way around.
2218 # @superset: If model A is a superset of model B, model B is guaranteed to run
2219 # where model A runs. There are no guarantees about the other way.
2221 # @subset: If model A is a subset of model B, model A is guaranteed to run
2222 # where model B runs. There are no guarantees about the other way.
2226 { 'enum': 'CpuModelCompareResult',
2227 'data': [ 'incompatible', 'identical', 'superset', 'subset' ] }
2230 # @CpuModelCompareInfo:
2232 # The result of a CPU model comparison.
2234 # @result: The result of the compare operation.
2235 # @responsible-properties: List of properties that led to the comparison result
2236 # not being identical.
2238 # @responsible-properties is a list of QOM property names that led to
2239 # both CPUs not being detected as identical. For identical models, this
2241 # If a QOM property is read-only, that means there's no known way to make the
2242 # CPU models identical. If the special property name "type" is included, the
2243 # models are by definition not identical and cannot be made identical.
2247 { 'struct': 'CpuModelCompareInfo',
2248 'data': {'result': 'CpuModelCompareResult',
2249 'responsible-properties': ['str']
2254 # @query-cpu-model-comparison:
2256 # Compares two CPU models, returning how they compare in a specific
2257 # configuration. The results indicates how both models compare regarding
2258 # runnability. This result can be used by tooling to make decisions if a
2259 # certain CPU model will run in a certain configuration or if a compatible
2260 # CPU model has to be created by baselining.
2262 # Usually, a CPU model is compared against the maximum possible CPU model
2263 # of a certain configuration (e.g. the "host" model for KVM). If that CPU
2264 # model is identical or a subset, it will run in that configuration.
2266 # The result returned by this command may be affected by:
2268 # * QEMU version: CPU models may look different depending on the QEMU version.
2269 # (Except for CPU models reported as "static" in query-cpu-definitions.)
2270 # * machine-type: CPU model may look different depending on the machine-type.
2271 # (Except for CPU models reported as "static" in query-cpu-definitions.)
2272 # * machine options (including accelerator): in some architectures, CPU models
2273 # may look different depending on machine and accelerator options. (Except for
2274 # CPU models reported as "static" in query-cpu-definitions.)
2275 # * "-cpu" arguments and global properties: arguments to the -cpu option and
2276 # global properties may affect expansion of CPU models. Using
2277 # query-cpu-model-expansion while using these is not advised.
2279 # Some architectures may not support comparing CPU models. s390x supports
2280 # comparing CPU models.
2282 # Returns: a CpuModelBaselineInfo. Returns an error if comparing CPU models is
2283 # not supported, if a model cannot be used, if a model contains
2284 # an unknown cpu definition name, unknown properties or properties
2289 { 'command': 'query-cpu-model-comparison',
2290 'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' },
2291 'returns': 'CpuModelCompareInfo' }
2294 # @CpuModelBaselineInfo:
2296 # The result of a CPU model baseline.
2298 # @model: the baselined CpuModelInfo.
2302 { 'struct': 'CpuModelBaselineInfo',
2303 'data': { 'model': 'CpuModelInfo' } }
2306 # @query-cpu-model-baseline:
2308 # Baseline two CPU models, creating a compatible third model. The created
2309 # model will always be a static, migration-safe CPU model (see "static"
2310 # CPU model expansion for details).
2312 # This interface can be used by tooling to create a compatible CPU model out
2313 # two CPU models. The created CPU model will be identical to or a subset of
2314 # both CPU models when comparing them. Therefore, the created CPU model is
2315 # guaranteed to run where the given CPU models run.
2317 # The result returned by this command may be affected by:
2319 # * QEMU version: CPU models may look different depending on the QEMU version.
2320 # (Except for CPU models reported as "static" in query-cpu-definitions.)
2321 # * machine-type: CPU model may look different depending on the machine-type.
2322 # (Except for CPU models reported as "static" in query-cpu-definitions.)
2323 # * machine options (including accelerator): in some architectures, CPU models
2324 # may look different depending on machine and accelerator options. (Except for
2325 # CPU models reported as "static" in query-cpu-definitions.)
2326 # * "-cpu" arguments and global properties: arguments to the -cpu option and
2327 # global properties may affect expansion of CPU models. Using
2328 # query-cpu-model-expansion while using these is not advised.
2330 # Some architectures may not support baselining CPU models. s390x supports
2331 # baselining CPU models.
2333 # Returns: a CpuModelBaselineInfo. Returns an error if baselining CPU models is
2334 # not supported, if a model cannot be used, if a model contains
2335 # an unknown cpu definition name, unknown properties or properties
2340 { 'command': 'query-cpu-model-baseline',
2341 'data': { 'modela': 'CpuModelInfo',
2342 'modelb': 'CpuModelInfo' },
2343 'returns': 'CpuModelBaselineInfo' }
2348 # Information about a file descriptor that was added to an fd set.
2350 # @fdset-id: The ID of the fd set that @fd was added to.
2352 # @fd: The file descriptor that was received via SCM rights and
2353 # added to the fd set.
2357 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
2362 # Add a file descriptor, that was passed via SCM rights, to an fd set.
2364 # @fdset-id: The ID of the fd set to add the file descriptor to.
2366 # @opaque: A free-form string that can be used to describe the fd.
2368 # Returns: @AddfdInfo on success
2370 # If file descriptor was not received, FdNotSupplied
2372 # If @fdset-id is a negative value, InvalidParameterValue
2374 # Notes: The list of fd sets is shared by all monitor connections.
2376 # If @fdset-id is not specified, a new fd set will be created.
2382 # -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
2383 # <- { "return": { "fdset-id": 1, "fd": 3 } }
2386 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
2387 'returns': 'AddfdInfo' }
2392 # Remove a file descriptor from an fd set.
2394 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
2396 # @fd: The file descriptor that is to be removed.
2398 # Returns: Nothing on success
2399 # If @fdset-id or @fd is not found, FdNotFound
2403 # Notes: The list of fd sets is shared by all monitor connections.
2405 # If @fd is not specified, all file descriptors in @fdset-id
2410 # -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
2411 # <- { "return": {} }
2414 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
2419 # Information about a file descriptor that belongs to an fd set.
2421 # @fd: The file descriptor value.
2423 # @opaque: A free-form string that can be used to describe the fd.
2427 { 'struct': 'FdsetFdInfo',
2428 'data': {'fd': 'int', '*opaque': 'str'} }
2433 # Information about an fd set.
2435 # @fdset-id: The ID of the fd set.
2437 # @fds: A list of file descriptors that belong to this fd set.
2441 { 'struct': 'FdsetInfo',
2442 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
2447 # Return information describing all fd sets.
2449 # Returns: A list of @FdsetInfo
2453 # Note: The list of fd sets is shared by all monitor connections.
2457 # -> { "execute": "query-fdsets" }
2463 # "opaque": "rdonly:/path/to/file"
2467 # "opaque": "rdwr:/path/to/file"
2487 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
2492 # Information describing the QEMU target.
2494 # @arch: the target architecture
2498 { 'struct': 'TargetInfo',
2499 'data': { 'arch': 'SysEmuTarget' } }
2504 # Return information about the target for this QEMU
2506 # Returns: TargetInfo
2510 { 'command': 'query-target', 'returns': 'TargetInfo' }
2513 # @AcpiTableOptions:
2515 # Specify an ACPI table on the command line to load.
2517 # At most one of @file and @data can be specified. The list of files specified
2518 # by any one of them is loaded and concatenated in order. If both are omitted,
2521 # Other fields / optargs can be used to override fields of the generic ACPI
2522 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
2523 # Description Table Header. If a header field is not overridden, then the
2524 # corresponding value from the concatenated blob is used (in case of @file), or
2525 # it is filled in with a hard-coded value (in case of @data).
2527 # String fields are copied into the matching ACPI member from lowest address
2528 # upwards, and silently truncated / NUL-padded to length.
2530 # @sig: table signature / identifier (4 bytes)
2532 # @rev: table revision number (dependent on signature, 1 byte)
2534 # @oem_id: OEM identifier (6 bytes)
2536 # @oem_table_id: OEM table identifier (8 bytes)
2538 # @oem_rev: OEM-supplied revision number (4 bytes)
2540 # @asl_compiler_id: identifier of the utility that created the table
2543 # @asl_compiler_rev: revision number of the utility that created the
2546 # @file: colon (:) separated list of pathnames to load and
2547 # concatenate as table data. The resultant binary blob is expected to
2548 # have an ACPI table header. At least one file is required. This field
2551 # @data: colon (:) separated list of pathnames to load and
2552 # concatenate as table data. The resultant binary blob must not have an
2553 # ACPI table header. At least one file is required. This field excludes
2558 { 'struct': 'AcpiTableOptions',
2563 '*oem_table_id': 'str',
2564 '*oem_rev': 'uint32',
2565 '*asl_compiler_id': 'str',
2566 '*asl_compiler_rev': 'uint32',
2571 # @CommandLineParameterType:
2573 # Possible types for an option parameter.
2575 # @string: accepts a character string
2577 # @boolean: accepts "on" or "off"
2579 # @number: accepts a number
2581 # @size: accepts a number followed by an optional suffix (K)ilo,
2582 # (M)ega, (G)iga, (T)era
2586 { 'enum': 'CommandLineParameterType',
2587 'data': ['string', 'boolean', 'number', 'size'] }
2590 # @CommandLineParameterInfo:
2592 # Details about a single parameter of a command line option.
2594 # @name: parameter name
2596 # @type: parameter @CommandLineParameterType
2598 # @help: human readable text string, not suitable for parsing.
2600 # @default: default value string (since 2.1)
2604 { 'struct': 'CommandLineParameterInfo',
2605 'data': { 'name': 'str',
2606 'type': 'CommandLineParameterType',
2608 '*default': 'str' } }
2611 # @CommandLineOptionInfo:
2613 # Details about a command line option, including its list of parameter details
2615 # @option: option name
2617 # @parameters: an array of @CommandLineParameterInfo
2621 { 'struct': 'CommandLineOptionInfo',
2622 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
2625 # @query-command-line-options:
2627 # Query command line option schema.
2629 # @option: option name
2631 # Returns: list of @CommandLineOptionInfo for all options (or for the given
2632 # @option). Returns an error if the given @option doesn't exist.
2638 # -> { "execute": "query-command-line-options",
2639 # "arguments": { "option": "option-rom" } }
2644 # "name": "romfile",
2648 # "name": "bootindex",
2652 # "option": "option-rom"
2658 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
2659 'returns': ['CommandLineOptionInfo'] }
2662 # @X86CPURegister32:
2664 # A X86 32-bit register
2668 { 'enum': 'X86CPURegister32',
2669 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
2672 # @X86CPUFeatureWordInfo:
2674 # Information about a X86 CPU feature word
2676 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
2678 # @cpuid-input-ecx: Input ECX value for CPUID instruction for that
2681 # @cpuid-register: Output register containing the feature bits
2683 # @features: value of output register, containing the feature bits
2687 { 'struct': 'X86CPUFeatureWordInfo',
2688 'data': { 'cpuid-input-eax': 'int',
2689 '*cpuid-input-ecx': 'int',
2690 'cpuid-register': 'X86CPURegister32',
2691 'features': 'int' } }
2694 # @DummyForceArrays:
2696 # Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
2700 { 'struct': 'DummyForceArrays',
2701 'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
2707 # @node: NUMA nodes configuration
2709 # @dist: NUMA distance configuration (since 2.10)
2711 # @cpu: property based CPU(s) to node mapping (Since: 2.10)
2715 { 'enum': 'NumaOptionsType',
2716 'data': [ 'node', 'dist', 'cpu' ] }
2721 # A discriminated record of NUMA options. (for OptsVisitor)
2725 { 'union': 'NumaOptions',
2726 'base': { 'type': 'NumaOptionsType' },
2727 'discriminator': 'type',
2729 'node': 'NumaNodeOptions',
2730 'dist': 'NumaDistOptions',
2731 'cpu': 'NumaCpuOptions' }}
2736 # Create a guest NUMA node. (for OptsVisitor)
2738 # @nodeid: NUMA node ID (increase by 1 from 0 if omitted)
2740 # @cpus: VCPUs belonging to this node (assign VCPUS round-robin
2743 # @mem: memory size of this node; mutually exclusive with @memdev.
2744 # Equally divide total memory among nodes if both @mem and @memdev are
2747 # @memdev: memory backend object. If specified for one node,
2748 # it must be specified for all nodes.
2752 { 'struct': 'NumaNodeOptions',
2754 '*nodeid': 'uint16',
2755 '*cpus': ['uint16'],
2762 # Set the distance between 2 NUMA nodes.
2764 # @src: source NUMA node.
2766 # @dst: destination NUMA node.
2768 # @val: NUMA distance from source node to destination node.
2769 # When a node is unreachable from another node, set the distance
2770 # between them to 255.
2774 { 'struct': 'NumaDistOptions',
2783 # Option "-numa cpu" overrides default cpu to node mapping.
2784 # It accepts the same set of cpu properties as returned by
2785 # query-hotpluggable-cpus[].props, where node-id could be used to
2786 # override default node mapping.
2790 { 'struct': 'NumaCpuOptions',
2791 'base': 'CpuInstanceProperties',
2797 # Host memory policy types
2799 # @default: restore default policy, remove any nondefault policy
2801 # @preferred: set the preferred host nodes for allocation
2803 # @bind: a strict policy that restricts memory allocation to the
2804 # host nodes specified
2806 # @interleave: memory allocations are interleaved across the set
2807 # of host nodes specified
2811 { 'enum': 'HostMemPolicy',
2812 'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
2817 # Information about memory backend
2819 # @id: backend's ID if backend has 'id' property (since 2.9)
2821 # @size: memory backend size
2823 # @merge: enables or disables memory merge support
2825 # @dump: includes memory backend's memory in a core dump or not
2827 # @prealloc: enables or disables memory preallocation
2829 # @host-nodes: host nodes for its memory policy
2831 # @policy: memory policy of memory backend
2835 { 'struct': 'Memdev',
2842 'host-nodes': ['uint16'],
2843 'policy': 'HostMemPolicy' }}
2848 # Returns information for all memory backends.
2850 # Returns: a list of @Memdev.
2856 # -> { "execute": "query-memdev" }
2860 # "size": 536870912,
2863 # "prealloc": false,
2864 # "host-nodes": [0, 1],
2868 # "size": 536870912,
2872 # "host-nodes": [2, 3],
2873 # "policy": "preferred"
2879 { 'command': 'query-memdev', 'returns': ['Memdev'] }
2882 # @PCDIMMDeviceInfo:
2884 # PCDIMMDevice state information
2888 # @addr: physical address, where device is mapped
2890 # @size: size of memory that the device provides
2892 # @slot: slot number at which device is plugged in
2894 # @node: NUMA node number where device is plugged in
2896 # @memdev: memory backend linked with device
2898 # @hotplugged: true if device was hotplugged
2900 # @hotpluggable: true if device if could be added/removed while machine is running
2904 { 'struct': 'PCDIMMDeviceInfo',
2905 'data': { '*id': 'str',
2911 'hotplugged': 'bool',
2912 'hotpluggable': 'bool'
2917 # @MemoryDeviceInfo:
2919 # Union containing information about a memory device
2923 { 'union': 'MemoryDeviceInfo',
2924 'data': { 'dimm': 'PCDIMMDeviceInfo',
2925 'nvdimm': 'PCDIMMDeviceInfo'
2930 # @query-memory-devices:
2932 # Lists available memory devices and their state
2938 # -> { "execute": "query-memory-devices" }
2939 # <- { "return": [ { "data":
2940 # { "addr": 5368709120,
2941 # "hotpluggable": true,
2942 # "hotplugged": true,
2944 # "memdev": "/objects/memX",
2946 # "size": 1073741824,
2952 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
2955 # @MEM_UNPLUG_ERROR:
2957 # Emitted when memory hot unplug error occurs.
2959 # @device: device name
2961 # @msg: Informative message
2967 # <- { "event": "MEM_UNPLUG_ERROR"
2968 # "data": { "device": "dimm1",
2969 # "msg": "acpi: device unplug for unsupported device"
2971 # "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
2974 { 'event': 'MEM_UNPLUG_ERROR',
2975 'data': { 'device': 'str', 'msg': 'str' } }
2980 # @DIMM: memory slot
2981 # @CPU: logical CPU slot (since 2.7)
2983 { 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
2988 # OSPM Status Indication for a device
2989 # For description of possible values of @source and @status fields
2990 # see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
2992 # @device: device ID associated with slot
2994 # @slot: slot ID, unique per slot of a given @slot-type
2996 # @slot-type: type of the slot
2998 # @source: an integer containing the source event
3000 # @status: an integer containing the status code
3004 { 'struct': 'ACPIOSTInfo',
3005 'data' : { '*device': 'str',
3007 'slot-type': 'ACPISlotType',
3012 # @query-acpi-ospm-status:
3014 # Return a list of ACPIOSTInfo for devices that support status
3015 # reporting via ACPI _OST method.
3021 # -> { "execute": "query-acpi-ospm-status" }
3022 # <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
3023 # { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
3024 # { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
3025 # { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
3029 { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
3034 # Emitted when guest executes ACPI _OST method.
3036 # @info: OSPM Status Indication
3042 # <- { "event": "ACPI_DEVICE_OST",
3043 # "data": { "device": "d1", "slot": "0",
3044 # "slot-type": "DIMM", "source": 1, "status": 0 } }
3047 { 'event': 'ACPI_DEVICE_OST',
3048 'data': { 'info': 'ACPIOSTInfo' } }
3051 # @rtc-reset-reinjection:
3053 # This command will reset the RTC interrupt reinjection backlog.
3054 # Can be used if another mechanism to synchronize guest time
3055 # is in effect, for example QEMU guest agent's guest-set-time
3062 # -> { "execute": "rtc-reset-reinjection" }
3063 # <- { "return": {} }
3066 { 'command': 'rtc-reset-reinjection' }
3071 # Emitted when the guest changes the RTC time.
3073 # @offset: offset between base RTC clock (as specified by -rtc base), and
3074 # new RTC clock value
3076 # Note: This event is rate-limited.
3082 # <- { "event": "RTC_CHANGE",
3083 # "data": { "offset": 78 },
3084 # "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
3087 { 'event': 'RTC_CHANGE',
3088 'data': { 'offset': 'int' } }
3093 # Mode of the replay subsystem.
3095 # @none: normal execution mode. Replay or record are not enabled.
3097 # @record: record mode. All non-deterministic data is written into the
3100 # @play: replay mode. Non-deterministic data required for system execution
3101 # is read from the log.
3105 { 'enum': 'ReplayMode',
3106 'data': [ 'none', 'record', 'play' ] }
3109 # @xen-load-devices-state:
3111 # Load the state of all devices from file. The RAM and the block devices
3112 # of the VM are not loaded by this command.
3114 # @filename: the file to load the state of the devices from as binary
3115 # data. See xen-save-devices-state.txt for a description of the binary
3122 # -> { "execute": "xen-load-devices-state",
3123 # "arguments": { "filename": "/tmp/resume" } }
3124 # <- { "return": {} }
3127 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
3132 # The struct describes capability for a specific GIC (Generic
3133 # Interrupt Controller) version. These bits are not only decided by
3134 # QEMU/KVM software version, but also decided by the hardware that
3135 # the program is running upon.
3137 # @version: version of GIC to be described. Currently, only 2 and 3
3140 # @emulated: whether current QEMU/hardware supports emulated GIC
3141 # device in user space.
3143 # @kernel: whether current QEMU/hardware supports hardware
3144 # accelerated GIC device in kernel.
3148 { 'struct': 'GICCapability',
3149 'data': { 'version': 'int',
3151 'kernel': 'bool' } }
3154 # @query-gic-capabilities:
3156 # This command is ARM-only. It will return a list of GICCapability
3157 # objects that describe its capability bits.
3159 # Returns: a list of GICCapability objects.
3165 # -> { "execute": "query-gic-capabilities" }
3166 # <- { "return": [{ "version": 2, "emulated": true, "kernel": false },
3167 # { "version": 3, "emulated": false, "kernel": true } ] }
3170 { 'command': 'query-gic-capabilities', 'returns': ['GICCapability'] }
3173 # @CpuInstanceProperties:
3175 # List of properties to be used for hotplugging a CPU instance,
3176 # it should be passed by management with device_add command when
3177 # a CPU is being hotplugged.
3179 # @node-id: NUMA node ID the CPU belongs to
3180 # @socket-id: socket number within node/board the CPU belongs to
3181 # @core-id: core number within socket the CPU belongs to
3182 # @thread-id: thread number within core the CPU belongs to
3184 # Note: currently there are 4 properties that could be present
3185 # but management should be prepared to pass through other
3186 # properties with device_add command to allow for future
3187 # interface extension. This also requires the filed names to be kept in
3188 # sync with the properties passed to -device/device_add.
3192 { 'struct': 'CpuInstanceProperties',
3193 'data': { '*node-id': 'int',
3194 '*socket-id': 'int',
3203 # @type: CPU object type for usage with device_add command
3204 # @props: list of properties to be used for hotplugging CPU
3205 # @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides
3206 # @qom-path: link to existing CPU object if CPU is present or
3207 # omitted if CPU is not present.
3211 { 'struct': 'HotpluggableCPU',
3212 'data': { 'type': 'str',
3213 'vcpus-count': 'int',
3214 'props': 'CpuInstanceProperties',
3220 # @query-hotpluggable-cpus:
3222 # Returns: a list of HotpluggableCPU objects.
3228 # For pseries machine type started with -smp 2,cores=2,maxcpus=4 -cpu POWER8:
3230 # -> { "execute": "query-hotpluggable-cpus" }
3232 # { "props": { "core": 8 }, "type": "POWER8-spapr-cpu-core",
3233 # "vcpus-count": 1 },
3234 # { "props": { "core": 0 }, "type": "POWER8-spapr-cpu-core",
3235 # "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"}
3238 # For pc machine type started with -smp 1,maxcpus=2:
3240 # -> { "execute": "query-hotpluggable-cpus" }
3243 # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
3244 # "props": {"core-id": 0, "socket-id": 1, "thread-id": 0}
3247 # "qom-path": "/machine/unattached/device[0]",
3248 # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
3249 # "props": {"core-id": 0, "socket-id": 0, "thread-id": 0}
3253 # For s390x-virtio-ccw machine type started with -smp 1,maxcpus=2 -cpu qemu
3256 # -> { "execute": "query-hotpluggable-cpus" }
3259 # "type": "qemu-s390x-cpu", "vcpus-count": 1,
3260 # "props": { "core-id": 1 }
3263 # "qom-path": "/machine/unattached/device[0]",
3264 # "type": "qemu-s390x-cpu", "vcpus-count": 1,
3265 # "props": { "core-id": 0 }
3270 { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'] }
3277 # @guid: the globally unique identifier
3281 { 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
3284 # @query-vm-generation-id:
3286 # Show Virtual Machine Generation ID
3290 { 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }
3296 # An enumeration of SEV state information used during @query-sev.
3298 # @uninit: The guest is uninitialized.
3300 # @launch-update: The guest is currently being launched; plaintext data and
3301 # register state is being imported.
3303 # @launch-secret: The guest is currently being launched; ciphertext data
3304 # is being imported.
3306 # @running: The guest is fully launched or migrated in.
3308 # @send-update: The guest is currently being migrated out to another machine.
3310 # @receive-update: The guest is currently being migrated from another machine.
3314 { 'enum': 'SevState',
3315 'data': ['uninit', 'launch-update', 'launch-secret', 'running',
3316 'send-update', 'receive-update' ] }
3321 # Information about Secure Encrypted Virtualization (SEV) support
3323 # @enabled: true if SEV is active
3325 # @api-major: SEV API major version
3327 # @api-minor: SEV API minor version
3329 # @build-id: SEV FW build id
3331 # @policy: SEV policy value
3333 # @state: SEV guest state
3335 # @handle: SEV firmware handle
3339 { 'struct': 'SevInfo',
3340 'data': { 'enabled': 'bool',
3341 'api-major': 'uint8',
3342 'api-minor' : 'uint8',
3343 'build-id' : 'uint8',
3344 'policy' : 'uint32',
3345 'state' : 'SevState',
3353 # Returns information about SEV
3361 # -> { "execute": "query-sev" }
3362 # <- { "return": { "enabled": true, "api-major" : 0, "api-minor" : 0,
3363 # "build-id" : 0, "policy" : 0, "state" : "running",
3367 { 'command': 'query-sev', 'returns': 'SevInfo' }
3370 # @SevLaunchMeasureInfo:
3372 # SEV Guest Launch measurement information
3374 # @data: the measurement value encoded in base64
3379 { 'struct': 'SevLaunchMeasureInfo', 'data': {'data': 'str'} }
3382 # @query-sev-launch-measure:
3384 # Query the SEV guest launch information.
3386 # Returns: The @SevLaunchMeasureInfo for the guest
3392 # -> { "execute": "query-sev-launch-measure" }
3393 # <- { "return": { "data": "4l8LXeNlSPUDlXPJG5966/8%YZ" } }
3396 { 'command': 'query-sev-launch-measure', 'returns': 'SevLaunchMeasureInfo' }
3401 # The struct describes capability for a Secure Encrypted Virtualization
3404 # @pdh: Platform Diffie-Hellman key (base64 encoded)
3406 # @cert-chain: PDH certificate chain (base64 encoded)
3408 # @cbitpos: C-bit location in page table entry
3410 # @reduced-phys-bits: Number of physical Address bit reduction when SEV is
3415 { 'struct': 'SevCapability',
3416 'data': { 'pdh': 'str',
3417 'cert-chain': 'str',
3419 'reduced-phys-bits': 'int'} }
3422 # @query-sev-capabilities:
3424 # This command is used to get the SEV capabilities, and is supported on AMD
3425 # X86 platforms only.
3427 # Returns: SevCapability objects.
3433 # -> { "execute": "query-sev-capabilities" }
3434 # <- { "return": { "pdh": "8CCDD8DDD", "cert-chain": "888CCCDDDEE",
3435 # "cbitpos": 47, "reduced-phys-bits": 5}}
3438 { 'command': 'query-sev-capabilities', 'returns': 'SevCapability' }
3441 # @CommandDropReason:
3443 # Reasons that caused one command to be dropped.
3445 # @queue-full: the command queue is full. This can only occur when
3446 # the client sends a new non-oob command before the
3447 # response to the previous non-oob command has been
3452 { 'enum': 'CommandDropReason',
3453 'data': [ 'queue-full' ] }
3458 # Emitted when a command is dropped due to some reason. Commands can
3459 # only be dropped when the oob capability is enabled.
3461 # @id: The dropped command's "id" field.
3463 # @reason: The reason why the command is dropped.
3469 # { "event": "COMMAND_DROPPED",
3470 # "data": {"result": {"id": "libvirt-102",
3471 # "reason": "queue-full" } } }
3474 { 'event': 'COMMAND_DROPPED' ,
3475 'data': { 'id': 'any', 'reason': 'CommandDropReason' } }
3480 # Test OOB functionality. When sending this command with lock=true,
3481 # it'll try to hang the dispatcher. When sending it with lock=false,
3482 # it'll try to notify the locked thread to continue. Note: it should
3483 # only be used by QMP test program rather than anything else.
3489 # { "execute": "x-oob-test",
3490 # "arguments": { "lock": true } }
3492 { 'command': 'x-oob-test', 'data' : { 'lock': 'bool' },