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 '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)
82 { 'union' : 'CpuInfoFast',
83 'base' : { 'cpu-index' : 'int',
86 '*props' : 'CpuInstanceProperties',
87 'target' : 'SysEmuTarget' },
88 'discriminator' : 'target',
89 'data' : { 's390x' : 'CpuInfoS390' } }
94 # Returns information about all virtual CPUs.
96 # Returns: list of @CpuInfoFast
102 # -> { "execute": "query-cpus-fast" }
105 # "thread-id": 25627,
111 # "qom-path": "/machine/unattached/device[0]",
116 # "thread-id": 25628,
122 # "qom-path": "/machine/unattached/device[2]",
129 { 'command': 'query-cpus-fast', 'returns': [ 'CpuInfoFast' ] }
134 # Information describing a machine.
136 # @name: the name of the machine
138 # @alias: an alias for the machine name
140 # @is-default: whether the machine is default
142 # @cpu-max: maximum number of CPUs supported by the machine type
145 # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7)
147 # @numa-mem-supported: true if '-numa node,mem' option is supported by
148 # the machine type and false otherwise (since 4.1)
150 # @deprecated: if true, the machine type is deprecated and may be removed
151 # in future versions of QEMU according to the QEMU deprecation
154 # @default-cpu-type: default CPU model typename if none is requested via
155 # the -cpu argument. (since 4.2)
157 # @default-ram-id: the default ID of initial RAM memory backend (since 5.2)
161 { 'struct': 'MachineInfo',
162 'data': { 'name': 'str', '*alias': 'str',
163 '*is-default': 'bool', 'cpu-max': 'int',
164 'hotpluggable-cpus': 'bool', 'numa-mem-supported': 'bool',
165 'deprecated': 'bool', '*default-cpu-type': 'str',
166 '*default-ram-id': 'str' } }
171 # Return a list of supported machines
173 # Returns: a list of MachineInfo
177 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
180 # @CurrentMachineParams:
182 # Information describing the running machine parameters.
184 # @wakeup-suspend-support: true if the machine supports wake up from
189 { 'struct': 'CurrentMachineParams',
190 'data': { 'wakeup-suspend-support': 'bool'} }
193 # @query-current-machine:
195 # Return information on the current virtual machine.
197 # Returns: CurrentMachineParams
201 { 'command': 'query-current-machine', 'returns': 'CurrentMachineParams' }
206 # Information describing the QEMU target.
208 # @arch: the target architecture
212 { 'struct': 'TargetInfo',
213 'data': { 'arch': 'SysEmuTarget' } }
218 # Return information about the target for this QEMU
220 # Returns: TargetInfo
224 { 'command': 'query-target', 'returns': 'TargetInfo' }
229 # Guest UUID information (Universally Unique Identifier).
231 # @UUID: the UUID of the guest
235 # Notes: If no UUID was specified for the guest, a null UUID is returned.
237 { 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
242 # Query the guest UUID information.
244 # Returns: The @UuidInfo for the guest
250 # -> { "execute": "query-uuid" }
251 # <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
254 { 'command': 'query-uuid', 'returns': 'UuidInfo', 'allow-preconfig': true }
261 # @guid: the globally unique identifier
265 { 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
268 # @query-vm-generation-id:
270 # Show Virtual Machine Generation ID
274 { 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }
279 # Performs a hard reset of a guest.
285 # -> { "execute": "system_reset" }
286 # <- { "return": {} }
289 { 'command': 'system_reset' }
294 # Requests that a guest perform a powerdown operation.
298 # Notes: A guest may or may not respond to this command. This command
299 # returning does not indicate that a guest has accepted the request or
300 # that it has shut down. Many guests will respond to this command by
301 # prompting the user in some way.
304 # -> { "execute": "system_powerdown" }
305 # <- { "return": {} }
308 { 'command': 'system_powerdown' }
313 # Wake up guest from suspend. If the guest has wake-up from suspend
314 # support enabled (wakeup-suspend-support flag from
315 # query-current-machine), wake-up guest from suspend if the guest is
316 # in SUSPENDED state. Return an error otherwise.
322 # Note: prior to 4.0, this command does nothing in case the guest
327 # -> { "execute": "system_wakeup" }
328 # <- { "return": {} }
331 { 'command': 'system_wakeup' }
336 # Policy for handling lost ticks in timer devices. Ticks end up getting
337 # lost when, for example, the guest is paused.
339 # @discard: throw away the missed ticks and continue with future injection
340 # normally. The guest OS will see the timer jump ahead by a
341 # potentially quite significant amount all at once, as if the
342 # intervening chunk of time had simply not existed; needless to
343 # say, such a sudden jump can easily confuse a guest OS which is
344 # not specifically prepared to deal with it. Assuming the guest
345 # OS can deal correctly with the time jump, the time in the guest
346 # and in the host should now match.
348 # @delay: continue to deliver ticks at the normal rate. The guest OS will
349 # not notice anything is amiss, as from its point of view time will
350 # have continued to flow normally. The time in the guest should now
351 # be behind the time in the host by exactly the amount of time during
352 # which ticks have been missed.
354 # @slew: deliver ticks at a higher rate to catch up with the missed ticks.
355 # The guest OS will not notice anything is amiss, as from its point
356 # of view time will have continued to flow normally. Once the timer
357 # has managed to catch up with all the missing ticks, the time in
358 # the guest and in the host should match.
362 { 'enum': 'LostTickPolicy',
363 'data': ['discard', 'delay', 'slew' ] }
368 # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
369 # The command fails when the guest doesn't support injecting.
371 # Returns: If successful, nothing
375 # Note: prior to 2.1, this command was only supported for x86 and s390 VMs
379 # -> { "execute": "inject-nmi" }
380 # <- { "return": {} }
383 { 'command': 'inject-nmi' }
388 # Information about support for KVM acceleration
390 # @enabled: true if KVM acceleration is active
392 # @present: true if KVM acceleration is built into this executable
396 { 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
401 # Returns information about KVM acceleration
409 # -> { "execute": "query-kvm" }
410 # <- { "return": { "enabled": true, "present": true } }
413 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
418 # @node: NUMA nodes configuration
420 # @dist: NUMA distance configuration (since 2.10)
422 # @cpu: property based CPU(s) to node mapping (Since: 2.10)
424 # @hmat-lb: memory latency and bandwidth information (Since: 5.0)
426 # @hmat-cache: memory side cache information (Since: 5.0)
430 { 'enum': 'NumaOptionsType',
431 'data': [ 'node', 'dist', 'cpu', 'hmat-lb', 'hmat-cache' ] }
436 # A discriminated record of NUMA options. (for OptsVisitor)
440 { 'union': 'NumaOptions',
441 'base': { 'type': 'NumaOptionsType' },
442 'discriminator': 'type',
444 'node': 'NumaNodeOptions',
445 'dist': 'NumaDistOptions',
446 'cpu': 'NumaCpuOptions',
447 'hmat-lb': 'NumaHmatLBOptions',
448 'hmat-cache': 'NumaHmatCacheOptions' }}
453 # Create a guest NUMA node. (for OptsVisitor)
455 # @nodeid: NUMA node ID (increase by 1 from 0 if omitted)
457 # @cpus: VCPUs belonging to this node (assign VCPUS round-robin
460 # @mem: memory size of this node; mutually exclusive with @memdev.
461 # Equally divide total memory among nodes if both @mem and @memdev are
464 # @memdev: memory backend object. If specified for one node,
465 # it must be specified for all nodes.
467 # @initiator: defined in ACPI 6.3 Chapter 5.2.27.3 Table 5-145,
468 # points to the nodeid which has the memory controller
469 # responsible for this NUMA node. This field provides
470 # additional information as to the initiator node that
471 # is closest (as in directly attached) to this node, and
472 # therefore has the best performance (since 5.0)
476 { 'struct': 'NumaNodeOptions',
482 '*initiator': 'uint16' }}
487 # Set the distance between 2 NUMA nodes.
489 # @src: source NUMA node.
491 # @dst: destination NUMA node.
493 # @val: NUMA distance from source node to destination node.
494 # When a node is unreachable from another node, set the distance
495 # between them to 255.
499 { 'struct': 'NumaDistOptions',
508 # A X86 32-bit register
512 { 'enum': 'X86CPURegister32',
513 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
516 # @X86CPUFeatureWordInfo:
518 # Information about a X86 CPU feature word
520 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
522 # @cpuid-input-ecx: Input ECX value for CPUID instruction for that
525 # @cpuid-register: Output register containing the feature bits
527 # @features: value of output register, containing the feature bits
531 { 'struct': 'X86CPUFeatureWordInfo',
532 'data': { 'cpuid-input-eax': 'int',
533 '*cpuid-input-ecx': 'int',
534 'cpuid-register': 'X86CPURegister32',
535 'features': 'int' } }
540 # Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
544 { 'struct': 'DummyForceArrays',
545 'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
550 # Option "-numa cpu" overrides default cpu to node mapping.
551 # It accepts the same set of cpu properties as returned by
552 # query-hotpluggable-cpus[].props, where node-id could be used to
553 # override default node mapping.
557 { 'struct': 'NumaCpuOptions',
558 'base': 'CpuInstanceProperties',
562 # @HmatLBMemoryHierarchy:
564 # The memory hierarchy in the System Locality Latency and Bandwidth
565 # Information Structure of HMAT (Heterogeneous Memory Attribute Table)
567 # For more information about @HmatLBMemoryHierarchy, see chapter
568 # 5.2.27.4: Table 5-146: Field "Flags" of ACPI 6.3 spec.
570 # @memory: the structure represents the memory performance
572 # @first-level: first level of memory side cache
574 # @second-level: second level of memory side cache
576 # @third-level: third level of memory side cache
580 { 'enum': 'HmatLBMemoryHierarchy',
581 'data': [ 'memory', 'first-level', 'second-level', 'third-level' ] }
586 # Data type in the System Locality Latency and Bandwidth
587 # Information Structure of HMAT (Heterogeneous Memory Attribute Table)
589 # For more information about @HmatLBDataType, see chapter
590 # 5.2.27.4: Table 5-146: Field "Data Type" of ACPI 6.3 spec.
592 # @access-latency: access latency (nanoseconds)
594 # @read-latency: read latency (nanoseconds)
596 # @write-latency: write latency (nanoseconds)
598 # @access-bandwidth: access bandwidth (Bytes per second)
600 # @read-bandwidth: read bandwidth (Bytes per second)
602 # @write-bandwidth: write bandwidth (Bytes per second)
606 { 'enum': 'HmatLBDataType',
607 'data': [ 'access-latency', 'read-latency', 'write-latency',
608 'access-bandwidth', 'read-bandwidth', 'write-bandwidth' ] }
611 # @NumaHmatLBOptions:
613 # Set the system locality latency and bandwidth information
614 # between Initiator and Target proximity Domains.
616 # For more information about @NumaHmatLBOptions, see chapter
617 # 5.2.27.4: Table 5-146 of ACPI 6.3 spec.
619 # @initiator: the Initiator Proximity Domain.
621 # @target: the Target Proximity Domain.
623 # @hierarchy: the Memory Hierarchy. Indicates the performance
624 # of memory or side cache.
626 # @data-type: presents the type of data, access/read/write
627 # latency or hit latency.
629 # @latency: the value of latency from @initiator to @target
630 # proximity domain, the latency unit is "ns(nanosecond)".
632 # @bandwidth: the value of bandwidth between @initiator and @target
633 # proximity domain, the bandwidth unit is
634 # "Bytes per second".
638 { 'struct': 'NumaHmatLBOptions',
640 'initiator': 'uint16',
642 'hierarchy': 'HmatLBMemoryHierarchy',
643 'data-type': 'HmatLBDataType',
644 '*latency': 'uint64',
645 '*bandwidth': 'size' }}
648 # @HmatCacheAssociativity:
650 # Cache associativity in the Memory Side Cache Information Structure
653 # For more information of @HmatCacheAssociativity, see chapter
654 # 5.2.27.5: Table 5-147 of ACPI 6.3 spec.
656 # @none: None (no memory side cache in this proximity domain,
657 # or cache associativity unknown)
659 # @direct: Direct Mapped
661 # @complex: Complex Cache Indexing (implementation specific)
665 { 'enum': 'HmatCacheAssociativity',
666 'data': [ 'none', 'direct', 'complex' ] }
669 # @HmatCacheWritePolicy:
671 # Cache write policy in the Memory Side Cache Information Structure
674 # For more information of @HmatCacheWritePolicy, see chapter
675 # 5.2.27.5: Table 5-147: Field "Cache Attributes" of ACPI 6.3 spec.
677 # @none: None (no memory side cache in this proximity domain,
678 # or cache write policy unknown)
680 # @write-back: Write Back (WB)
682 # @write-through: Write Through (WT)
686 { 'enum': 'HmatCacheWritePolicy',
687 'data': [ 'none', 'write-back', 'write-through' ] }
690 # @NumaHmatCacheOptions:
692 # Set the memory side cache information for a given memory domain.
694 # For more information of @NumaHmatCacheOptions, see chapter
695 # 5.2.27.5: Table 5-147: Field "Cache Attributes" of ACPI 6.3 spec.
697 # @node-id: the memory proximity domain to which the memory belongs.
699 # @size: the size of memory side cache in bytes.
701 # @level: the cache level described in this structure.
703 # @associativity: the cache associativity,
704 # none/direct-mapped/complex(complex cache indexing).
706 # @policy: the write policy, none/write-back/write-through.
708 # @line: the cache Line size in bytes.
712 { 'struct': 'NumaHmatCacheOptions',
717 'associativity': 'HmatCacheAssociativity',
718 'policy': 'HmatCacheWritePolicy',
724 # Save a portion of guest memory to a file.
726 # @val: the virtual address of the guest to start from
728 # @size: the size of memory region to save
730 # @filename: the file to save the memory to as binary data
732 # @cpu-index: the index of the virtual CPU to use for translating the
733 # virtual address (defaults to CPU 0)
735 # Returns: Nothing on success
739 # Notes: Errors were not reliably returned until 1.1
743 # -> { "execute": "memsave",
744 # "arguments": { "val": 10,
746 # "filename": "/tmp/virtual-mem-dump" } }
747 # <- { "return": {} }
750 { 'command': 'memsave',
751 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
756 # Save a portion of guest physical memory to a file.
758 # @val: the physical address of the guest to start from
760 # @size: the size of memory region to save
762 # @filename: the file to save the memory to as binary data
764 # Returns: Nothing on success
768 # Notes: Errors were not reliably returned until 1.1
772 # -> { "execute": "pmemsave",
773 # "arguments": { "val": 10,
775 # "filename": "/tmp/physical-mem-dump" } }
776 # <- { "return": {} }
779 { 'command': 'pmemsave',
780 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
785 # Information about memory backend
787 # @id: backend's ID if backend has 'id' property (since 2.9)
789 # @size: memory backend size
791 # @merge: whether memory merge support is enabled
793 # @dump: whether memory backend's memory is included in a core dump
795 # @prealloc: whether memory was preallocated
797 # @share: whether memory is private to QEMU or shared (since 6.1)
799 # @reserve: whether swap space (or huge pages) was reserved if applicable.
800 # This corresponds to the user configuration and not the actual
801 # behavior implemented in the OS to perform the reservation.
802 # For example, Linux will never reserve swap space for shared
803 # file mappings. (since 6.1)
805 # @host-nodes: host nodes for its memory policy
807 # @policy: memory policy of memory backend
811 { 'struct': 'Memdev',
820 'host-nodes': ['uint16'],
821 'policy': 'HostMemPolicy' }}
826 # Returns information for all memory backends.
828 # Returns: a list of @Memdev.
834 # -> { "execute": "query-memdev" }
843 # "host-nodes": [0, 1],
852 # "host-nodes": [2, 3],
853 # "policy": "preferred"
859 { 'command': 'query-memdev', 'returns': ['Memdev'], 'allow-preconfig': true }
862 # @CpuInstanceProperties:
864 # List of properties to be used for hotplugging a CPU instance,
865 # it should be passed by management with device_add command when
866 # a CPU is being hotplugged.
868 # @node-id: NUMA node ID the CPU belongs to
869 # @socket-id: socket number within node/board the CPU belongs to
870 # @die-id: die number within socket the CPU belongs to (since 4.1)
871 # @cluster-id: cluster number within die the CPU belongs to (since 7.1)
872 # @core-id: core number within cluster the CPU belongs to
873 # @thread-id: thread number within core the CPU belongs to
875 # Note: currently there are 6 properties that could be present
876 # but management should be prepared to pass through other
877 # properties with device_add command to allow for future
878 # interface extension. This also requires the filed names to be kept in
879 # sync with the properties passed to -device/device_add.
883 { 'struct': 'CpuInstanceProperties',
884 'data': { '*node-id': 'int',
887 '*cluster-id': 'int',
896 # @type: CPU object type for usage with device_add command
897 # @props: list of properties to be used for hotplugging CPU
898 # @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides
899 # @qom-path: link to existing CPU object if CPU is present or
900 # omitted if CPU is not present.
904 { 'struct': 'HotpluggableCPU',
905 'data': { 'type': 'str',
906 'vcpus-count': 'int',
907 'props': 'CpuInstanceProperties',
913 # @query-hotpluggable-cpus:
915 # TODO: Better documentation; currently there is none.
917 # Returns: a list of HotpluggableCPU objects.
923 # For pseries machine type started with -smp 2,cores=2,maxcpus=4 -cpu POWER8:
925 # -> { "execute": "query-hotpluggable-cpus" }
927 # { "props": { "core": 8 }, "type": "POWER8-spapr-cpu-core",
928 # "vcpus-count": 1 },
929 # { "props": { "core": 0 }, "type": "POWER8-spapr-cpu-core",
930 # "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"}
933 # For pc machine type started with -smp 1,maxcpus=2:
935 # -> { "execute": "query-hotpluggable-cpus" }
938 # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
939 # "props": {"core-id": 0, "socket-id": 1, "thread-id": 0}
942 # "qom-path": "/machine/unattached/device[0]",
943 # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
944 # "props": {"core-id": 0, "socket-id": 0, "thread-id": 0}
948 # For s390x-virtio-ccw machine type started with -smp 1,maxcpus=2 -cpu qemu
951 # -> { "execute": "query-hotpluggable-cpus" }
954 # "type": "qemu-s390x-cpu", "vcpus-count": 1,
955 # "props": { "core-id": 1 }
958 # "qom-path": "/machine/unattached/device[0]",
959 # "type": "qemu-s390x-cpu", "vcpus-count": 1,
960 # "props": { "core-id": 0 }
965 { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'],
966 'allow-preconfig': true }
971 # Runtime equivalent of '-numa' CLI option, available at
972 # preconfigure stage to configure numa mapping before initializing
977 { 'command': 'set-numa-node', 'boxed': true,
978 'data': 'NumaOptions',
979 'allow-preconfig': true
985 # Request the balloon driver to change its balloon size.
987 # @value: the target logical size of the VM in bytes.
988 # We can deduce the size of the balloon using this formula:
990 # logical_vm_size = vm_ram_size - balloon_size
992 # From it we have: balloon_size = vm_ram_size - @value
994 # Returns: - Nothing on success
995 # - If the balloon driver is enabled but not functional because the KVM
996 # kernel module cannot support it, KvmMissingCap
997 # - If no balloon device is present, DeviceNotActive
999 # Notes: This command just issues a request to the guest. When it returns,
1000 # the balloon size may not have changed. A guest can change the balloon
1001 # size independent of this command.
1007 # -> { "execute": "balloon", "arguments": { "value": 536870912 } }
1008 # <- { "return": {} }
1010 # With a 2.5GiB guest this command inflated the ballon to 3GiB.
1013 { 'command': 'balloon', 'data': {'value': 'int'} }
1018 # Information about the guest balloon device.
1020 # @actual: the logical size of the VM in bytes
1021 # Formula used: logical_vm_size = vm_ram_size - balloon_size
1026 { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
1031 # Return information about the balloon device.
1033 # Returns: - @BalloonInfo on success
1034 # - If the balloon driver is enabled but not functional because the KVM
1035 # kernel module cannot support it, KvmMissingCap
1036 # - If no balloon device is present, DeviceNotActive
1042 # -> { "execute": "query-balloon" }
1044 # "actual": 1073741824,
1049 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1054 # Emitted when the guest changes the actual BALLOON level. This value is
1055 # equivalent to the @actual field return by the 'query-balloon' command
1057 # @actual: the logical size of the VM in bytes
1058 # Formula used: logical_vm_size = vm_ram_size - balloon_size
1060 # Note: this event is rate-limited.
1066 # <- { "event": "BALLOON_CHANGE",
1067 # "data": { "actual": 944766976 },
1068 # "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
1071 { 'event': 'BALLOON_CHANGE',
1072 'data': { 'actual': 'int' } }
1077 # Actual memory information in bytes.
1079 # @base-memory: size of "base" memory specified with command line
1082 # @plugged-memory: size of memory that can be hot-unplugged. This field
1083 # is omitted if target doesn't support memory hotplug
1084 # (i.e. CONFIG_MEM_DEVICE not defined at build time).
1088 { 'struct': 'MemoryInfo',
1089 'data' : { 'base-memory': 'size', '*plugged-memory': 'size' } }
1092 # @query-memory-size-summary:
1094 # Return the amount of initially allocated and present hotpluggable (if
1095 # enabled) memory in bytes.
1099 # -> { "execute": "query-memory-size-summary" }
1100 # <- { "return": { "base-memory": 4294967296, "plugged-memory": 0 } }
1104 { 'command': 'query-memory-size-summary', 'returns': 'MemoryInfo' }
1107 # @PCDIMMDeviceInfo:
1109 # PCDIMMDevice state information
1113 # @addr: physical address, where device is mapped
1115 # @size: size of memory that the device provides
1117 # @slot: slot number at which device is plugged in
1119 # @node: NUMA node number where device is plugged in
1121 # @memdev: memory backend linked with device
1123 # @hotplugged: true if device was hotplugged
1125 # @hotpluggable: true if device if could be added/removed while machine is running
1129 { 'struct': 'PCDIMMDeviceInfo',
1130 'data': { '*id': 'str',
1136 'hotplugged': 'bool',
1137 'hotpluggable': 'bool'
1142 # @VirtioPMEMDeviceInfo:
1144 # VirtioPMEM state information
1148 # @memaddr: physical address in memory, where device is mapped
1150 # @size: size of memory that the device provides
1152 # @memdev: memory backend linked with device
1156 { 'struct': 'VirtioPMEMDeviceInfo',
1157 'data': { '*id': 'str',
1165 # @VirtioMEMDeviceInfo:
1167 # VirtioMEMDevice state information
1171 # @memaddr: physical address in memory, where device is mapped
1173 # @requested-size: the user requested size of the device
1175 # @size: the (current) size of memory that the device provides
1177 # @max-size: the maximum size of memory that the device can provide
1179 # @block-size: the block size of memory that the device provides
1181 # @node: NUMA node number where device is assigned to
1183 # @memdev: memory backend linked with the region
1187 { 'struct': 'VirtioMEMDeviceInfo',
1188 'data': { '*id': 'str',
1190 'requested-size': 'size',
1193 'block-size': 'size',
1200 # @SgxEPCDeviceInfo:
1202 # Sgx EPC state information
1206 # @memaddr: physical address in memory, where device is mapped
1208 # @size: size of memory that the device provides
1210 # @memdev: memory backend linked with device
1212 # @node: the numa node (Since: 7.0)
1216 { 'struct': 'SgxEPCDeviceInfo',
1217 'data': { '*id': 'str',
1226 # @MemoryDeviceInfoKind:
1230 { 'enum': 'MemoryDeviceInfoKind',
1231 'data': [ 'dimm', 'nvdimm', 'virtio-pmem', 'virtio-mem', 'sgx-epc' ] }
1234 # @PCDIMMDeviceInfoWrapper:
1238 { 'struct': 'PCDIMMDeviceInfoWrapper',
1239 'data': { 'data': 'PCDIMMDeviceInfo' } }
1242 # @VirtioPMEMDeviceInfoWrapper:
1246 { 'struct': 'VirtioPMEMDeviceInfoWrapper',
1247 'data': { 'data': 'VirtioPMEMDeviceInfo' } }
1250 # @VirtioMEMDeviceInfoWrapper:
1254 { 'struct': 'VirtioMEMDeviceInfoWrapper',
1255 'data': { 'data': 'VirtioMEMDeviceInfo' } }
1258 # @SgxEPCDeviceInfoWrapper:
1262 { 'struct': 'SgxEPCDeviceInfoWrapper',
1263 'data': { 'data': 'SgxEPCDeviceInfo' } }
1266 # @MemoryDeviceInfo:
1268 # Union containing information about a memory device
1270 # nvdimm is included since 2.12. virtio-pmem is included since 4.1.
1271 # virtio-mem is included since 5.1. sgx-epc is included since 6.2.
1275 { 'union': 'MemoryDeviceInfo',
1276 'base': { 'type': 'MemoryDeviceInfoKind' },
1277 'discriminator': 'type',
1278 'data': { 'dimm': 'PCDIMMDeviceInfoWrapper',
1279 'nvdimm': 'PCDIMMDeviceInfoWrapper',
1280 'virtio-pmem': 'VirtioPMEMDeviceInfoWrapper',
1281 'virtio-mem': 'VirtioMEMDeviceInfoWrapper',
1282 'sgx-epc': 'SgxEPCDeviceInfoWrapper'
1289 # Sgx EPC cmdline information
1291 # @memdev: memory backend linked with device
1293 # @node: the numa node (Since: 7.0)
1297 { 'struct': 'SgxEPC',
1298 'data': { 'memdev': 'str',
1304 # @SgxEPCProperties:
1306 # SGX properties of machine types.
1308 # @sgx-epc: list of ids of memory-backend-epc objects.
1312 { 'struct': 'SgxEPCProperties',
1313 'data': { 'sgx-epc': ['SgxEPC'] }
1317 # @query-memory-devices:
1319 # Lists available memory devices and their state
1325 # -> { "execute": "query-memory-devices" }
1326 # <- { "return": [ { "data":
1327 # { "addr": 5368709120,
1328 # "hotpluggable": true,
1329 # "hotplugged": true,
1331 # "memdev": "/objects/memX",
1333 # "size": 1073741824,
1339 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
1342 # @MEMORY_DEVICE_SIZE_CHANGE:
1344 # Emitted when the size of a memory device changes. Only emitted for memory
1345 # devices that can actually change the size (e.g., virtio-mem due to guest
1350 # @size: the new size of memory that the device provides
1352 # @qom-path: path to the device object in the QOM tree (since 6.2)
1354 # Note: this event is rate-limited.
1360 # <- { "event": "MEMORY_DEVICE_SIZE_CHANGE",
1361 # "data": { "id": "vm0", "size": 1073741824,
1362 # "qom-path": "/machine/unattached/device[2]" },
1363 # "timestamp": { "seconds": 1588168529, "microseconds": 201316 } }
1366 { 'event': 'MEMORY_DEVICE_SIZE_CHANGE',
1367 'data': { '*id': 'str', 'size': 'size', 'qom-path' : 'str'} }
1371 # @MEM_UNPLUG_ERROR:
1373 # Emitted when memory hot unplug error occurs.
1375 # @device: device name
1377 # @msg: Informative message
1380 # @deprecated: This event is deprecated. Use @DEVICE_UNPLUG_GUEST_ERROR
1387 # <- { "event": "MEM_UNPLUG_ERROR"
1388 # "data": { "device": "dimm1",
1389 # "msg": "acpi: device unplug for unsupported device"
1391 # "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
1394 { 'event': 'MEM_UNPLUG_ERROR',
1395 'data': { 'device': 'str', 'msg': 'str' },
1396 'features': ['deprecated'] }
1399 # @BootConfiguration:
1401 # Schema for virtual machine boot configuration.
1403 # @order: Boot order (a=floppy, c=hard disk, d=CD-ROM, n=network)
1405 # @once: Boot order to apply on first boot
1407 # @menu: Whether to show a boot menu
1409 # @splash: The name of the file to be passed to the firmware as logo picture, if @menu is true.
1411 # @splash-time: How long to show the logo picture, in milliseconds
1413 # @reboot-timeout: Timeout before guest reboots after boot fails
1415 # @strict: Whether to attempt booting from devices not included in the boot order
1419 { 'struct': 'BootConfiguration', 'data': {
1424 '*splash-time': 'int',
1425 '*reboot-timeout': 'int',
1426 '*strict': 'bool' } }
1429 # @SMPConfiguration:
1431 # Schema for CPU topology configuration. A missing value lets
1432 # QEMU figure out a suitable value based on the ones that are provided.
1434 # @cpus: number of virtual CPUs in the virtual machine
1436 # @sockets: number of sockets in the CPU topology
1438 # @dies: number of dies per socket in the CPU topology
1440 # @clusters: number of clusters per die in the CPU topology (since 7.0)
1442 # @cores: number of cores per cluster in the CPU topology
1444 # @threads: number of threads per core in the CPU topology
1446 # @maxcpus: maximum number of hotpluggable virtual CPUs in the virtual machine
1450 { 'struct': 'SMPConfiguration', 'data': {
1457 '*maxcpus': 'int' } }
1462 # Query interrupt statistics
1465 # @unstable: This command is meant for debugging.
1467 # Returns: interrupt statistics
1471 { 'command': 'x-query-irq',
1472 'returns': 'HumanReadableText',
1473 'features': [ 'unstable' ] }
1478 # Query TCG compiler statistics
1481 # @unstable: This command is meant for debugging.
1483 # Returns: TCG compiler statistics
1487 { 'command': 'x-query-jit',
1488 'returns': 'HumanReadableText',
1490 'features': [ 'unstable' ] }
1495 # Query NUMA topology information
1498 # @unstable: This command is meant for debugging.
1500 # Returns: topology information
1504 { 'command': 'x-query-numa',
1505 'returns': 'HumanReadableText',
1506 'features': [ 'unstable' ] }
1511 # Query TCG opcode counters
1514 # @unstable: This command is meant for debugging.
1516 # Returns: TCG opcode counters
1520 { 'command': 'x-query-opcount',
1521 'returns': 'HumanReadableText',
1523 'features': [ 'unstable' ] }
1528 # Query TCG profiling information
1531 # @unstable: This command is meant for debugging.
1533 # Returns: profile information
1537 { 'command': 'x-query-profile',
1538 'returns': 'HumanReadableText',
1540 'features': [ 'unstable' ] }
1543 # @x-query-ramblock:
1545 # Query system ramblock information
1548 # @unstable: This command is meant for debugging.
1550 # Returns: system ramblock information
1554 { 'command': 'x-query-ramblock',
1555 'returns': 'HumanReadableText',
1556 'features': [ 'unstable' ] }
1564 # @unstable: This command is meant for debugging.
1566 # Returns: RDMA state
1570 { 'command': 'x-query-rdma',
1571 'returns': 'HumanReadableText',
1572 'features': [ 'unstable' ] }
1577 # Query information on the registered ROMS
1580 # @unstable: This command is meant for debugging.
1582 # Returns: registered ROMs
1586 { 'command': 'x-query-roms',
1587 'returns': 'HumanReadableText',
1588 'features': [ 'unstable' ] }
1593 # Query information on the USB devices
1596 # @unstable: This command is meant for debugging.
1598 # Returns: USB device information
1602 { 'command': 'x-query-usb',
1603 'returns': 'HumanReadableText',
1604 'features': [ 'unstable' ] }
1607 # @SmbiosEntryPointType:
1609 # @32: SMBIOS version 2.1 (32-bit) Entry Point
1611 # @64: SMBIOS version 3.0 (64-bit) Entry Point
1615 { 'enum': 'SmbiosEntryPointType',
1616 'data': [ '32', '64' ] }