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.
14 # The comprehensive enumeration of QEMU system emulation ("softmmu")
15 # targets. Run "./configure --help" in the project root directory, and
16 # look for the \*-softmmu targets near the "--target-list" option. The
17 # individual target constants are not documented here, for the time
23 # Notes: The resulting QMP strings can be appended to the "qemu-system-"
24 # prefix to produce the corresponding QEMU executable name. This
25 # is true even for "qemu-system-x86_64".
29 { 'enum' : 'SysEmuTarget',
30 'data' : [ 'aarch64', 'alpha', 'arm', 'avr', 'cris', 'hppa', 'i386', 'lm32',
31 'm68k', 'microblaze', 'microblazeel', 'mips', 'mips64',
32 'mips64el', 'mipsel', 'moxie', 'nios2', 'or1k', 'ppc',
33 'ppc64', 'riscv32', 'riscv64', 'rx', 's390x', 'sh4',
34 'sh4eb', 'sparc', 'sparc64', 'tricore', 'unicore32',
35 'x86_64', 'xtensa', 'xtensaeb' ] }
40 # An enumeration of cpu types that enable additional information during
41 # @query-cpus and @query-cpus-fast.
49 { 'enum': 'CpuInfoArch',
50 'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 's390', 'riscv', 'other' ] }
55 # Information about a virtual CPU
57 # @CPU: the index of the virtual CPU
59 # @current: this only exists for backwards compatibility and should be ignored
61 # @halted: true if the virtual CPU is in the halt state. Halt usually refers
62 # to a processor specific low power mode.
64 # @qom_path: path to the CPU object in the QOM tree (since 2.4)
66 # @thread_id: ID of the underlying host thread
68 # @props: properties describing to which node/socket/core/thread
69 # virtual CPU belongs to, provided if supported by board (since 2.10)
71 # @arch: architecture of the cpu, which determines which additional fields
72 # will be listed (since 2.6)
76 # Notes: @halted is a transient state that changes frequently. By the time the
77 # data is sent to the client, the guest may no longer be halted.
80 'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool',
81 'qom_path': 'str', 'thread_id': 'int',
82 '*props': 'CpuInstanceProperties', 'arch': 'CpuInfoArch' },
83 'discriminator': 'arch',
84 'data': { 'x86': 'CpuInfoX86',
85 'sparc': 'CpuInfoSPARC',
87 'mips': 'CpuInfoMIPS',
88 'tricore': 'CpuInfoTricore',
89 's390': 'CpuInfoS390',
90 'riscv': 'CpuInfoRISCV' } }
95 # Additional information about a virtual i386 or x86_64 CPU
97 # @pc: the 64-bit instruction pointer
101 { 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } }
106 # Additional information about a virtual SPARC CPU
108 # @pc: the PC component of the instruction pointer
110 # @npc: the NPC component of the instruction pointer
114 { 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } }
119 # Additional information about a virtual PPC CPU
121 # @nip: the instruction pointer
125 { 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } }
130 # Additional information about a virtual MIPS CPU
132 # @PC: the instruction pointer
136 { 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } }
141 # Additional information about a virtual Tricore CPU
143 # @PC: the instruction pointer
147 { 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } }
152 # Additional information about a virtual RISCV CPU
154 # @pc: the instruction pointer
158 { 'struct': 'CpuInfoRISCV', 'data': { 'pc': 'int' } }
163 # An enumeration of cpu states that can be assumed by a virtual
168 { 'enum': 'CpuS390State',
169 'prefix': 'S390_CPU_STATE',
170 'data': [ 'uninitialized', 'stopped', 'check-stop', 'operating', 'load' ] }
175 # Additional information about a virtual S390 CPU
177 # @cpu-state: the virtual CPU's state
181 { 'struct': 'CpuInfoS390', 'data': { 'cpu-state': 'CpuS390State' } }
186 # Returns a list of information about each virtual CPU.
188 # This command causes vCPU threads to exit to userspace, which causes
189 # a small interruption to guest CPU execution. This will have a negative
190 # impact on realtime guests and other latency sensitive guest workloads.
193 # @deprecated: This command is deprecated, because it interferes with
194 # the guest. Use 'query-cpus-fast' instead to avoid the vCPU
197 # Returns: a list of @CpuInfo for each virtual CPU
203 # -> { "execute": "query-cpus" }
209 # "qom_path":"/machine/unattached/device[0]",
218 # "qom_path":"/machine/unattached/device[2]",
227 { 'command': 'query-cpus', 'returns': ['CpuInfo'],
228 'features': [ 'deprecated' ] }
233 # Information about a virtual CPU
235 # @cpu-index: index of the virtual CPU
237 # @qom-path: path to the CPU object in the QOM tree
239 # @thread-id: ID of the underlying host thread
241 # @props: properties describing to which node/socket/core/thread
242 # virtual CPU belongs to, provided if supported by board
244 # @arch: base architecture of the cpu
246 # @target: the QEMU system emulation target, which determines which
247 # additional fields will be listed (since 3.0)
250 # @deprecated: Member @arch is deprecated. Use @target instead.
255 { 'union' : 'CpuInfoFast',
256 'base' : { 'cpu-index' : 'int',
259 '*props' : 'CpuInstanceProperties',
260 'arch' : { 'type': 'CpuInfoArch',
261 'features': [ 'deprecated' ] },
262 'target' : 'SysEmuTarget' },
263 'discriminator' : 'target',
264 'data' : { 's390x' : 'CpuInfoS390' } }
269 # Returns information about all virtual CPUs. This command does not
270 # incur a performance penalty and should be used in production
271 # instead of query-cpus.
273 # Returns: list of @CpuInfoFast
279 # -> { "execute": "query-cpus-fast" }
282 # "thread-id": 25627,
288 # "qom-path": "/machine/unattached/device[0]",
294 # "thread-id": 25628,
300 # "qom-path": "/machine/unattached/device[2]",
308 { 'command': 'query-cpus-fast', 'returns': [ 'CpuInfoFast' ] }
313 # Information describing a machine.
315 # @name: the name of the machine
317 # @alias: an alias for the machine name
319 # @is-default: whether the machine is default
321 # @cpu-max: maximum number of CPUs supported by the machine type
324 # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
326 # @numa-mem-supported: true if '-numa node,mem' option is supported by
327 # the machine type and false otherwise (since 4.1)
329 # @deprecated: if true, the machine type is deprecated and may be removed
330 # in future versions of QEMU according to the QEMU deprecation
331 # policy (since 4.1.0)
333 # @default-cpu-type: default CPU model typename if none is requested via
334 # the -cpu argument. (since 4.2)
336 # @default-ram-id: the default ID of initial RAM memory backend (since 5.2)
340 { 'struct': 'MachineInfo',
341 'data': { 'name': 'str', '*alias': 'str',
342 '*is-default': 'bool', 'cpu-max': 'int',
343 'hotpluggable-cpus': 'bool', 'numa-mem-supported': 'bool',
344 'deprecated': 'bool', '*default-cpu-type': 'str',
345 '*default-ram-id': 'str' } }
350 # Return a list of supported machines
352 # Returns: a list of MachineInfo
356 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
359 # @CurrentMachineParams:
361 # Information describing the running machine parameters.
363 # @wakeup-suspend-support: true if the machine supports wake up from
368 { 'struct': 'CurrentMachineParams',
369 'data': { 'wakeup-suspend-support': 'bool'} }
372 # @query-current-machine:
374 # Return information on the current virtual machine.
376 # Returns: CurrentMachineParams
380 { 'command': 'query-current-machine', 'returns': 'CurrentMachineParams' }
385 # Information describing the QEMU target.
387 # @arch: the target architecture
391 { 'struct': 'TargetInfo',
392 'data': { 'arch': 'SysEmuTarget' } }
397 # Return information about the target for this QEMU
399 # Returns: TargetInfo
403 { 'command': 'query-target', 'returns': 'TargetInfo' }
408 # Guest UUID information (Universally Unique Identifier).
410 # @UUID: the UUID of the guest
414 # Notes: If no UUID was specified for the guest, a null UUID is returned.
416 { 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
421 # Query the guest UUID information.
423 # Returns: The @UuidInfo for the guest
429 # -> { "execute": "query-uuid" }
430 # <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
433 { 'command': 'query-uuid', 'returns': 'UuidInfo', 'allow-preconfig': true }
440 # @guid: the globally unique identifier
444 { 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
447 # @query-vm-generation-id:
449 # Show Virtual Machine Generation ID
453 { 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }
458 # Policy for handling lost ticks in timer devices. Ticks end up getting
459 # lost when, for example, the guest is paused.
461 # @discard: throw away the missed ticks and continue with future injection
462 # normally. The guest OS will see the timer jump ahead by a
463 # potentially quite significant amount all at once, as if the
464 # intervening chunk of time had simply not existed; needless to
465 # say, such a sudden jump can easily confuse a guest OS which is
466 # not specifically prepared to deal with it. Assuming the guest
467 # OS can deal correctly with the time jump, the time in the guest
468 # and in the host should now match.
470 # @delay: continue to deliver ticks at the normal rate. The guest OS will
471 # not notice anything is amiss, as from its point of view time will
472 # have continued to flow normally. The time in the guest should now
473 # be behind the time in the host by exactly the amount of time during
474 # which ticks have been missed.
476 # @slew: deliver ticks at a higher rate to catch up with the missed ticks.
477 # The guest OS will not notice anything is amiss, as from its point
478 # of view time will have continued to flow normally. Once the timer
479 # has managed to catch up with all the missing ticks, the time in
480 # the guest and in the host should match.
484 { 'enum': 'LostTickPolicy',
485 'data': ['discard', 'delay', 'slew' ] }
490 # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
491 # The command fails when the guest doesn't support injecting.
493 # Returns: If successful, nothing
497 # Note: prior to 2.1, this command was only supported for x86 and s390 VMs
501 # -> { "execute": "inject-nmi" }
502 # <- { "return": {} }
505 { 'command': 'inject-nmi' }
510 # @node: NUMA nodes configuration
512 # @dist: NUMA distance configuration (since 2.10)
514 # @cpu: property based CPU(s) to node mapping (Since: 2.10)
516 # @hmat-lb: memory latency and bandwidth information (Since: 5.0)
518 # @hmat-cache: memory side cache information (Since: 5.0)
522 { 'enum': 'NumaOptionsType',
523 'data': [ 'node', 'dist', 'cpu', 'hmat-lb', 'hmat-cache' ] }
528 # A discriminated record of NUMA options. (for OptsVisitor)
532 { 'union': 'NumaOptions',
533 'base': { 'type': 'NumaOptionsType' },
534 'discriminator': 'type',
536 'node': 'NumaNodeOptions',
537 'dist': 'NumaDistOptions',
538 'cpu': 'NumaCpuOptions',
539 'hmat-lb': 'NumaHmatLBOptions',
540 'hmat-cache': 'NumaHmatCacheOptions' }}
545 # Create a guest NUMA node. (for OptsVisitor)
547 # @nodeid: NUMA node ID (increase by 1 from 0 if omitted)
549 # @cpus: VCPUs belonging to this node (assign VCPUS round-robin
552 # @mem: memory size of this node; mutually exclusive with @memdev.
553 # Equally divide total memory among nodes if both @mem and @memdev are
556 # @memdev: memory backend object. If specified for one node,
557 # it must be specified for all nodes.
559 # @initiator: defined in ACPI 6.3 Chapter 5.2.27.3 Table 5-145,
560 # points to the nodeid which has the memory controller
561 # responsible for this NUMA node. This field provides
562 # additional information as to the initiator node that
563 # is closest (as in directly attached) to this node, and
564 # therefore has the best performance (since 5.0)
568 { 'struct': 'NumaNodeOptions',
574 '*initiator': 'uint16' }}
579 # Set the distance between 2 NUMA nodes.
581 # @src: source NUMA node.
583 # @dst: destination NUMA node.
585 # @val: NUMA distance from source node to destination node.
586 # When a node is unreachable from another node, set the distance
587 # between them to 255.
591 { 'struct': 'NumaDistOptions',
600 # A X86 32-bit register
604 { 'enum': 'X86CPURegister32',
605 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
608 # @X86CPUFeatureWordInfo:
610 # Information about a X86 CPU feature word
612 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
614 # @cpuid-input-ecx: Input ECX value for CPUID instruction for that
617 # @cpuid-register: Output register containing the feature bits
619 # @features: value of output register, containing the feature bits
623 { 'struct': 'X86CPUFeatureWordInfo',
624 'data': { 'cpuid-input-eax': 'int',
625 '*cpuid-input-ecx': 'int',
626 'cpuid-register': 'X86CPURegister32',
627 'features': 'int' } }
632 # Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
636 { 'struct': 'DummyForceArrays',
637 'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
642 # Option "-numa cpu" overrides default cpu to node mapping.
643 # It accepts the same set of cpu properties as returned by
644 # query-hotpluggable-cpus[].props, where node-id could be used to
645 # override default node mapping.
649 { 'struct': 'NumaCpuOptions',
650 'base': 'CpuInstanceProperties',
654 # @HmatLBMemoryHierarchy:
656 # The memory hierarchy in the System Locality Latency and Bandwidth
657 # Information Structure of HMAT (Heterogeneous Memory Attribute Table)
659 # For more information about @HmatLBMemoryHierarchy, see chapter
660 # 5.2.27.4: Table 5-146: Field "Flags" of ACPI 6.3 spec.
662 # @memory: the structure represents the memory performance
664 # @first-level: first level of memory side cache
666 # @second-level: second level of memory side cache
668 # @third-level: third level of memory side cache
672 { 'enum': 'HmatLBMemoryHierarchy',
673 'data': [ 'memory', 'first-level', 'second-level', 'third-level' ] }
678 # Data type in the System Locality Latency and Bandwidth
679 # Information Structure of HMAT (Heterogeneous Memory Attribute Table)
681 # For more information about @HmatLBDataType, see chapter
682 # 5.2.27.4: Table 5-146: Field "Data Type" of ACPI 6.3 spec.
684 # @access-latency: access latency (nanoseconds)
686 # @read-latency: read latency (nanoseconds)
688 # @write-latency: write latency (nanoseconds)
690 # @access-bandwidth: access bandwidth (Bytes per second)
692 # @read-bandwidth: read bandwidth (Bytes per second)
694 # @write-bandwidth: write bandwidth (Bytes per second)
698 { 'enum': 'HmatLBDataType',
699 'data': [ 'access-latency', 'read-latency', 'write-latency',
700 'access-bandwidth', 'read-bandwidth', 'write-bandwidth' ] }
703 # @NumaHmatLBOptions:
705 # Set the system locality latency and bandwidth information
706 # between Initiator and Target proximity Domains.
708 # For more information about @NumaHmatLBOptions, see chapter
709 # 5.2.27.4: Table 5-146 of ACPI 6.3 spec.
711 # @initiator: the Initiator Proximity Domain.
713 # @target: the Target Proximity Domain.
715 # @hierarchy: the Memory Hierarchy. Indicates the performance
716 # of memory or side cache.
718 # @data-type: presents the type of data, access/read/write
719 # latency or hit latency.
721 # @latency: the value of latency from @initiator to @target
722 # proximity domain, the latency unit is "ns(nanosecond)".
724 # @bandwidth: the value of bandwidth between @initiator and @target
725 # proximity domain, the bandwidth unit is
726 # "Bytes per second".
730 { 'struct': 'NumaHmatLBOptions',
732 'initiator': 'uint16',
734 'hierarchy': 'HmatLBMemoryHierarchy',
735 'data-type': 'HmatLBDataType',
736 '*latency': 'uint64',
737 '*bandwidth': 'size' }}
740 # @HmatCacheAssociativity:
742 # Cache associativity in the Memory Side Cache Information Structure
745 # For more information of @HmatCacheAssociativity, see chapter
746 # 5.2.27.5: Table 5-147 of ACPI 6.3 spec.
748 # @none: None (no memory side cache in this proximity domain,
749 # or cache associativity unknown)
751 # @direct: Direct Mapped
753 # @complex: Complex Cache Indexing (implementation specific)
757 { 'enum': 'HmatCacheAssociativity',
758 'data': [ 'none', 'direct', 'complex' ] }
761 # @HmatCacheWritePolicy:
763 # Cache write policy in the Memory Side Cache Information Structure
766 # For more information of @HmatCacheWritePolicy, see chapter
767 # 5.2.27.5: Table 5-147: Field "Cache Attributes" of ACPI 6.3 spec.
769 # @none: None (no memory side cache in this proximity domain,
770 # or cache write policy unknown)
772 # @write-back: Write Back (WB)
774 # @write-through: Write Through (WT)
778 { 'enum': 'HmatCacheWritePolicy',
779 'data': [ 'none', 'write-back', 'write-through' ] }
782 # @NumaHmatCacheOptions:
784 # Set the memory side cache information for a given memory domain.
786 # For more information of @NumaHmatCacheOptions, see chapter
787 # 5.2.27.5: Table 5-147: Field "Cache Attributes" of ACPI 6.3 spec.
789 # @node-id: the memory proximity domain to which the memory belongs.
791 # @size: the size of memory side cache in bytes.
793 # @level: the cache level described in this structure.
795 # @associativity: the cache associativity,
796 # none/direct-mapped/complex(complex cache indexing).
798 # @policy: the write policy, none/write-back/write-through.
800 # @line: the cache Line size in bytes.
804 { 'struct': 'NumaHmatCacheOptions',
809 'associativity': 'HmatCacheAssociativity',
810 'policy': 'HmatCacheWritePolicy',
816 # Host memory policy types
818 # @default: restore default policy, remove any nondefault policy
820 # @preferred: set the preferred host nodes for allocation
822 # @bind: a strict policy that restricts memory allocation to the
823 # host nodes specified
825 # @interleave: memory allocations are interleaved across the set
826 # of host nodes specified
830 { 'enum': 'HostMemPolicy',
831 'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
836 # Information about memory backend
838 # @id: backend's ID if backend has 'id' property (since 2.9)
840 # @size: memory backend size
842 # @merge: enables or disables memory merge support
844 # @dump: includes memory backend's memory in a core dump or not
846 # @prealloc: enables or disables memory preallocation
848 # @host-nodes: host nodes for its memory policy
850 # @policy: memory policy of memory backend
854 { 'struct': 'Memdev',
861 'host-nodes': ['uint16'],
862 'policy': 'HostMemPolicy' }}
867 # Returns information for all memory backends.
869 # Returns: a list of @Memdev.
875 # -> { "execute": "query-memdev" }
883 # "host-nodes": [0, 1],
891 # "host-nodes": [2, 3],
892 # "policy": "preferred"
898 { 'command': 'query-memdev', 'returns': ['Memdev'], 'allow-preconfig': true }
901 # @CpuInstanceProperties:
903 # List of properties to be used for hotplugging a CPU instance,
904 # it should be passed by management with device_add command when
905 # a CPU is being hotplugged.
907 # @node-id: NUMA node ID the CPU belongs to
908 # @socket-id: socket number within node/board the CPU belongs to
909 # @die-id: die number within node/board the CPU belongs to (Since 4.1)
910 # @core-id: core number within die the CPU belongs to
911 # @thread-id: thread number within core the CPU belongs to
913 # Note: currently there are 5 properties that could be present
914 # but management should be prepared to pass through other
915 # properties with device_add command to allow for future
916 # interface extension. This also requires the filed names to be kept in
917 # sync with the properties passed to -device/device_add.
921 { 'struct': 'CpuInstanceProperties',
922 'data': { '*node-id': 'int',
933 # @type: CPU object type for usage with device_add command
934 # @props: list of properties to be used for hotplugging CPU
935 # @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides
936 # @qom-path: link to existing CPU object if CPU is present or
937 # omitted if CPU is not present.
941 { 'struct': 'HotpluggableCPU',
942 'data': { 'type': 'str',
943 'vcpus-count': 'int',
944 'props': 'CpuInstanceProperties',
950 # @query-hotpluggable-cpus:
952 # TODO: Better documentation; currently there is none.
954 # Returns: a list of HotpluggableCPU objects.
960 # For pseries machine type started with -smp 2,cores=2,maxcpus=4 -cpu POWER8:
962 # -> { "execute": "query-hotpluggable-cpus" }
964 # { "props": { "core": 8 }, "type": "POWER8-spapr-cpu-core",
965 # "vcpus-count": 1 },
966 # { "props": { "core": 0 }, "type": "POWER8-spapr-cpu-core",
967 # "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"}
970 # For pc machine type started with -smp 1,maxcpus=2:
972 # -> { "execute": "query-hotpluggable-cpus" }
975 # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
976 # "props": {"core-id": 0, "socket-id": 1, "thread-id": 0}
979 # "qom-path": "/machine/unattached/device[0]",
980 # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
981 # "props": {"core-id": 0, "socket-id": 0, "thread-id": 0}
985 # For s390x-virtio-ccw machine type started with -smp 1,maxcpus=2 -cpu qemu
988 # -> { "execute": "query-hotpluggable-cpus" }
991 # "type": "qemu-s390x-cpu", "vcpus-count": 1,
992 # "props": { "core-id": 1 }
995 # "qom-path": "/machine/unattached/device[0]",
996 # "type": "qemu-s390x-cpu", "vcpus-count": 1,
997 # "props": { "core-id": 0 }
1002 { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'],
1003 'allow-preconfig': true }
1008 # Runtime equivalent of '-numa' CLI option, available at
1009 # preconfigure stage to configure numa mapping before initializing
1014 { 'command': 'set-numa-node', 'boxed': true,
1015 'data': 'NumaOptions',
1016 'allow-preconfig': true
1022 # Request the balloon driver to change its balloon size.
1024 # @value: the target logical size of the VM in bytes.
1025 # We can deduce the size of the balloon using this formula:
1027 # logical_vm_size = vm_ram_size - balloon_size
1029 # From it we have: balloon_size = vm_ram_size - @value
1031 # Returns: - Nothing on success
1032 # - If the balloon driver is enabled but not functional because the KVM
1033 # kernel module cannot support it, KvmMissingCap
1034 # - If no balloon device is present, DeviceNotActive
1036 # Notes: This command just issues a request to the guest. When it returns,
1037 # the balloon size may not have changed. A guest can change the balloon
1038 # size independent of this command.
1044 # -> { "execute": "balloon", "arguments": { "value": 536870912 } }
1045 # <- { "return": {} }
1047 # With a 2.5GiB guest this command inflated the ballon to 3GiB.
1050 { 'command': 'balloon', 'data': {'value': 'int'} }
1055 # Information about the guest balloon device.
1057 # @actual: the logical size of the VM in bytes
1058 # Formula used: logical_vm_size = vm_ram_size - balloon_size
1063 { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
1068 # Return information about the balloon device.
1070 # Returns: - @BalloonInfo on success
1071 # - If the balloon driver is enabled but not functional because the KVM
1072 # kernel module cannot support it, KvmMissingCap
1073 # - If no balloon device is present, DeviceNotActive
1079 # -> { "execute": "query-balloon" }
1081 # "actual": 1073741824,
1086 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1091 # Emitted when the guest changes the actual BALLOON level. This value is
1092 # equivalent to the @actual field return by the 'query-balloon' command
1094 # @actual: the logical size of the VM in bytes
1095 # Formula used: logical_vm_size = vm_ram_size - balloon_size
1097 # Note: this event is rate-limited.
1103 # <- { "event": "BALLOON_CHANGE",
1104 # "data": { "actual": 944766976 },
1105 # "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
1108 { 'event': 'BALLOON_CHANGE',
1109 'data': { 'actual': 'int' } }
1114 # Actual memory information in bytes.
1116 # @base-memory: size of "base" memory specified with command line
1119 # @plugged-memory: size of memory that can be hot-unplugged. This field
1120 # is omitted if target doesn't support memory hotplug
1121 # (i.e. CONFIG_MEM_DEVICE not defined at build time).
1125 { 'struct': 'MemoryInfo',
1126 'data' : { 'base-memory': 'size', '*plugged-memory': 'size' } }
1129 # @query-memory-size-summary:
1131 # Return the amount of initially allocated and present hotpluggable (if
1132 # enabled) memory in bytes.
1136 # -> { "execute": "query-memory-size-summary" }
1137 # <- { "return": { "base-memory": 4294967296, "plugged-memory": 0 } }
1141 { 'command': 'query-memory-size-summary', 'returns': 'MemoryInfo' }
1144 # @PCDIMMDeviceInfo:
1146 # PCDIMMDevice state information
1150 # @addr: physical address, where device is mapped
1152 # @size: size of memory that the device provides
1154 # @slot: slot number at which device is plugged in
1156 # @node: NUMA node number where device is plugged in
1158 # @memdev: memory backend linked with device
1160 # @hotplugged: true if device was hotplugged
1162 # @hotpluggable: true if device if could be added/removed while machine is running
1166 { 'struct': 'PCDIMMDeviceInfo',
1167 'data': { '*id': 'str',
1173 'hotplugged': 'bool',
1174 'hotpluggable': 'bool'
1179 # @VirtioPMEMDeviceInfo:
1181 # VirtioPMEM state information
1185 # @memaddr: physical address in memory, where device is mapped
1187 # @size: size of memory that the device provides
1189 # @memdev: memory backend linked with device
1193 { 'struct': 'VirtioPMEMDeviceInfo',
1194 'data': { '*id': 'str',
1202 # @VirtioMEMDeviceInfo:
1204 # VirtioMEMDevice state information
1208 # @memaddr: physical address in memory, where device is mapped
1210 # @requested-size: the user requested size of the device
1212 # @size: the (current) size of memory that the device provides
1214 # @max-size: the maximum size of memory that the device can provide
1216 # @block-size: the block size of memory that the device provides
1218 # @node: NUMA node number where device is assigned to
1220 # @memdev: memory backend linked with the region
1224 { 'struct': 'VirtioMEMDeviceInfo',
1225 'data': { '*id': 'str',
1227 'requested-size': 'size',
1230 'block-size': 'size',
1237 # @MemoryDeviceInfo:
1239 # Union containing information about a memory device
1241 # nvdimm is included since 2.12. virtio-pmem is included since 4.1.
1242 # virtio-mem is included since 5.1.
1246 { 'union': 'MemoryDeviceInfo',
1247 'data': { 'dimm': 'PCDIMMDeviceInfo',
1248 'nvdimm': 'PCDIMMDeviceInfo',
1249 'virtio-pmem': 'VirtioPMEMDeviceInfo',
1250 'virtio-mem': 'VirtioMEMDeviceInfo'
1255 # @query-memory-devices:
1257 # Lists available memory devices and their state
1263 # -> { "execute": "query-memory-devices" }
1264 # <- { "return": [ { "data":
1265 # { "addr": 5368709120,
1266 # "hotpluggable": true,
1267 # "hotplugged": true,
1269 # "memdev": "/objects/memX",
1271 # "size": 1073741824,
1277 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
1280 # @MEMORY_DEVICE_SIZE_CHANGE:
1282 # Emitted when the size of a memory device changes. Only emitted for memory
1283 # devices that can actually change the size (e.g., virtio-mem due to guest
1287 # @size: the new size of memory that the device provides
1289 # Note: this event is rate-limited.
1295 # <- { "event": "MEMORY_DEVICE_SIZE_CHANGE",
1296 # "data": { "id": "vm0", "size": 1073741824},
1297 # "timestamp": { "seconds": 1588168529, "microseconds": 201316 } }
1300 { 'event': 'MEMORY_DEVICE_SIZE_CHANGE',
1301 'data': { '*id': 'str', 'size': 'size' } }
1305 # @MEM_UNPLUG_ERROR:
1307 # Emitted when memory hot unplug error occurs.
1309 # @device: device name
1311 # @msg: Informative message
1317 # <- { "event": "MEM_UNPLUG_ERROR"
1318 # "data": { "device": "dimm1",
1319 # "msg": "acpi: device unplug for unsupported device"
1321 # "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
1324 { 'event': 'MEM_UNPLUG_ERROR',
1325 'data': { 'device': 'str', 'msg': 'str' } }