4 # This work is licensed under the terms of the GNU GPL, version 2 or later.
5 # See the COPYING file in the top-level directory.
11 { 'include': 'common.json' }
16 # The comprehensive enumeration of QEMU system emulation ("softmmu")
17 # targets. Run "./configure --help" in the project root directory,
18 # and look for the \*-softmmu targets near the "--target-list" option.
19 # The individual target constants are not documented here, for the
26 # Notes: The resulting QMP strings can be appended to the
27 # "qemu-system-" prefix to produce the corresponding QEMU
28 # executable name. This is true even for "qemu-system-x86_64".
32 { 'enum' : 'SysEmuTarget',
33 'data' : [ 'aarch64', 'alpha', 'arm', 'avr', 'cris', 'hppa', 'i386',
34 'loongarch64', 'm68k', 'microblaze', 'microblazeel', 'mips', 'mips64',
35 'mips64el', 'mipsel', 'nios2', 'or1k', 'ppc',
36 'ppc64', 'riscv32', 'riscv64', 'rx', 's390x', 'sh4',
37 'sh4eb', 'sparc', 'sparc64', 'tricore',
38 'x86_64', 'xtensa', 'xtensaeb' ] }
43 # An enumeration of cpu states that can be assumed by a virtual S390
48 { 'enum': 'CpuS390State',
49 'prefix': 'S390_CPU_STATE',
50 'data': [ 'uninitialized', 'stopped', 'check-stop', 'operating', 'load' ] }
55 # Additional information about a virtual S390 CPU
57 # @cpu-state: the virtual CPU's state
61 { 'struct': 'CpuInfoS390', 'data': { 'cpu-state': 'CpuS390State' } }
66 # Information about a virtual CPU
68 # @cpu-index: index of the virtual CPU
70 # @qom-path: path to the CPU object in the QOM tree
72 # @thread-id: ID of the underlying host thread
74 # @props: properties describing to which node/socket/core/thread
75 # virtual CPU belongs to, provided if supported by board
77 # @target: the QEMU system emulation target, which determines which
78 # additional fields will be listed (since 3.0)
82 { 'union' : 'CpuInfoFast',
83 'base' : { 'cpu-index' : 'int',
86 '*props' : 'CpuInstanceProperties',
87 'target' : 'SysEmuTarget' },
88 'discriminator' : 'target',
89 'data' : { 's390x' : 'CpuInfoS390' } }
94 # Returns information about all virtual CPUs.
96 # Returns: list of @CpuInfoFast
102 # -> { "execute": "query-cpus-fast" }
105 # "thread-id": 25627,
111 # "qom-path": "/machine/unattached/device[0]",
116 # "thread-id": 25628,
122 # "qom-path": "/machine/unattached/device[2]",
129 { 'command': 'query-cpus-fast', 'returns': [ 'CpuInfoFast' ] }
134 # Information describing a machine.
136 # @name: the name of the machine
138 # @alias: an alias for the machine name
140 # @is-default: whether the machine is default
142 # @cpu-max: maximum number of CPUs supported by the machine type
145 # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7)
147 # @numa-mem-supported: true if '-numa node,mem' option is supported by
148 # the machine type and false otherwise (since 4.1)
150 # @deprecated: if true, the machine type is deprecated and may be
151 # removed in future versions of QEMU according to the QEMU
152 # deprecation policy (since 4.1)
154 # @default-cpu-type: default CPU model typename if none is requested
155 # via the -cpu argument. (since 4.2)
157 # @default-ram-id: the default ID of initial RAM memory backend (since
160 # @acpi: machine type supports ACPI (since 8.0)
164 { 'struct': 'MachineInfo',
165 'data': { 'name': 'str', '*alias': 'str',
166 '*is-default': 'bool', 'cpu-max': 'int',
167 'hotpluggable-cpus': 'bool', 'numa-mem-supported': 'bool',
168 'deprecated': 'bool', '*default-cpu-type': 'str',
169 '*default-ram-id': 'str', 'acpi': 'bool' } }
174 # Return a list of supported machines
176 # Returns: a list of MachineInfo
180 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
183 # @CurrentMachineParams:
185 # Information describing the running machine parameters.
187 # @wakeup-suspend-support: true if the machine supports wake up from
192 { 'struct': 'CurrentMachineParams',
193 'data': { 'wakeup-suspend-support': 'bool'} }
196 # @query-current-machine:
198 # Return information on the current virtual machine.
200 # Returns: CurrentMachineParams
204 { 'command': 'query-current-machine', 'returns': 'CurrentMachineParams' }
209 # Information describing the QEMU target.
211 # @arch: the target architecture
215 { 'struct': 'TargetInfo',
216 'data': { 'arch': 'SysEmuTarget' } }
221 # Return information about the target for this QEMU
223 # Returns: TargetInfo
227 { 'command': 'query-target', 'returns': 'TargetInfo' }
232 # Guest UUID information (Universally Unique Identifier).
234 # @UUID: the UUID of the guest
238 # Notes: If no UUID was specified for the guest, a null UUID is
241 { 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
246 # Query the guest UUID information.
248 # Returns: The @UuidInfo for the guest
254 # -> { "execute": "query-uuid" }
255 # <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
257 { 'command': 'query-uuid', 'returns': 'UuidInfo', 'allow-preconfig': true }
264 # @guid: the globally unique identifier
268 { 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
271 # @query-vm-generation-id:
273 # Show Virtual Machine Generation ID
277 { 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }
282 # Performs a hard reset of a guest.
288 # -> { "execute": "system_reset" }
289 # <- { "return": {} }
291 { 'command': 'system_reset' }
296 # Requests that a guest perform a powerdown operation.
300 # Notes: A guest may or may not respond to this command. This command
301 # returning does not indicate that a guest has accepted the
302 # request or that it has shut down. Many guests will respond to
303 # this command by prompting the user in some way.
307 # -> { "execute": "system_powerdown" }
308 # <- { "return": {} }
310 { 'command': 'system_powerdown' }
315 # Wake up guest from suspend. If the guest has wake-up from suspend
316 # support enabled (wakeup-suspend-support flag from
317 # query-current-machine), wake-up guest from suspend if the guest is
318 # in SUSPENDED state. Return an error otherwise.
324 # Note: prior to 4.0, this command does nothing in case the guest
329 # -> { "execute": "system_wakeup" }
330 # <- { "return": {} }
332 { 'command': 'system_wakeup' }
337 # Policy for handling lost ticks in timer devices. Ticks end up
338 # getting lost when, for example, the guest is paused.
340 # @discard: throw away the missed ticks and continue with future
341 # injection normally. The guest OS will see the timer jump ahead
342 # by a potentially quite significant amount all at once, as if the
343 # intervening chunk of time had simply not existed; needless to
344 # say, such a sudden jump can easily confuse a guest OS which is
345 # not specifically prepared to deal with it. Assuming the guest
346 # OS can deal correctly with the time jump, the time in the guest
347 # and in the host should now match.
349 # @delay: continue to deliver ticks at the normal rate. The guest OS
350 # will not notice anything is amiss, as from its point of view
351 # time will have continued to flow normally. The time in the
352 # guest should now be behind the time in the host by exactly the
353 # amount of time during which ticks have been missed.
355 # @slew: deliver ticks at a higher rate to catch up with the missed
356 # ticks. The guest OS will not notice anything is amiss, as from
357 # its point of view time will have continued to flow normally.
358 # Once the timer has managed to catch up with all the missing
359 # ticks, the time in the guest and in the host should match.
363 { 'enum': 'LostTickPolicy',
364 'data': ['discard', 'delay', 'slew' ] }
369 # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or
370 # all CPUs (ppc64). The command fails when the guest doesn't support
373 # Returns: If successful, nothing
377 # Note: prior to 2.1, this command was only supported for x86 and s390
382 # -> { "execute": "inject-nmi" }
383 # <- { "return": {} }
385 { 'command': 'inject-nmi' }
390 # Information about support for KVM acceleration
392 # @enabled: true if KVM acceleration is active
394 # @present: true if KVM acceleration is built into this executable
398 { 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
403 # Returns information about KVM acceleration
411 # -> { "execute": "query-kvm" }
412 # <- { "return": { "enabled": true, "present": true } }
414 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
419 # @node: NUMA nodes configuration
421 # @dist: NUMA distance configuration (since 2.10)
423 # @cpu: property based CPU(s) to node mapping (Since: 2.10)
425 # @hmat-lb: memory latency and bandwidth information (Since: 5.0)
427 # @hmat-cache: memory side cache information (Since: 5.0)
431 { 'enum': 'NumaOptionsType',
432 'data': [ 'node', 'dist', 'cpu', 'hmat-lb', 'hmat-cache' ] }
437 # A discriminated record of NUMA options. (for OptsVisitor)
441 { 'union': 'NumaOptions',
442 'base': { 'type': 'NumaOptionsType' },
443 'discriminator': 'type',
445 'node': 'NumaNodeOptions',
446 'dist': 'NumaDistOptions',
447 'cpu': 'NumaCpuOptions',
448 'hmat-lb': 'NumaHmatLBOptions',
449 'hmat-cache': 'NumaHmatCacheOptions' }}
454 # Create a guest NUMA node. (for OptsVisitor)
456 # @nodeid: NUMA node ID (increase by 1 from 0 if omitted)
458 # @cpus: VCPUs belonging to this node (assign VCPUS round-robin if
461 # @mem: memory size of this node; mutually exclusive with @memdev.
462 # Equally divide total memory among nodes if both @mem and @memdev
465 # @memdev: memory backend object. If specified for one node, it must
466 # be specified for all nodes.
468 # @initiator: defined in ACPI 6.3 Chapter 5.2.27.3 Table 5-145, points
469 # to the nodeid which has the memory controller responsible for
470 # this NUMA node. This field provides additional information as
471 # to the initiator node that is closest (as in directly attached)
472 # to this node, and therefore has the best performance (since 5.0)
476 { 'struct': 'NumaNodeOptions',
482 '*initiator': 'uint16' }}
487 # Set the distance between 2 NUMA nodes.
489 # @src: source NUMA node.
491 # @dst: destination NUMA node.
493 # @val: NUMA distance from source node to destination node. When a
494 # node is unreachable from another node, set the distance between
499 { 'struct': 'NumaDistOptions',
506 # @CXLFixedMemoryWindowOptions:
508 # Create a CXL Fixed Memory Window
510 # @size: Size of the Fixed Memory Window in bytes. Must be a multiple
513 # @interleave-granularity: Number of contiguous bytes for which
514 # accesses will go to a given interleave target. Accepted values
515 # [256, 512, 1k, 2k, 4k, 8k, 16k]
517 # @targets: Target root bridge IDs from -device ...,id=<ID> for each
522 { 'struct': 'CXLFixedMemoryWindowOptions',
525 '*interleave-granularity': 'size',
526 'targets': ['str'] }}
531 # List of CXL Fixed Memory Windows.
533 # @cxl-fmw: List of CXLFixedMemoryWindowOptions
537 { 'struct' : 'CXLFMWProperties',
538 'data': { 'cxl-fmw': ['CXLFixedMemoryWindowOptions'] }
544 # A X86 32-bit register
548 { 'enum': 'X86CPURegister32',
549 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
552 # @X86CPUFeatureWordInfo:
554 # Information about a X86 CPU feature word
556 # @cpuid-input-eax: Input EAX value for CPUID instruction for that
559 # @cpuid-input-ecx: Input ECX value for CPUID instruction for that
562 # @cpuid-register: Output register containing the feature bits
564 # @features: value of output register, containing the feature bits
568 { 'struct': 'X86CPUFeatureWordInfo',
569 'data': { 'cpuid-input-eax': 'int',
570 '*cpuid-input-ecx': 'int',
571 'cpuid-register': 'X86CPURegister32',
572 'features': 'int' } }
577 # Not used by QMP; hack to let us use X86CPUFeatureWordInfoList
582 { 'struct': 'DummyForceArrays',
583 'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
588 # Option "-numa cpu" overrides default cpu to node mapping. It
589 # accepts the same set of cpu properties as returned by
590 # query-hotpluggable-cpus[].props, where node-id could be used to
591 # override default node mapping.
595 { 'struct': 'NumaCpuOptions',
596 'base': 'CpuInstanceProperties',
600 # @HmatLBMemoryHierarchy:
602 # The memory hierarchy in the System Locality Latency and Bandwidth
603 # Information Structure of HMAT (Heterogeneous Memory Attribute Table)
605 # For more information about @HmatLBMemoryHierarchy, see chapter
606 # 5.2.27.4: Table 5-146: Field "Flags" of ACPI 6.3 spec.
608 # @memory: the structure represents the memory performance
610 # @first-level: first level of memory side cache
612 # @second-level: second level of memory side cache
614 # @third-level: third level of memory side cache
618 { 'enum': 'HmatLBMemoryHierarchy',
619 'data': [ 'memory', 'first-level', 'second-level', 'third-level' ] }
624 # Data type in the System Locality Latency and Bandwidth Information
625 # Structure of HMAT (Heterogeneous Memory Attribute Table)
627 # For more information about @HmatLBDataType, see chapter 5.2.27.4:
628 # Table 5-146: Field "Data Type" of ACPI 6.3 spec.
630 # @access-latency: access latency (nanoseconds)
632 # @read-latency: read latency (nanoseconds)
634 # @write-latency: write latency (nanoseconds)
636 # @access-bandwidth: access bandwidth (Bytes per second)
638 # @read-bandwidth: read bandwidth (Bytes per second)
640 # @write-bandwidth: write bandwidth (Bytes per second)
644 { 'enum': 'HmatLBDataType',
645 'data': [ 'access-latency', 'read-latency', 'write-latency',
646 'access-bandwidth', 'read-bandwidth', 'write-bandwidth' ] }
649 # @NumaHmatLBOptions:
651 # Set the system locality latency and bandwidth information between
652 # Initiator and Target proximity Domains.
654 # For more information about @NumaHmatLBOptions, see chapter 5.2.27.4:
655 # Table 5-146 of ACPI 6.3 spec.
657 # @initiator: the Initiator Proximity Domain.
659 # @target: the Target Proximity Domain.
661 # @hierarchy: the Memory Hierarchy. Indicates the performance of
662 # memory or side cache.
664 # @data-type: presents the type of data, access/read/write latency or
667 # @latency: the value of latency from @initiator to @target proximity
668 # domain, the latency unit is "ns(nanosecond)".
670 # @bandwidth: the value of bandwidth between @initiator and @target
671 # proximity domain, the bandwidth unit is "Bytes per second".
675 { 'struct': 'NumaHmatLBOptions',
677 'initiator': 'uint16',
679 'hierarchy': 'HmatLBMemoryHierarchy',
680 'data-type': 'HmatLBDataType',
681 '*latency': 'uint64',
682 '*bandwidth': 'size' }}
685 # @HmatCacheAssociativity:
687 # Cache associativity in the Memory Side Cache Information Structure
690 # For more information of @HmatCacheAssociativity, see chapter
691 # 5.2.27.5: Table 5-147 of ACPI 6.3 spec.
693 # @none: None (no memory side cache in this proximity domain, or cache
694 # associativity unknown)
696 # @direct: Direct Mapped
698 # @complex: Complex Cache Indexing (implementation specific)
702 { 'enum': 'HmatCacheAssociativity',
703 'data': [ 'none', 'direct', 'complex' ] }
706 # @HmatCacheWritePolicy:
708 # Cache write policy in the Memory Side Cache Information Structure of
711 # For more information of @HmatCacheWritePolicy, see chapter 5.2.27.5:
712 # Table 5-147: Field "Cache Attributes" of ACPI 6.3 spec.
714 # @none: None (no memory side cache in this proximity domain, or cache
715 # write policy unknown)
717 # @write-back: Write Back (WB)
719 # @write-through: Write Through (WT)
723 { 'enum': 'HmatCacheWritePolicy',
724 'data': [ 'none', 'write-back', 'write-through' ] }
727 # @NumaHmatCacheOptions:
729 # Set the memory side cache information for a given memory domain.
731 # For more information of @NumaHmatCacheOptions, see chapter 5.2.27.5:
732 # Table 5-147: Field "Cache Attributes" of ACPI 6.3 spec.
734 # @node-id: the memory proximity domain to which the memory belongs.
736 # @size: the size of memory side cache in bytes.
738 # @level: the cache level described in this structure.
740 # @associativity: the cache associativity,
741 # none/direct-mapped/complex(complex cache indexing).
743 # @policy: the write policy, none/write-back/write-through.
745 # @line: the cache Line size in bytes.
749 { 'struct': 'NumaHmatCacheOptions',
754 'associativity': 'HmatCacheAssociativity',
755 'policy': 'HmatCacheWritePolicy',
761 # Save a portion of guest memory to a file.
763 # @val: the virtual address of the guest to start from
765 # @size: the size of memory region to save
767 # @filename: the file to save the memory to as binary data
769 # @cpu-index: the index of the virtual CPU to use for translating the
770 # virtual address (defaults to CPU 0)
772 # Returns: Nothing on success
776 # Notes: Errors were not reliably returned until 1.1
780 # -> { "execute": "memsave",
781 # "arguments": { "val": 10,
783 # "filename": "/tmp/virtual-mem-dump" } }
784 # <- { "return": {} }
786 { 'command': 'memsave',
787 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
792 # Save a portion of guest physical memory to a file.
794 # @val: the physical address of the guest to start from
796 # @size: the size of memory region to save
798 # @filename: the file to save the memory to as binary data
800 # Returns: Nothing on success
804 # Notes: Errors were not reliably returned until 1.1
808 # -> { "execute": "pmemsave",
809 # "arguments": { "val": 10,
811 # "filename": "/tmp/physical-mem-dump" } }
812 # <- { "return": {} }
814 { 'command': 'pmemsave',
815 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
820 # Information about memory backend
822 # @id: backend's ID if backend has 'id' property (since 2.9)
824 # @size: memory backend size
826 # @merge: whether memory merge support is enabled
828 # @dump: whether memory backend's memory is included in a core dump
830 # @prealloc: whether memory was preallocated
832 # @share: whether memory is private to QEMU or shared (since 6.1)
834 # @reserve: whether swap space (or huge pages) was reserved if
835 # applicable. This corresponds to the user configuration and not
836 # the actual behavior implemented in the OS to perform the
837 # reservation. For example, Linux will never reserve swap space
838 # for shared file mappings. (since 6.1)
840 # @host-nodes: host nodes for its memory policy
842 # @policy: memory policy of memory backend
846 { 'struct': 'Memdev',
855 'host-nodes': ['uint16'],
856 'policy': 'HostMemPolicy' }}
861 # Returns information for all memory backends.
863 # Returns: a list of @Memdev.
869 # -> { "execute": "query-memdev" }
878 # "host-nodes": [0, 1],
887 # "host-nodes": [2, 3],
888 # "policy": "preferred"
893 { 'command': 'query-memdev', 'returns': ['Memdev'], 'allow-preconfig': true }
896 # @CpuInstanceProperties:
898 # List of properties to be used for hotplugging a CPU instance, it
899 # should be passed by management with device_add command when a CPU is
902 # @node-id: NUMA node ID the CPU belongs to
904 # @socket-id: socket number within node/board the CPU belongs to
906 # @die-id: die number within socket the CPU belongs to (since 4.1)
908 # @cluster-id: cluster number within die the CPU belongs to (since
911 # @core-id: core number within cluster the CPU belongs to
913 # @thread-id: thread number within core the CPU belongs to
915 # Note: currently there are 6 properties that could be present but
916 # management should be prepared to pass through other properties
917 # with device_add command to allow for future interface extension.
918 # This also requires the filed names to be kept in sync with the
919 # properties passed to -device/device_add.
923 { 'struct': 'CpuInstanceProperties',
924 'data': { '*node-id': 'int',
927 '*cluster-id': 'int',
936 # @type: CPU object type for usage with device_add command
938 # @props: list of properties to be used for hotplugging CPU
940 # @vcpus-count: number of logical VCPU threads @HotpluggableCPU
943 # @qom-path: link to existing CPU object if CPU is present or omitted
944 # if CPU is not present.
948 { 'struct': 'HotpluggableCPU',
949 'data': { 'type': 'str',
950 'vcpus-count': 'int',
951 'props': 'CpuInstanceProperties',
957 # @query-hotpluggable-cpus:
959 # TODO: Better documentation; currently there is none.
961 # Returns: a list of HotpluggableCPU objects.
967 # For pseries machine type started with -smp 2,cores=2,maxcpus=4 -cpu
970 # -> { "execute": "query-hotpluggable-cpus" }
972 # { "props": { "core-id": 8 }, "type": "POWER8-spapr-cpu-core",
973 # "vcpus-count": 1 },
974 # { "props": { "core-id": 0 }, "type": "POWER8-spapr-cpu-core",
975 # "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"}
978 # For pc machine type started with -smp 1,maxcpus=2:
980 # -> { "execute": "query-hotpluggable-cpus" }
983 # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
984 # "props": {"core-id": 0, "socket-id": 1, "thread-id": 0}
987 # "qom-path": "/machine/unattached/device[0]",
988 # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
989 # "props": {"core-id": 0, "socket-id": 0, "thread-id": 0}
993 # For s390x-virtio-ccw machine type started with -smp 1,maxcpus=2 -cpu
994 # qemu (Since: 2.11):
996 # -> { "execute": "query-hotpluggable-cpus" }
999 # "type": "qemu-s390x-cpu", "vcpus-count": 1,
1000 # "props": { "core-id": 1 }
1003 # "qom-path": "/machine/unattached/device[0]",
1004 # "type": "qemu-s390x-cpu", "vcpus-count": 1,
1005 # "props": { "core-id": 0 }
1009 { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'],
1010 'allow-preconfig': true }
1015 # Runtime equivalent of '-numa' CLI option, available at preconfigure
1016 # stage to configure numa mapping before initializing machine.
1020 { 'command': 'set-numa-node', 'boxed': true,
1021 'data': 'NumaOptions',
1022 'allow-preconfig': true
1028 # Request the balloon driver to change its balloon size.
1030 # @value: the target logical size of the VM in bytes. We can deduce
1031 # the size of the balloon using this formula:
1033 # logical_vm_size = vm_ram_size - balloon_size
1035 # From it we have: balloon_size = vm_ram_size - @value
1038 # - Nothing on success
1039 # - If the balloon driver is enabled but not functional because the
1040 # KVM kernel module cannot support it, KVMMissingCap
1041 # - If no balloon device is present, DeviceNotActive
1043 # Notes: This command just issues a request to the guest. When it
1044 # returns, the balloon size may not have changed. A guest can
1045 # change the balloon size independent of this command.
1051 # -> { "execute": "balloon", "arguments": { "value": 536870912 } }
1052 # <- { "return": {} }
1054 # With a 2.5GiB guest this command inflated the ballon to 3GiB.
1056 { 'command': 'balloon', 'data': {'value': 'int'} }
1061 # Information about the guest balloon device.
1063 # @actual: the logical size of the VM in bytes Formula used:
1064 # logical_vm_size = vm_ram_size - balloon_size
1068 { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
1073 # Return information about the balloon device.
1076 # - @BalloonInfo on success
1077 # - If the balloon driver is enabled but not functional because the
1078 # KVM kernel module cannot support it, KVMMissingCap
1079 # - If no balloon device is present, DeviceNotActive
1085 # -> { "execute": "query-balloon" }
1087 # "actual": 1073741824
1091 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1096 # Emitted when the guest changes the actual BALLOON level. This value
1097 # is equivalent to the @actual field return by the 'query-balloon'
1100 # @actual: the logical size of the VM in bytes Formula used:
1101 # logical_vm_size = vm_ram_size - balloon_size
1103 # Note: this event is rate-limited.
1109 # <- { "event": "BALLOON_CHANGE",
1110 # "data": { "actual": 944766976 },
1111 # "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
1113 { 'event': 'BALLOON_CHANGE',
1114 'data': { 'actual': 'int' } }
1119 # Actual memory information in bytes.
1121 # @base-memory: size of "base" memory specified with command line
1124 # @plugged-memory: size of memory that can be hot-unplugged. This
1125 # field is omitted if target doesn't support memory hotplug (i.e.
1126 # CONFIG_MEM_DEVICE not defined at build time).
1130 { 'struct': 'MemoryInfo',
1131 'data' : { 'base-memory': 'size', '*plugged-memory': 'size' } }
1134 # @query-memory-size-summary:
1136 # Return the amount of initially allocated and present hotpluggable
1137 # (if enabled) memory in bytes.
1141 # -> { "execute": "query-memory-size-summary" }
1142 # <- { "return": { "base-memory": 4294967296, "plugged-memory": 0 } }
1146 { 'command': 'query-memory-size-summary', 'returns': 'MemoryInfo' }
1149 # @PCDIMMDeviceInfo:
1151 # PCDIMMDevice state information
1155 # @addr: physical address, where device is mapped
1157 # @size: size of memory that the device provides
1159 # @slot: slot number at which device is plugged in
1161 # @node: NUMA node number where device is plugged in
1163 # @memdev: memory backend linked with device
1165 # @hotplugged: true if device was hotplugged
1167 # @hotpluggable: true if device if could be added/removed while
1168 # machine is running
1172 { 'struct': 'PCDIMMDeviceInfo',
1173 'data': { '*id': 'str',
1179 'hotplugged': 'bool',
1180 'hotpluggable': 'bool'
1185 # @VirtioPMEMDeviceInfo:
1187 # VirtioPMEM state information
1191 # @memaddr: physical address in memory, where device is mapped
1193 # @size: size of memory that the device provides
1195 # @memdev: memory backend linked with device
1199 { 'struct': 'VirtioPMEMDeviceInfo',
1200 'data': { '*id': 'str',
1208 # @VirtioMEMDeviceInfo:
1210 # VirtioMEMDevice state information
1214 # @memaddr: physical address in memory, where device is mapped
1216 # @requested-size: the user requested size of the device
1218 # @size: the (current) size of memory that the device provides
1220 # @max-size: the maximum size of memory that the device can provide
1222 # @block-size: the block size of memory that the device provides
1224 # @node: NUMA node number where device is assigned to
1226 # @memdev: memory backend linked with the region
1230 { 'struct': 'VirtioMEMDeviceInfo',
1231 'data': { '*id': 'str',
1233 'requested-size': 'size',
1236 'block-size': 'size',
1243 # @SgxEPCDeviceInfo:
1245 # Sgx EPC state information
1249 # @memaddr: physical address in memory, where device is mapped
1251 # @size: size of memory that the device provides
1253 # @memdev: memory backend linked with device
1255 # @node: the numa node (Since: 7.0)
1259 { 'struct': 'SgxEPCDeviceInfo',
1260 'data': { '*id': 'str',
1269 # @MemoryDeviceInfoKind:
1271 # @nvdimm: since 2.12
1273 # @virtio-pmem: since 4.1
1275 # @virtio-mem: since 5.1
1277 # @sgx-epc: since 6.2.
1281 { 'enum': 'MemoryDeviceInfoKind',
1282 'data': [ 'dimm', 'nvdimm', 'virtio-pmem', 'virtio-mem', 'sgx-epc' ] }
1285 # @PCDIMMDeviceInfoWrapper:
1289 { 'struct': 'PCDIMMDeviceInfoWrapper',
1290 'data': { 'data': 'PCDIMMDeviceInfo' } }
1293 # @VirtioPMEMDeviceInfoWrapper:
1297 { 'struct': 'VirtioPMEMDeviceInfoWrapper',
1298 'data': { 'data': 'VirtioPMEMDeviceInfo' } }
1301 # @VirtioMEMDeviceInfoWrapper:
1305 { 'struct': 'VirtioMEMDeviceInfoWrapper',
1306 'data': { 'data': 'VirtioMEMDeviceInfo' } }
1309 # @SgxEPCDeviceInfoWrapper:
1313 { 'struct': 'SgxEPCDeviceInfoWrapper',
1314 'data': { 'data': 'SgxEPCDeviceInfo' } }
1317 # @MemoryDeviceInfo:
1319 # Union containing information about a memory device
1323 { 'union': 'MemoryDeviceInfo',
1324 'base': { 'type': 'MemoryDeviceInfoKind' },
1325 'discriminator': 'type',
1326 'data': { 'dimm': 'PCDIMMDeviceInfoWrapper',
1327 'nvdimm': 'PCDIMMDeviceInfoWrapper',
1328 'virtio-pmem': 'VirtioPMEMDeviceInfoWrapper',
1329 'virtio-mem': 'VirtioMEMDeviceInfoWrapper',
1330 'sgx-epc': 'SgxEPCDeviceInfoWrapper'
1337 # Sgx EPC cmdline information
1339 # @memdev: memory backend linked with device
1341 # @node: the numa node (Since: 7.0)
1345 { 'struct': 'SgxEPC',
1346 'data': { 'memdev': 'str',
1352 # @SgxEPCProperties:
1354 # SGX properties of machine types.
1356 # @sgx-epc: list of ids of memory-backend-epc objects.
1360 { 'struct': 'SgxEPCProperties',
1361 'data': { 'sgx-epc': ['SgxEPC'] }
1365 # @query-memory-devices:
1367 # Lists available memory devices and their state
1373 # -> { "execute": "query-memory-devices" }
1374 # <- { "return": [ { "data":
1375 # { "addr": 5368709120,
1376 # "hotpluggable": true,
1377 # "hotplugged": true,
1379 # "memdev": "/objects/memX",
1381 # "size": 1073741824,
1386 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
1389 # @MEMORY_DEVICE_SIZE_CHANGE:
1391 # Emitted when the size of a memory device changes. Only emitted for
1392 # memory devices that can actually change the size (e.g., virtio-mem
1393 # due to guest action).
1397 # @size: the new size of memory that the device provides
1399 # @qom-path: path to the device object in the QOM tree (since 6.2)
1401 # Note: this event is rate-limited.
1407 # <- { "event": "MEMORY_DEVICE_SIZE_CHANGE",
1408 # "data": { "id": "vm0", "size": 1073741824,
1409 # "qom-path": "/machine/unattached/device[2]" },
1410 # "timestamp": { "seconds": 1588168529, "microseconds": 201316 } }
1412 { 'event': 'MEMORY_DEVICE_SIZE_CHANGE',
1413 'data': { '*id': 'str', 'size': 'size', 'qom-path' : 'str'} }
1416 # @MEM_UNPLUG_ERROR:
1418 # Emitted when memory hot unplug error occurs.
1420 # @device: device name
1422 # @msg: Informative message
1426 # @deprecated: This event is deprecated. Use
1427 # @DEVICE_UNPLUG_GUEST_ERROR instead.
1433 # <- { "event": "MEM_UNPLUG_ERROR",
1434 # "data": { "device": "dimm1",
1435 # "msg": "acpi: device unplug for unsupported device"
1437 # "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
1439 { 'event': 'MEM_UNPLUG_ERROR',
1440 'data': { 'device': 'str', 'msg': 'str' },
1441 'features': ['deprecated'] }
1444 # @BootConfiguration:
1446 # Schema for virtual machine boot configuration.
1448 # @order: Boot order (a=floppy, c=hard disk, d=CD-ROM, n=network)
1450 # @once: Boot order to apply on first boot
1452 # @menu: Whether to show a boot menu
1454 # @splash: The name of the file to be passed to the firmware as logo
1455 # picture, if @menu is true.
1457 # @splash-time: How long to show the logo picture, in milliseconds
1459 # @reboot-timeout: Timeout before guest reboots after boot fails
1461 # @strict: Whether to attempt booting from devices not included in the
1466 { 'struct': 'BootConfiguration', 'data': {
1471 '*splash-time': 'int',
1472 '*reboot-timeout': 'int',
1473 '*strict': 'bool' } }
1476 # @SMPConfiguration:
1478 # Schema for CPU topology configuration. A missing value lets QEMU
1479 # figure out a suitable value based on the ones that are provided.
1481 # @cpus: number of virtual CPUs in the virtual machine
1483 # @sockets: number of sockets in the CPU topology
1485 # @dies: number of dies per socket in the CPU topology
1487 # @clusters: number of clusters per die in the CPU topology (since
1490 # @cores: number of cores per cluster in the CPU topology
1492 # @threads: number of threads per core in the CPU topology
1494 # @maxcpus: maximum number of hotpluggable virtual CPUs in the virtual
1499 { 'struct': 'SMPConfiguration', 'data': {
1506 '*maxcpus': 'int' } }
1511 # Query interrupt statistics
1515 # @unstable: This command is meant for debugging.
1517 # Returns: interrupt statistics
1521 { 'command': 'x-query-irq',
1522 'returns': 'HumanReadableText',
1523 'features': [ 'unstable' ] }
1528 # Query TCG compiler statistics
1532 # @unstable: This command is meant for debugging.
1534 # Returns: TCG compiler statistics
1538 { 'command': 'x-query-jit',
1539 'returns': 'HumanReadableText',
1541 'features': [ 'unstable' ] }
1546 # Query NUMA topology information
1550 # @unstable: This command is meant for debugging.
1552 # Returns: topology information
1556 { 'command': 'x-query-numa',
1557 'returns': 'HumanReadableText',
1558 'features': [ 'unstable' ] }
1563 # Query TCG opcode counters
1567 # @unstable: This command is meant for debugging.
1569 # Returns: TCG opcode counters
1573 { 'command': 'x-query-opcount',
1574 'returns': 'HumanReadableText',
1576 'features': [ 'unstable' ] }
1581 # Query TCG profiling information
1585 # @unstable: This command is meant for debugging.
1587 # Returns: profile information
1591 { 'command': 'x-query-profile',
1592 'returns': 'HumanReadableText',
1594 'features': [ 'unstable' ] }
1597 # @x-query-ramblock:
1599 # Query system ramblock information
1603 # @unstable: This command is meant for debugging.
1605 # Returns: system ramblock information
1609 { 'command': 'x-query-ramblock',
1610 'returns': 'HumanReadableText',
1611 'features': [ 'unstable' ] }
1620 # @unstable: This command is meant for debugging.
1622 # Returns: RDMA state
1626 { 'command': 'x-query-rdma',
1627 'returns': 'HumanReadableText',
1628 'features': [ 'unstable' ] }
1633 # Query information on the registered ROMS
1637 # @unstable: This command is meant for debugging.
1639 # Returns: registered ROMs
1643 { 'command': 'x-query-roms',
1644 'returns': 'HumanReadableText',
1645 'features': [ 'unstable' ] }
1650 # Query information on the USB devices
1654 # @unstable: This command is meant for debugging.
1656 # Returns: USB device information
1660 { 'command': 'x-query-usb',
1661 'returns': 'HumanReadableText',
1662 'features': [ 'unstable' ] }
1665 # @SmbiosEntryPointType:
1667 # @32: SMBIOS version 2.1 (32-bit) Entry Point
1669 # @64: SMBIOS version 3.0 (64-bit) Entry Point
1673 { 'enum': 'SmbiosEntryPointType',
1674 'data': [ '32', '64' ] }
1677 # @MemorySizeConfiguration:
1679 # Schema for memory size configuration.
1681 # @size: memory size in bytes
1683 # @max-size: maximum hotpluggable memory size in bytes
1685 # @slots: number of available memory slots for hotplug
1689 { 'struct': 'MemorySizeConfiguration', 'data': {
1691 '*max-size': 'size',
1692 '*slots': 'uint64' } }
1697 # Save the FDT in dtb format.
1699 # @filename: name of the dtb file to be created
1705 # -> { "execute": "dumpdtb" }
1706 # "arguments": { "filename": "fdt.dtb" } }
1707 # <- { "return": {} }
1709 { 'command': 'dumpdtb',
1710 'data': { 'filename': 'str' },
1711 'if': 'CONFIG_FDT' }