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' ] },
41 'allow-preconfig': true }
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)
55 { 'enum': 'QMPCapability',
61 # A three-part version number.
63 # @major: The major version number.
65 # @minor: The minor version number.
67 # @micro: The micro version number.
71 { 'struct': 'VersionTriple',
72 'data': {'major': 'int', 'minor': 'int', 'micro': 'int'} }
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.
93 { 'struct': 'VersionInfo',
94 'data': {'qemu': 'VersionTriple', 'package': 'str'} }
99 # Returns the current version of QEMU.
101 # Returns: A @VersionInfo object describing the current version of QEMU.
107 # -> { "execute": "query-version" }
120 { 'command': 'query-version', 'returns': 'VersionInfo',
121 'allow-preconfig': true }
126 # Information about a QMP command
128 # @name: The command name
132 { 'struct': 'CommandInfo', 'data': {'name': 'str'} }
137 # Return a list of supported QMP commands by this server
139 # Returns: A list of @CommandInfo for all supported commands
145 # -> { "execute": "query-commands" }
149 # "name":"query-balloon"
152 # "name":"system_powerdown"
157 # Note: This example has been shortened as the real response is too long.
160 { 'command': 'query-commands', 'returns': ['CommandInfo'],
161 'allow-preconfig': true }
166 # Policy for handling lost ticks in timer devices.
168 # @discard: throw away the missed tick(s) and continue with future injection
169 # normally. Guest time may be delayed, unless the OS has explicit
170 # handling of lost ticks
172 # @delay: continue to deliver ticks at the normal rate. Guest time will be
173 # delayed due to the late tick
175 # @merge: merge the missed tick(s) into one tick and inject. Guest time
176 # may be delayed, depending on how the OS reacts to the merging
179 # @slew: deliver ticks at a higher rate to catch up with the missed tick. The
180 # guest time should not be delayed once catchup is complete.
184 { 'enum': 'LostTickPolicy',
185 'data': ['discard', 'delay', 'merge', 'slew' ] }
190 # Allow client connections for VNC, Spice and socket based
191 # character devices to be passed in to QEMU via SCM_RIGHTS.
193 # @protocol: protocol name. Valid names are "vnc", "spice" or the
194 # name of a character device (eg. from -chardev id=XXXX)
196 # @fdname: file descriptor name previously passed via 'getfd' command
198 # @skipauth: whether to skip authentication. Only applies
199 # to "vnc" and "spice" protocols
201 # @tls: whether to perform TLS. Only applies to the "spice"
204 # Returns: nothing on success.
210 # -> { "execute": "add_client", "arguments": { "protocol": "vnc",
211 # "fdname": "myclient" } }
212 # <- { "return": {} }
215 { 'command': 'add_client',
216 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
222 # Guest name information.
224 # @name: The name of the guest
228 { 'struct': 'NameInfo', 'data': {'*name': 'str'} }
233 # Return the name information of a guest.
235 # Returns: @NameInfo of the guest
241 # -> { "execute": "query-name" }
242 # <- { "return": { "name": "qemu-name" } }
245 { 'command': 'query-name', 'returns': 'NameInfo', 'allow-preconfig': true }
250 # Information about support for KVM acceleration
252 # @enabled: true if KVM acceleration is active
254 # @present: true if KVM acceleration is built into this executable
258 { 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
263 # Returns information about KVM acceleration
271 # -> { "execute": "query-kvm" }
272 # <- { "return": { "enabled": true, "present": true } }
275 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
280 # Guest UUID information (Universally Unique Identifier).
282 # @UUID: the UUID of the guest
286 # Notes: If no UUID was specified for the guest, a null UUID is returned.
288 { 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
293 # Query the guest UUID information.
295 # Returns: The @UuidInfo for the guest
301 # -> { "execute": "query-uuid" }
302 # <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
305 { 'command': 'query-uuid', 'returns': 'UuidInfo', 'allow-preconfig': true }
310 # Information about a QMP event
312 # @name: The event name
316 { 'struct': 'EventInfo', 'data': {'name': 'str'} }
321 # Return a list of supported QMP events by this server
323 # Returns: A list of @EventInfo for all supported events
329 # -> { "execute": "query-events" }
341 # Note: This example has been shortened as the real response is too long.
344 { 'command': 'query-events', 'returns': ['EventInfo'] }
349 # An enumeration of cpu types that enable additional information during
350 # @query-cpus and @query-cpus-fast.
358 { 'enum': 'CpuInfoArch',
359 'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 's390', 'riscv', 'other' ] }
364 # Information about a virtual CPU
366 # @CPU: the index of the virtual CPU
368 # @current: this only exists for backwards compatibility and should be ignored
370 # @halted: true if the virtual CPU is in the halt state. Halt usually refers
371 # to a processor specific low power mode.
373 # @qom_path: path to the CPU object in the QOM tree (since 2.4)
375 # @thread_id: ID of the underlying host thread
377 # @props: properties describing to which node/socket/core/thread
378 # virtual CPU belongs to, provided if supported by board (since 2.10)
380 # @arch: architecture of the cpu, which determines which additional fields
381 # will be listed (since 2.6)
385 # Notes: @halted is a transient state that changes frequently. By the time the
386 # data is sent to the client, the guest may no longer be halted.
388 { 'union': 'CpuInfo',
389 'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool',
390 'qom_path': 'str', 'thread_id': 'int',
391 '*props': 'CpuInstanceProperties', 'arch': 'CpuInfoArch' },
392 'discriminator': 'arch',
393 'data': { 'x86': 'CpuInfoX86',
394 'sparc': 'CpuInfoSPARC',
396 'mips': 'CpuInfoMIPS',
397 'tricore': 'CpuInfoTricore',
398 's390': 'CpuInfoS390',
399 'riscv': 'CpuInfoRISCV' } }
404 # Additional information about a virtual i386 or x86_64 CPU
406 # @pc: the 64-bit instruction pointer
410 { 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } }
415 # Additional information about a virtual SPARC CPU
417 # @pc: the PC component of the instruction pointer
419 # @npc: the NPC component of the instruction pointer
423 { 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } }
428 # Additional information about a virtual PPC CPU
430 # @nip: the instruction pointer
434 { 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } }
439 # Additional information about a virtual MIPS CPU
441 # @PC: the instruction pointer
445 { 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } }
450 # Additional information about a virtual Tricore CPU
452 # @PC: the instruction pointer
456 { 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } }
461 # Additional information about a virtual RISCV CPU
463 # @pc: the instruction pointer
467 { 'struct': 'CpuInfoRISCV', 'data': { 'pc': 'int' } }
472 # An enumeration of cpu states that can be assumed by a virtual
477 { 'enum': 'CpuS390State',
478 'prefix': 'S390_CPU_STATE',
479 'data': [ 'uninitialized', 'stopped', 'check-stop', 'operating', 'load' ] }
484 # Additional information about a virtual S390 CPU
486 # @cpu-state: the virtual CPU's state
490 { 'struct': 'CpuInfoS390', 'data': { 'cpu-state': 'CpuS390State' } }
495 # Returns a list of information about each virtual CPU.
497 # This command causes vCPU threads to exit to userspace, which causes
498 # a small interruption to guest CPU execution. This will have a negative
499 # impact on realtime guests and other latency sensitive guest workloads.
500 # It is recommended to use @query-cpus-fast instead of this command to
501 # avoid the vCPU interruption.
503 # Returns: a list of @CpuInfo for each virtual CPU
509 # -> { "execute": "query-cpus" }
515 # "qom_path":"/machine/unattached/device[0]",
524 # "qom_path":"/machine/unattached/device[2]",
532 # Notes: This interface is deprecated (since 2.12.0), and it is strongly
533 # recommended that you avoid using it. Use @query-cpus-fast to
534 # obtain information about virtual CPUs.
537 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
542 # Information about a virtual CPU
544 # @cpu-index: index of the virtual CPU
546 # @qom-path: path to the CPU object in the QOM tree
548 # @thread-id: ID of the underlying host thread
550 # @props: properties describing to which node/socket/core/thread
551 # virtual CPU belongs to, provided if supported by board
553 # @arch: base architecture of the cpu; deprecated since 3.0.0 in favor
556 # @target: the QEMU system emulation target, which determines which
557 # additional fields will be listed (since 3.0)
562 { 'union' : 'CpuInfoFast',
563 'base' : { 'cpu-index' : 'int',
566 '*props' : 'CpuInstanceProperties',
567 'arch' : 'CpuInfoArch',
568 'target' : 'SysEmuTarget' },
569 'discriminator' : 'target',
570 'data' : { 's390x' : 'CpuInfoS390' } }
575 # Returns information about all virtual CPUs. This command does not
576 # incur a performance penalty and should be used in production
577 # instead of query-cpus.
579 # Returns: list of @CpuInfoFast
585 # -> { "execute": "query-cpus-fast" }
588 # "thread-id": 25627,
594 # "qom-path": "/machine/unattached/device[0]",
600 # "thread-id": 25628,
606 # "qom-path": "/machine/unattached/device[2]",
614 { 'command': 'query-cpus-fast', 'returns': [ 'CpuInfoFast' ] }
619 # Information about an iothread
621 # @id: the identifier of the iothread
623 # @thread-id: ID of the underlying host thread
625 # @poll-max-ns: maximum polling time in ns, 0 means polling is disabled
628 # @poll-grow: how many ns will be added to polling time, 0 means that it's not
629 # configured (since 2.9)
631 # @poll-shrink: how many ns will be removed from polling time, 0 means that
632 # it's not configured (since 2.9)
636 { 'struct': 'IOThreadInfo',
637 'data': {'id': 'str',
639 'poll-max-ns': 'int',
641 'poll-shrink': 'int' } }
646 # Returns a list of information about each iothread.
648 # Note: this list excludes the QEMU main loop thread, which is not declared
649 # using the -object iothread command-line option. It is always the main thread
652 # Returns: a list of @IOThreadInfo for each iothread
658 # -> { "execute": "query-iothreads" }
672 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'],
673 'allow-preconfig': true }
678 # Information about the guest balloon device.
680 # @actual: the number of bytes the balloon currently contains
685 { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
690 # Return information about the balloon device.
692 # Returns: @BalloonInfo on success
694 # If the balloon driver is enabled but not functional because the KVM
695 # kernel module cannot support it, KvmMissingCap
697 # If no balloon device is present, DeviceNotActive
703 # -> { "execute": "query-balloon" }
705 # "actual": 1073741824,
710 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
715 # Emitted when the guest changes the actual BALLOON level. This value is
716 # equivalent to the @actual field return by the 'query-balloon' command
718 # @actual: actual level of the guest memory balloon in bytes
720 # Note: this event is rate-limited.
726 # <- { "event": "BALLOON_CHANGE",
727 # "data": { "actual": 944766976 },
728 # "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
731 { 'event': 'BALLOON_CHANGE',
732 'data': { 'actual': 'int' } }
737 # A PCI device memory region
739 # @base: the starting address (guest physical)
741 # @limit: the ending address (guest physical)
745 { 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
750 # Information about a PCI device I/O region.
752 # @bar: the index of the Base Address Register for this region
754 # @type: 'io' if the region is a PIO region
755 # 'memory' if the region is a MMIO region
759 # @prefetch: if @type is 'memory', true if the memory is prefetchable
761 # @mem_type_64: if @type is 'memory', true if the BAR is 64-bit
765 { 'struct': 'PciMemoryRegion',
766 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
767 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
772 # Information about a bus of a PCI Bridge device
774 # @number: primary bus interface number. This should be the number of the
775 # bus the device resides on.
777 # @secondary: secondary bus interface number. This is the number of the
778 # main bus for the bridge
780 # @subordinate: This is the highest number bus that resides below the
783 # @io_range: The PIO range for all devices on this bridge
785 # @memory_range: The MMIO range for all devices on this bridge
787 # @prefetchable_range: The range of prefetchable MMIO for all devices on
792 { 'struct': 'PciBusInfo',
793 'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
794 'io_range': 'PciMemoryRange',
795 'memory_range': 'PciMemoryRange',
796 'prefetchable_range': 'PciMemoryRange' } }
801 # Information about a PCI Bridge device
803 # @bus: information about the bus the device resides on
805 # @devices: a list of @PciDeviceInfo for each device on this bridge
809 { 'struct': 'PciBridgeInfo',
810 'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
815 # Information about the Class of a PCI device
817 # @desc: a string description of the device's class
819 # @class: the class code of the device
823 { 'struct': 'PciDeviceClass',
824 'data': {'*desc': 'str', 'class': 'int'} }
829 # Information about the Id of a PCI device
831 # @device: the PCI device id
833 # @vendor: the PCI vendor id
835 # @subsystem: the PCI subsystem id (since 3.1)
837 # @subsystem-vendor: the PCI subsystem vendor id (since 3.1)
841 { 'struct': 'PciDeviceId',
842 'data': {'device': 'int', 'vendor': 'int', '*subsystem': 'int',
843 '*subsystem-vendor': 'int'} }
848 # Information about a PCI device
850 # @bus: the bus number of the device
852 # @slot: the slot the device is located in
854 # @function: the function of the slot used by the device
856 # @class_info: the class of the device
858 # @id: the PCI device id
860 # @irq: if an IRQ is assigned to the device, the IRQ number
862 # @qdev_id: the device name of the PCI device
864 # @pci_bridge: if the device is a PCI bridge, the bridge information
866 # @regions: a list of the PCI I/O regions associated with the device
868 # Notes: the contents of @class_info.desc are not stable and should only be
869 # treated as informational.
873 { 'struct': 'PciDeviceInfo',
874 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
875 'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
876 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
877 'regions': ['PciMemoryRegion']} }
882 # Information about a PCI bus
884 # @bus: the bus index
886 # @devices: a list of devices on this bus
890 { 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
895 # Return information about the PCI bus topology of the guest.
897 # Returns: a list of @PciInfo for each PCI bus. Each bus is
898 # represented by a json-object, which has a key with a json-array of
899 # all PCI devices attached to it. Each device is represented by a
906 # -> { "execute": "query-pci" }
917 # "desc": "Host bridge"
933 # "desc": "ISA bridge"
949 # "desc": "IDE controller"
971 # "desc": "VGA controller"
981 # "mem_type_64": false,
984 # "address": 4026531840,
989 # "mem_type_64": false,
992 # "address": 4060086272,
997 # "mem_type_64": false,
1012 # "desc": "RAM controller"
1033 # Note: This example has been shortened as the real response is too long.
1036 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1041 # This command will cause the QEMU process to exit gracefully. While every
1042 # attempt is made to send the QMP response before terminating, this is not
1043 # guaranteed. When using this interface, a premature EOF would not be
1050 # -> { "execute": "quit" }
1051 # <- { "return": {} }
1053 { 'command': 'quit' }
1058 # Stop all guest VCPU execution.
1062 # Notes: This function will succeed even if the guest is already in the stopped
1063 # state. In "inmigrate" state, it will ensure that the guest
1064 # remains paused once migration finishes, as if the -S option was
1065 # passed on the command line.
1069 # -> { "execute": "stop" }
1070 # <- { "return": {} }
1073 { 'command': 'stop' }
1078 # Performs a hard reset of a guest.
1084 # -> { "execute": "system_reset" }
1085 # <- { "return": {} }
1088 { 'command': 'system_reset' }
1091 # @system_powerdown:
1093 # Requests that a guest perform a powerdown operation.
1097 # Notes: A guest may or may not respond to this command. This command
1098 # returning does not indicate that a guest has accepted the request or
1099 # that it has shut down. Many guests will respond to this command by
1100 # prompting the user in some way.
1103 # -> { "execute": "system_powerdown" }
1104 # <- { "return": {} }
1107 { 'command': 'system_powerdown' }
1112 # Adds CPU with specified ID.
1114 # @id: ID of CPU to be created, valid values [0..max_cpus)
1116 # Returns: Nothing on success
1120 # Note: This command is deprecated. The `device_add` command should be
1121 # used instead. See the `query-hotpluggable-cpus` command for
1126 # -> { "execute": "cpu-add", "arguments": { "id": 2 } }
1127 # <- { "return": {} }
1130 { 'command': 'cpu-add', 'data': {'id': 'int'} }
1135 # Save a portion of guest memory to a file.
1137 # @val: the virtual address of the guest to start from
1139 # @size: the size of memory region to save
1141 # @filename: the file to save the memory to as binary data
1143 # @cpu-index: the index of the virtual CPU to use for translating the
1144 # virtual address (defaults to CPU 0)
1146 # Returns: Nothing on success
1150 # Notes: Errors were not reliably returned until 1.1
1154 # -> { "execute": "memsave",
1155 # "arguments": { "val": 10,
1157 # "filename": "/tmp/virtual-mem-dump" } }
1158 # <- { "return": {} }
1161 { 'command': 'memsave',
1162 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1167 # Save a portion of guest physical memory to a file.
1169 # @val: the physical address of the guest to start from
1171 # @size: the size of memory region to save
1173 # @filename: the file to save the memory to as binary data
1175 # Returns: Nothing on success
1179 # Notes: Errors were not reliably returned until 1.1
1183 # -> { "execute": "pmemsave",
1184 # "arguments": { "val": 10,
1186 # "filename": "/tmp/physical-mem-dump" } }
1187 # <- { "return": {} }
1190 { 'command': 'pmemsave',
1191 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1196 # Resume guest VCPU execution.
1200 # Returns: If successful, nothing
1202 # Notes: This command will succeed if the guest is currently running. It
1203 # will also succeed if the guest is in the "inmigrate" state; in
1204 # this case, the effect of the command is to make sure the guest
1205 # starts once migration finishes, removing the effect of the -S
1206 # command line option if it was passed.
1210 # -> { "execute": "cont" }
1211 # <- { "return": {} }
1214 { 'command': 'cont' }
1217 # @x-exit-preconfig:
1219 # Exit from "preconfig" state
1221 # This command makes QEMU exit the preconfig state and proceed with
1222 # VM initialization using configuration data provided on the command line
1223 # and via the QMP monitor during the preconfig state. The command is only
1224 # available during the preconfig state (i.e. when the --preconfig command
1225 # line option was in use).
1233 # -> { "execute": "x-exit-preconfig" }
1234 # <- { "return": {} }
1237 { 'command': 'x-exit-preconfig', 'allow-preconfig': true }
1242 # Wake up guest from suspend. If the guest has wake-up from suspend
1243 # support enabled (wakeup-suspend-support flag from
1244 # query-current-machine), wake-up guest from suspend if the guest is
1245 # in SUSPENDED state. Return an error otherwise.
1251 # Note: prior to 4.0, this command does nothing in case the guest
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' ],
1387 'allow-preconfig': true }
1392 # This command will get a property from a object model path and return the
1395 # @path: The path within the object model. There are two forms of supported
1396 # paths--absolute and partial paths.
1398 # Absolute paths are derived from the root object and can follow child<>
1399 # or link<> properties. Since they can follow link<> properties, they
1400 # can be arbitrarily long. Absolute paths look like absolute filenames
1401 # and are prefixed with a leading slash.
1403 # Partial paths look like relative filenames. They do not begin
1404 # with a prefix. The matching rules for partial paths are subtle but
1405 # designed to make specifying objects easy. At each level of the
1406 # composition tree, the partial path is matched as an absolute path.
1407 # The first match is not returned. At least two matches are searched
1408 # for. A successful result is only returned if only one match is
1409 # found. If more than one match is found, a flag is return to
1410 # indicate that the match was ambiguous.
1412 # @property: The property name to read
1414 # Returns: The property value. The type depends on the property
1415 # type. child<> and link<> properties are returned as #str
1416 # pathnames. All integer property types (u8, u16, etc) are
1421 { 'command': 'qom-get',
1422 'data': { 'path': 'str', 'property': 'str' },
1424 'allow-preconfig': true }
1429 # This command will set a property from a object model path.
1431 # @path: see @qom-get for a description of this parameter
1433 # @property: the property name to set
1435 # @value: a value who's type is appropriate for the property type. See @qom-get
1436 # for a description of type mapping.
1440 { 'command': 'qom-set',
1441 'data': { 'path': 'str', 'property': 'str', 'value': 'any' },
1442 'allow-preconfig': true }
1447 # This command is multiple commands multiplexed together.
1449 # @device: This is normally the name of a block device but it may also be 'vnc'.
1450 # when it's 'vnc', then sub command depends on @target
1452 # @target: If @device is a block device, then this is the new filename.
1453 # If @device is 'vnc', then if the value 'password' selects the vnc
1454 # change password command. Otherwise, this specifies a new server URI
1455 # address to listen to for VNC connections.
1457 # @arg: If @device is a block device, then this is an optional format to open
1459 # If @device is 'vnc' and @target is 'password', this is the new VNC
1460 # password to set. See change-vnc-password for additional notes.
1462 # Returns: Nothing on success.
1463 # If @device is not a valid block device, DeviceNotFound
1465 # Notes: This interface is deprecated, and it is strongly recommended that you
1466 # avoid using it. For changing block devices, use
1467 # blockdev-change-medium; for changing VNC parameters, use
1468 # change-vnc-password.
1474 # 1. Change a removable medium
1476 # -> { "execute": "change",
1477 # "arguments": { "device": "ide1-cd0",
1478 # "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } }
1479 # <- { "return": {} }
1481 # 2. Change VNC password
1483 # -> { "execute": "change",
1484 # "arguments": { "device": "vnc", "target": "password",
1485 # "arg": "foobar1" } }
1486 # <- { "return": {} }
1489 { 'command': 'change',
1490 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
1495 # This structure describes a search result from @qom-list-types
1497 # @name: the type name found in the search
1499 # @abstract: the type is abstract and can't be directly instantiated.
1500 # Omitted if false. (since 2.10)
1502 # @parent: Name of parent type, if any (since 2.10)
1506 { 'struct': 'ObjectTypeInfo',
1507 'data': { 'name': 'str', '*abstract': 'bool', '*parent': 'str' } }
1512 # This command will return a list of types given search parameters
1514 # @implements: if specified, only return types that implement this type name
1516 # @abstract: if true, include abstract types in the results
1518 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
1522 { 'command': 'qom-list-types',
1523 'data': { '*implements': 'str', '*abstract': 'bool' },
1524 'returns': [ 'ObjectTypeInfo' ],
1525 'allow-preconfig': true }
1528 # @device-list-properties:
1530 # List properties associated with a device.
1532 # @typename: the type name of a device
1534 # Returns: a list of ObjectPropertyInfo describing a devices properties
1536 # Note: objects can create properties at runtime, for example to describe
1537 # links between different devices and/or objects. These properties
1538 # are not included in the output of this command.
1542 { 'command': 'device-list-properties',
1543 'data': { 'typename': 'str'},
1544 'returns': [ 'ObjectPropertyInfo' ] }
1547 # @qom-list-properties:
1549 # List properties associated with a QOM object.
1551 # @typename: the type name of an object
1553 # Note: objects can create properties at runtime, for example to describe
1554 # links between different devices and/or objects. These properties
1555 # are not included in the output of this command.
1557 # Returns: a list of ObjectPropertyInfo describing object properties
1561 { 'command': 'qom-list-properties',
1562 'data': { 'typename': 'str'},
1563 'returns': [ 'ObjectPropertyInfo' ],
1564 'allow-preconfig': true }
1567 # @xen-set-global-dirty-log:
1569 # Enable or disable the global dirty log mode.
1571 # @enable: true to enable, false to disable.
1579 # -> { "execute": "xen-set-global-dirty-log",
1580 # "arguments": { "enable": true } }
1581 # <- { "return": {} }
1584 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
1589 # @driver: the name of the new device's driver
1591 # @bus: the device's parent bus (device tree path)
1593 # @id: the device's ID, must be unique
1595 # Additional arguments depend on the type.
1600 # 1. For detailed information about this command, please refer to the
1601 # 'docs/qdev-device-use.txt' file.
1603 # 2. It's possible to list device properties by running QEMU with the
1604 # "-device DEVICE,help" command-line argument, where DEVICE is the
1609 # -> { "execute": "device_add",
1610 # "arguments": { "driver": "e1000", "id": "net1",
1612 # "mac": "52:54:00:12:34:56" } }
1613 # <- { "return": {} }
1615 # TODO: This command effectively bypasses QAPI completely due to its
1616 # "additional arguments" business. It shouldn't have been added to
1617 # the schema in this form. It should be qapified properly, or
1618 # replaced by a properly qapified command.
1622 { 'command': 'device_add',
1623 'data': {'driver': 'str', '*bus': 'str', '*id': 'str'},
1624 'gen': false } # so we can get the additional arguments
1629 # Remove a device from a guest
1631 # @id: the device's ID or QOM path
1633 # Returns: Nothing on success
1634 # If @id is not a valid device, DeviceNotFound
1636 # Notes: When this command completes, the device may not be removed from the
1637 # guest. Hot removal is an operation that requires guest cooperation.
1638 # This command merely requests that the guest begin the hot removal
1639 # process. Completion of the device removal process is signaled with a
1640 # DEVICE_DELETED event. Guest reset will automatically complete removal
1647 # -> { "execute": "device_del",
1648 # "arguments": { "id": "net1" } }
1649 # <- { "return": {} }
1651 # -> { "execute": "device_del",
1652 # "arguments": { "id": "/machine/peripheral-anon/device[0]" } }
1653 # <- { "return": {} }
1656 { 'command': 'device_del', 'data': {'id': 'str'} }
1661 # Emitted whenever the device removal completion is acknowledged by the guest.
1662 # At this point, it's safe to reuse the specified device ID. Device removal can
1663 # be initiated by the guest or by HMP/QMP commands.
1665 # @device: device name
1667 # @path: device path
1673 # <- { "event": "DEVICE_DELETED",
1674 # "data": { "device": "virtio-net-pci-0",
1675 # "path": "/machine/peripheral/virtio-net-pci-0" },
1676 # "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
1679 { 'event': 'DEVICE_DELETED',
1680 'data': { '*device': 'str', 'path': 'str' } }
1683 # @DumpGuestMemoryFormat:
1685 # An enumeration of guest-memory-dump's format.
1689 # @kdump-zlib: kdump-compressed format with zlib-compressed
1691 # @kdump-lzo: kdump-compressed format with lzo-compressed
1693 # @kdump-snappy: kdump-compressed format with snappy-compressed
1695 # @win-dmp: Windows full crashdump format,
1696 # can be used instead of ELF converting (since 2.13)
1700 { 'enum': 'DumpGuestMemoryFormat',
1701 'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy', 'win-dmp' ] }
1704 # @dump-guest-memory:
1706 # Dump guest's memory to vmcore. It is a synchronous operation that can take
1707 # very long depending on the amount of guest memory.
1709 # @paging: if true, do paging to get guest's memory mapping. This allows
1710 # using gdb to process the core file.
1712 # IMPORTANT: this option can make QEMU allocate several gigabytes
1713 # of RAM. This can happen for a large guest, or a
1714 # malicious guest pretending to be large.
1716 # Also, paging=true has the following limitations:
1718 # 1. The guest may be in a catastrophic state or can have corrupted
1719 # memory, which cannot be trusted
1720 # 2. The guest can be in real-mode even if paging is enabled. For
1721 # example, the guest uses ACPI to sleep, and ACPI sleep state
1723 # 3. Currently only supported on i386 and x86_64.
1725 # @protocol: the filename or file descriptor of the vmcore. The supported
1728 # 1. file: the protocol starts with "file:", and the following
1729 # string is the file's path.
1730 # 2. fd: the protocol starts with "fd:", and the following string
1733 # @detach: if true, QMP will return immediately rather than
1734 # waiting for the dump to finish. The user can track progress
1735 # using "query-dump". (since 2.6).
1737 # @begin: if specified, the starting physical address.
1739 # @length: if specified, the memory size, in bytes. If you don't
1740 # want to dump all guest's memory, please specify the start @begin
1743 # @format: if specified, the format of guest memory dump. But non-elf
1744 # format is conflict with paging and filter, ie. @paging, @begin and
1745 # @length is not allowed to be specified with non-elf @format at the
1746 # same time (since 2.0)
1748 # Note: All boolean arguments default to false
1750 # Returns: nothing on success
1756 # -> { "execute": "dump-guest-memory",
1757 # "arguments": { "protocol": "fd:dump" } }
1758 # <- { "return": {} }
1761 { 'command': 'dump-guest-memory',
1762 'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool',
1763 '*begin': 'int', '*length': 'int',
1764 '*format': 'DumpGuestMemoryFormat'} }
1769 # Describe the status of a long-running background guest memory dump.
1771 # @none: no dump-guest-memory has started yet.
1773 # @active: there is one dump running in background.
1775 # @completed: the last dump has finished successfully.
1777 # @failed: the last dump has failed.
1781 { 'enum': 'DumpStatus',
1782 'data': [ 'none', 'active', 'completed', 'failed' ] }
1787 # The result format for 'query-dump'.
1789 # @status: enum of @DumpStatus, which shows current dump status
1791 # @completed: bytes written in latest dump (uncompressed)
1793 # @total: total bytes to be written in latest dump (uncompressed)
1797 { 'struct': 'DumpQueryResult',
1798 'data': { 'status': 'DumpStatus',
1805 # Query latest dump status.
1807 # Returns: A @DumpStatus object showing the dump status.
1813 # -> { "execute": "query-dump" }
1814 # <- { "return": { "status": "active", "completed": 1024000,
1815 # "total": 2048000 } }
1818 { 'command': 'query-dump', 'returns': 'DumpQueryResult' }
1823 # Emitted when background dump has completed
1825 # @result: final dump status
1827 # @error: human-readable error string that provides
1828 # hint on why dump failed. Only presents on failure. The
1829 # user should not try to interpret the error string.
1835 # { "event": "DUMP_COMPLETED",
1836 # "data": {"result": {"total": 1090650112, "status": "completed",
1837 # "completed": 1090650112} } }
1840 { 'event': 'DUMP_COMPLETED' ,
1841 'data': { 'result': 'DumpQueryResult', '*error': 'str' } }
1844 # @DumpGuestMemoryCapability:
1846 # A list of the available formats for dump-guest-memory
1850 { 'struct': 'DumpGuestMemoryCapability',
1852 'formats': ['DumpGuestMemoryFormat'] } }
1855 # @query-dump-guest-memory-capability:
1857 # Returns the available formats for dump-guest-memory
1859 # Returns: A @DumpGuestMemoryCapability object listing available formats for
1866 # -> { "execute": "query-dump-guest-memory-capability" }
1867 # <- { "return": { "formats":
1868 # ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] }
1871 { 'command': 'query-dump-guest-memory-capability',
1872 'returns': 'DumpGuestMemoryCapability' }
1877 # Dump guest's storage keys
1879 # @filename: the path to the file to dump to
1881 # This command is only supported on s390 architecture.
1887 # -> { "execute": "dump-skeys",
1888 # "arguments": { "filename": "/tmp/skeys" } }
1889 # <- { "return": {} }
1892 { 'command': 'dump-skeys',
1893 'data': { 'filename': 'str' } }
1898 # Create a QOM object.
1900 # @qom-type: the class name for the object to be created
1902 # @id: the name of the new object
1904 # @props: a dictionary of properties to be passed to the backend
1906 # Returns: Nothing on success
1907 # Error if @qom-type is not a valid class name
1913 # -> { "execute": "object-add",
1914 # "arguments": { "qom-type": "rng-random", "id": "rng1",
1915 # "props": { "filename": "/dev/hwrng" } } }
1916 # <- { "return": {} }
1919 { 'command': 'object-add',
1920 'data': {'qom-type': 'str', 'id': 'str', '*props': 'any'} }
1925 # Remove a QOM object.
1927 # @id: the name of the QOM object to remove
1929 # Returns: Nothing on success
1930 # Error if @id is not a valid id for a QOM object
1936 # -> { "execute": "object-del", "arguments": { "id": "rng1" } }
1937 # <- { "return": {} }
1940 { 'command': 'object-del', 'data': {'id': 'str'} }
1945 # Receive a file descriptor via SCM rights and assign it a name
1947 # @fdname: file descriptor name
1949 # Returns: Nothing on success
1953 # Notes: If @fdname already exists, the file descriptor assigned to
1954 # it will be closed and replaced by the received file
1957 # The 'closefd' command can be used to explicitly close the
1958 # file descriptor when it is no longer needed.
1962 # -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
1963 # <- { "return": {} }
1966 { 'command': 'getfd', 'data': {'fdname': 'str'} }
1971 # Close a file descriptor previously passed via SCM rights
1973 # @fdname: file descriptor name
1975 # Returns: Nothing on success
1981 # -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
1982 # <- { "return": {} }
1985 { 'command': 'closefd', 'data': {'fdname': 'str'} }
1990 # Information describing a machine.
1992 # @name: the name of the machine
1994 # @alias: an alias for the machine name
1996 # @is-default: whether the machine is default
1998 # @cpu-max: maximum number of CPUs supported by the machine type
2001 # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
2005 { 'struct': 'MachineInfo',
2006 'data': { 'name': 'str', '*alias': 'str',
2007 '*is-default': 'bool', 'cpu-max': 'int',
2008 'hotpluggable-cpus': 'bool'} }
2013 # Return a list of supported machines
2015 # Returns: a list of MachineInfo
2019 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
2022 # @CurrentMachineParams:
2024 # Information describing the running machine parameters.
2026 # @wakeup-suspend-support: true if the machine supports wake up from
2031 { 'struct': 'CurrentMachineParams',
2032 'data': { 'wakeup-suspend-support': 'bool'} }
2035 # @query-current-machine:
2037 # Return information on the current virtual machine.
2039 # Returns: CurrentMachineParams
2043 { 'command': 'query-current-machine', 'returns': 'CurrentMachineParams' }
2046 # @CpuDefinitionInfo:
2048 # Virtual CPU definition.
2050 # @name: the name of the CPU definition
2052 # @migration-safe: whether a CPU definition can be safely used for
2053 # migration in combination with a QEMU compatibility machine
2054 # when migrating between different QEMU versions and between
2055 # hosts with different sets of (hardware or software)
2056 # capabilities. If not provided, information is not available
2057 # and callers should not assume the CPU definition to be
2058 # migration-safe. (since 2.8)
2060 # @static: whether a CPU definition is static and will not change depending on
2061 # QEMU version, machine type, machine options and accelerator options.
2062 # A static model is always migration-safe. (since 2.8)
2064 # @unavailable-features: List of properties that prevent
2065 # the CPU model from running in the current
2067 # @typename: Type name that can be used as argument to @device-list-properties,
2068 # to introspect properties configurable using -cpu or -global.
2071 # @unavailable-features is a list of QOM property names that
2072 # represent CPU model attributes that prevent the CPU from running.
2073 # If the QOM property is read-only, that means there's no known
2074 # way to make the CPU model run in the current host. Implementations
2075 # that choose not to provide specific information return the
2076 # property name "type".
2077 # If the property is read-write, it means that it MAY be possible
2078 # to run the CPU model in the current host if that property is
2079 # changed. Management software can use it as hints to suggest or
2080 # choose an alternative for the user, or just to generate meaningful
2081 # error messages explaining why the CPU model can't be used.
2082 # If @unavailable-features is an empty list, the CPU model is
2083 # runnable using the current host and machine-type.
2084 # If @unavailable-features is not present, runnability
2085 # information for the CPU is not available.
2089 { 'struct': 'CpuDefinitionInfo',
2090 'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool',
2091 '*unavailable-features': [ 'str' ], 'typename': 'str' } }
2096 # Actual memory information in bytes.
2098 # @base-memory: size of "base" memory specified with command line
2101 # @plugged-memory: size of memory that can be hot-unplugged. This field
2102 # is omitted if target doesn't support memory hotplug
2103 # (i.e. CONFIG_MEM_DEVICE not defined at build time).
2107 { 'struct': 'MemoryInfo',
2108 'data' : { 'base-memory': 'size', '*plugged-memory': 'size' } }
2111 # @query-memory-size-summary:
2113 # Return the amount of initially allocated and present hotpluggable (if
2114 # enabled) memory in bytes.
2118 # -> { "execute": "query-memory-size-summary" }
2119 # <- { "return": { "base-memory": 4294967296, "plugged-memory": 0 } }
2123 { 'command': 'query-memory-size-summary', 'returns': 'MemoryInfo' }
2126 # @query-cpu-definitions:
2128 # Return a list of supported virtual CPU definitions
2130 # Returns: a list of CpuDefInfo
2134 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
2139 # Virtual CPU model.
2141 # A CPU model consists of the name of a CPU definition, to which
2142 # delta changes are applied (e.g. features added/removed). Most magic values
2143 # that an architecture might require should be hidden behind the name.
2144 # However, if required, architectures can expose relevant properties.
2146 # @name: the name of the CPU definition the model is based on
2147 # @props: a dictionary of QOM properties to be applied
2151 { 'struct': 'CpuModelInfo',
2152 'data': { 'name': 'str',
2156 # @CpuModelExpansionType:
2158 # An enumeration of CPU model expansion types.
2160 # @static: Expand to a static CPU model, a combination of a static base
2161 # model name and property delta changes. As the static base model will
2162 # never change, the expanded CPU model will be the same, independent of
2163 # QEMU version, machine type, machine options, and accelerator options.
2164 # Therefore, the resulting model can be used by tooling without having
2165 # to specify a compatibility machine - e.g. when displaying the "host"
2166 # model. The @static CPU models are migration-safe.
2168 # @full: Expand all properties. The produced model is not guaranteed to be
2169 # migration-safe, but allows tooling to get an insight and work with
2172 # Note: When a non-migration-safe CPU model is expanded in static mode, some
2173 # features enabled by the CPU model may be omitted, because they can't be
2174 # implemented by a static CPU model definition (e.g. cache info passthrough and
2175 # PMU passthrough in x86). If you need an accurate representation of the
2176 # features enabled by a non-migration-safe CPU model, use @full. If you need a
2177 # static representation that will keep ABI compatibility even when changing QEMU
2178 # version or machine-type, use @static (but keep in mind that some features may
2183 { 'enum': 'CpuModelExpansionType',
2184 'data': [ 'static', 'full' ] }
2188 # @CpuModelExpansionInfo:
2190 # The result of a cpu model expansion.
2192 # @model: the expanded CpuModelInfo.
2196 { 'struct': 'CpuModelExpansionInfo',
2197 'data': { 'model': 'CpuModelInfo' } }
2201 # @query-cpu-model-expansion:
2203 # Expands a given CPU model (or a combination of CPU model + additional options)
2204 # to different granularities, allowing tooling to get an understanding what a
2205 # specific CPU model looks like in QEMU under a certain configuration.
2207 # This interface can be used to query the "host" CPU model.
2209 # The data returned by this command may be affected by:
2211 # * QEMU version: CPU models may look different depending on the QEMU version.
2212 # (Except for CPU models reported as "static" in query-cpu-definitions.)
2213 # * machine-type: CPU model may look different depending on the machine-type.
2214 # (Except for CPU models reported as "static" in query-cpu-definitions.)
2215 # * machine options (including accelerator): in some architectures, CPU models
2216 # may look different depending on machine and accelerator options. (Except for
2217 # CPU models reported as "static" in query-cpu-definitions.)
2218 # * "-cpu" arguments and global properties: arguments to the -cpu option and
2219 # global properties may affect expansion of CPU models. Using
2220 # query-cpu-model-expansion while using these is not advised.
2222 # Some architectures may not support all expansion types. s390x supports
2223 # "full" and "static".
2225 # Returns: a CpuModelExpansionInfo. Returns an error if expanding CPU models is
2226 # not supported, if the model cannot be expanded, if the model contains
2227 # an unknown CPU definition name, unknown properties or properties
2228 # with a wrong type. Also returns an error if an expansion type is
2233 { 'command': 'query-cpu-model-expansion',
2234 'data': { 'type': 'CpuModelExpansionType',
2235 'model': 'CpuModelInfo' },
2236 'returns': 'CpuModelExpansionInfo' }
2239 # @CpuModelCompareResult:
2241 # An enumeration of CPU model comparison results. The result is usually
2242 # calculated using e.g. CPU features or CPU generations.
2244 # @incompatible: If model A is incompatible to model B, model A is not
2245 # guaranteed to run where model B runs and the other way around.
2247 # @identical: If model A is identical to model B, model A is guaranteed to run
2248 # where model B runs and the other way around.
2250 # @superset: If model A is a superset of model B, model B is guaranteed to run
2251 # where model A runs. There are no guarantees about the other way.
2253 # @subset: If model A is a subset of model B, model A is guaranteed to run
2254 # where model B runs. There are no guarantees about the other way.
2258 { 'enum': 'CpuModelCompareResult',
2259 'data': [ 'incompatible', 'identical', 'superset', 'subset' ] }
2262 # @CpuModelCompareInfo:
2264 # The result of a CPU model comparison.
2266 # @result: The result of the compare operation.
2267 # @responsible-properties: List of properties that led to the comparison result
2268 # not being identical.
2270 # @responsible-properties is a list of QOM property names that led to
2271 # both CPUs not being detected as identical. For identical models, this
2273 # If a QOM property is read-only, that means there's no known way to make the
2274 # CPU models identical. If the special property name "type" is included, the
2275 # models are by definition not identical and cannot be made identical.
2279 { 'struct': 'CpuModelCompareInfo',
2280 'data': {'result': 'CpuModelCompareResult',
2281 'responsible-properties': ['str']
2286 # @query-cpu-model-comparison:
2288 # Compares two CPU models, returning how they compare in a specific
2289 # configuration. The results indicates how both models compare regarding
2290 # runnability. This result can be used by tooling to make decisions if a
2291 # certain CPU model will run in a certain configuration or if a compatible
2292 # CPU model has to be created by baselining.
2294 # Usually, a CPU model is compared against the maximum possible CPU model
2295 # of a certain configuration (e.g. the "host" model for KVM). If that CPU
2296 # model is identical or a subset, it will run in that configuration.
2298 # The result returned by this command may be affected by:
2300 # * QEMU version: CPU models may look different depending on the QEMU version.
2301 # (Except for CPU models reported as "static" in query-cpu-definitions.)
2302 # * machine-type: CPU model may look different depending on the machine-type.
2303 # (Except for CPU models reported as "static" in query-cpu-definitions.)
2304 # * machine options (including accelerator): in some architectures, CPU models
2305 # may look different depending on machine and accelerator options. (Except for
2306 # CPU models reported as "static" in query-cpu-definitions.)
2307 # * "-cpu" arguments and global properties: arguments to the -cpu option and
2308 # global properties may affect expansion of CPU models. Using
2309 # query-cpu-model-expansion while using these is not advised.
2311 # Some architectures may not support comparing CPU models. s390x supports
2312 # comparing CPU models.
2314 # Returns: a CpuModelBaselineInfo. Returns an error if comparing CPU models is
2315 # not supported, if a model cannot be used, if a model contains
2316 # an unknown cpu definition name, unknown properties or properties
2321 { 'command': 'query-cpu-model-comparison',
2322 'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' },
2323 'returns': 'CpuModelCompareInfo' }
2326 # @CpuModelBaselineInfo:
2328 # The result of a CPU model baseline.
2330 # @model: the baselined CpuModelInfo.
2334 { 'struct': 'CpuModelBaselineInfo',
2335 'data': { 'model': 'CpuModelInfo' } }
2338 # @query-cpu-model-baseline:
2340 # Baseline two CPU models, creating a compatible third model. The created
2341 # model will always be a static, migration-safe CPU model (see "static"
2342 # CPU model expansion for details).
2344 # This interface can be used by tooling to create a compatible CPU model out
2345 # two CPU models. The created CPU model will be identical to or a subset of
2346 # both CPU models when comparing them. Therefore, the created CPU model is
2347 # guaranteed to run where the given CPU models run.
2349 # The result returned by this command may be affected by:
2351 # * QEMU version: CPU models may look different depending on the QEMU version.
2352 # (Except for CPU models reported as "static" in query-cpu-definitions.)
2353 # * machine-type: CPU model may look different depending on the machine-type.
2354 # (Except for CPU models reported as "static" in query-cpu-definitions.)
2355 # * machine options (including accelerator): in some architectures, CPU models
2356 # may look different depending on machine and accelerator options. (Except for
2357 # CPU models reported as "static" in query-cpu-definitions.)
2358 # * "-cpu" arguments and global properties: arguments to the -cpu option and
2359 # global properties may affect expansion of CPU models. Using
2360 # query-cpu-model-expansion while using these is not advised.
2362 # Some architectures may not support baselining CPU models. s390x supports
2363 # baselining CPU models.
2365 # Returns: a CpuModelBaselineInfo. Returns an error if baselining CPU models is
2366 # not supported, if a model cannot be used, if a model contains
2367 # an unknown cpu definition name, unknown properties or properties
2372 { 'command': 'query-cpu-model-baseline',
2373 'data': { 'modela': 'CpuModelInfo',
2374 'modelb': 'CpuModelInfo' },
2375 'returns': 'CpuModelBaselineInfo' }
2380 # Information about a file descriptor that was added to an fd set.
2382 # @fdset-id: The ID of the fd set that @fd was added to.
2384 # @fd: The file descriptor that was received via SCM rights and
2385 # added to the fd set.
2389 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
2394 # Add a file descriptor, that was passed via SCM rights, to an fd set.
2396 # @fdset-id: The ID of the fd set to add the file descriptor to.
2398 # @opaque: A free-form string that can be used to describe the fd.
2400 # Returns: @AddfdInfo on success
2402 # If file descriptor was not received, FdNotSupplied
2404 # If @fdset-id is a negative value, InvalidParameterValue
2406 # Notes: The list of fd sets is shared by all monitor connections.
2408 # If @fdset-id is not specified, a new fd set will be created.
2414 # -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
2415 # <- { "return": { "fdset-id": 1, "fd": 3 } }
2418 { 'command': 'add-fd',
2419 'data': { '*fdset-id': 'int',
2421 'returns': 'AddfdInfo' }
2426 # Remove a file descriptor from an fd set.
2428 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
2430 # @fd: The file descriptor that is to be removed.
2432 # Returns: Nothing on success
2433 # If @fdset-id or @fd is not found, FdNotFound
2437 # Notes: The list of fd sets is shared by all monitor connections.
2439 # If @fd is not specified, all file descriptors in @fdset-id
2444 # -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
2445 # <- { "return": {} }
2448 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
2453 # Information about a file descriptor that belongs to an fd set.
2455 # @fd: The file descriptor value.
2457 # @opaque: A free-form string that can be used to describe the fd.
2461 { 'struct': 'FdsetFdInfo',
2462 'data': {'fd': 'int', '*opaque': 'str'} }
2467 # Information about an fd set.
2469 # @fdset-id: The ID of the fd set.
2471 # @fds: A list of file descriptors that belong to this fd set.
2475 { 'struct': 'FdsetInfo',
2476 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
2481 # Return information describing all fd sets.
2483 # Returns: A list of @FdsetInfo
2487 # Note: The list of fd sets is shared by all monitor connections.
2491 # -> { "execute": "query-fdsets" }
2497 # "opaque": "rdonly:/path/to/file"
2501 # "opaque": "rdwr:/path/to/file"
2521 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
2526 # Information describing the QEMU target.
2528 # @arch: the target architecture
2532 { 'struct': 'TargetInfo',
2533 'data': { 'arch': 'SysEmuTarget' } }
2538 # Return information about the target for this QEMU
2540 # Returns: TargetInfo
2544 { 'command': 'query-target', 'returns': 'TargetInfo' }
2547 # @AcpiTableOptions:
2549 # Specify an ACPI table on the command line to load.
2551 # At most one of @file and @data can be specified. The list of files specified
2552 # by any one of them is loaded and concatenated in order. If both are omitted,
2555 # Other fields / optargs can be used to override fields of the generic ACPI
2556 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
2557 # Description Table Header. If a header field is not overridden, then the
2558 # corresponding value from the concatenated blob is used (in case of @file), or
2559 # it is filled in with a hard-coded value (in case of @data).
2561 # String fields are copied into the matching ACPI member from lowest address
2562 # upwards, and silently truncated / NUL-padded to length.
2564 # @sig: table signature / identifier (4 bytes)
2566 # @rev: table revision number (dependent on signature, 1 byte)
2568 # @oem_id: OEM identifier (6 bytes)
2570 # @oem_table_id: OEM table identifier (8 bytes)
2572 # @oem_rev: OEM-supplied revision number (4 bytes)
2574 # @asl_compiler_id: identifier of the utility that created the table
2577 # @asl_compiler_rev: revision number of the utility that created the
2580 # @file: colon (:) separated list of pathnames to load and
2581 # concatenate as table data. The resultant binary blob is expected to
2582 # have an ACPI table header. At least one file is required. This field
2585 # @data: colon (:) separated list of pathnames to load and
2586 # concatenate as table data. The resultant binary blob must not have an
2587 # ACPI table header. At least one file is required. This field excludes
2592 { 'struct': 'AcpiTableOptions',
2597 '*oem_table_id': 'str',
2598 '*oem_rev': 'uint32',
2599 '*asl_compiler_id': 'str',
2600 '*asl_compiler_rev': 'uint32',
2605 # @CommandLineParameterType:
2607 # Possible types for an option parameter.
2609 # @string: accepts a character string
2611 # @boolean: accepts "on" or "off"
2613 # @number: accepts a number
2615 # @size: accepts a number followed by an optional suffix (K)ilo,
2616 # (M)ega, (G)iga, (T)era
2620 { 'enum': 'CommandLineParameterType',
2621 'data': ['string', 'boolean', 'number', 'size'] }
2624 # @CommandLineParameterInfo:
2626 # Details about a single parameter of a command line option.
2628 # @name: parameter name
2630 # @type: parameter @CommandLineParameterType
2632 # @help: human readable text string, not suitable for parsing.
2634 # @default: default value string (since 2.1)
2638 { 'struct': 'CommandLineParameterInfo',
2639 'data': { 'name': 'str',
2640 'type': 'CommandLineParameterType',
2642 '*default': 'str' } }
2645 # @CommandLineOptionInfo:
2647 # Details about a command line option, including its list of parameter details
2649 # @option: option name
2651 # @parameters: an array of @CommandLineParameterInfo
2655 { 'struct': 'CommandLineOptionInfo',
2656 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
2659 # @query-command-line-options:
2661 # Query command line option schema.
2663 # @option: option name
2665 # Returns: list of @CommandLineOptionInfo for all options (or for the given
2666 # @option). Returns an error if the given @option doesn't exist.
2672 # -> { "execute": "query-command-line-options",
2673 # "arguments": { "option": "option-rom" } }
2678 # "name": "romfile",
2682 # "name": "bootindex",
2686 # "option": "option-rom"
2692 {'command': 'query-command-line-options',
2693 'data': { '*option': 'str' },
2694 'returns': ['CommandLineOptionInfo'],
2695 'allow-preconfig': true }
2698 # @X86CPURegister32:
2700 # A X86 32-bit register
2704 { 'enum': 'X86CPURegister32',
2705 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
2708 # @X86CPUFeatureWordInfo:
2710 # Information about a X86 CPU feature word
2712 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
2714 # @cpuid-input-ecx: Input ECX value for CPUID instruction for that
2717 # @cpuid-register: Output register containing the feature bits
2719 # @features: value of output register, containing the feature bits
2723 { 'struct': 'X86CPUFeatureWordInfo',
2724 'data': { 'cpuid-input-eax': 'int',
2725 '*cpuid-input-ecx': 'int',
2726 'cpuid-register': 'X86CPURegister32',
2727 'features': 'int' } }
2730 # @DummyForceArrays:
2732 # Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
2736 { 'struct': 'DummyForceArrays',
2737 'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
2743 # @node: NUMA nodes configuration
2745 # @dist: NUMA distance configuration (since 2.10)
2747 # @cpu: property based CPU(s) to node mapping (Since: 2.10)
2751 { 'enum': 'NumaOptionsType',
2752 'data': [ 'node', 'dist', 'cpu' ] }
2757 # A discriminated record of NUMA options. (for OptsVisitor)
2761 { 'union': 'NumaOptions',
2762 'base': { 'type': 'NumaOptionsType' },
2763 'discriminator': 'type',
2765 'node': 'NumaNodeOptions',
2766 'dist': 'NumaDistOptions',
2767 'cpu': 'NumaCpuOptions' }}
2772 # Create a guest NUMA node. (for OptsVisitor)
2774 # @nodeid: NUMA node ID (increase by 1 from 0 if omitted)
2776 # @cpus: VCPUs belonging to this node (assign VCPUS round-robin
2779 # @mem: memory size of this node; mutually exclusive with @memdev.
2780 # Equally divide total memory among nodes if both @mem and @memdev are
2783 # @memdev: memory backend object. If specified for one node,
2784 # it must be specified for all nodes.
2788 { 'struct': 'NumaNodeOptions',
2790 '*nodeid': 'uint16',
2791 '*cpus': ['uint16'],
2798 # Set the distance between 2 NUMA nodes.
2800 # @src: source NUMA node.
2802 # @dst: destination NUMA node.
2804 # @val: NUMA distance from source node to destination node.
2805 # When a node is unreachable from another node, set the distance
2806 # between them to 255.
2810 { 'struct': 'NumaDistOptions',
2819 # Option "-numa cpu" overrides default cpu to node mapping.
2820 # It accepts the same set of cpu properties as returned by
2821 # query-hotpluggable-cpus[].props, where node-id could be used to
2822 # override default node mapping.
2826 { 'struct': 'NumaCpuOptions',
2827 'base': 'CpuInstanceProperties',
2833 # Host memory policy types
2835 # @default: restore default policy, remove any nondefault policy
2837 # @preferred: set the preferred host nodes for allocation
2839 # @bind: a strict policy that restricts memory allocation to the
2840 # host nodes specified
2842 # @interleave: memory allocations are interleaved across the set
2843 # of host nodes specified
2847 { 'enum': 'HostMemPolicy',
2848 'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
2853 # Information about memory backend
2855 # @id: backend's ID if backend has 'id' property (since 2.9)
2857 # @size: memory backend size
2859 # @merge: enables or disables memory merge support
2861 # @dump: includes memory backend's memory in a core dump or not
2863 # @prealloc: enables or disables memory preallocation
2865 # @host-nodes: host nodes for its memory policy
2867 # @policy: memory policy of memory backend
2871 { 'struct': 'Memdev',
2878 'host-nodes': ['uint16'],
2879 'policy': 'HostMemPolicy' }}
2884 # Returns information for all memory backends.
2886 # Returns: a list of @Memdev.
2892 # -> { "execute": "query-memdev" }
2896 # "size": 536870912,
2899 # "prealloc": false,
2900 # "host-nodes": [0, 1],
2904 # "size": 536870912,
2908 # "host-nodes": [2, 3],
2909 # "policy": "preferred"
2915 { 'command': 'query-memdev', 'returns': ['Memdev'], 'allow-preconfig': true }
2918 # @PCDIMMDeviceInfo:
2920 # PCDIMMDevice state information
2924 # @addr: physical address, where device is mapped
2926 # @size: size of memory that the device provides
2928 # @slot: slot number at which device is plugged in
2930 # @node: NUMA node number where device is plugged in
2932 # @memdev: memory backend linked with device
2934 # @hotplugged: true if device was hotplugged
2936 # @hotpluggable: true if device if could be added/removed while machine is running
2940 { 'struct': 'PCDIMMDeviceInfo',
2941 'data': { '*id': 'str',
2947 'hotplugged': 'bool',
2948 'hotpluggable': 'bool'
2953 # @MemoryDeviceInfo:
2955 # Union containing information about a memory device
2959 { 'union': 'MemoryDeviceInfo',
2960 'data': { 'dimm': 'PCDIMMDeviceInfo',
2961 'nvdimm': 'PCDIMMDeviceInfo'
2966 # @query-memory-devices:
2968 # Lists available memory devices and their state
2974 # -> { "execute": "query-memory-devices" }
2975 # <- { "return": [ { "data":
2976 # { "addr": 5368709120,
2977 # "hotpluggable": true,
2978 # "hotplugged": true,
2980 # "memdev": "/objects/memX",
2982 # "size": 1073741824,
2988 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
2991 # @MEM_UNPLUG_ERROR:
2993 # Emitted when memory hot unplug error occurs.
2995 # @device: device name
2997 # @msg: Informative message
3003 # <- { "event": "MEM_UNPLUG_ERROR"
3004 # "data": { "device": "dimm1",
3005 # "msg": "acpi: device unplug for unsupported device"
3007 # "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
3010 { 'event': 'MEM_UNPLUG_ERROR',
3011 'data': { 'device': 'str', 'msg': 'str' } }
3016 # @DIMM: memory slot
3017 # @CPU: logical CPU slot (since 2.7)
3019 { 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
3024 # OSPM Status Indication for a device
3025 # For description of possible values of @source and @status fields
3026 # see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
3028 # @device: device ID associated with slot
3030 # @slot: slot ID, unique per slot of a given @slot-type
3032 # @slot-type: type of the slot
3034 # @source: an integer containing the source event
3036 # @status: an integer containing the status code
3040 { 'struct': 'ACPIOSTInfo',
3041 'data' : { '*device': 'str',
3043 'slot-type': 'ACPISlotType',
3048 # @query-acpi-ospm-status:
3050 # Return a list of ACPIOSTInfo for devices that support status
3051 # reporting via ACPI _OST method.
3057 # -> { "execute": "query-acpi-ospm-status" }
3058 # <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
3059 # { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
3060 # { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
3061 # { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
3065 { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
3070 # Emitted when guest executes ACPI _OST method.
3072 # @info: OSPM Status Indication
3078 # <- { "event": "ACPI_DEVICE_OST",
3079 # "data": { "device": "d1", "slot": "0",
3080 # "slot-type": "DIMM", "source": 1, "status": 0 } }
3083 { 'event': 'ACPI_DEVICE_OST',
3084 'data': { 'info': 'ACPIOSTInfo' } }
3087 # @rtc-reset-reinjection:
3089 # This command will reset the RTC interrupt reinjection backlog.
3090 # Can be used if another mechanism to synchronize guest time
3091 # is in effect, for example QEMU guest agent's guest-set-time
3098 # -> { "execute": "rtc-reset-reinjection" }
3099 # <- { "return": {} }
3102 { 'command': 'rtc-reset-reinjection' }
3107 # Emitted when the guest changes the RTC time.
3109 # @offset: offset between base RTC clock (as specified by -rtc base), and
3110 # new RTC clock value. Note that value will be different depending
3111 # on clock chosen to drive RTC (specified by -rtc clock).
3113 # Note: This event is rate-limited.
3119 # <- { "event": "RTC_CHANGE",
3120 # "data": { "offset": 78 },
3121 # "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
3124 { 'event': 'RTC_CHANGE',
3125 'data': { 'offset': 'int' } }
3130 # Mode of the replay subsystem.
3132 # @none: normal execution mode. Replay or record are not enabled.
3134 # @record: record mode. All non-deterministic data is written into the
3137 # @play: replay mode. Non-deterministic data required for system execution
3138 # is read from the log.
3142 { 'enum': 'ReplayMode',
3143 'data': [ 'none', 'record', 'play' ] }
3146 # @xen-load-devices-state:
3148 # Load the state of all devices from file. The RAM and the block devices
3149 # of the VM are not loaded by this command.
3151 # @filename: the file to load the state of the devices from as binary
3152 # data. See xen-save-devices-state.txt for a description of the binary
3159 # -> { "execute": "xen-load-devices-state",
3160 # "arguments": { "filename": "/tmp/resume" } }
3161 # <- { "return": {} }
3164 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
3169 # The struct describes capability for a specific GIC (Generic
3170 # Interrupt Controller) version. These bits are not only decided by
3171 # QEMU/KVM software version, but also decided by the hardware that
3172 # the program is running upon.
3174 # @version: version of GIC to be described. Currently, only 2 and 3
3177 # @emulated: whether current QEMU/hardware supports emulated GIC
3178 # device in user space.
3180 # @kernel: whether current QEMU/hardware supports hardware
3181 # accelerated GIC device in kernel.
3185 { 'struct': 'GICCapability',
3186 'data': { 'version': 'int',
3188 'kernel': 'bool' } }
3191 # @query-gic-capabilities:
3193 # This command is ARM-only. It will return a list of GICCapability
3194 # objects that describe its capability bits.
3196 # Returns: a list of GICCapability objects.
3202 # -> { "execute": "query-gic-capabilities" }
3203 # <- { "return": [{ "version": 2, "emulated": true, "kernel": false },
3204 # { "version": 3, "emulated": false, "kernel": true } ] }
3207 { 'command': 'query-gic-capabilities', 'returns': ['GICCapability'] }
3210 # @CpuInstanceProperties:
3212 # List of properties to be used for hotplugging a CPU instance,
3213 # it should be passed by management with device_add command when
3214 # a CPU is being hotplugged.
3216 # @node-id: NUMA node ID the CPU belongs to
3217 # @socket-id: socket number within node/board the CPU belongs to
3218 # @core-id: core number within socket the CPU belongs to
3219 # @thread-id: thread number within core the CPU belongs to
3221 # Note: currently there are 4 properties that could be present
3222 # but management should be prepared to pass through other
3223 # properties with device_add command to allow for future
3224 # interface extension. This also requires the filed names to be kept in
3225 # sync with the properties passed to -device/device_add.
3229 { 'struct': 'CpuInstanceProperties',
3230 'data': { '*node-id': 'int',
3231 '*socket-id': 'int',
3240 # @type: CPU object type for usage with device_add command
3241 # @props: list of properties to be used for hotplugging CPU
3242 # @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides
3243 # @qom-path: link to existing CPU object if CPU is present or
3244 # omitted if CPU is not present.
3248 { 'struct': 'HotpluggableCPU',
3249 'data': { 'type': 'str',
3250 'vcpus-count': 'int',
3251 'props': 'CpuInstanceProperties',
3257 # @query-hotpluggable-cpus:
3259 # TODO: Better documentation; currently there is none.
3261 # Returns: a list of HotpluggableCPU objects.
3267 # For pseries machine type started with -smp 2,cores=2,maxcpus=4 -cpu POWER8:
3269 # -> { "execute": "query-hotpluggable-cpus" }
3271 # { "props": { "core": 8 }, "type": "POWER8-spapr-cpu-core",
3272 # "vcpus-count": 1 },
3273 # { "props": { "core": 0 }, "type": "POWER8-spapr-cpu-core",
3274 # "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"}
3277 # For pc machine type started with -smp 1,maxcpus=2:
3279 # -> { "execute": "query-hotpluggable-cpus" }
3282 # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
3283 # "props": {"core-id": 0, "socket-id": 1, "thread-id": 0}
3286 # "qom-path": "/machine/unattached/device[0]",
3287 # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
3288 # "props": {"core-id": 0, "socket-id": 0, "thread-id": 0}
3292 # For s390x-virtio-ccw machine type started with -smp 1,maxcpus=2 -cpu qemu
3295 # -> { "execute": "query-hotpluggable-cpus" }
3298 # "type": "qemu-s390x-cpu", "vcpus-count": 1,
3299 # "props": { "core-id": 1 }
3302 # "qom-path": "/machine/unattached/device[0]",
3303 # "type": "qemu-s390x-cpu", "vcpus-count": 1,
3304 # "props": { "core-id": 0 }
3309 { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'],
3310 'allow-preconfig': true }
3317 # @guid: the globally unique identifier
3321 { 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
3324 # @query-vm-generation-id:
3326 # Show Virtual Machine Generation ID
3330 { 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }
3336 # An enumeration of SEV state information used during @query-sev.
3338 # @uninit: The guest is uninitialized.
3340 # @launch-update: The guest is currently being launched; plaintext data and
3341 # register state is being imported.
3343 # @launch-secret: The guest is currently being launched; ciphertext data
3344 # is being imported.
3346 # @running: The guest is fully launched or migrated in.
3348 # @send-update: The guest is currently being migrated out to another machine.
3350 # @receive-update: The guest is currently being migrated from another machine.
3354 { 'enum': 'SevState',
3355 'data': ['uninit', 'launch-update', 'launch-secret', 'running',
3356 'send-update', 'receive-update' ] }
3361 # Information about Secure Encrypted Virtualization (SEV) support
3363 # @enabled: true if SEV is active
3365 # @api-major: SEV API major version
3367 # @api-minor: SEV API minor version
3369 # @build-id: SEV FW build id
3371 # @policy: SEV policy value
3373 # @state: SEV guest state
3375 # @handle: SEV firmware handle
3379 { 'struct': 'SevInfo',
3380 'data': { 'enabled': 'bool',
3381 'api-major': 'uint8',
3382 'api-minor' : 'uint8',
3383 'build-id' : 'uint8',
3384 'policy' : 'uint32',
3385 'state' : 'SevState',
3393 # Returns information about SEV
3401 # -> { "execute": "query-sev" }
3402 # <- { "return": { "enabled": true, "api-major" : 0, "api-minor" : 0,
3403 # "build-id" : 0, "policy" : 0, "state" : "running",
3407 { 'command': 'query-sev', 'returns': 'SevInfo' }
3410 # @SevLaunchMeasureInfo:
3412 # SEV Guest Launch measurement information
3414 # @data: the measurement value encoded in base64
3419 { 'struct': 'SevLaunchMeasureInfo', 'data': {'data': 'str'} }
3422 # @query-sev-launch-measure:
3424 # Query the SEV guest launch information.
3426 # Returns: The @SevLaunchMeasureInfo for the guest
3432 # -> { "execute": "query-sev-launch-measure" }
3433 # <- { "return": { "data": "4l8LXeNlSPUDlXPJG5966/8%YZ" } }
3436 { 'command': 'query-sev-launch-measure', 'returns': 'SevLaunchMeasureInfo' }
3441 # The struct describes capability for a Secure Encrypted Virtualization
3444 # @pdh: Platform Diffie-Hellman key (base64 encoded)
3446 # @cert-chain: PDH certificate chain (base64 encoded)
3448 # @cbitpos: C-bit location in page table entry
3450 # @reduced-phys-bits: Number of physical Address bit reduction when SEV is
3455 { 'struct': 'SevCapability',
3456 'data': { 'pdh': 'str',
3457 'cert-chain': 'str',
3459 'reduced-phys-bits': 'int'} }
3462 # @query-sev-capabilities:
3464 # This command is used to get the SEV capabilities, and is supported on AMD
3465 # X86 platforms only.
3467 # Returns: SevCapability objects.
3473 # -> { "execute": "query-sev-capabilities" }
3474 # <- { "return": { "pdh": "8CCDD8DDD", "cert-chain": "888CCCDDDEE",
3475 # "cbitpos": 47, "reduced-phys-bits": 5}}
3478 { 'command': 'query-sev-capabilities', 'returns': 'SevCapability' }
3483 # Runtime equivalent of '-numa' CLI option, available at
3484 # preconfigure stage to configure numa mapping before initializing
3489 { 'command': 'set-numa-node', 'boxed': true,
3490 'data': 'NumaOptions',
3491 'allow-preconfig': true