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, and
18 # look for the \*-softmmu targets near the "--target-list" option. The
19 # individual target constants are not documented here, for the time
25 # Notes: The resulting QMP strings can be appended to the "qemu-system-"
26 # prefix to produce the corresponding QEMU executable name. This
27 # is true even for "qemu-system-x86_64".
31 { 'enum' : 'SysEmuTarget',
32 'data' : [ 'aarch64', 'alpha', 'arm', 'avr', 'cris', 'hppa', 'i386',
33 'loongarch64', 'm68k', 'microblaze', 'microblazeel', 'mips', 'mips64',
34 'mips64el', 'mipsel', 'nios2', 'or1k', 'ppc',
35 'ppc64', 'riscv32', 'riscv64', 'rx', 's390x', 'sh4',
36 'sh4eb', 'sparc', 'sparc64', 'tricore',
37 'x86_64', 'xtensa', 'xtensaeb' ] }
42 # An enumeration of cpu states that can be assumed by a virtual
47 { 'enum': 'CpuS390State',
48 'prefix': 'S390_CPU_STATE',
49 'data': [ 'uninitialized', 'stopped', 'check-stop', 'operating', 'load' ] }
54 # Additional information about a virtual S390 CPU
56 # @cpu-state: the virtual CPU's state
60 { 'struct': 'CpuInfoS390', 'data': { 'cpu-state': 'CpuS390State' } }
65 # Information about a virtual CPU
67 # @cpu-index: index of the virtual CPU
69 # @qom-path: path to the CPU object in the QOM tree
71 # @thread-id: ID of the underlying host thread
73 # @props: properties describing to which node/socket/core/thread
74 # virtual CPU belongs to, provided if supported by board
76 # @target: the QEMU system emulation target, which determines which
77 # additional fields will be listed (since 3.0)
81 { 'union' : 'CpuInfoFast',
82 'base' : { 'cpu-index' : 'int',
85 '*props' : 'CpuInstanceProperties',
86 'target' : 'SysEmuTarget' },
87 'discriminator' : 'target',
88 'data' : { 's390x' : 'CpuInfoS390' } }
93 # Returns information about all virtual CPUs.
95 # Returns: list of @CpuInfoFast
101 # -> { "execute": "query-cpus-fast" }
104 # "thread-id": 25627,
110 # "qom-path": "/machine/unattached/device[0]",
115 # "thread-id": 25628,
121 # "qom-path": "/machine/unattached/device[2]",
128 { 'command': 'query-cpus-fast', 'returns': [ 'CpuInfoFast' ] }
133 # Information describing a machine.
135 # @name: the name of the machine
137 # @alias: an alias for the machine name
139 # @is-default: whether the machine is default
141 # @cpu-max: maximum number of CPUs supported by the machine type
144 # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7)
146 # @numa-mem-supported: true if '-numa node,mem' option is supported by
147 # the machine type and false otherwise (since 4.1)
149 # @deprecated: if true, the machine type is deprecated and may be removed
150 # in future versions of QEMU according to the QEMU deprecation
153 # @default-cpu-type: default CPU model typename if none is requested via
154 # the -cpu argument. (since 4.2)
156 # @default-ram-id: the default ID of initial RAM memory backend (since 5.2)
158 # @acpi: machine type supports ACPI (since 8.0)
162 { 'struct': 'MachineInfo',
163 'data': { 'name': 'str', '*alias': 'str',
164 '*is-default': 'bool', 'cpu-max': 'int',
165 'hotpluggable-cpus': 'bool', 'numa-mem-supported': 'bool',
166 'deprecated': 'bool', '*default-cpu-type': 'str',
167 '*default-ram-id': 'str', 'acpi': 'bool' } }
172 # Return a list of supported machines
174 # Returns: a list of MachineInfo
178 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
181 # @CurrentMachineParams:
183 # Information describing the running machine parameters.
185 # @wakeup-suspend-support: true if the machine supports wake up from
190 { 'struct': 'CurrentMachineParams',
191 'data': { 'wakeup-suspend-support': 'bool'} }
194 # @query-current-machine:
196 # Return information on the current virtual machine.
198 # Returns: CurrentMachineParams
202 { 'command': 'query-current-machine', 'returns': 'CurrentMachineParams' }
207 # Information describing the QEMU target.
209 # @arch: the target architecture
213 { 'struct': 'TargetInfo',
214 'data': { 'arch': 'SysEmuTarget' } }
219 # Return information about the target for this QEMU
221 # Returns: TargetInfo
225 { 'command': 'query-target', 'returns': 'TargetInfo' }
230 # Guest UUID information (Universally Unique Identifier).
232 # @UUID: the UUID of the guest
236 # Notes: If no UUID was specified for the guest, a null UUID is returned.
238 { 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
243 # Query the guest UUID information.
245 # Returns: The @UuidInfo for the guest
251 # -> { "execute": "query-uuid" }
252 # <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
255 { 'command': 'query-uuid', 'returns': 'UuidInfo', 'allow-preconfig': true }
262 # @guid: the globally unique identifier
266 { 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
269 # @query-vm-generation-id:
271 # Show Virtual Machine Generation ID
275 { 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }
280 # Performs a hard reset of a guest.
286 # -> { "execute": "system_reset" }
287 # <- { "return": {} }
290 { 'command': 'system_reset' }
295 # Requests that a guest perform a powerdown operation.
299 # Notes: A guest may or may not respond to this command. This command
300 # returning does not indicate that a guest has accepted the request or
301 # that it has shut down. Many guests will respond to this command by
302 # prompting the user in some way.
306 # -> { "execute": "system_powerdown" }
307 # <- { "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": {} }
333 { 'command': 'system_wakeup' }
338 # Policy for handling lost ticks in timer devices. Ticks end up getting
339 # lost when, for example, the guest is paused.
341 # @discard: throw away the missed ticks and continue with future injection
342 # normally. The guest OS will see the timer jump ahead by a
343 # potentially quite significant amount all at once, as if the
344 # intervening chunk of time had simply not existed; needless to
345 # say, such a sudden jump can easily confuse a guest OS which is
346 # not specifically prepared to deal with it. Assuming the guest
347 # OS can deal correctly with the time jump, the time in the guest
348 # and in the host should now match.
350 # @delay: continue to deliver ticks at the normal rate. The guest OS will
351 # not notice anything is amiss, as from its point of view time will
352 # have continued to flow normally. The time in the guest should now
353 # be behind the time in the host by exactly the amount of time during
354 # which ticks have been missed.
356 # @slew: deliver ticks at a higher rate to catch up with the missed ticks.
357 # The guest OS will not notice anything is amiss, as from its point
358 # of view time will have continued to flow normally. Once the timer
359 # has managed to catch up with all the missing ticks, the time in
360 # the guest and in the host should match.
364 { 'enum': 'LostTickPolicy',
365 'data': ['discard', 'delay', 'slew' ] }
370 # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
371 # The command fails when the guest doesn't support injecting.
373 # Returns: If successful, nothing
377 # Note: prior to 2.1, this command was only supported for x86 and s390 VMs
381 # -> { "execute": "inject-nmi" }
382 # <- { "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 } }
415 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
420 # @node: NUMA nodes configuration
422 # @dist: NUMA distance configuration (since 2.10)
424 # @cpu: property based CPU(s) to node mapping (Since: 2.10)
426 # @hmat-lb: memory latency and bandwidth information (Since: 5.0)
428 # @hmat-cache: memory side cache information (Since: 5.0)
432 { 'enum': 'NumaOptionsType',
433 'data': [ 'node', 'dist', 'cpu', 'hmat-lb', 'hmat-cache' ] }
438 # A discriminated record of NUMA options. (for OptsVisitor)
442 { 'union': 'NumaOptions',
443 'base': { 'type': 'NumaOptionsType' },
444 'discriminator': 'type',
446 'node': 'NumaNodeOptions',
447 'dist': 'NumaDistOptions',
448 'cpu': 'NumaCpuOptions',
449 'hmat-lb': 'NumaHmatLBOptions',
450 'hmat-cache': 'NumaHmatCacheOptions' }}
455 # Create a guest NUMA node. (for OptsVisitor)
457 # @nodeid: NUMA node ID (increase by 1 from 0 if omitted)
459 # @cpus: VCPUs belonging to this node (assign VCPUS round-robin
462 # @mem: memory size of this node; mutually exclusive with @memdev.
463 # Equally divide total memory among nodes if both @mem and @memdev are
466 # @memdev: memory backend object. If specified for one node,
467 # it must be specified for all nodes.
469 # @initiator: defined in ACPI 6.3 Chapter 5.2.27.3 Table 5-145,
470 # points to the nodeid which has the memory controller
471 # responsible for this NUMA node. This field provides
472 # additional information as to the initiator node that
473 # is closest (as in directly attached) to this node, and
474 # therefore has the best performance (since 5.0)
478 { 'struct': 'NumaNodeOptions',
484 '*initiator': 'uint16' }}
489 # Set the distance between 2 NUMA nodes.
491 # @src: source NUMA node.
493 # @dst: destination NUMA node.
495 # @val: NUMA distance from source node to destination node.
496 # When a node is unreachable from another node, set the distance
497 # between them to 255.
501 { 'struct': 'NumaDistOptions',
508 # @CXLFixedMemoryWindowOptions:
510 # Create a CXL Fixed Memory Window
512 # @size: Size of the Fixed Memory Window in bytes. Must be a multiple
514 # @interleave-granularity: Number of contiguous bytes for which
515 # accesses will go to a given interleave target.
516 # Accepted values [256, 512, 1k, 2k, 4k, 8k, 16k]
517 # @targets: Target root bridge IDs from -device ...,id=<ID> for each root
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 feature word
558 # @cpuid-input-ecx: Input ECX value for CPUID instruction for that
561 # @cpuid-register: Output register containing the feature bits
563 # @features: value of output register, containing the feature bits
567 { 'struct': 'X86CPUFeatureWordInfo',
568 'data': { 'cpuid-input-eax': 'int',
569 '*cpuid-input-ecx': 'int',
570 'cpuid-register': 'X86CPURegister32',
571 'features': 'int' } }
576 # Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
580 { 'struct': 'DummyForceArrays',
581 'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
586 # Option "-numa cpu" overrides default cpu to node mapping.
587 # It accepts the same set of cpu properties as returned by
588 # query-hotpluggable-cpus[].props, where node-id could be used to
589 # override default node mapping.
593 { 'struct': 'NumaCpuOptions',
594 'base': 'CpuInstanceProperties',
598 # @HmatLBMemoryHierarchy:
600 # The memory hierarchy in the System Locality Latency and Bandwidth
601 # Information Structure of HMAT (Heterogeneous Memory Attribute Table)
603 # For more information about @HmatLBMemoryHierarchy, see chapter
604 # 5.2.27.4: Table 5-146: Field "Flags" of ACPI 6.3 spec.
606 # @memory: the structure represents the memory performance
608 # @first-level: first level of memory side cache
610 # @second-level: second level of memory side cache
612 # @third-level: third level of memory side cache
616 { 'enum': 'HmatLBMemoryHierarchy',
617 'data': [ 'memory', 'first-level', 'second-level', 'third-level' ] }
622 # Data type in the System Locality Latency and Bandwidth
623 # Information Structure of HMAT (Heterogeneous Memory Attribute Table)
625 # For more information about @HmatLBDataType, see chapter
626 # 5.2.27.4: Table 5-146: Field "Data Type" of ACPI 6.3 spec.
628 # @access-latency: access latency (nanoseconds)
630 # @read-latency: read latency (nanoseconds)
632 # @write-latency: write latency (nanoseconds)
634 # @access-bandwidth: access bandwidth (Bytes per second)
636 # @read-bandwidth: read bandwidth (Bytes per second)
638 # @write-bandwidth: write bandwidth (Bytes per second)
642 { 'enum': 'HmatLBDataType',
643 'data': [ 'access-latency', 'read-latency', 'write-latency',
644 'access-bandwidth', 'read-bandwidth', 'write-bandwidth' ] }
647 # @NumaHmatLBOptions:
649 # Set the system locality latency and bandwidth information
650 # between Initiator and Target proximity Domains.
652 # For more information about @NumaHmatLBOptions, see chapter
653 # 5.2.27.4: Table 5-146 of ACPI 6.3 spec.
655 # @initiator: the Initiator Proximity Domain.
657 # @target: the Target Proximity Domain.
659 # @hierarchy: the Memory Hierarchy. Indicates the performance
660 # of memory or side cache.
662 # @data-type: presents the type of data, access/read/write
663 # latency or hit latency.
665 # @latency: the value of latency from @initiator to @target
666 # proximity domain, the latency unit is "ns(nanosecond)".
668 # @bandwidth: the value of bandwidth between @initiator and @target
669 # proximity domain, the bandwidth unit is
670 # "Bytes per second".
674 { 'struct': 'NumaHmatLBOptions',
676 'initiator': 'uint16',
678 'hierarchy': 'HmatLBMemoryHierarchy',
679 'data-type': 'HmatLBDataType',
680 '*latency': 'uint64',
681 '*bandwidth': 'size' }}
684 # @HmatCacheAssociativity:
686 # Cache associativity in the Memory Side Cache Information Structure
689 # For more information of @HmatCacheAssociativity, see chapter
690 # 5.2.27.5: Table 5-147 of ACPI 6.3 spec.
692 # @none: None (no memory side cache in this proximity domain,
693 # or cache associativity unknown)
695 # @direct: Direct Mapped
697 # @complex: Complex Cache Indexing (implementation specific)
701 { 'enum': 'HmatCacheAssociativity',
702 'data': [ 'none', 'direct', 'complex' ] }
705 # @HmatCacheWritePolicy:
707 # Cache write policy in the Memory Side Cache Information Structure
710 # For more information of @HmatCacheWritePolicy, see chapter
711 # 5.2.27.5: Table 5-147: Field "Cache Attributes" of ACPI 6.3 spec.
713 # @none: None (no memory side cache in this proximity domain,
714 # or cache write policy unknown)
716 # @write-back: Write Back (WB)
718 # @write-through: Write Through (WT)
722 { 'enum': 'HmatCacheWritePolicy',
723 'data': [ 'none', 'write-back', 'write-through' ] }
726 # @NumaHmatCacheOptions:
728 # Set the memory side cache information for a given memory domain.
730 # For more information of @NumaHmatCacheOptions, see chapter
731 # 5.2.27.5: Table 5-147: Field "Cache Attributes" of ACPI 6.3 spec.
733 # @node-id: the memory proximity domain to which the memory belongs.
735 # @size: the size of memory side cache in bytes.
737 # @level: the cache level described in this structure.
739 # @associativity: the cache associativity,
740 # none/direct-mapped/complex(complex cache indexing).
742 # @policy: the write policy, none/write-back/write-through.
744 # @line: the cache Line size in bytes.
748 { 'struct': 'NumaHmatCacheOptions',
753 'associativity': 'HmatCacheAssociativity',
754 'policy': 'HmatCacheWritePolicy',
760 # Save a portion of guest memory to a file.
762 # @val: the virtual address of the guest to start from
764 # @size: the size of memory region to save
766 # @filename: the file to save the memory to as binary data
768 # @cpu-index: the index of the virtual CPU to use for translating the
769 # virtual address (defaults to CPU 0)
771 # Returns: Nothing on success
775 # Notes: Errors were not reliably returned until 1.1
779 # -> { "execute": "memsave",
780 # "arguments": { "val": 10,
782 # "filename": "/tmp/virtual-mem-dump" } }
783 # <- { "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": {} }
815 { 'command': 'pmemsave',
816 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
821 # Information about memory backend
823 # @id: backend's ID if backend has 'id' property (since 2.9)
825 # @size: memory backend size
827 # @merge: whether memory merge support is enabled
829 # @dump: whether memory backend's memory is included in a core dump
831 # @prealloc: whether memory was preallocated
833 # @share: whether memory is private to QEMU or shared (since 6.1)
835 # @reserve: whether swap space (or huge pages) was reserved if applicable.
836 # This corresponds to the user configuration and not the actual
837 # behavior implemented in the OS to perform the reservation.
838 # For example, Linux will never reserve swap space for shared
839 # file mappings. (since 6.1)
841 # @host-nodes: host nodes for its memory policy
843 # @policy: memory policy of memory backend
847 { 'struct': 'Memdev',
856 'host-nodes': ['uint16'],
857 'policy': 'HostMemPolicy' }}
862 # Returns information for all memory backends.
864 # Returns: a list of @Memdev.
870 # -> { "execute": "query-memdev" }
879 # "host-nodes": [0, 1],
888 # "host-nodes": [2, 3],
889 # "policy": "preferred"
895 { 'command': 'query-memdev', 'returns': ['Memdev'], 'allow-preconfig': true }
898 # @CpuInstanceProperties:
900 # List of properties to be used for hotplugging a CPU instance,
901 # it should be passed by management with device_add command when
902 # a CPU is being hotplugged.
904 # @node-id: NUMA node ID the CPU belongs to
905 # @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)
907 # @cluster-id: cluster number within die the CPU belongs to (since 7.1)
908 # @core-id: core number within cluster the CPU belongs to
909 # @thread-id: thread number within core the CPU belongs to
911 # Note: currently there are 6 properties that could be present
912 # but management should be prepared to pass through other
913 # properties with device_add command to allow for future
914 # interface extension. This also requires the filed names to be kept in
915 # sync with the properties passed to -device/device_add.
919 { 'struct': 'CpuInstanceProperties',
920 'data': { '*node-id': 'int',
923 '*cluster-id': 'int',
932 # @type: CPU object type for usage with device_add command
933 # @props: list of properties to be used for hotplugging CPU
934 # @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides
935 # @qom-path: link to existing CPU object if CPU is present or
936 # omitted if CPU is not present.
940 { 'struct': 'HotpluggableCPU',
941 'data': { 'type': 'str',
942 'vcpus-count': 'int',
943 'props': 'CpuInstanceProperties',
949 # @query-hotpluggable-cpus:
951 # TODO: Better documentation; currently there is none.
953 # Returns: a list of HotpluggableCPU objects.
959 # For pseries machine type started with -smp 2,cores=2,maxcpus=4 -cpu POWER8:
961 # -> { "execute": "query-hotpluggable-cpus" }
963 # { "props": { "core-id": 8 }, "type": "POWER8-spapr-cpu-core",
964 # "vcpus-count": 1 },
965 # { "props": { "core-id": 0 }, "type": "POWER8-spapr-cpu-core",
966 # "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"}
969 # For pc machine type started with -smp 1,maxcpus=2:
971 # -> { "execute": "query-hotpluggable-cpus" }
974 # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
975 # "props": {"core-id": 0, "socket-id": 1, "thread-id": 0}
978 # "qom-path": "/machine/unattached/device[0]",
979 # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
980 # "props": {"core-id": 0, "socket-id": 0, "thread-id": 0}
984 # For s390x-virtio-ccw machine type started with -smp 1,maxcpus=2 -cpu qemu
987 # -> { "execute": "query-hotpluggable-cpus" }
990 # "type": "qemu-s390x-cpu", "vcpus-count": 1,
991 # "props": { "core-id": 1 }
994 # "qom-path": "/machine/unattached/device[0]",
995 # "type": "qemu-s390x-cpu", "vcpus-count": 1,
996 # "props": { "core-id": 0 }
1001 { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'],
1002 'allow-preconfig': true }
1007 # Runtime equivalent of '-numa' CLI option, available at
1008 # preconfigure stage to configure numa mapping before initializing
1013 { 'command': 'set-numa-node', 'boxed': true,
1014 'data': 'NumaOptions',
1015 'allow-preconfig': true
1021 # Request the balloon driver to change its balloon size.
1023 # @value: the target logical size of the VM in bytes.
1024 # We can deduce the size of the balloon using this formula:
1026 # logical_vm_size = vm_ram_size - balloon_size
1028 # From it we have: balloon_size = vm_ram_size - @value
1030 # Returns: - Nothing on success
1031 # - If the balloon driver is enabled but not functional because the KVM
1032 # kernel module cannot support it, KvmMissingCap
1033 # - If no balloon device is present, DeviceNotActive
1035 # Notes: This command just issues a request to the guest. When it returns,
1036 # the balloon size may not have changed. A guest can change the balloon
1037 # size independent of this command.
1043 # -> { "execute": "balloon", "arguments": { "value": 536870912 } }
1044 # <- { "return": {} }
1046 # With a 2.5GiB guest this command inflated the ballon to 3GiB.
1049 { 'command': 'balloon', 'data': {'value': 'int'} }
1054 # Information about the guest balloon device.
1056 # @actual: the logical size of the VM in bytes
1057 # Formula used: logical_vm_size = vm_ram_size - balloon_size
1061 { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
1066 # Return information about the balloon device.
1068 # Returns: - @BalloonInfo on success
1069 # - If the balloon driver is enabled but not functional because the KVM
1070 # kernel module cannot support it, KvmMissingCap
1071 # - If no balloon device is present, DeviceNotActive
1077 # -> { "execute": "query-balloon" }
1079 # "actual": 1073741824
1084 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1089 # Emitted when the guest changes the actual BALLOON level. This value is
1090 # equivalent to the @actual field return by the 'query-balloon' command
1092 # @actual: the logical size of the VM in bytes
1093 # Formula used: logical_vm_size = vm_ram_size - balloon_size
1095 # Note: this event is rate-limited.
1101 # <- { "event": "BALLOON_CHANGE",
1102 # "data": { "actual": 944766976 },
1103 # "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
1106 { 'event': 'BALLOON_CHANGE',
1107 'data': { 'actual': 'int' } }
1112 # Actual memory information in bytes.
1114 # @base-memory: size of "base" memory specified with command line
1117 # @plugged-memory: size of memory that can be hot-unplugged. This field
1118 # is omitted if target doesn't support memory hotplug
1119 # (i.e. CONFIG_MEM_DEVICE not defined at build time).
1123 { 'struct': 'MemoryInfo',
1124 'data' : { 'base-memory': 'size', '*plugged-memory': 'size' } }
1127 # @query-memory-size-summary:
1129 # Return the amount of initially allocated and present hotpluggable (if
1130 # enabled) memory in bytes.
1134 # -> { "execute": "query-memory-size-summary" }
1135 # <- { "return": { "base-memory": 4294967296, "plugged-memory": 0 } }
1139 { 'command': 'query-memory-size-summary', 'returns': 'MemoryInfo' }
1142 # @PCDIMMDeviceInfo:
1144 # PCDIMMDevice state information
1148 # @addr: physical address, where device is mapped
1150 # @size: size of memory that the device provides
1152 # @slot: slot number at which device is plugged in
1154 # @node: NUMA node number where device is plugged in
1156 # @memdev: memory backend linked with device
1158 # @hotplugged: true if device was hotplugged
1160 # @hotpluggable: true if device if could be added/removed while machine is running
1164 { 'struct': 'PCDIMMDeviceInfo',
1165 'data': { '*id': 'str',
1171 'hotplugged': 'bool',
1172 'hotpluggable': 'bool'
1177 # @VirtioPMEMDeviceInfo:
1179 # VirtioPMEM state information
1183 # @memaddr: physical address in memory, where device is mapped
1185 # @size: size of memory that the device provides
1187 # @memdev: memory backend linked with device
1191 { 'struct': 'VirtioPMEMDeviceInfo',
1192 'data': { '*id': 'str',
1200 # @VirtioMEMDeviceInfo:
1202 # VirtioMEMDevice state information
1206 # @memaddr: physical address in memory, where device is mapped
1208 # @requested-size: the user requested size of the device
1210 # @size: the (current) size of memory that the device provides
1212 # @max-size: the maximum size of memory that the device can provide
1214 # @block-size: the block size of memory that the device provides
1216 # @node: NUMA node number where device is assigned to
1218 # @memdev: memory backend linked with the region
1222 { 'struct': 'VirtioMEMDeviceInfo',
1223 'data': { '*id': 'str',
1225 'requested-size': 'size',
1228 'block-size': 'size',
1235 # @SgxEPCDeviceInfo:
1237 # Sgx EPC state information
1241 # @memaddr: physical address in memory, where device is mapped
1243 # @size: size of memory that the device provides
1245 # @memdev: memory backend linked with device
1247 # @node: the numa node (Since: 7.0)
1251 { 'struct': 'SgxEPCDeviceInfo',
1252 'data': { '*id': 'str',
1261 # @MemoryDeviceInfoKind:
1265 { 'enum': 'MemoryDeviceInfoKind',
1266 'data': [ 'dimm', 'nvdimm', 'virtio-pmem', 'virtio-mem', 'sgx-epc' ] }
1269 # @PCDIMMDeviceInfoWrapper:
1273 { 'struct': 'PCDIMMDeviceInfoWrapper',
1274 'data': { 'data': 'PCDIMMDeviceInfo' } }
1277 # @VirtioPMEMDeviceInfoWrapper:
1281 { 'struct': 'VirtioPMEMDeviceInfoWrapper',
1282 'data': { 'data': 'VirtioPMEMDeviceInfo' } }
1285 # @VirtioMEMDeviceInfoWrapper:
1289 { 'struct': 'VirtioMEMDeviceInfoWrapper',
1290 'data': { 'data': 'VirtioMEMDeviceInfo' } }
1293 # @SgxEPCDeviceInfoWrapper:
1297 { 'struct': 'SgxEPCDeviceInfoWrapper',
1298 'data': { 'data': 'SgxEPCDeviceInfo' } }
1301 # @MemoryDeviceInfo:
1303 # Union containing information about a memory device
1305 # nvdimm is included since 2.12. virtio-pmem is included since 4.1.
1306 # virtio-mem is included since 5.1. sgx-epc is included since 6.2.
1310 { 'union': 'MemoryDeviceInfo',
1311 'base': { 'type': 'MemoryDeviceInfoKind' },
1312 'discriminator': 'type',
1313 'data': { 'dimm': 'PCDIMMDeviceInfoWrapper',
1314 'nvdimm': 'PCDIMMDeviceInfoWrapper',
1315 'virtio-pmem': 'VirtioPMEMDeviceInfoWrapper',
1316 'virtio-mem': 'VirtioMEMDeviceInfoWrapper',
1317 'sgx-epc': 'SgxEPCDeviceInfoWrapper'
1324 # Sgx EPC cmdline information
1326 # @memdev: memory backend linked with device
1328 # @node: the numa node (Since: 7.0)
1332 { 'struct': 'SgxEPC',
1333 'data': { 'memdev': 'str',
1339 # @SgxEPCProperties:
1341 # SGX properties of machine types.
1343 # @sgx-epc: list of ids of memory-backend-epc objects.
1347 { 'struct': 'SgxEPCProperties',
1348 'data': { 'sgx-epc': ['SgxEPC'] }
1352 # @query-memory-devices:
1354 # Lists available memory devices and their state
1360 # -> { "execute": "query-memory-devices" }
1361 # <- { "return": [ { "data":
1362 # { "addr": 5368709120,
1363 # "hotpluggable": true,
1364 # "hotplugged": true,
1366 # "memdev": "/objects/memX",
1368 # "size": 1073741824,
1374 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
1377 # @MEMORY_DEVICE_SIZE_CHANGE:
1379 # Emitted when the size of a memory device changes. Only emitted for memory
1380 # devices that can actually change the size (e.g., virtio-mem due to guest
1385 # @size: the new size of memory that the device provides
1387 # @qom-path: path to the device object in the QOM tree (since 6.2)
1389 # Note: this event is rate-limited.
1395 # <- { "event": "MEMORY_DEVICE_SIZE_CHANGE",
1396 # "data": { "id": "vm0", "size": 1073741824,
1397 # "qom-path": "/machine/unattached/device[2]" },
1398 # "timestamp": { "seconds": 1588168529, "microseconds": 201316 } }
1401 { 'event': 'MEMORY_DEVICE_SIZE_CHANGE',
1402 'data': { '*id': 'str', 'size': 'size', 'qom-path' : 'str'} }
1405 # @MEM_UNPLUG_ERROR:
1407 # Emitted when memory hot unplug error occurs.
1409 # @device: device name
1411 # @msg: Informative message
1414 # @deprecated: This event is deprecated. Use @DEVICE_UNPLUG_GUEST_ERROR
1421 # <- { "event": "MEM_UNPLUG_ERROR",
1422 # "data": { "device": "dimm1",
1423 # "msg": "acpi: device unplug for unsupported device"
1425 # "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
1428 { 'event': 'MEM_UNPLUG_ERROR',
1429 'data': { 'device': 'str', 'msg': 'str' },
1430 'features': ['deprecated'] }
1433 # @BootConfiguration:
1435 # Schema for virtual machine boot configuration.
1437 # @order: Boot order (a=floppy, c=hard disk, d=CD-ROM, n=network)
1439 # @once: Boot order to apply on first boot
1441 # @menu: Whether to show a boot menu
1443 # @splash: The name of the file to be passed to the firmware as logo picture, if @menu is true.
1445 # @splash-time: How long to show the logo picture, in milliseconds
1447 # @reboot-timeout: Timeout before guest reboots after boot fails
1449 # @strict: Whether to attempt booting from devices not included in the boot order
1453 { 'struct': 'BootConfiguration', 'data': {
1458 '*splash-time': 'int',
1459 '*reboot-timeout': 'int',
1460 '*strict': 'bool' } }
1463 # @SMPConfiguration:
1465 # Schema for CPU topology configuration. A missing value lets
1466 # QEMU figure out a suitable value based on the ones that are provided.
1468 # @cpus: number of virtual CPUs in the virtual machine
1470 # @sockets: number of sockets in the CPU topology
1472 # @dies: number of dies per socket in the CPU topology
1474 # @clusters: number of clusters per die in the CPU topology (since 7.0)
1476 # @cores: number of cores per cluster in the CPU topology
1478 # @threads: number of threads per core in the CPU topology
1480 # @maxcpus: maximum number of hotpluggable virtual CPUs in the virtual machine
1484 { 'struct': 'SMPConfiguration', 'data': {
1491 '*maxcpus': 'int' } }
1496 # Query interrupt statistics
1499 # @unstable: This command is meant for debugging.
1501 # Returns: interrupt statistics
1505 { 'command': 'x-query-irq',
1506 'returns': 'HumanReadableText',
1507 'features': [ 'unstable' ] }
1512 # Query TCG compiler statistics
1515 # @unstable: This command is meant for debugging.
1517 # Returns: TCG compiler statistics
1521 { 'command': 'x-query-jit',
1522 'returns': 'HumanReadableText',
1524 'features': [ 'unstable' ] }
1529 # Query NUMA topology information
1532 # @unstable: This command is meant for debugging.
1534 # Returns: topology information
1538 { 'command': 'x-query-numa',
1539 'returns': 'HumanReadableText',
1540 'features': [ 'unstable' ] }
1545 # Query TCG opcode counters
1548 # @unstable: This command is meant for debugging.
1550 # Returns: TCG opcode counters
1554 { 'command': 'x-query-opcount',
1555 'returns': 'HumanReadableText',
1557 'features': [ 'unstable' ] }
1562 # Query TCG profiling information
1565 # @unstable: This command is meant for debugging.
1567 # Returns: profile information
1571 { 'command': 'x-query-profile',
1572 'returns': 'HumanReadableText',
1574 'features': [ 'unstable' ] }
1577 # @x-query-ramblock:
1579 # Query system ramblock information
1582 # @unstable: This command is meant for debugging.
1584 # Returns: system ramblock information
1588 { 'command': 'x-query-ramblock',
1589 'returns': 'HumanReadableText',
1590 'features': [ 'unstable' ] }
1598 # @unstable: This command is meant for debugging.
1600 # Returns: RDMA state
1604 { 'command': 'x-query-rdma',
1605 'returns': 'HumanReadableText',
1606 'features': [ 'unstable' ] }
1611 # Query information on the registered ROMS
1614 # @unstable: This command is meant for debugging.
1616 # Returns: registered ROMs
1620 { 'command': 'x-query-roms',
1621 'returns': 'HumanReadableText',
1622 'features': [ 'unstable' ] }
1627 # Query information on the USB devices
1630 # @unstable: This command is meant for debugging.
1632 # Returns: USB device information
1636 { 'command': 'x-query-usb',
1637 'returns': 'HumanReadableText',
1638 'features': [ 'unstable' ] }
1641 # @SmbiosEntryPointType:
1643 # @32: SMBIOS version 2.1 (32-bit) Entry Point
1645 # @64: SMBIOS version 3.0 (64-bit) Entry Point
1649 { 'enum': 'SmbiosEntryPointType',
1650 'data': [ '32', '64' ] }
1653 # @MemorySizeConfiguration:
1655 # Schema for memory size configuration.
1657 # @size: memory size in bytes
1659 # @max-size: maximum hotpluggable memory size in bytes
1661 # @slots: number of available memory slots for hotplug
1665 { 'struct': 'MemorySizeConfiguration', 'data': {
1667 '*max-size': 'size',
1668 '*slots': 'uint64' } }
1673 # Save the FDT in dtb format.
1675 # @filename: name of the dtb file to be created
1680 # {"execute": "dumpdtb"}
1681 # "arguments": { "filename": "fdt.dtb" } }
1684 { 'command': 'dumpdtb',
1685 'data': { 'filename': 'str' },
1686 'if': 'CONFIG_FDT' }