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', 'nios2', '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 # Information describing a machine.
143 # @name: the name of the machine
145 # @alias: an alias for the machine name
147 # @is-default: whether the machine is default
149 # @cpu-max: maximum number of CPUs supported by the machine type
152 # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7)
154 # @numa-mem-supported: true if '-numa node,mem' option is supported by
155 # the machine type and false otherwise (since 4.1)
157 # @deprecated: if true, the machine type is deprecated and may be
158 # removed in future versions of QEMU according to the QEMU
159 # deprecation policy (since 4.1)
161 # @default-cpu-type: default CPU model typename if none is requested
162 # via the -cpu argument. (since 4.2)
164 # @default-ram-id: the default ID of initial RAM memory backend (since
167 # @acpi: machine type supports ACPI (since 8.0)
171 { 'struct': 'MachineInfo',
172 'data': { 'name': 'str', '*alias': 'str',
173 '*is-default': 'bool', 'cpu-max': 'int',
174 'hotpluggable-cpus': 'bool', 'numa-mem-supported': 'bool',
175 'deprecated': 'bool', '*default-cpu-type': 'str',
176 '*default-ram-id': 'str', 'acpi': 'bool' } }
181 # Return a list of supported machines
183 # Returns: a list of MachineInfo
187 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
190 # @CurrentMachineParams:
192 # Information describing the running machine parameters.
194 # @wakeup-suspend-support: true if the machine supports wake up from
199 { 'struct': 'CurrentMachineParams',
200 'data': { 'wakeup-suspend-support': 'bool'} }
203 # @query-current-machine:
205 # Return information on the current virtual machine.
207 # Returns: CurrentMachineParams
211 { 'command': 'query-current-machine', 'returns': 'CurrentMachineParams' }
216 # Information describing the QEMU target.
218 # @arch: the target architecture
222 { 'struct': 'TargetInfo',
223 'data': { 'arch': 'SysEmuTarget' } }
228 # Return information about the target for this QEMU
230 # Returns: TargetInfo
234 { 'command': 'query-target', 'returns': 'TargetInfo' }
239 # Guest UUID information (Universally Unique Identifier).
241 # @UUID: the UUID of the guest
245 # Notes: If no UUID was specified for the guest, a null UUID is
248 { 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
253 # Query the guest UUID information.
255 # Returns: The @UuidInfo for the guest
261 # -> { "execute": "query-uuid" }
262 # <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
264 { 'command': 'query-uuid', 'returns': 'UuidInfo', 'allow-preconfig': true }
271 # @guid: the globally unique identifier
275 { 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
278 # @query-vm-generation-id:
280 # Show Virtual Machine Generation ID
284 { 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }
289 # Performs a hard reset of a guest.
295 # -> { "execute": "system_reset" }
296 # <- { "return": {} }
298 { 'command': 'system_reset' }
303 # Requests that a guest perform a powerdown operation.
307 # Notes: A guest may or may not respond to this command. This command
308 # returning does not indicate that a guest has accepted the
309 # request or that it has shut down. Many guests will respond to
310 # this command by prompting the user in some way.
314 # -> { "execute": "system_powerdown" }
315 # <- { "return": {} }
317 { 'command': 'system_powerdown' }
322 # Wake up guest from suspend. If the guest has wake-up from suspend
323 # support enabled (wakeup-suspend-support flag from
324 # query-current-machine), wake-up guest from suspend if the guest is
325 # in SUSPENDED state. Return an error otherwise.
331 # Note: prior to 4.0, this command does nothing in case the guest
336 # -> { "execute": "system_wakeup" }
337 # <- { "return": {} }
339 { 'command': 'system_wakeup' }
344 # Policy for handling lost ticks in timer devices. Ticks end up
345 # getting lost when, for example, the guest is paused.
347 # @discard: throw away the missed ticks and continue with future
348 # injection normally. The guest OS will see the timer jump ahead
349 # by a potentially quite significant amount all at once, as if the
350 # intervening chunk of time had simply not existed; needless to
351 # say, such a sudden jump can easily confuse a guest OS which is
352 # not specifically prepared to deal with it. Assuming the guest
353 # OS can deal correctly with the time jump, the time in the guest
354 # and in the host should now match.
356 # @delay: continue to deliver ticks at the normal rate. The guest OS
357 # will not notice anything is amiss, as from its point of view
358 # time will have continued to flow normally. The time in the
359 # guest should now be behind the time in the host by exactly the
360 # amount of time during which ticks have been missed.
362 # @slew: deliver ticks at a higher rate to catch up with the missed
363 # ticks. The guest OS will not notice anything is amiss, as from
364 # its point of view time will have continued to flow normally.
365 # Once the timer has managed to catch up with all the missing
366 # ticks, the time in the guest and in the host should match.
370 { 'enum': 'LostTickPolicy',
371 'data': ['discard', 'delay', 'slew' ] }
376 # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or
377 # all CPUs (ppc64). The command fails when the guest doesn't support
380 # Returns: If successful, nothing
384 # Note: prior to 2.1, this command was only supported for x86 and s390
389 # -> { "execute": "inject-nmi" }
390 # <- { "return": {} }
392 { 'command': 'inject-nmi' }
397 # Information about support for KVM acceleration
399 # @enabled: true if KVM acceleration is active
401 # @present: true if KVM acceleration is built into this executable
405 { 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
410 # Returns information about KVM acceleration
418 # -> { "execute": "query-kvm" }
419 # <- { "return": { "enabled": true, "present": true } }
421 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
426 # @node: NUMA nodes configuration
428 # @dist: NUMA distance configuration (since 2.10)
430 # @cpu: property based CPU(s) to node mapping (Since: 2.10)
432 # @hmat-lb: memory latency and bandwidth information (Since: 5.0)
434 # @hmat-cache: memory side cache information (Since: 5.0)
438 { 'enum': 'NumaOptionsType',
439 'data': [ 'node', 'dist', 'cpu', 'hmat-lb', 'hmat-cache' ] }
444 # A discriminated record of NUMA options. (for OptsVisitor)
448 { 'union': 'NumaOptions',
449 'base': { 'type': 'NumaOptionsType' },
450 'discriminator': 'type',
452 'node': 'NumaNodeOptions',
453 'dist': 'NumaDistOptions',
454 'cpu': 'NumaCpuOptions',
455 'hmat-lb': 'NumaHmatLBOptions',
456 'hmat-cache': 'NumaHmatCacheOptions' }}
461 # Create a guest NUMA node. (for OptsVisitor)
463 # @nodeid: NUMA node ID (increase by 1 from 0 if omitted)
465 # @cpus: VCPUs belonging to this node (assign VCPUS round-robin if
468 # @mem: memory size of this node; mutually exclusive with @memdev.
469 # Equally divide total memory among nodes if both @mem and @memdev
472 # @memdev: memory backend object. If specified for one node, it must
473 # be specified for all nodes.
475 # @initiator: defined in ACPI 6.3 Chapter 5.2.27.3 Table 5-145, points
476 # to the nodeid which has the memory controller responsible for
477 # this NUMA node. This field provides additional information as
478 # to the initiator node that is closest (as in directly attached)
479 # to this node, and therefore has the best performance (since 5.0)
483 { 'struct': 'NumaNodeOptions',
489 '*initiator': 'uint16' }}
494 # Set the distance between 2 NUMA nodes.
496 # @src: source NUMA node.
498 # @dst: destination NUMA node.
500 # @val: NUMA distance from source node to destination node. When a
501 # node is unreachable from another node, set the distance between
506 { 'struct': 'NumaDistOptions',
513 # @CXLFixedMemoryWindowOptions:
515 # Create a CXL Fixed Memory Window
517 # @size: Size of the Fixed Memory Window in bytes. Must be a multiple
520 # @interleave-granularity: Number of contiguous bytes for which
521 # accesses will go to a given interleave target. Accepted values
522 # [256, 512, 1k, 2k, 4k, 8k, 16k]
524 # @targets: Target root bridge IDs from -device ...,id=<ID> for each
529 { 'struct': 'CXLFixedMemoryWindowOptions',
532 '*interleave-granularity': 'size',
533 'targets': ['str'] }}
538 # List of CXL Fixed Memory Windows.
540 # @cxl-fmw: List of CXLFixedMemoryWindowOptions
544 { 'struct' : 'CXLFMWProperties',
545 'data': { 'cxl-fmw': ['CXLFixedMemoryWindowOptions'] }
551 # A X86 32-bit register
555 { 'enum': 'X86CPURegister32',
556 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
559 # @X86CPUFeatureWordInfo:
561 # Information about a X86 CPU feature word
563 # @cpuid-input-eax: Input EAX value for CPUID instruction for that
566 # @cpuid-input-ecx: Input ECX value for CPUID instruction for that
569 # @cpuid-register: Output register containing the feature bits
571 # @features: value of output register, containing the feature bits
575 { 'struct': 'X86CPUFeatureWordInfo',
576 'data': { 'cpuid-input-eax': 'int',
577 '*cpuid-input-ecx': 'int',
578 'cpuid-register': 'X86CPURegister32',
579 'features': 'int' } }
584 # Not used by QMP; hack to let us use X86CPUFeatureWordInfoList
589 { 'struct': 'DummyForceArrays',
590 'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
595 # Option "-numa cpu" overrides default cpu to node mapping. It
596 # accepts the same set of cpu properties as returned by
597 # query-hotpluggable-cpus[].props, where node-id could be used to
598 # override default node mapping.
602 { 'struct': 'NumaCpuOptions',
603 'base': 'CpuInstanceProperties',
607 # @HmatLBMemoryHierarchy:
609 # The memory hierarchy in the System Locality Latency and Bandwidth
610 # Information Structure of HMAT (Heterogeneous Memory Attribute Table)
612 # For more information about @HmatLBMemoryHierarchy, see chapter
613 # 5.2.27.4: Table 5-146: Field "Flags" of ACPI 6.3 spec.
615 # @memory: the structure represents the memory performance
617 # @first-level: first level of memory side cache
619 # @second-level: second level of memory side cache
621 # @third-level: third level of memory side cache
625 { 'enum': 'HmatLBMemoryHierarchy',
626 'data': [ 'memory', 'first-level', 'second-level', 'third-level' ] }
631 # Data type in the System Locality Latency and Bandwidth Information
632 # Structure of HMAT (Heterogeneous Memory Attribute Table)
634 # For more information about @HmatLBDataType, see chapter 5.2.27.4:
635 # Table 5-146: Field "Data Type" of ACPI 6.3 spec.
637 # @access-latency: access latency (nanoseconds)
639 # @read-latency: read latency (nanoseconds)
641 # @write-latency: write latency (nanoseconds)
643 # @access-bandwidth: access bandwidth (Bytes per second)
645 # @read-bandwidth: read bandwidth (Bytes per second)
647 # @write-bandwidth: write bandwidth (Bytes per second)
651 { 'enum': 'HmatLBDataType',
652 'data': [ 'access-latency', 'read-latency', 'write-latency',
653 'access-bandwidth', 'read-bandwidth', 'write-bandwidth' ] }
656 # @NumaHmatLBOptions:
658 # Set the system locality latency and bandwidth information between
659 # Initiator and Target proximity Domains.
661 # For more information about @NumaHmatLBOptions, see chapter 5.2.27.4:
662 # Table 5-146 of ACPI 6.3 spec.
664 # @initiator: the Initiator Proximity Domain.
666 # @target: the Target Proximity Domain.
668 # @hierarchy: the Memory Hierarchy. Indicates the performance of
669 # memory or side cache.
671 # @data-type: presents the type of data, access/read/write latency or
674 # @latency: the value of latency from @initiator to @target proximity
675 # domain, the latency unit is "ns(nanosecond)".
677 # @bandwidth: the value of bandwidth between @initiator and @target
678 # proximity domain, the bandwidth unit is "Bytes per second".
682 { 'struct': 'NumaHmatLBOptions',
684 'initiator': 'uint16',
686 'hierarchy': 'HmatLBMemoryHierarchy',
687 'data-type': 'HmatLBDataType',
688 '*latency': 'uint64',
689 '*bandwidth': 'size' }}
692 # @HmatCacheAssociativity:
694 # Cache associativity in the Memory Side Cache Information Structure
697 # For more information of @HmatCacheAssociativity, see chapter
698 # 5.2.27.5: Table 5-147 of ACPI 6.3 spec.
700 # @none: None (no memory side cache in this proximity domain, or cache
701 # associativity unknown)
703 # @direct: Direct Mapped
705 # @complex: Complex Cache Indexing (implementation specific)
709 { 'enum': 'HmatCacheAssociativity',
710 'data': [ 'none', 'direct', 'complex' ] }
713 # @HmatCacheWritePolicy:
715 # Cache write policy in the Memory Side Cache Information Structure of
718 # For more information of @HmatCacheWritePolicy, see chapter 5.2.27.5:
719 # Table 5-147: Field "Cache Attributes" of ACPI 6.3 spec.
721 # @none: None (no memory side cache in this proximity domain, or cache
722 # write policy unknown)
724 # @write-back: Write Back (WB)
726 # @write-through: Write Through (WT)
730 { 'enum': 'HmatCacheWritePolicy',
731 'data': [ 'none', 'write-back', 'write-through' ] }
734 # @NumaHmatCacheOptions:
736 # Set the memory side cache information for a given memory domain.
738 # For more information of @NumaHmatCacheOptions, see chapter 5.2.27.5:
739 # Table 5-147: Field "Cache Attributes" of ACPI 6.3 spec.
741 # @node-id: the memory proximity domain to which the memory belongs.
743 # @size: the size of memory side cache in bytes.
745 # @level: the cache level described in this structure.
747 # @associativity: the cache associativity,
748 # none/direct-mapped/complex(complex cache indexing).
750 # @policy: the write policy, none/write-back/write-through.
752 # @line: the cache Line size in bytes.
756 { 'struct': 'NumaHmatCacheOptions',
761 'associativity': 'HmatCacheAssociativity',
762 'policy': 'HmatCacheWritePolicy',
768 # Save a portion of guest memory to a file.
770 # @val: the virtual address of the guest to start from
772 # @size: the size of memory region to save
774 # @filename: the file to save the memory to as binary data
776 # @cpu-index: the index of the virtual CPU to use for translating the
777 # virtual address (defaults to CPU 0)
779 # Returns: Nothing on success
783 # Notes: Errors were not reliably returned until 1.1
787 # -> { "execute": "memsave",
788 # "arguments": { "val": 10,
790 # "filename": "/tmp/virtual-mem-dump" } }
791 # <- { "return": {} }
793 { 'command': 'memsave',
794 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
799 # Save a portion of guest physical memory to a file.
801 # @val: the physical address of the guest to start from
803 # @size: the size of memory region to save
805 # @filename: the file to save the memory to as binary data
807 # Returns: Nothing on success
811 # Notes: Errors were not reliably returned until 1.1
815 # -> { "execute": "pmemsave",
816 # "arguments": { "val": 10,
818 # "filename": "/tmp/physical-mem-dump" } }
819 # <- { "return": {} }
821 { 'command': 'pmemsave',
822 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
827 # Information about memory backend
829 # @id: backend's ID if backend has 'id' property (since 2.9)
831 # @size: memory backend size
833 # @merge: whether memory merge support is enabled
835 # @dump: whether memory backend's memory is included in a core dump
837 # @prealloc: whether memory was preallocated
839 # @share: whether memory is private to QEMU or shared (since 6.1)
841 # @reserve: whether swap space (or huge pages) was reserved if
842 # applicable. This corresponds to the user configuration and not
843 # the actual behavior implemented in the OS to perform the
844 # reservation. For example, Linux will never reserve swap space
845 # for shared file mappings. (since 6.1)
847 # @host-nodes: host nodes for its memory policy
849 # @policy: memory policy of memory backend
853 { 'struct': 'Memdev',
862 'host-nodes': ['uint16'],
863 'policy': 'HostMemPolicy' }}
868 # Returns information for all memory backends.
870 # Returns: a list of @Memdev.
876 # -> { "execute": "query-memdev" }
885 # "host-nodes": [0, 1],
894 # "host-nodes": [2, 3],
895 # "policy": "preferred"
900 { 'command': 'query-memdev', 'returns': ['Memdev'], 'allow-preconfig': true }
903 # @CpuInstanceProperties:
905 # List of properties to be used for hotplugging a CPU instance, it
906 # should be passed by management with device_add command when a CPU is
909 # Which members are optional and which mandatory depends on the
910 # architecture and board.
912 # For s390x see :ref:`cpu-topology-s390x`.
914 # The ids other than the node-id specify the position of the CPU
915 # within the CPU topology (as defined by the machine property "smp",
916 # thus see also type @SMPConfiguration)
918 # @node-id: NUMA node ID the CPU belongs to
920 # @drawer-id: drawer number within CPU topology the CPU belongs to
923 # @book-id: book number within parent container the CPU belongs to
926 # @socket-id: socket number within parent container the CPU belongs to
928 # @die-id: die number within the parent container the CPU belongs to
931 # @cluster-id: cluster number within the parent container the CPU
932 # belongs to (since 7.1)
934 # @core-id: core number within the parent container the CPU
937 # @thread-id: thread number within the core the CPU belongs to
939 # Note: management should be prepared to pass through additional
940 # properties with device_add.
944 { 'struct': 'CpuInstanceProperties',
945 # Keep these in sync with the properties device_add accepts
946 'data': { '*node-id': 'int',
951 '*cluster-id': 'int',
960 # @type: CPU object type for usage with device_add command
962 # @props: list of properties to be used for hotplugging CPU
964 # @vcpus-count: number of logical VCPU threads @HotpluggableCPU
967 # @qom-path: link to existing CPU object if CPU is present or omitted
968 # if CPU is not present.
972 { 'struct': 'HotpluggableCPU',
973 'data': { 'type': 'str',
974 'vcpus-count': 'int',
975 'props': 'CpuInstanceProperties',
981 # @query-hotpluggable-cpus:
983 # TODO: Better documentation; currently there is none.
985 # Returns: a list of HotpluggableCPU objects.
991 # For pseries machine type started with -smp 2,cores=2,maxcpus=4 -cpu
994 # -> { "execute": "query-hotpluggable-cpus" }
996 # { "props": { "core-id": 8 }, "type": "POWER8-spapr-cpu-core",
997 # "vcpus-count": 1 },
998 # { "props": { "core-id": 0 }, "type": "POWER8-spapr-cpu-core",
999 # "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"}
1002 # For pc machine type started with -smp 1,maxcpus=2:
1004 # -> { "execute": "query-hotpluggable-cpus" }
1007 # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
1008 # "props": {"core-id": 0, "socket-id": 1, "thread-id": 0}
1011 # "qom-path": "/machine/unattached/device[0]",
1012 # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
1013 # "props": {"core-id": 0, "socket-id": 0, "thread-id": 0}
1017 # For s390x-virtio-ccw machine type started with -smp 1,maxcpus=2 -cpu
1018 # qemu (Since: 2.11):
1020 # -> { "execute": "query-hotpluggable-cpus" }
1023 # "type": "qemu-s390x-cpu", "vcpus-count": 1,
1024 # "props": { "core-id": 1 }
1027 # "qom-path": "/machine/unattached/device[0]",
1028 # "type": "qemu-s390x-cpu", "vcpus-count": 1,
1029 # "props": { "core-id": 0 }
1033 { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'],
1034 'allow-preconfig': true }
1039 # Runtime equivalent of '-numa' CLI option, available at preconfigure
1040 # stage to configure numa mapping before initializing machine.
1044 { 'command': 'set-numa-node', 'boxed': true,
1045 'data': 'NumaOptions',
1046 'allow-preconfig': true
1052 # Request the balloon driver to change its balloon size.
1054 # @value: the target logical size of the VM in bytes. We can deduce
1055 # the size of the balloon using this formula:
1057 # logical_vm_size = vm_ram_size - balloon_size
1059 # From it we have: balloon_size = vm_ram_size - @value
1062 # - Nothing on success
1063 # - If the balloon driver is enabled but not functional because
1064 # the KVM kernel module cannot support it, KVMMissingCap
1065 # - If no balloon device is present, DeviceNotActive
1067 # Notes: This command just issues a request to the guest. When it
1068 # returns, the balloon size may not have changed. A guest can
1069 # change the balloon size independent of this command.
1075 # -> { "execute": "balloon", "arguments": { "value": 536870912 } }
1076 # <- { "return": {} }
1078 # With a 2.5GiB guest this command inflated the ballon to 3GiB.
1080 { 'command': 'balloon', 'data': {'value': 'int'} }
1085 # Information about the guest balloon device.
1087 # @actual: the logical size of the VM in bytes Formula used:
1088 # logical_vm_size = vm_ram_size - balloon_size
1092 { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
1097 # Return information about the balloon device.
1100 # - @BalloonInfo on success
1101 # - If the balloon driver is enabled but not functional because
1102 # the KVM kernel module cannot support it, KVMMissingCap
1103 # - If no balloon device is present, DeviceNotActive
1109 # -> { "execute": "query-balloon" }
1111 # "actual": 1073741824
1115 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1120 # Emitted when the guest changes the actual BALLOON level. This value
1121 # is equivalent to the @actual field return by the 'query-balloon'
1124 # @actual: the logical size of the VM in bytes Formula used:
1125 # logical_vm_size = vm_ram_size - balloon_size
1127 # Note: this event is rate-limited.
1133 # <- { "event": "BALLOON_CHANGE",
1134 # "data": { "actual": 944766976 },
1135 # "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
1137 { 'event': 'BALLOON_CHANGE',
1138 'data': { 'actual': 'int' } }
1143 # hv-balloon guest-provided memory status information.
1145 # @committed: the amount of memory in use inside the guest plus the
1146 # amount of the memory unusable inside the guest (ballooned out,
1149 # @available: the amount of the memory inside the guest available for
1150 # new allocations ("free")
1154 { 'struct': 'HvBalloonInfo',
1155 'data': { 'committed': 'size', 'available': 'size' } }
1158 # @query-hv-balloon-status-report:
1160 # Returns the hv-balloon driver data contained in the last received "STATUS"
1161 # message from the guest.
1164 # - @HvBalloonInfo on success
1165 # - If no hv-balloon device is present, guest memory status
1166 # reporting is not enabled or no guest memory status report
1167 # received yet, GenericError
1173 # -> { "execute": "query-hv-balloon-status-report" }
1175 # "committed": 816640000,
1176 # "available": 3333054464
1180 { 'command': 'query-hv-balloon-status-report', 'returns': 'HvBalloonInfo' }
1183 # @HV_BALLOON_STATUS_REPORT:
1185 # Emitted when the hv-balloon driver receives a "STATUS" message from
1188 # Note: this event is rate-limited.
1194 # <- { "event": "HV_BALLOON_STATUS_REPORT",
1195 # "data": { "committed": 816640000, "available": 3333054464 },
1196 # "timestamp": { "seconds": 1600295492, "microseconds": 661044 } }
1199 { 'event': 'HV_BALLOON_STATUS_REPORT',
1200 'data': 'HvBalloonInfo' }
1205 # Actual memory information in bytes.
1207 # @base-memory: size of "base" memory specified with command line
1210 # @plugged-memory: size of memory that can be hot-unplugged. This
1211 # field is omitted if target doesn't support memory hotplug (i.e.
1212 # CONFIG_MEM_DEVICE not defined at build time).
1216 { 'struct': 'MemoryInfo',
1217 'data' : { 'base-memory': 'size', '*plugged-memory': 'size' } }
1220 # @query-memory-size-summary:
1222 # Return the amount of initially allocated and present hotpluggable
1223 # (if enabled) memory in bytes.
1227 # -> { "execute": "query-memory-size-summary" }
1228 # <- { "return": { "base-memory": 4294967296, "plugged-memory": 0 } }
1232 { 'command': 'query-memory-size-summary', 'returns': 'MemoryInfo' }
1235 # @PCDIMMDeviceInfo:
1237 # PCDIMMDevice state information
1241 # @addr: physical address, where device is mapped
1243 # @size: size of memory that the device provides
1245 # @slot: slot number at which device is plugged in
1247 # @node: NUMA node number where device is plugged in
1249 # @memdev: memory backend linked with device
1251 # @hotplugged: true if device was hotplugged
1253 # @hotpluggable: true if device if could be added/removed while
1254 # machine is running
1258 { 'struct': 'PCDIMMDeviceInfo',
1259 'data': { '*id': 'str',
1265 'hotplugged': 'bool',
1266 'hotpluggable': 'bool'
1271 # @VirtioPMEMDeviceInfo:
1273 # VirtioPMEM state information
1277 # @memaddr: physical address in memory, where device is mapped
1279 # @size: size of memory that the device provides
1281 # @memdev: memory backend linked with device
1285 { 'struct': 'VirtioPMEMDeviceInfo',
1286 'data': { '*id': 'str',
1294 # @VirtioMEMDeviceInfo:
1296 # VirtioMEMDevice state information
1300 # @memaddr: physical address in memory, where device is mapped
1302 # @requested-size: the user requested size of the device
1304 # @size: the (current) size of memory that the device provides
1306 # @max-size: the maximum size of memory that the device can provide
1308 # @block-size: the block size of memory that the device provides
1310 # @node: NUMA node number where device is assigned to
1312 # @memdev: memory backend linked with the region
1316 { 'struct': 'VirtioMEMDeviceInfo',
1317 'data': { '*id': 'str',
1319 'requested-size': 'size',
1322 'block-size': 'size',
1329 # @SgxEPCDeviceInfo:
1331 # Sgx EPC state information
1335 # @memaddr: physical address in memory, where device is mapped
1337 # @size: size of memory that the device provides
1339 # @memdev: memory backend linked with device
1341 # @node: the numa node (Since: 7.0)
1345 { 'struct': 'SgxEPCDeviceInfo',
1346 'data': { '*id': 'str',
1355 # @HvBalloonDeviceInfo:
1357 # hv-balloon provided memory state information
1361 # @memaddr: physical address in memory, where device is mapped
1363 # @max-size: the maximum size of memory that the device can provide
1365 # @memdev: memory backend linked with device
1369 { 'struct': 'HvBalloonDeviceInfo',
1370 'data': { '*id': 'str',
1378 # @MemoryDeviceInfoKind:
1380 # @nvdimm: since 2.12
1382 # @virtio-pmem: since 4.1
1384 # @virtio-mem: since 5.1
1386 # @sgx-epc: since 6.2.
1388 # @hv-balloon: since 8.2.
1392 { 'enum': 'MemoryDeviceInfoKind',
1393 'data': [ 'dimm', 'nvdimm', 'virtio-pmem', 'virtio-mem', 'sgx-epc',
1397 # @PCDIMMDeviceInfoWrapper:
1401 { 'struct': 'PCDIMMDeviceInfoWrapper',
1402 'data': { 'data': 'PCDIMMDeviceInfo' } }
1405 # @VirtioPMEMDeviceInfoWrapper:
1409 { 'struct': 'VirtioPMEMDeviceInfoWrapper',
1410 'data': { 'data': 'VirtioPMEMDeviceInfo' } }
1413 # @VirtioMEMDeviceInfoWrapper:
1417 { 'struct': 'VirtioMEMDeviceInfoWrapper',
1418 'data': { 'data': 'VirtioMEMDeviceInfo' } }
1421 # @SgxEPCDeviceInfoWrapper:
1425 { 'struct': 'SgxEPCDeviceInfoWrapper',
1426 'data': { 'data': 'SgxEPCDeviceInfo' } }
1429 # @HvBalloonDeviceInfoWrapper:
1433 { 'struct': 'HvBalloonDeviceInfoWrapper',
1434 'data': { 'data': 'HvBalloonDeviceInfo' } }
1437 # @MemoryDeviceInfo:
1439 # Union containing information about a memory device
1443 { 'union': 'MemoryDeviceInfo',
1444 'base': { 'type': 'MemoryDeviceInfoKind' },
1445 'discriminator': 'type',
1446 'data': { 'dimm': 'PCDIMMDeviceInfoWrapper',
1447 'nvdimm': 'PCDIMMDeviceInfoWrapper',
1448 'virtio-pmem': 'VirtioPMEMDeviceInfoWrapper',
1449 'virtio-mem': 'VirtioMEMDeviceInfoWrapper',
1450 'sgx-epc': 'SgxEPCDeviceInfoWrapper',
1451 'hv-balloon': 'HvBalloonDeviceInfoWrapper'
1458 # Sgx EPC cmdline information
1460 # @memdev: memory backend linked with device
1462 # @node: the numa node (Since: 7.0)
1466 { 'struct': 'SgxEPC',
1467 'data': { 'memdev': 'str',
1473 # @SgxEPCProperties:
1475 # SGX properties of machine types.
1477 # @sgx-epc: list of ids of memory-backend-epc objects.
1481 { 'struct': 'SgxEPCProperties',
1482 'data': { 'sgx-epc': ['SgxEPC'] }
1486 # @query-memory-devices:
1488 # Lists available memory devices and their state
1494 # -> { "execute": "query-memory-devices" }
1495 # <- { "return": [ { "data":
1496 # { "addr": 5368709120,
1497 # "hotpluggable": true,
1498 # "hotplugged": true,
1500 # "memdev": "/objects/memX",
1502 # "size": 1073741824,
1507 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
1510 # @MEMORY_DEVICE_SIZE_CHANGE:
1512 # Emitted when the size of a memory device changes. Only emitted for
1513 # memory devices that can actually change the size (e.g., virtio-mem
1514 # due to guest action).
1518 # @size: the new size of memory that the device provides
1520 # @qom-path: path to the device object in the QOM tree (since 6.2)
1522 # Note: this event is rate-limited.
1528 # <- { "event": "MEMORY_DEVICE_SIZE_CHANGE",
1529 # "data": { "id": "vm0", "size": 1073741824,
1530 # "qom-path": "/machine/unattached/device[2]" },
1531 # "timestamp": { "seconds": 1588168529, "microseconds": 201316 } }
1533 { 'event': 'MEMORY_DEVICE_SIZE_CHANGE',
1534 'data': { '*id': 'str', 'size': 'size', 'qom-path' : 'str'} }
1537 # @MEM_UNPLUG_ERROR:
1539 # Emitted when memory hot unplug error occurs.
1541 # @device: device name
1543 # @msg: Informative message
1547 # @deprecated: This event is deprecated. Use
1548 # @DEVICE_UNPLUG_GUEST_ERROR instead.
1554 # <- { "event": "MEM_UNPLUG_ERROR",
1555 # "data": { "device": "dimm1",
1556 # "msg": "acpi: device unplug for unsupported device"
1558 # "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
1560 { 'event': 'MEM_UNPLUG_ERROR',
1561 'data': { 'device': 'str', 'msg': 'str' },
1562 'features': ['deprecated'] }
1565 # @BootConfiguration:
1567 # Schema for virtual machine boot configuration.
1569 # @order: Boot order (a=floppy, c=hard disk, d=CD-ROM, n=network)
1571 # @once: Boot order to apply on first boot
1573 # @menu: Whether to show a boot menu
1575 # @splash: The name of the file to be passed to the firmware as logo
1576 # picture, if @menu is true.
1578 # @splash-time: How long to show the logo picture, in milliseconds
1580 # @reboot-timeout: Timeout before guest reboots after boot fails
1582 # @strict: Whether to attempt booting from devices not included in the
1587 { 'struct': 'BootConfiguration', 'data': {
1592 '*splash-time': 'int',
1593 '*reboot-timeout': 'int',
1594 '*strict': 'bool' } }
1597 # @SMPConfiguration:
1599 # Schema for CPU topology configuration. A missing value lets QEMU
1600 # figure out a suitable value based on the ones that are provided.
1602 # The members other than @cpus and @maxcpus define a topology of
1605 # The ordering from highest/coarsest to lowest/finest is:
1606 # @drawers, @books, @sockets, @dies, @clusters, @cores, @threads.
1608 # Different architectures support different subsets of topology
1611 # For example, s390x does not have clusters and dies, and the socket
1612 # is the parent container of cores.
1614 # @cpus: number of virtual CPUs in the virtual machine
1616 # @maxcpus: maximum number of hotpluggable virtual CPUs in the virtual
1619 # @drawers: number of drawers in the CPU topology (since 8.2)
1621 # @books: number of books in the CPU topology (since 8.2)
1623 # @sockets: number of sockets per parent container
1625 # @dies: number of dies per parent container
1627 # @clusters: number of clusters per parent container (since 7.0)
1629 # @cores: number of cores per parent container
1631 # @threads: number of threads per core
1635 { 'struct': 'SMPConfiguration', 'data': {
1644 '*maxcpus': 'int' } }
1649 # Query interrupt statistics
1653 # @unstable: This command is meant for debugging.
1655 # Returns: interrupt statistics
1659 { 'command': 'x-query-irq',
1660 'returns': 'HumanReadableText',
1661 'features': [ 'unstable' ] }
1666 # Query TCG compiler statistics
1670 # @unstable: This command is meant for debugging.
1672 # Returns: TCG compiler statistics
1676 { 'command': 'x-query-jit',
1677 'returns': 'HumanReadableText',
1679 'features': [ 'unstable' ] }
1684 # Query NUMA topology information
1688 # @unstable: This command is meant for debugging.
1690 # Returns: topology information
1694 { 'command': 'x-query-numa',
1695 'returns': 'HumanReadableText',
1696 'features': [ 'unstable' ] }
1701 # Query TCG opcode counters
1705 # @unstable: This command is meant for debugging.
1707 # Returns: TCG opcode counters
1711 { 'command': 'x-query-opcount',
1712 'returns': 'HumanReadableText',
1714 'features': [ 'unstable' ] }
1717 # @x-query-ramblock:
1719 # Query system ramblock information
1723 # @unstable: This command is meant for debugging.
1725 # Returns: system ramblock information
1729 { 'command': 'x-query-ramblock',
1730 'returns': 'HumanReadableText',
1731 'features': [ 'unstable' ] }
1740 # @unstable: This command is meant for debugging.
1742 # Returns: RDMA state
1746 { 'command': 'x-query-rdma',
1747 'returns': 'HumanReadableText',
1748 'features': [ 'unstable' ] }
1753 # Query information on the registered ROMS
1757 # @unstable: This command is meant for debugging.
1759 # Returns: registered ROMs
1763 { 'command': 'x-query-roms',
1764 'returns': 'HumanReadableText',
1765 'features': [ 'unstable' ] }
1770 # Query information on the USB devices
1774 # @unstable: This command is meant for debugging.
1776 # Returns: USB device information
1780 { 'command': 'x-query-usb',
1781 'returns': 'HumanReadableText',
1782 'features': [ 'unstable' ] }
1785 # @SmbiosEntryPointType:
1787 # @32: SMBIOS version 2.1 (32-bit) Entry Point
1789 # @64: SMBIOS version 3.0 (64-bit) Entry Point
1793 { 'enum': 'SmbiosEntryPointType',
1794 'data': [ '32', '64' ] }
1797 # @MemorySizeConfiguration:
1799 # Schema for memory size configuration.
1801 # @size: memory size in bytes
1803 # @max-size: maximum hotpluggable memory size in bytes
1805 # @slots: number of available memory slots for hotplug
1809 { 'struct': 'MemorySizeConfiguration', 'data': {
1811 '*max-size': 'size',
1812 '*slots': 'uint64' } }
1817 # Save the FDT in dtb format.
1819 # @filename: name of the dtb file to be created
1825 # -> { "execute": "dumpdtb" }
1826 # "arguments": { "filename": "fdt.dtb" } }
1827 # <- { "return": {} }
1829 { 'command': 'dumpdtb',
1830 'data': { 'filename': 'str' },
1831 'if': 'CONFIG_FDT' }