docs: Update POWER9 XIVE support for nested guests
[qemu/ar7.git] / qapi / machine.json
blob481b1f07ecccac710ef84f3214b575b64a181a0c
1 # -*- Mode: Python -*-
2 # vim: filetype=python
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.
7 ##
8 # = Machines
9 ##
12 # @SysEmuTarget:
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
18 # being.
20 # @rx: since 5.0
21 # @avr: since 5.1
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".
27 # Since: 3.0
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' ] }
38 # @CpuInfoArch:
40 # An enumeration of cpu types that enable additional information during
41 # @query-cpus and @query-cpus-fast.
43 # @s390: since 2.12
45 # @riscv: since 2.12
47 # Since: 2.6
49 { 'enum': 'CpuInfoArch',
50   'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 's390', 'riscv', 'other' ] }
53 # @CpuInfo:
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)
74 # Since: 0.14.0
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.
79 { 'union': 'CpuInfo',
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',
86             'ppc': 'CpuInfoPPC',
87             'mips': 'CpuInfoMIPS',
88             'tricore': 'CpuInfoTricore',
89             's390': 'CpuInfoS390',
90             'riscv': 'CpuInfoRISCV' } }
93 # @CpuInfoX86:
95 # Additional information about a virtual i386 or x86_64 CPU
97 # @pc: the 64-bit instruction pointer
99 # Since: 2.6
101 { 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } }
104 # @CpuInfoSPARC:
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
112 # Since: 2.6
114 { 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } }
117 # @CpuInfoPPC:
119 # Additional information about a virtual PPC CPU
121 # @nip: the instruction pointer
123 # Since: 2.6
125 { 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } }
128 # @CpuInfoMIPS:
130 # Additional information about a virtual MIPS CPU
132 # @PC: the instruction pointer
134 # Since: 2.6
136 { 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } }
139 # @CpuInfoTricore:
141 # Additional information about a virtual Tricore CPU
143 # @PC: the instruction pointer
145 # Since: 2.6
147 { 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } }
150 # @CpuInfoRISCV:
152 # Additional information about a virtual RISCV CPU
154 # @pc: the instruction pointer
156 # Since 2.12
158 { 'struct': 'CpuInfoRISCV', 'data': { 'pc': 'int' } }
161 # @CpuS390State:
163 # An enumeration of cpu states that can be assumed by a virtual
164 # S390 CPU
166 # Since: 2.12
168 { 'enum': 'CpuS390State',
169   'prefix': 'S390_CPU_STATE',
170   'data': [ 'uninitialized', 'stopped', 'check-stop', 'operating', 'load' ] }
173 # @CpuInfoS390:
175 # Additional information about a virtual S390 CPU
177 # @cpu-state: the virtual CPU's state
179 # Since: 2.12
181 { 'struct': 'CpuInfoS390', 'data': { 'cpu-state': 'CpuS390State' } }
184 # @query-cpus:
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.
192 # Features:
193 # @deprecated: This command is deprecated, because it interferes with
194 #     the guest.  Use 'query-cpus-fast' instead to avoid the vCPU
195 #     interruption.
197 # Returns: a list of @CpuInfo for each virtual CPU
199 # Since: 0.14.0
201 # Example:
203 # -> { "execute": "query-cpus" }
204 # <- { "return": [
205 #          {
206 #             "CPU":0,
207 #             "current":true,
208 #             "halted":false,
209 #             "qom_path":"/machine/unattached/device[0]",
210 #             "arch":"x86",
211 #             "pc":3227107138,
212 #             "thread_id":3134
213 #          },
214 #          {
215 #             "CPU":1,
216 #             "current":false,
217 #             "halted":true,
218 #             "qom_path":"/machine/unattached/device[2]",
219 #             "arch":"x86",
220 #             "pc":7108165,
221 #             "thread_id":3135
222 #          }
223 #       ]
224 #    }
227 { 'command': 'query-cpus', 'returns': ['CpuInfo'],
228   'features': [ 'deprecated' ] }
231 # @CpuInfoFast:
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)
249 # Features:
250 # @deprecated: Member @arch is deprecated.  Use @target instead.
252 # Since: 2.12
255 { 'union'         : 'CpuInfoFast',
256   'base'          : { 'cpu-index'    : 'int',
257                       'qom-path'     : 'str',
258                       'thread-id'    : 'int',
259                       '*props'       : 'CpuInstanceProperties',
260                       'arch'         : { 'type': 'CpuInfoArch',
261                                          'features': [ 'deprecated' ] },
262                       'target'       : 'SysEmuTarget' },
263   'discriminator' : 'target',
264   'data'          : { 's390x'        : 'CpuInfoS390' } }
267 # @query-cpus-fast:
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
275 # Since: 2.12
277 # Example:
279 # -> { "execute": "query-cpus-fast" }
280 # <- { "return": [
281 #         {
282 #             "thread-id": 25627,
283 #             "props": {
284 #                 "core-id": 0,
285 #                 "thread-id": 0,
286 #                 "socket-id": 0
287 #             },
288 #             "qom-path": "/machine/unattached/device[0]",
289 #             "arch":"x86",
290 #             "target":"x86_64",
291 #             "cpu-index": 0
292 #         },
293 #         {
294 #             "thread-id": 25628,
295 #             "props": {
296 #                 "core-id": 0,
297 #                 "thread-id": 0,
298 #                 "socket-id": 1
299 #             },
300 #             "qom-path": "/machine/unattached/device[2]",
301 #             "arch":"x86",
302 #             "target":"x86_64",
303 #             "cpu-index": 1
304 #         }
305 #     ]
306 # }
308 { 'command': 'query-cpus-fast', 'returns': [ 'CpuInfoFast' ] }
311 # @cpu-add:
313 # Adds CPU with specified ID.
315 # @id: ID of CPU to be created, valid values [0..max_cpus)
317 # Features:
318 # @deprecated: This command is deprecated.  Use `device_add` instead.
319 #     See the `query-hotpluggable-cpus` command for details.
321 # Returns: Nothing on success
323 # Since: 1.5
325 # Example:
327 # -> { "execute": "cpu-add", "arguments": { "id": 2 } }
328 # <- { "return": {} }
331 { 'command': 'cpu-add', 'data': {'id': 'int'},
332   'features': [ 'deprecated' ] }
335 # @MachineInfo:
337 # Information describing a machine.
339 # @name: the name of the machine
341 # @alias: an alias for the machine name
343 # @is-default: whether the machine is default
345 # @cpu-max: maximum number of CPUs supported by the machine type
346 #           (since 1.5.0)
348 # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
350 # @numa-mem-supported: true if '-numa node,mem' option is supported by
351 #                      the machine type and false otherwise (since 4.1)
353 # @deprecated: if true, the machine type is deprecated and may be removed
354 #              in future versions of QEMU according to the QEMU deprecation
355 #              policy (since 4.1.0)
357 # @default-cpu-type: default CPU model typename if none is requested via
358 #                    the -cpu argument. (since 4.2)
360 # Since: 1.2.0
362 { 'struct': 'MachineInfo',
363   'data': { 'name': 'str', '*alias': 'str',
364             '*is-default': 'bool', 'cpu-max': 'int',
365             'hotpluggable-cpus': 'bool',  'numa-mem-supported': 'bool',
366             'deprecated': 'bool', '*default-cpu-type': 'str' } }
369 # @query-machines:
371 # Return a list of supported machines
373 # Returns: a list of MachineInfo
375 # Since: 1.2.0
377 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
380 # @CurrentMachineParams:
382 # Information describing the running machine parameters.
384 # @wakeup-suspend-support: true if the machine supports wake up from
385 #                          suspend
387 # Since: 4.0
389 { 'struct': 'CurrentMachineParams',
390   'data': { 'wakeup-suspend-support': 'bool'} }
393 # @query-current-machine:
395 # Return information on the current virtual machine.
397 # Returns: CurrentMachineParams
399 # Since: 4.0
401 { 'command': 'query-current-machine', 'returns': 'CurrentMachineParams' }
404 # @TargetInfo:
406 # Information describing the QEMU target.
408 # @arch: the target architecture
410 # Since: 1.2.0
412 { 'struct': 'TargetInfo',
413   'data': { 'arch': 'SysEmuTarget' } }
416 # @query-target:
418 # Return information about the target for this QEMU
420 # Returns: TargetInfo
422 # Since: 1.2.0
424 { 'command': 'query-target', 'returns': 'TargetInfo' }
427 # @NumaOptionsType:
429 # @node: NUMA nodes configuration
431 # @dist: NUMA distance configuration (since 2.10)
433 # @cpu: property based CPU(s) to node mapping (Since: 2.10)
435 # @hmat-lb: memory latency and bandwidth information (Since: 5.0)
437 # @hmat-cache: memory side cache information (Since: 5.0)
439 # Since: 2.1
441 { 'enum': 'NumaOptionsType',
442   'data': [ 'node', 'dist', 'cpu', 'hmat-lb', 'hmat-cache' ] }
445 # @NumaOptions:
447 # A discriminated record of NUMA options. (for OptsVisitor)
449 # Since: 2.1
451 { 'union': 'NumaOptions',
452   'base': { 'type': 'NumaOptionsType' },
453   'discriminator': 'type',
454   'data': {
455     'node': 'NumaNodeOptions',
456     'dist': 'NumaDistOptions',
457     'cpu': 'NumaCpuOptions',
458     'hmat-lb': 'NumaHmatLBOptions',
459     'hmat-cache': 'NumaHmatCacheOptions' }}
462 # @NumaNodeOptions:
464 # Create a guest NUMA node. (for OptsVisitor)
466 # @nodeid: NUMA node ID (increase by 1 from 0 if omitted)
468 # @cpus: VCPUs belonging to this node (assign VCPUS round-robin
469 #         if omitted)
471 # @mem: memory size of this node; mutually exclusive with @memdev.
472 #       Equally divide total memory among nodes if both @mem and @memdev are
473 #       omitted.
475 # @memdev: memory backend object.  If specified for one node,
476 #          it must be specified for all nodes.
478 # @initiator: defined in ACPI 6.3 Chapter 5.2.27.3 Table 5-145,
479 #             points to the nodeid which has the memory controller
480 #             responsible for this NUMA node. This field provides
481 #             additional information as to the initiator node that
482 #             is closest (as in directly attached) to this node, and
483 #             therefore has the best performance (since 5.0)
485 # Since: 2.1
487 { 'struct': 'NumaNodeOptions',
488   'data': {
489    '*nodeid': 'uint16',
490    '*cpus':   ['uint16'],
491    '*mem':    'size',
492    '*memdev': 'str',
493    '*initiator': 'uint16' }}
496 # @NumaDistOptions:
498 # Set the distance between 2 NUMA nodes.
500 # @src: source NUMA node.
502 # @dst: destination NUMA node.
504 # @val: NUMA distance from source node to destination node.
505 #       When a node is unreachable from another node, set the distance
506 #       between them to 255.
508 # Since: 2.10
510 { 'struct': 'NumaDistOptions',
511   'data': {
512    'src': 'uint16',
513    'dst': 'uint16',
514    'val': 'uint8' }}
517 # @X86CPURegister32:
519 # A X86 32-bit register
521 # Since: 1.5
523 { 'enum': 'X86CPURegister32',
524   'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
527 # @X86CPUFeatureWordInfo:
529 # Information about a X86 CPU feature word
531 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
533 # @cpuid-input-ecx: Input ECX value for CPUID instruction for that
534 #                   feature word
536 # @cpuid-register: Output register containing the feature bits
538 # @features: value of output register, containing the feature bits
540 # Since: 1.5
542 { 'struct': 'X86CPUFeatureWordInfo',
543   'data': { 'cpuid-input-eax': 'int',
544             '*cpuid-input-ecx': 'int',
545             'cpuid-register': 'X86CPURegister32',
546             'features': 'int' } }
549 # @DummyForceArrays:
551 # Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
553 # Since: 2.5
555 { 'struct': 'DummyForceArrays',
556   'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
559 # @NumaCpuOptions:
561 # Option "-numa cpu" overrides default cpu to node mapping.
562 # It accepts the same set of cpu properties as returned by
563 # query-hotpluggable-cpus[].props, where node-id could be used to
564 # override default node mapping.
566 # Since: 2.10
568 { 'struct': 'NumaCpuOptions',
569    'base': 'CpuInstanceProperties',
570    'data' : {} }
573 # @HmatLBMemoryHierarchy:
575 # The memory hierarchy in the System Locality Latency and Bandwidth
576 # Information Structure of HMAT (Heterogeneous Memory Attribute Table)
578 # For more information about @HmatLBMemoryHierarchy, see chapter
579 # 5.2.27.4: Table 5-146: Field "Flags" of ACPI 6.3 spec.
581 # @memory: the structure represents the memory performance
583 # @first-level: first level of memory side cache
585 # @second-level: second level of memory side cache
587 # @third-level: third level of memory side cache
589 # Since: 5.0
591 { 'enum': 'HmatLBMemoryHierarchy',
592   'data': [ 'memory', 'first-level', 'second-level', 'third-level' ] }
595 # @HmatLBDataType:
597 # Data type in the System Locality Latency and Bandwidth
598 # Information Structure of HMAT (Heterogeneous Memory Attribute Table)
600 # For more information about @HmatLBDataType, see chapter
601 # 5.2.27.4: Table 5-146:  Field "Data Type" of ACPI 6.3 spec.
603 # @access-latency: access latency (nanoseconds)
605 # @read-latency: read latency (nanoseconds)
607 # @write-latency: write latency (nanoseconds)
609 # @access-bandwidth: access bandwidth (Bytes per second)
611 # @read-bandwidth: read bandwidth (Bytes per second)
613 # @write-bandwidth: write bandwidth (Bytes per second)
615 # Since: 5.0
617 { 'enum': 'HmatLBDataType',
618   'data': [ 'access-latency', 'read-latency', 'write-latency',
619             'access-bandwidth', 'read-bandwidth', 'write-bandwidth' ] }
622 # @NumaHmatLBOptions:
624 # Set the system locality latency and bandwidth information
625 # between Initiator and Target proximity Domains.
627 # For more information about @NumaHmatLBOptions, see chapter
628 # 5.2.27.4: Table 5-146 of ACPI 6.3 spec.
630 # @initiator: the Initiator Proximity Domain.
632 # @target: the Target Proximity Domain.
634 # @hierarchy: the Memory Hierarchy. Indicates the performance
635 #             of memory or side cache.
637 # @data-type: presents the type of data, access/read/write
638 #             latency or hit latency.
640 # @latency: the value of latency from @initiator to @target
641 #           proximity domain, the latency unit is "ns(nanosecond)".
643 # @bandwidth: the value of bandwidth between @initiator and @target
644 #             proximity domain, the bandwidth unit is
645 #             "Bytes per second".
647 # Since: 5.0
649 { 'struct': 'NumaHmatLBOptions',
650     'data': {
651     'initiator': 'uint16',
652     'target': 'uint16',
653     'hierarchy': 'HmatLBMemoryHierarchy',
654     'data-type': 'HmatLBDataType',
655     '*latency': 'uint64',
656     '*bandwidth': 'size' }}
659 # @HmatCacheAssociativity:
661 # Cache associativity in the Memory Side Cache Information Structure
662 # of HMAT
664 # For more information of @HmatCacheAssociativity, see chapter
665 # 5.2.27.5: Table 5-147 of ACPI 6.3 spec.
667 # @none: None (no memory side cache in this proximity domain,
668 #              or cache associativity unknown)
670 # @direct: Direct Mapped
672 # @complex: Complex Cache Indexing (implementation specific)
674 # Since: 5.0
676 { 'enum': 'HmatCacheAssociativity',
677   'data': [ 'none', 'direct', 'complex' ] }
680 # @HmatCacheWritePolicy:
682 # Cache write policy in the Memory Side Cache Information Structure
683 # of HMAT
685 # For more information of @HmatCacheWritePolicy, see chapter
686 # 5.2.27.5: Table 5-147: Field "Cache Attributes" of ACPI 6.3 spec.
688 # @none: None (no memory side cache in this proximity domain,
689 #        or cache write policy unknown)
691 # @write-back: Write Back (WB)
693 # @write-through: Write Through (WT)
695 # Since: 5.0
697 { 'enum': 'HmatCacheWritePolicy',
698   'data': [ 'none', 'write-back', 'write-through' ] }
701 # @NumaHmatCacheOptions:
703 # Set the memory side cache information for a given memory domain.
705 # For more information of @NumaHmatCacheOptions, see chapter
706 # 5.2.27.5: Table 5-147: Field "Cache Attributes" of ACPI 6.3 spec.
708 # @node-id: the memory proximity domain to which the memory belongs.
710 # @size: the size of memory side cache in bytes.
712 # @level: the cache level described in this structure.
714 # @associativity: the cache associativity,
715 #                 none/direct-mapped/complex(complex cache indexing).
717 # @policy: the write policy, none/write-back/write-through.
719 # @line: the cache Line size in bytes.
721 # Since: 5.0
723 { 'struct': 'NumaHmatCacheOptions',
724   'data': {
725    'node-id': 'uint32',
726    'size': 'size',
727    'level': 'uint8',
728    'associativity': 'HmatCacheAssociativity',
729    'policy': 'HmatCacheWritePolicy',
730    'line': 'uint16' }}
733 # @HostMemPolicy:
735 # Host memory policy types
737 # @default: restore default policy, remove any nondefault policy
739 # @preferred: set the preferred host nodes for allocation
741 # @bind: a strict policy that restricts memory allocation to the
742 #        host nodes specified
744 # @interleave: memory allocations are interleaved across the set
745 #              of host nodes specified
747 # Since: 2.1
749 { 'enum': 'HostMemPolicy',
750   'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
753 # @Memdev:
755 # Information about memory backend
757 # @id: backend's ID if backend has 'id' property (since 2.9)
759 # @size: memory backend size
761 # @merge: enables or disables memory merge support
763 # @dump: includes memory backend's memory in a core dump or not
765 # @prealloc: enables or disables memory preallocation
767 # @host-nodes: host nodes for its memory policy
769 # @policy: memory policy of memory backend
771 # Since: 2.1
773 { 'struct': 'Memdev',
774   'data': {
775     '*id':        'str',
776     'size':       'size',
777     'merge':      'bool',
778     'dump':       'bool',
779     'prealloc':   'bool',
780     'host-nodes': ['uint16'],
781     'policy':     'HostMemPolicy' }}
784 # @query-memdev:
786 # Returns information for all memory backends.
788 # Returns: a list of @Memdev.
790 # Since: 2.1
792 # Example:
794 # -> { "execute": "query-memdev" }
795 # <- { "return": [
796 #        {
797 #          "id": "mem1",
798 #          "size": 536870912,
799 #          "merge": false,
800 #          "dump": true,
801 #          "prealloc": false,
802 #          "host-nodes": [0, 1],
803 #          "policy": "bind"
804 #        },
805 #        {
806 #          "size": 536870912,
807 #          "merge": false,
808 #          "dump": true,
809 #          "prealloc": true,
810 #          "host-nodes": [2, 3],
811 #          "policy": "preferred"
812 #        }
813 #      ]
814 #    }
817 { 'command': 'query-memdev', 'returns': ['Memdev'], 'allow-preconfig': true }
820 # @CpuInstanceProperties:
822 # List of properties to be used for hotplugging a CPU instance,
823 # it should be passed by management with device_add command when
824 # a CPU is being hotplugged.
826 # @node-id: NUMA node ID the CPU belongs to
827 # @socket-id: socket number within node/board the CPU belongs to
828 # @die-id: die number within node/board the CPU belongs to (Since 4.1)
829 # @core-id: core number within die the CPU belongs to
830 # @thread-id: thread number within core the CPU belongs to
832 # Note: currently there are 5 properties that could be present
833 #       but management should be prepared to pass through other
834 #       properties with device_add command to allow for future
835 #       interface extension. This also requires the filed names to be kept in
836 #       sync with the properties passed to -device/device_add.
838 # Since: 2.7
840 { 'struct': 'CpuInstanceProperties',
841   'data': { '*node-id': 'int',
842             '*socket-id': 'int',
843             '*die-id': 'int',
844             '*core-id': 'int',
845             '*thread-id': 'int'
846   }
850 # @HotpluggableCPU:
852 # @type: CPU object type for usage with device_add command
853 # @props: list of properties to be used for hotplugging CPU
854 # @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides
855 # @qom-path: link to existing CPU object if CPU is present or
856 #            omitted if CPU is not present.
858 # Since: 2.7
860 { 'struct': 'HotpluggableCPU',
861   'data': { 'type': 'str',
862             'vcpus-count': 'int',
863             'props': 'CpuInstanceProperties',
864             '*qom-path': 'str'
865           }
869 # @query-hotpluggable-cpus:
871 # TODO: Better documentation; currently there is none.
873 # Returns: a list of HotpluggableCPU objects.
875 # Since: 2.7
877 # Example:
879 # For pseries machine type started with -smp 2,cores=2,maxcpus=4 -cpu POWER8:
881 # -> { "execute": "query-hotpluggable-cpus" }
882 # <- {"return": [
883 #      { "props": { "core": 8 }, "type": "POWER8-spapr-cpu-core",
884 #        "vcpus-count": 1 },
885 #      { "props": { "core": 0 }, "type": "POWER8-spapr-cpu-core",
886 #        "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"}
887 #    ]}'
889 # For pc machine type started with -smp 1,maxcpus=2:
891 # -> { "execute": "query-hotpluggable-cpus" }
892 # <- {"return": [
893 #      {
894 #         "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
895 #         "props": {"core-id": 0, "socket-id": 1, "thread-id": 0}
896 #      },
897 #      {
898 #         "qom-path": "/machine/unattached/device[0]",
899 #         "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
900 #         "props": {"core-id": 0, "socket-id": 0, "thread-id": 0}
901 #      }
902 #    ]}
904 # For s390x-virtio-ccw machine type started with -smp 1,maxcpus=2 -cpu qemu
905 # (Since: 2.11):
907 # -> { "execute": "query-hotpluggable-cpus" }
908 # <- {"return": [
909 #      {
910 #         "type": "qemu-s390x-cpu", "vcpus-count": 1,
911 #         "props": { "core-id": 1 }
912 #      },
913 #      {
914 #         "qom-path": "/machine/unattached/device[0]",
915 #         "type": "qemu-s390x-cpu", "vcpus-count": 1,
916 #         "props": { "core-id": 0 }
917 #      }
918 #    ]}
921 { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'],
922              'allow-preconfig': true }
925 # @set-numa-node:
927 # Runtime equivalent of '-numa' CLI option, available at
928 # preconfigure stage to configure numa mapping before initializing
929 # machine.
931 # Since 3.0
933 { 'command': 'set-numa-node', 'boxed': true,
934   'data': 'NumaOptions',
935   'allow-preconfig': true