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' }
12 { 'include': 'machine-common.json' }
17 # The comprehensive enumeration of QEMU system emulation ("softmmu")
18 # targets. Run "./configure --help" in the project root directory,
19 # and look for the \*-softmmu targets near the "--target-list" option.
20 # The individual target constants are not documented here, for the
27 # Notes: The resulting QMP strings can be appended to the
28 # "qemu-system-" prefix to produce the corresponding QEMU
29 # executable name. This is true even for "qemu-system-x86_64".
33 { 'enum' : 'SysEmuTarget',
34 'data' : [ 'aarch64', 'alpha', 'arm', 'avr', 'cris', 'hppa', 'i386',
35 'loongarch64', 'm68k', 'microblaze', 'microblazeel', 'mips', 'mips64',
36 'mips64el', 'mipsel', 'or1k', 'ppc',
37 'ppc64', 'riscv32', 'riscv64', 'rx', 's390x', 'sh4',
38 'sh4eb', 'sparc', 'sparc64', 'tricore',
39 'x86_64', 'xtensa', 'xtensaeb' ] }
44 # An enumeration of cpu states that can be assumed by a virtual S390
49 { 'enum': 'CpuS390State',
50 'prefix': 'S390_CPU_STATE',
51 'data': [ 'uninitialized', 'stopped', 'check-stop', 'operating', 'load' ] }
56 # Additional information about a virtual S390 CPU
58 # @cpu-state: the virtual CPU's state
60 # @dedicated: the virtual CPU's dedication (since 8.2)
62 # @entitlement: the virtual CPU's entitlement (since 8.2)
66 { 'struct': 'CpuInfoS390',
67 'data': { 'cpu-state': 'CpuS390State',
69 '*entitlement': 'CpuS390Entitlement' } }
74 # Information about a virtual CPU
76 # @cpu-index: index of the virtual CPU
78 # @qom-path: path to the CPU object in the QOM tree
80 # @thread-id: ID of the underlying host thread
82 # @props: properties associated with a virtual CPU, e.g. the socket id
84 # @target: the QEMU system emulation target, which determines which
85 # additional fields will be listed (since 3.0)
89 { 'union' : 'CpuInfoFast',
90 'base' : { 'cpu-index' : 'int',
93 '*props' : 'CpuInstanceProperties',
94 'target' : 'SysEmuTarget' },
95 'discriminator' : 'target',
96 'data' : { 's390x' : 'CpuInfoS390' } }
101 # Returns information about all virtual CPUs.
103 # Returns: list of @CpuInfoFast
109 # -> { "execute": "query-cpus-fast" }
112 # "thread-id": 25627,
118 # "qom-path": "/machine/unattached/device[0]",
123 # "thread-id": 25628,
129 # "qom-path": "/machine/unattached/device[2]",
136 { 'command': 'query-cpus-fast', 'returns': [ 'CpuInfoFast' ] }
141 # Property default values specific to a machine type, for use by
142 # scripts/compare-machine-types.
144 # @qom-type: name of the QOM type to which the default applies
146 # @property: name of its property to which the default applies
148 # @value: the default value (machine-specific default can overwrite
149 # the "default" default, to avoid this use -machine none)
153 { 'struct': 'CompatProperty',
154 'data': { 'qom-type': 'str',
161 # Information describing a machine.
163 # @name: the name of the machine
165 # @alias: an alias for the machine name
167 # @is-default: whether the machine is default
169 # @cpu-max: maximum number of CPUs supported by the machine type
172 # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7)
174 # @numa-mem-supported: true if '-numa node,mem' option is supported by
175 # the machine type and false otherwise (since 4.1)
177 # @deprecated: if true, the machine type is deprecated and may be
178 # removed in future versions of QEMU according to the QEMU
179 # deprecation policy (since 4.1)
181 # @default-cpu-type: default CPU model typename if none is requested
182 # via the -cpu argument. (since 4.2)
184 # @default-ram-id: the default ID of initial RAM memory backend (since
187 # @acpi: machine type supports ACPI (since 8.0)
189 # @compat-props: The machine type's compatibility properties. Only
190 # present when query-machines argument @compat-props is true.
195 # @unstable: Member @compat-props is experimental.
199 { 'struct': 'MachineInfo',
200 'data': { 'name': 'str', '*alias': 'str',
201 '*is-default': 'bool', 'cpu-max': 'int',
202 'hotpluggable-cpus': 'bool', 'numa-mem-supported': 'bool',
203 'deprecated': 'bool', '*default-cpu-type': 'str',
204 '*default-ram-id': 'str', 'acpi': 'bool',
205 '*compat-props': { 'type': ['CompatProperty'],
206 'features': ['unstable'] } } }
211 # Return a list of supported machines
213 # @compat-props: if true, also return compatibility properties.
214 # (default: false) (since 9.1)
218 # @unstable: Argument @compat-props is experimental.
220 # Returns: a list of MachineInfo
226 # -> { "execute": "query-machines", "arguments": { "compat-props": true } }
229 # "hotpluggable-cpus": true,
230 # "name": "pc-q35-6.2",
233 # "qom-type": "virtio-mem",
234 # "property": "unplugged-inaccessible",
238 # "numa-mem-supported": false,
239 # "default-cpu-type": "qemu64-x86_64-cpu",
241 # "deprecated": false,
242 # "default-ram-id": "pc.ram"
247 { 'command': 'query-machines',
248 'data': { '*compat-props': { 'type': 'bool',
249 'features': [ 'unstable' ] } },
250 'returns': ['MachineInfo'] }
253 # @CurrentMachineParams:
255 # Information describing the running machine parameters.
257 # @wakeup-suspend-support: true if the machine supports wake up from
262 { 'struct': 'CurrentMachineParams',
263 'data': { 'wakeup-suspend-support': 'bool'} }
266 # @query-current-machine:
268 # Return information on the current virtual machine.
270 # Returns: CurrentMachineParams
274 { 'command': 'query-current-machine', 'returns': 'CurrentMachineParams' }
279 # Information describing the QEMU target.
281 # @arch: the target architecture
285 { 'struct': 'TargetInfo',
286 'data': { 'arch': 'SysEmuTarget' } }
291 # Return information about the target for this QEMU
293 # Returns: TargetInfo
297 { 'command': 'query-target', 'returns': 'TargetInfo' }
302 # Guest UUID information (Universally Unique Identifier).
304 # @UUID: the UUID of the guest
308 # Notes: If no UUID was specified for the guest, a null UUID is
311 { 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
316 # Query the guest UUID information.
318 # Returns: The @UuidInfo for the guest
324 # -> { "execute": "query-uuid" }
325 # <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
327 { 'command': 'query-uuid', 'returns': 'UuidInfo', 'allow-preconfig': true }
334 # @guid: the globally unique identifier
338 { 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
341 # @query-vm-generation-id:
343 # Show Virtual Machine Generation ID
347 { 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }
352 # Performs a hard reset of a guest.
358 # -> { "execute": "system_reset" }
359 # <- { "return": {} }
361 { 'command': 'system_reset' }
366 # Requests that a guest perform a powerdown operation.
370 # Notes: A guest may or may not respond to this command. This command
371 # returning does not indicate that a guest has accepted the
372 # request or that it has shut down. Many guests will respond to
373 # this command by prompting the user in some way.
377 # -> { "execute": "system_powerdown" }
378 # <- { "return": {} }
380 { 'command': 'system_powerdown' }
385 # Wake up guest from suspend. If the guest has wake-up from suspend
386 # support enabled (wakeup-suspend-support flag from
387 # query-current-machine), wake-up guest from suspend if the guest is
388 # in SUSPENDED state. Return an error otherwise.
392 # Note: prior to 4.0, this command does nothing in case the guest
397 # -> { "execute": "system_wakeup" }
398 # <- { "return": {} }
400 { 'command': 'system_wakeup' }
405 # Policy for handling lost ticks in timer devices. Ticks end up
406 # getting lost when, for example, the guest is paused.
408 # @discard: throw away the missed ticks and continue with future
409 # injection normally. The guest OS will see the timer jump ahead
410 # by a potentially quite significant amount all at once, as if the
411 # intervening chunk of time had simply not existed; needless to
412 # say, such a sudden jump can easily confuse a guest OS which is
413 # not specifically prepared to deal with it. Assuming the guest
414 # OS can deal correctly with the time jump, the time in the guest
415 # and in the host should now match.
417 # @delay: continue to deliver ticks at the normal rate. The guest OS
418 # will not notice anything is amiss, as from its point of view
419 # time will have continued to flow normally. The time in the
420 # guest should now be behind the time in the host by exactly the
421 # amount of time during which ticks have been missed.
423 # @slew: deliver ticks at a higher rate to catch up with the missed
424 # ticks. The guest OS will not notice anything is amiss, as from
425 # its point of view time will have continued to flow normally.
426 # Once the timer has managed to catch up with all the missing
427 # ticks, the time in the guest and in the host should match.
431 { 'enum': 'LostTickPolicy',
432 'data': ['discard', 'delay', 'slew' ] }
437 # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or
438 # all CPUs (ppc64). The command fails when the guest doesn't support
443 # Note: prior to 2.1, this command was only supported for x86 and s390
448 # -> { "execute": "inject-nmi" }
449 # <- { "return": {} }
451 { 'command': 'inject-nmi' }
456 # Information about support for KVM acceleration
458 # @enabled: true if KVM acceleration is active
460 # @present: true if KVM acceleration is built into this executable
464 { 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
469 # Returns information about KVM acceleration
477 # -> { "execute": "query-kvm" }
478 # <- { "return": { "enabled": true, "present": true } }
480 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
485 # @node: NUMA nodes configuration
487 # @dist: NUMA distance configuration (since 2.10)
489 # @cpu: property based CPU(s) to node mapping (Since: 2.10)
491 # @hmat-lb: memory latency and bandwidth information (Since: 5.0)
493 # @hmat-cache: memory side cache information (Since: 5.0)
497 { 'enum': 'NumaOptionsType',
498 'data': [ 'node', 'dist', 'cpu', 'hmat-lb', 'hmat-cache' ] }
503 # A discriminated record of NUMA options. (for OptsVisitor)
505 # @type: NUMA option type
509 { 'union': 'NumaOptions',
510 'base': { 'type': 'NumaOptionsType' },
511 'discriminator': 'type',
513 'node': 'NumaNodeOptions',
514 'dist': 'NumaDistOptions',
515 'cpu': 'NumaCpuOptions',
516 'hmat-lb': 'NumaHmatLBOptions',
517 'hmat-cache': 'NumaHmatCacheOptions' }}
522 # Create a guest NUMA node. (for OptsVisitor)
524 # @nodeid: NUMA node ID (increase by 1 from 0 if omitted)
526 # @cpus: VCPUs belonging to this node (assign VCPUS round-robin if
529 # @mem: memory size of this node; mutually exclusive with @memdev.
530 # Equally divide total memory among nodes if both @mem and @memdev
533 # @memdev: memory backend object. If specified for one node, it must
534 # be specified for all nodes.
536 # @initiator: defined in ACPI 6.3 Chapter 5.2.27.3 Table 5-145, points
537 # to the nodeid which has the memory controller responsible for
538 # this NUMA node. This field provides additional information as
539 # to the initiator node that is closest (as in directly attached)
540 # to this node, and therefore has the best performance (since 5.0)
544 { 'struct': 'NumaNodeOptions',
550 '*initiator': 'uint16' }}
555 # Set the distance between 2 NUMA nodes.
557 # @src: source NUMA node.
559 # @dst: destination NUMA node.
561 # @val: NUMA distance from source node to destination node. When a
562 # node is unreachable from another node, set the distance between
567 { 'struct': 'NumaDistOptions',
574 # @CXLFixedMemoryWindowOptions:
576 # Create a CXL Fixed Memory Window
578 # @size: Size of the Fixed Memory Window in bytes. Must be a multiple
581 # @interleave-granularity: Number of contiguous bytes for which
582 # accesses will go to a given interleave target. Accepted values
583 # [256, 512, 1k, 2k, 4k, 8k, 16k]
585 # @targets: Target root bridge IDs from -device ...,id=<ID> for each
590 { 'struct': 'CXLFixedMemoryWindowOptions',
593 '*interleave-granularity': 'size',
594 'targets': ['str'] }}
599 # List of CXL Fixed Memory Windows.
601 # @cxl-fmw: List of CXLFixedMemoryWindowOptions
605 { 'struct' : 'CXLFMWProperties',
606 'data': { 'cxl-fmw': ['CXLFixedMemoryWindowOptions'] }
612 # A X86 32-bit register
616 { 'enum': 'X86CPURegister32',
617 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
620 # @X86CPUFeatureWordInfo:
622 # Information about a X86 CPU feature word
624 # @cpuid-input-eax: Input EAX value for CPUID instruction for that
627 # @cpuid-input-ecx: Input ECX value for CPUID instruction for that
630 # @cpuid-register: Output register containing the feature bits
632 # @features: value of output register, containing the feature bits
636 { 'struct': 'X86CPUFeatureWordInfo',
637 'data': { 'cpuid-input-eax': 'int',
638 '*cpuid-input-ecx': 'int',
639 'cpuid-register': 'X86CPURegister32',
640 'features': 'int' } }
645 # Not used by QMP; hack to let us use X86CPUFeatureWordInfoList
650 { 'struct': 'DummyForceArrays',
651 'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
656 # Option "-numa cpu" overrides default cpu to node mapping. It
657 # accepts the same set of cpu properties as returned by
658 # query-hotpluggable-cpus[].props, where node-id could be used to
659 # override default node mapping.
663 { 'struct': 'NumaCpuOptions',
664 'base': 'CpuInstanceProperties',
668 # @HmatLBMemoryHierarchy:
670 # The memory hierarchy in the System Locality Latency and Bandwidth
671 # Information Structure of HMAT (Heterogeneous Memory Attribute Table)
673 # For more information about @HmatLBMemoryHierarchy, see chapter
674 # 5.2.27.4: Table 5-146: Field "Flags" of ACPI 6.3 spec.
676 # @memory: the structure represents the memory performance
678 # @first-level: first level of memory side cache
680 # @second-level: second level of memory side cache
682 # @third-level: third level of memory side cache
686 { 'enum': 'HmatLBMemoryHierarchy',
687 'data': [ 'memory', 'first-level', 'second-level', 'third-level' ] }
692 # Data type in the System Locality Latency and Bandwidth Information
693 # Structure of HMAT (Heterogeneous Memory Attribute Table)
695 # For more information about @HmatLBDataType, see chapter 5.2.27.4:
696 # Table 5-146: Field "Data Type" of ACPI 6.3 spec.
698 # @access-latency: access latency (nanoseconds)
700 # @read-latency: read latency (nanoseconds)
702 # @write-latency: write latency (nanoseconds)
704 # @access-bandwidth: access bandwidth (Bytes per second)
706 # @read-bandwidth: read bandwidth (Bytes per second)
708 # @write-bandwidth: write bandwidth (Bytes per second)
712 { 'enum': 'HmatLBDataType',
713 'data': [ 'access-latency', 'read-latency', 'write-latency',
714 'access-bandwidth', 'read-bandwidth', 'write-bandwidth' ] }
717 # @NumaHmatLBOptions:
719 # Set the system locality latency and bandwidth information between
720 # Initiator and Target proximity Domains.
722 # For more information about @NumaHmatLBOptions, see chapter 5.2.27.4:
723 # Table 5-146 of ACPI 6.3 spec.
725 # @initiator: the Initiator Proximity Domain.
727 # @target: the Target Proximity Domain.
729 # @hierarchy: the Memory Hierarchy. Indicates the performance of
730 # memory or side cache.
732 # @data-type: presents the type of data, access/read/write latency or
735 # @latency: the value of latency from @initiator to @target proximity
736 # domain, the latency unit is "ns(nanosecond)".
738 # @bandwidth: the value of bandwidth between @initiator and @target
739 # proximity domain, the bandwidth unit is "Bytes per second".
743 { 'struct': 'NumaHmatLBOptions',
745 'initiator': 'uint16',
747 'hierarchy': 'HmatLBMemoryHierarchy',
748 'data-type': 'HmatLBDataType',
749 '*latency': 'uint64',
750 '*bandwidth': 'size' }}
753 # @HmatCacheAssociativity:
755 # Cache associativity in the Memory Side Cache Information Structure
758 # For more information of @HmatCacheAssociativity, see chapter
759 # 5.2.27.5: Table 5-147 of ACPI 6.3 spec.
761 # @none: None (no memory side cache in this proximity domain, or cache
762 # associativity unknown)
764 # @direct: Direct Mapped
766 # @complex: Complex Cache Indexing (implementation specific)
770 { 'enum': 'HmatCacheAssociativity',
771 'data': [ 'none', 'direct', 'complex' ] }
774 # @HmatCacheWritePolicy:
776 # Cache write policy in the Memory Side Cache Information Structure of
779 # For more information of @HmatCacheWritePolicy, see chapter 5.2.27.5:
780 # Table 5-147: Field "Cache Attributes" of ACPI 6.3 spec.
782 # @none: None (no memory side cache in this proximity domain, or cache
783 # write policy unknown)
785 # @write-back: Write Back (WB)
787 # @write-through: Write Through (WT)
791 { 'enum': 'HmatCacheWritePolicy',
792 'data': [ 'none', 'write-back', 'write-through' ] }
795 # @NumaHmatCacheOptions:
797 # Set the memory side cache information for a given memory domain.
799 # For more information of @NumaHmatCacheOptions, see chapter 5.2.27.5:
800 # Table 5-147: Field "Cache Attributes" of ACPI 6.3 spec.
802 # @node-id: the memory proximity domain to which the memory belongs.
804 # @size: the size of memory side cache in bytes.
806 # @level: the cache level described in this structure.
808 # @associativity: the cache associativity,
809 # none/direct-mapped/complex(complex cache indexing).
811 # @policy: the write policy, none/write-back/write-through.
813 # @line: the cache Line size in bytes.
817 { 'struct': 'NumaHmatCacheOptions',
822 'associativity': 'HmatCacheAssociativity',
823 'policy': 'HmatCacheWritePolicy',
829 # Save a portion of guest memory to a file.
831 # @val: the virtual address of the guest to start from
833 # @size: the size of memory region to save
835 # @filename: the file to save the memory to as binary data
837 # @cpu-index: the index of the virtual CPU to use for translating the
838 # virtual address (defaults to CPU 0)
842 # Notes: Errors were not reliably returned until 1.1
846 # -> { "execute": "memsave",
847 # "arguments": { "val": 10,
849 # "filename": "/tmp/virtual-mem-dump" } }
850 # <- { "return": {} }
852 { 'command': 'memsave',
853 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
858 # Save a portion of guest physical memory to a file.
860 # @val: the physical address of the guest to start from
862 # @size: the size of memory region to save
864 # @filename: the file to save the memory to as binary data
868 # Notes: Errors were not reliably returned until 1.1
872 # -> { "execute": "pmemsave",
873 # "arguments": { "val": 10,
875 # "filename": "/tmp/physical-mem-dump" } }
876 # <- { "return": {} }
878 { 'command': 'pmemsave',
879 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
884 # Information about memory backend
886 # @id: backend's ID if backend has 'id' property (since 2.9)
888 # @size: memory backend size
890 # @merge: whether memory merge support is enabled
892 # @dump: whether memory backend's memory is included in a core dump
894 # @prealloc: whether memory was preallocated
896 # @share: whether memory is private to QEMU or shared (since 6.1)
898 # @reserve: whether swap space (or huge pages) was reserved if
899 # applicable. This corresponds to the user configuration and not
900 # the actual behavior implemented in the OS to perform the
901 # reservation. For example, Linux will never reserve swap space
902 # for shared file mappings. (since 6.1)
904 # @host-nodes: host nodes for its memory policy
906 # @policy: memory policy of memory backend
910 { 'struct': 'Memdev',
919 'host-nodes': ['uint16'],
920 'policy': 'HostMemPolicy' }}
925 # Returns information for all memory backends.
927 # Returns: a list of @Memdev.
933 # -> { "execute": "query-memdev" }
942 # "host-nodes": [0, 1],
951 # "host-nodes": [2, 3],
952 # "policy": "preferred"
957 { 'command': 'query-memdev', 'returns': ['Memdev'], 'allow-preconfig': true }
960 # @CpuInstanceProperties:
962 # List of properties to be used for hotplugging a CPU instance, it
963 # should be passed by management with device_add command when a CPU is
966 # Which members are optional and which mandatory depends on the
967 # architecture and board.
969 # For s390x see :ref:`cpu-topology-s390x`.
971 # The ids other than the node-id specify the position of the CPU
972 # within the CPU topology (as defined by the machine property "smp",
973 # thus see also type @SMPConfiguration)
975 # @node-id: NUMA node ID the CPU belongs to
977 # @drawer-id: drawer number within CPU topology the CPU belongs to
980 # @book-id: book number within parent container the CPU belongs to
983 # @socket-id: socket number within parent container the CPU belongs to
985 # @die-id: die number within the parent container the CPU belongs to
988 # @cluster-id: cluster number within the parent container the CPU
989 # belongs to (since 7.1)
991 # @module-id: module number within the parent container the CPU belongs
994 # @core-id: core number within the parent container the CPU belongs to
996 # @thread-id: thread number within the core the CPU belongs to
998 # Note: management should be prepared to pass through additional
999 # properties with device_add.
1003 { 'struct': 'CpuInstanceProperties',
1004 # Keep these in sync with the properties device_add accepts
1005 'data': { '*node-id': 'int',
1006 '*drawer-id': 'int',
1008 '*socket-id': 'int',
1010 '*cluster-id': 'int',
1011 '*module-id': 'int',
1020 # @type: CPU object type for usage with device_add command
1022 # @props: list of properties to be used for hotplugging CPU
1024 # @vcpus-count: number of logical VCPU threads @HotpluggableCPU
1027 # @qom-path: link to existing CPU object if CPU is present or omitted
1028 # if CPU is not present.
1032 { 'struct': 'HotpluggableCPU',
1033 'data': { 'type': 'str',
1034 'vcpus-count': 'int',
1035 'props': 'CpuInstanceProperties',
1041 # @query-hotpluggable-cpus:
1043 # TODO: Better documentation; currently there is none.
1045 # Returns: a list of HotpluggableCPU objects.
1051 # For pseries machine type started with -smp 2,cores=2,maxcpus=4
1054 # -> { "execute": "query-hotpluggable-cpus" }
1056 # { "props": { "core-id": 8 }, "type": "POWER8-spapr-cpu-core",
1057 # "vcpus-count": 1 },
1058 # { "props": { "core-id": 0 }, "type": "POWER8-spapr-cpu-core",
1059 # "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"}
1062 # For pc machine type started with -smp 1,maxcpus=2:
1064 # -> { "execute": "query-hotpluggable-cpus" }
1067 # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
1068 # "props": {"core-id": 0, "socket-id": 1, "thread-id": 0}
1071 # "qom-path": "/machine/unattached/device[0]",
1072 # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
1073 # "props": {"core-id": 0, "socket-id": 0, "thread-id": 0}
1077 # For s390x-virtio-ccw machine type started with -smp 1,maxcpus=2
1078 # -cpu qemu (Since: 2.11):
1080 # -> { "execute": "query-hotpluggable-cpus" }
1083 # "type": "qemu-s390x-cpu", "vcpus-count": 1,
1084 # "props": { "core-id": 1 }
1087 # "qom-path": "/machine/unattached/device[0]",
1088 # "type": "qemu-s390x-cpu", "vcpus-count": 1,
1089 # "props": { "core-id": 0 }
1093 { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'],
1094 'allow-preconfig': true }
1099 # Runtime equivalent of '-numa' CLI option, available at preconfigure
1100 # stage to configure numa mapping before initializing machine.
1104 { 'command': 'set-numa-node', 'boxed': true,
1105 'data': 'NumaOptions',
1106 'allow-preconfig': true
1112 # Request the balloon driver to change its balloon size.
1114 # @value: the target logical size of the VM in bytes. We can deduce
1115 # the size of the balloon using this formula:
1117 # logical_vm_size = vm_ram_size - balloon_size
1119 # From it we have: balloon_size = vm_ram_size - @value
1122 # - If the balloon driver is enabled but not functional because
1123 # the KVM kernel module cannot support it, KVMMissingCap
1124 # - If no balloon device is present, DeviceNotActive
1126 # Notes: This command just issues a request to the guest. When it
1127 # returns, the balloon size may not have changed. A guest can
1128 # change the balloon size independent of this command.
1134 # -> { "execute": "balloon", "arguments": { "value": 536870912 } }
1135 # <- { "return": {} }
1137 # With a 2.5GiB guest this command inflated the ballon to 3GiB.
1139 { 'command': 'balloon', 'data': {'value': 'int'} }
1144 # Information about the guest balloon device.
1146 # @actual: the logical size of the VM in bytes Formula used:
1147 # logical_vm_size = vm_ram_size - balloon_size
1151 { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
1156 # Return information about the balloon device.
1162 # - If the balloon driver is enabled but not functional because
1163 # the KVM kernel module cannot support it, KVMMissingCap
1164 # - If no balloon device is present, DeviceNotActive
1170 # -> { "execute": "query-balloon" }
1172 # "actual": 1073741824
1176 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1181 # Emitted when the guest changes the actual BALLOON level. This value
1182 # is equivalent to the @actual field return by the 'query-balloon'
1185 # @actual: the logical size of the VM in bytes Formula used:
1186 # logical_vm_size = vm_ram_size - balloon_size
1188 # Note: this event is rate-limited.
1194 # <- { "event": "BALLOON_CHANGE",
1195 # "data": { "actual": 944766976 },
1196 # "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
1198 { 'event': 'BALLOON_CHANGE',
1199 'data': { 'actual': 'int' } }
1204 # hv-balloon guest-provided memory status information.
1206 # @committed: the amount of memory in use inside the guest plus the
1207 # amount of the memory unusable inside the guest (ballooned out,
1210 # @available: the amount of the memory inside the guest available for
1211 # new allocations ("free")
1215 { 'struct': 'HvBalloonInfo',
1216 'data': { 'committed': 'size', 'available': 'size' } }
1219 # @query-hv-balloon-status-report:
1221 # Returns the hv-balloon driver data contained in the last received
1222 # "STATUS" message from the guest.
1228 # - If no hv-balloon device is present, guest memory status
1229 # reporting is not enabled or no guest memory status report
1230 # received yet, GenericError
1236 # -> { "execute": "query-hv-balloon-status-report" }
1238 # "committed": 816640000,
1239 # "available": 3333054464
1243 { 'command': 'query-hv-balloon-status-report', 'returns': 'HvBalloonInfo' }
1246 # @HV_BALLOON_STATUS_REPORT:
1248 # Emitted when the hv-balloon driver receives a "STATUS" message from
1251 # Note: this event is rate-limited.
1257 # <- { "event": "HV_BALLOON_STATUS_REPORT",
1258 # "data": { "committed": 816640000, "available": 3333054464 },
1259 # "timestamp": { "seconds": 1600295492, "microseconds": 661044 } }
1261 { 'event': 'HV_BALLOON_STATUS_REPORT',
1262 'data': 'HvBalloonInfo' }
1267 # Actual memory information in bytes.
1269 # @base-memory: size of "base" memory specified with command line
1272 # @plugged-memory: size of memory that can be hot-unplugged. This
1273 # field is omitted if target doesn't support memory hotplug (i.e.
1274 # CONFIG_MEM_DEVICE not defined at build time).
1278 { 'struct': 'MemoryInfo',
1279 'data' : { 'base-memory': 'size', '*plugged-memory': 'size' } }
1282 # @query-memory-size-summary:
1284 # Return the amount of initially allocated and present hotpluggable
1285 # (if enabled) memory in bytes.
1289 # -> { "execute": "query-memory-size-summary" }
1290 # <- { "return": { "base-memory": 4294967296, "plugged-memory": 0 } }
1294 { 'command': 'query-memory-size-summary', 'returns': 'MemoryInfo' }
1297 # @PCDIMMDeviceInfo:
1299 # PCDIMMDevice state information
1303 # @addr: physical address, where device is mapped
1305 # @size: size of memory that the device provides
1307 # @slot: slot number at which device is plugged in
1309 # @node: NUMA node number where device is plugged in
1311 # @memdev: memory backend linked with device
1313 # @hotplugged: true if device was hotplugged
1315 # @hotpluggable: true if device if could be added/removed while
1316 # machine is running
1320 { 'struct': 'PCDIMMDeviceInfo',
1321 'data': { '*id': 'str',
1327 'hotplugged': 'bool',
1328 'hotpluggable': 'bool'
1333 # @VirtioPMEMDeviceInfo:
1335 # VirtioPMEM state information
1339 # @memaddr: physical address in memory, where device is mapped
1341 # @size: size of memory that the device provides
1343 # @memdev: memory backend linked with device
1347 { 'struct': 'VirtioPMEMDeviceInfo',
1348 'data': { '*id': 'str',
1356 # @VirtioMEMDeviceInfo:
1358 # VirtioMEMDevice state information
1362 # @memaddr: physical address in memory, where device is mapped
1364 # @requested-size: the user requested size of the device
1366 # @size: the (current) size of memory that the device provides
1368 # @max-size: the maximum size of memory that the device can provide
1370 # @block-size: the block size of memory that the device provides
1372 # @node: NUMA node number where device is assigned to
1374 # @memdev: memory backend linked with the region
1378 { 'struct': 'VirtioMEMDeviceInfo',
1379 'data': { '*id': 'str',
1381 'requested-size': 'size',
1384 'block-size': 'size',
1391 # @SgxEPCDeviceInfo:
1393 # Sgx EPC state information
1397 # @memaddr: physical address in memory, where device is mapped
1399 # @size: size of memory that the device provides
1401 # @memdev: memory backend linked with device
1403 # @node: the numa node (Since: 7.0)
1407 { 'struct': 'SgxEPCDeviceInfo',
1408 'data': { '*id': 'str',
1417 # @HvBalloonDeviceInfo:
1419 # hv-balloon provided memory state information
1423 # @memaddr: physical address in memory, where device is mapped
1425 # @max-size: the maximum size of memory that the device can provide
1427 # @memdev: memory backend linked with device
1431 { 'struct': 'HvBalloonDeviceInfo',
1432 'data': { '*id': 'str',
1440 # @MemoryDeviceInfoKind:
1442 # @nvdimm: since 2.12
1444 # @virtio-pmem: since 4.1
1446 # @virtio-mem: since 5.1
1448 # @sgx-epc: since 6.2.
1450 # @hv-balloon: since 8.2.
1454 { 'enum': 'MemoryDeviceInfoKind',
1455 'data': [ 'dimm', 'nvdimm', 'virtio-pmem', 'virtio-mem', 'sgx-epc',
1459 # @PCDIMMDeviceInfoWrapper:
1461 # @data: PCDIMMDevice state information
1465 { 'struct': 'PCDIMMDeviceInfoWrapper',
1466 'data': { 'data': 'PCDIMMDeviceInfo' } }
1469 # @VirtioPMEMDeviceInfoWrapper:
1471 # @data: VirtioPMEM state information
1475 { 'struct': 'VirtioPMEMDeviceInfoWrapper',
1476 'data': { 'data': 'VirtioPMEMDeviceInfo' } }
1479 # @VirtioMEMDeviceInfoWrapper:
1481 # @data: VirtioMEMDevice state information
1485 { 'struct': 'VirtioMEMDeviceInfoWrapper',
1486 'data': { 'data': 'VirtioMEMDeviceInfo' } }
1489 # @SgxEPCDeviceInfoWrapper:
1491 # @data: Sgx EPC state information
1495 { 'struct': 'SgxEPCDeviceInfoWrapper',
1496 'data': { 'data': 'SgxEPCDeviceInfo' } }
1499 # @HvBalloonDeviceInfoWrapper:
1501 # @data: hv-balloon provided memory state information
1505 { 'struct': 'HvBalloonDeviceInfoWrapper',
1506 'data': { 'data': 'HvBalloonDeviceInfo' } }
1509 # @MemoryDeviceInfo:
1511 # Union containing information about a memory device
1513 # @type: memory device type
1517 { 'union': 'MemoryDeviceInfo',
1518 'base': { 'type': 'MemoryDeviceInfoKind' },
1519 'discriminator': 'type',
1520 'data': { 'dimm': 'PCDIMMDeviceInfoWrapper',
1521 'nvdimm': 'PCDIMMDeviceInfoWrapper',
1522 'virtio-pmem': 'VirtioPMEMDeviceInfoWrapper',
1523 'virtio-mem': 'VirtioMEMDeviceInfoWrapper',
1524 'sgx-epc': 'SgxEPCDeviceInfoWrapper',
1525 'hv-balloon': 'HvBalloonDeviceInfoWrapper'
1532 # Sgx EPC cmdline information
1534 # @memdev: memory backend linked with device
1536 # @node: the numa node (Since: 7.0)
1540 { 'struct': 'SgxEPC',
1541 'data': { 'memdev': 'str',
1547 # @SgxEPCProperties:
1549 # SGX properties of machine types.
1551 # @sgx-epc: list of ids of memory-backend-epc objects.
1555 { 'struct': 'SgxEPCProperties',
1556 'data': { 'sgx-epc': ['SgxEPC'] }
1560 # @query-memory-devices:
1562 # Lists available memory devices and their state
1568 # -> { "execute": "query-memory-devices" }
1569 # <- { "return": [ { "data":
1570 # { "addr": 5368709120,
1571 # "hotpluggable": true,
1572 # "hotplugged": true,
1574 # "memdev": "/objects/memX",
1576 # "size": 1073741824,
1581 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
1584 # @MEMORY_DEVICE_SIZE_CHANGE:
1586 # Emitted when the size of a memory device changes. Only emitted for
1587 # memory devices that can actually change the size (e.g., virtio-mem
1588 # due to guest action).
1592 # @size: the new size of memory that the device provides
1594 # @qom-path: path to the device object in the QOM tree (since 6.2)
1596 # Note: this event is rate-limited.
1602 # <- { "event": "MEMORY_DEVICE_SIZE_CHANGE",
1603 # "data": { "id": "vm0", "size": 1073741824,
1604 # "qom-path": "/machine/unattached/device[2]" },
1605 # "timestamp": { "seconds": 1588168529, "microseconds": 201316 } }
1607 { 'event': 'MEMORY_DEVICE_SIZE_CHANGE',
1608 'data': { '*id': 'str', 'size': 'size', 'qom-path' : 'str'} }
1611 # @MEM_UNPLUG_ERROR:
1613 # Emitted when memory hot unplug error occurs.
1615 # @device: device name
1617 # @msg: Informative message
1621 # @deprecated: This event is deprecated. Use
1622 # @DEVICE_UNPLUG_GUEST_ERROR instead.
1628 # <- { "event": "MEM_UNPLUG_ERROR",
1629 # "data": { "device": "dimm1",
1630 # "msg": "acpi: device unplug for unsupported device"
1632 # "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
1634 { 'event': 'MEM_UNPLUG_ERROR',
1635 'data': { 'device': 'str', 'msg': 'str' },
1636 'features': ['deprecated'] }
1639 # @BootConfiguration:
1641 # Schema for virtual machine boot configuration.
1643 # @order: Boot order (a=floppy, c=hard disk, d=CD-ROM, n=network)
1645 # @once: Boot order to apply on first boot
1647 # @menu: Whether to show a boot menu
1649 # @splash: The name of the file to be passed to the firmware as logo
1650 # picture, if @menu is true.
1652 # @splash-time: How long to show the logo picture, in milliseconds
1654 # @reboot-timeout: Timeout before guest reboots after boot fails
1656 # @strict: Whether to attempt booting from devices not included in the
1661 { 'struct': 'BootConfiguration', 'data': {
1666 '*splash-time': 'int',
1667 '*reboot-timeout': 'int',
1668 '*strict': 'bool' } }
1671 # @SMPConfiguration:
1673 # Schema for CPU topology configuration. A missing value lets QEMU
1674 # figure out a suitable value based on the ones that are provided.
1676 # The members other than @cpus and @maxcpus define a topology of
1679 # The ordering from highest/coarsest to lowest/finest is:
1680 # @drawers, @books, @sockets, @dies, @clusters, @cores, @threads.
1682 # Different architectures support different subsets of topology
1685 # For example, s390x does not have clusters and dies, and the socket
1686 # is the parent container of cores.
1688 # @cpus: number of virtual CPUs in the virtual machine
1690 # @maxcpus: maximum number of hotpluggable virtual CPUs in the virtual
1693 # @drawers: number of drawers in the CPU topology (since 8.2)
1695 # @books: number of books in the CPU topology (since 8.2)
1697 # @sockets: number of sockets per parent container
1699 # @dies: number of dies per parent container
1701 # @clusters: number of clusters per parent container (since 7.0)
1703 # @modules: number of modules per parent container (since 9.1)
1705 # @cores: number of cores per parent container
1707 # @threads: number of threads per core
1711 { 'struct': 'SMPConfiguration', 'data': {
1721 '*maxcpus': 'int' } }
1726 # Query interrupt statistics
1730 # @unstable: This command is meant for debugging.
1732 # Returns: interrupt statistics
1736 { 'command': 'x-query-irq',
1737 'returns': 'HumanReadableText',
1738 'features': [ 'unstable' ] }
1743 # Query TCG compiler statistics
1747 # @unstable: This command is meant for debugging.
1749 # Returns: TCG compiler statistics
1753 { 'command': 'x-query-jit',
1754 'returns': 'HumanReadableText',
1756 'features': [ 'unstable' ] }
1761 # Query NUMA topology information
1765 # @unstable: This command is meant for debugging.
1767 # Returns: topology information
1771 { 'command': 'x-query-numa',
1772 'returns': 'HumanReadableText',
1773 'features': [ 'unstable' ] }
1778 # Query TCG opcode counters
1782 # @unstable: This command is meant for debugging.
1784 # Returns: TCG opcode counters
1788 { 'command': 'x-query-opcount',
1789 'returns': 'HumanReadableText',
1791 'features': [ 'unstable' ] }
1794 # @x-query-ramblock:
1796 # Query system ramblock information
1800 # @unstable: This command is meant for debugging.
1802 # Returns: system ramblock information
1806 { 'command': 'x-query-ramblock',
1807 'returns': 'HumanReadableText',
1808 'features': [ 'unstable' ] }
1813 # Query information on the registered ROMS
1817 # @unstable: This command is meant for debugging.
1819 # Returns: registered ROMs
1823 { 'command': 'x-query-roms',
1824 'returns': 'HumanReadableText',
1825 'features': [ 'unstable' ] }
1830 # Query information on the USB devices
1834 # @unstable: This command is meant for debugging.
1836 # Returns: USB device information
1840 { 'command': 'x-query-usb',
1841 'returns': 'HumanReadableText',
1842 'features': [ 'unstable' ] }
1845 # @SmbiosEntryPointType:
1847 # @32: SMBIOS version 2.1 (32-bit) Entry Point
1849 # @64: SMBIOS version 3.0 (64-bit) Entry Point
1851 # @auto: Either 2.x or 3.x SMBIOS version, 2.x if configuration can be
1852 # described by it and 3.x otherwise (since: 9.0)
1856 { 'enum': 'SmbiosEntryPointType',
1857 'data': [ '32', '64', 'auto' ] }
1860 # @MemorySizeConfiguration:
1862 # Schema for memory size configuration.
1864 # @size: memory size in bytes
1866 # @max-size: maximum hotpluggable memory size in bytes
1868 # @slots: number of available memory slots for hotplug
1872 { 'struct': 'MemorySizeConfiguration', 'data': {
1874 '*max-size': 'size',
1875 '*slots': 'uint64' } }
1880 # Save the FDT in dtb format.
1882 # @filename: name of the dtb file to be created
1888 # -> { "execute": "dumpdtb" }
1889 # "arguments": { "filename": "fdt.dtb" } }
1890 # <- { "return": {} }
1892 { 'command': 'dumpdtb',
1893 'data': { 'filename': 'str' },
1894 'if': 'CONFIG_FDT' }