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:
1263 # @nvdimm: since 2.12
1265 # @virtio-pmem: since 4.1
1267 # @virtio-mem: since 5.1
1269 # @sgx-epc: since 6.2.
1273 { 'enum': 'MemoryDeviceInfoKind',
1274 'data': [ 'dimm', 'nvdimm', 'virtio-pmem', 'virtio-mem', 'sgx-epc' ] }
1277 # @PCDIMMDeviceInfoWrapper:
1281 { 'struct': 'PCDIMMDeviceInfoWrapper',
1282 'data': { 'data': 'PCDIMMDeviceInfo' } }
1285 # @VirtioPMEMDeviceInfoWrapper:
1289 { 'struct': 'VirtioPMEMDeviceInfoWrapper',
1290 'data': { 'data': 'VirtioPMEMDeviceInfo' } }
1293 # @VirtioMEMDeviceInfoWrapper:
1297 { 'struct': 'VirtioMEMDeviceInfoWrapper',
1298 'data': { 'data': 'VirtioMEMDeviceInfo' } }
1301 # @SgxEPCDeviceInfoWrapper:
1305 { 'struct': 'SgxEPCDeviceInfoWrapper',
1306 'data': { 'data': 'SgxEPCDeviceInfo' } }
1309 # @MemoryDeviceInfo:
1311 # Union containing information about a memory device
1315 { 'union': 'MemoryDeviceInfo',
1316 'base': { 'type': 'MemoryDeviceInfoKind' },
1317 'discriminator': 'type',
1318 'data': { 'dimm': 'PCDIMMDeviceInfoWrapper',
1319 'nvdimm': 'PCDIMMDeviceInfoWrapper',
1320 'virtio-pmem': 'VirtioPMEMDeviceInfoWrapper',
1321 'virtio-mem': 'VirtioMEMDeviceInfoWrapper',
1322 'sgx-epc': 'SgxEPCDeviceInfoWrapper'
1329 # Sgx EPC cmdline information
1331 # @memdev: memory backend linked with device
1333 # @node: the numa node (Since: 7.0)
1337 { 'struct': 'SgxEPC',
1338 'data': { 'memdev': 'str',
1344 # @SgxEPCProperties:
1346 # SGX properties of machine types.
1348 # @sgx-epc: list of ids of memory-backend-epc objects.
1352 { 'struct': 'SgxEPCProperties',
1353 'data': { 'sgx-epc': ['SgxEPC'] }
1357 # @query-memory-devices:
1359 # Lists available memory devices and their state
1365 # -> { "execute": "query-memory-devices" }
1366 # <- { "return": [ { "data":
1367 # { "addr": 5368709120,
1368 # "hotpluggable": true,
1369 # "hotplugged": true,
1371 # "memdev": "/objects/memX",
1373 # "size": 1073741824,
1379 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
1382 # @MEMORY_DEVICE_SIZE_CHANGE:
1384 # Emitted when the size of a memory device changes. Only emitted for memory
1385 # devices that can actually change the size (e.g., virtio-mem due to guest
1390 # @size: the new size of memory that the device provides
1392 # @qom-path: path to the device object in the QOM tree (since 6.2)
1394 # Note: this event is rate-limited.
1400 # <- { "event": "MEMORY_DEVICE_SIZE_CHANGE",
1401 # "data": { "id": "vm0", "size": 1073741824,
1402 # "qom-path": "/machine/unattached/device[2]" },
1403 # "timestamp": { "seconds": 1588168529, "microseconds": 201316 } }
1406 { 'event': 'MEMORY_DEVICE_SIZE_CHANGE',
1407 'data': { '*id': 'str', 'size': 'size', 'qom-path' : 'str'} }
1410 # @MEM_UNPLUG_ERROR:
1412 # Emitted when memory hot unplug error occurs.
1414 # @device: device name
1416 # @msg: Informative message
1419 # @deprecated: This event is deprecated. Use @DEVICE_UNPLUG_GUEST_ERROR
1426 # <- { "event": "MEM_UNPLUG_ERROR",
1427 # "data": { "device": "dimm1",
1428 # "msg": "acpi: device unplug for unsupported device"
1430 # "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
1433 { 'event': 'MEM_UNPLUG_ERROR',
1434 'data': { 'device': 'str', 'msg': 'str' },
1435 'features': ['deprecated'] }
1438 # @BootConfiguration:
1440 # Schema for virtual machine boot configuration.
1442 # @order: Boot order (a=floppy, c=hard disk, d=CD-ROM, n=network)
1444 # @once: Boot order to apply on first boot
1446 # @menu: Whether to show a boot menu
1448 # @splash: The name of the file to be passed to the firmware as logo picture, if @menu is true.
1450 # @splash-time: How long to show the logo picture, in milliseconds
1452 # @reboot-timeout: Timeout before guest reboots after boot fails
1454 # @strict: Whether to attempt booting from devices not included in the boot order
1458 { 'struct': 'BootConfiguration', 'data': {
1463 '*splash-time': 'int',
1464 '*reboot-timeout': 'int',
1465 '*strict': 'bool' } }
1468 # @SMPConfiguration:
1470 # Schema for CPU topology configuration. A missing value lets
1471 # QEMU figure out a suitable value based on the ones that are provided.
1473 # @cpus: number of virtual CPUs in the virtual machine
1475 # @sockets: number of sockets in the CPU topology
1477 # @dies: number of dies per socket in the CPU topology
1479 # @clusters: number of clusters per die in the CPU topology (since 7.0)
1481 # @cores: number of cores per cluster in the CPU topology
1483 # @threads: number of threads per core in the CPU topology
1485 # @maxcpus: maximum number of hotpluggable virtual CPUs in the virtual machine
1489 { 'struct': 'SMPConfiguration', 'data': {
1496 '*maxcpus': 'int' } }
1501 # Query interrupt statistics
1504 # @unstable: This command is meant for debugging.
1506 # Returns: interrupt statistics
1510 { 'command': 'x-query-irq',
1511 'returns': 'HumanReadableText',
1512 'features': [ 'unstable' ] }
1517 # Query TCG compiler statistics
1520 # @unstable: This command is meant for debugging.
1522 # Returns: TCG compiler statistics
1526 { 'command': 'x-query-jit',
1527 'returns': 'HumanReadableText',
1529 'features': [ 'unstable' ] }
1534 # Query NUMA topology information
1537 # @unstable: This command is meant for debugging.
1539 # Returns: topology information
1543 { 'command': 'x-query-numa',
1544 'returns': 'HumanReadableText',
1545 'features': [ 'unstable' ] }
1550 # Query TCG opcode counters
1553 # @unstable: This command is meant for debugging.
1555 # Returns: TCG opcode counters
1559 { 'command': 'x-query-opcount',
1560 'returns': 'HumanReadableText',
1562 'features': [ 'unstable' ] }
1567 # Query TCG profiling information
1570 # @unstable: This command is meant for debugging.
1572 # Returns: profile information
1576 { 'command': 'x-query-profile',
1577 'returns': 'HumanReadableText',
1579 'features': [ 'unstable' ] }
1582 # @x-query-ramblock:
1584 # Query system ramblock information
1587 # @unstable: This command is meant for debugging.
1589 # Returns: system ramblock information
1593 { 'command': 'x-query-ramblock',
1594 'returns': 'HumanReadableText',
1595 'features': [ 'unstable' ] }
1603 # @unstable: This command is meant for debugging.
1605 # Returns: RDMA state
1609 { 'command': 'x-query-rdma',
1610 'returns': 'HumanReadableText',
1611 'features': [ 'unstable' ] }
1616 # Query information on the registered ROMS
1619 # @unstable: This command is meant for debugging.
1621 # Returns: registered ROMs
1625 { 'command': 'x-query-roms',
1626 'returns': 'HumanReadableText',
1627 'features': [ 'unstable' ] }
1632 # Query information on the USB devices
1635 # @unstable: This command is meant for debugging.
1637 # Returns: USB device information
1641 { 'command': 'x-query-usb',
1642 'returns': 'HumanReadableText',
1643 'features': [ 'unstable' ] }
1646 # @SmbiosEntryPointType:
1648 # @32: SMBIOS version 2.1 (32-bit) Entry Point
1650 # @64: SMBIOS version 3.0 (64-bit) Entry Point
1654 { 'enum': 'SmbiosEntryPointType',
1655 'data': [ '32', '64' ] }
1658 # @MemorySizeConfiguration:
1660 # Schema for memory size configuration.
1662 # @size: memory size in bytes
1664 # @max-size: maximum hotpluggable memory size in bytes
1666 # @slots: number of available memory slots for hotplug
1670 { 'struct': 'MemorySizeConfiguration', 'data': {
1672 '*max-size': 'size',
1673 '*slots': 'uint64' } }
1678 # Save the FDT in dtb format.
1680 # @filename: name of the dtb file to be created
1685 # -> { "execute": "dumpdtb" }
1686 # "arguments": { "filename": "fdt.dtb" } }
1687 # <- { "return": {} }
1690 { 'command': 'dumpdtb',
1691 'data': { 'filename': 'str' },
1692 'if': 'CONFIG_FDT' }