xref: /openbmc/qemu/qapi/machine.json (revision 7f6c3d1a)
1# -*- Mode: Python -*-
2# vim: filetype=python
3#
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.
6
7##
8# = Machines
9##
10
11##
12# @SysEmuTarget:
13#
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.
19#
20# @rx: since 5.0
21# @avr: since 5.1
22#
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".
26#
27# Since: 3.0
28##
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' ] }
36
37##
38# @CpuInfoArch:
39#
40# An enumeration of cpu types that enable additional information during
41# @query-cpus and @query-cpus-fast.
42#
43# @s390: since 2.12
44#
45# @riscv: since 2.12
46#
47# Since: 2.6
48##
49{ 'enum': 'CpuInfoArch',
50  'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 's390', 'riscv', 'other' ] }
51
52##
53# @CpuInfo:
54#
55# Information about a virtual CPU
56#
57# @CPU: the index of the virtual CPU
58#
59# @current: this only exists for backwards compatibility and should be ignored
60#
61# @halted: true if the virtual CPU is in the halt state.  Halt usually refers
62#          to a processor specific low power mode.
63#
64# @qom_path: path to the CPU object in the QOM tree (since 2.4)
65#
66# @thread_id: ID of the underlying host thread
67#
68# @props: properties describing to which node/socket/core/thread
69#         virtual CPU belongs to, provided if supported by board (since 2.10)
70#
71# @arch: architecture of the cpu, which determines which additional fields
72#        will be listed (since 2.6)
73#
74# Since: 0.14.0
75#
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.
78##
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' } }
91
92##
93# @CpuInfoX86:
94#
95# Additional information about a virtual i386 or x86_64 CPU
96#
97# @pc: the 64-bit instruction pointer
98#
99# Since: 2.6
100##
101{ 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } }
102
103##
104# @CpuInfoSPARC:
105#
106# Additional information about a virtual SPARC CPU
107#
108# @pc: the PC component of the instruction pointer
109#
110# @npc: the NPC component of the instruction pointer
111#
112# Since: 2.6
113##
114{ 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } }
115
116##
117# @CpuInfoPPC:
118#
119# Additional information about a virtual PPC CPU
120#
121# @nip: the instruction pointer
122#
123# Since: 2.6
124##
125{ 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } }
126
127##
128# @CpuInfoMIPS:
129#
130# Additional information about a virtual MIPS CPU
131#
132# @PC: the instruction pointer
133#
134# Since: 2.6
135##
136{ 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } }
137
138##
139# @CpuInfoTricore:
140#
141# Additional information about a virtual Tricore CPU
142#
143# @PC: the instruction pointer
144#
145# Since: 2.6
146##
147{ 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } }
148
149##
150# @CpuInfoRISCV:
151#
152# Additional information about a virtual RISCV CPU
153#
154# @pc: the instruction pointer
155#
156# Since 2.12
157##
158{ 'struct': 'CpuInfoRISCV', 'data': { 'pc': 'int' } }
159
160##
161# @CpuS390State:
162#
163# An enumeration of cpu states that can be assumed by a virtual
164# S390 CPU
165#
166# Since: 2.12
167##
168{ 'enum': 'CpuS390State',
169  'prefix': 'S390_CPU_STATE',
170  'data': [ 'uninitialized', 'stopped', 'check-stop', 'operating', 'load' ] }
171
172##
173# @CpuInfoS390:
174#
175# Additional information about a virtual S390 CPU
176#
177# @cpu-state: the virtual CPU's state
178#
179# Since: 2.12
180##
181{ 'struct': 'CpuInfoS390', 'data': { 'cpu-state': 'CpuS390State' } }
182
183##
184# @query-cpus:
185#
186# Returns a list of information about each virtual CPU.
187#
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.
191#
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.
196#
197# Returns: a list of @CpuInfo for each virtual CPU
198#
199# Since: 0.14.0
200#
201# Example:
202#
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#    }
225#
226##
227{ 'command': 'query-cpus', 'returns': ['CpuInfo'],
228  'features': [ 'deprecated' ] }
229
230##
231# @CpuInfoFast:
232#
233# Information about a virtual CPU
234#
235# @cpu-index: index of the virtual CPU
236#
237# @qom-path: path to the CPU object in the QOM tree
238#
239# @thread-id: ID of the underlying host thread
240#
241# @props: properties describing to which node/socket/core/thread
242#         virtual CPU belongs to, provided if supported by board
243#
244# @arch: base architecture of the cpu
245#
246# @target: the QEMU system emulation target, which determines which
247#          additional fields will be listed (since 3.0)
248#
249# Features:
250# @deprecated: Member @arch is deprecated.  Use @target instead.
251#
252# Since: 2.12
253#
254##
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' } }
265
266##
267# @query-cpus-fast:
268#
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.
272#
273# Returns: list of @CpuInfoFast
274#
275# Since: 2.12
276#
277# Example:
278#
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# }
307##
308{ 'command': 'query-cpus-fast', 'returns': [ 'CpuInfoFast' ] }
309
310##
311# @MachineInfo:
312#
313# Information describing a machine.
314#
315# @name: the name of the machine
316#
317# @alias: an alias for the machine name
318#
319# @is-default: whether the machine is default
320#
321# @cpu-max: maximum number of CPUs supported by the machine type
322#           (since 1.5.0)
323#
324# @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
325#
326# @numa-mem-supported: true if '-numa node,mem' option is supported by
327#                      the machine type and false otherwise (since 4.1)
328#
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)
332#
333# @default-cpu-type: default CPU model typename if none is requested via
334#                    the -cpu argument. (since 4.2)
335#
336# @default-ram-id: the default ID of initial RAM memory backend (since 5.2)
337#
338# Since: 1.2.0
339##
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' } }
346
347##
348# @query-machines:
349#
350# Return a list of supported machines
351#
352# Returns: a list of MachineInfo
353#
354# Since: 1.2.0
355##
356{ 'command': 'query-machines', 'returns': ['MachineInfo'] }
357
358##
359# @CurrentMachineParams:
360#
361# Information describing the running machine parameters.
362#
363# @wakeup-suspend-support: true if the machine supports wake up from
364#                          suspend
365#
366# Since: 4.0
367##
368{ 'struct': 'CurrentMachineParams',
369  'data': { 'wakeup-suspend-support': 'bool'} }
370
371##
372# @query-current-machine:
373#
374# Return information on the current virtual machine.
375#
376# Returns: CurrentMachineParams
377#
378# Since: 4.0
379##
380{ 'command': 'query-current-machine', 'returns': 'CurrentMachineParams' }
381
382##
383# @TargetInfo:
384#
385# Information describing the QEMU target.
386#
387# @arch: the target architecture
388#
389# Since: 1.2.0
390##
391{ 'struct': 'TargetInfo',
392  'data': { 'arch': 'SysEmuTarget' } }
393
394##
395# @query-target:
396#
397# Return information about the target for this QEMU
398#
399# Returns: TargetInfo
400#
401# Since: 1.2.0
402##
403{ 'command': 'query-target', 'returns': 'TargetInfo' }
404
405##
406# @NumaOptionsType:
407#
408# @node: NUMA nodes configuration
409#
410# @dist: NUMA distance configuration (since 2.10)
411#
412# @cpu: property based CPU(s) to node mapping (Since: 2.10)
413#
414# @hmat-lb: memory latency and bandwidth information (Since: 5.0)
415#
416# @hmat-cache: memory side cache information (Since: 5.0)
417#
418# Since: 2.1
419##
420{ 'enum': 'NumaOptionsType',
421  'data': [ 'node', 'dist', 'cpu', 'hmat-lb', 'hmat-cache' ] }
422
423##
424# @NumaOptions:
425#
426# A discriminated record of NUMA options. (for OptsVisitor)
427#
428# Since: 2.1
429##
430{ 'union': 'NumaOptions',
431  'base': { 'type': 'NumaOptionsType' },
432  'discriminator': 'type',
433  'data': {
434    'node': 'NumaNodeOptions',
435    'dist': 'NumaDistOptions',
436    'cpu': 'NumaCpuOptions',
437    'hmat-lb': 'NumaHmatLBOptions',
438    'hmat-cache': 'NumaHmatCacheOptions' }}
439
440##
441# @NumaNodeOptions:
442#
443# Create a guest NUMA node. (for OptsVisitor)
444#
445# @nodeid: NUMA node ID (increase by 1 from 0 if omitted)
446#
447# @cpus: VCPUs belonging to this node (assign VCPUS round-robin
448#         if omitted)
449#
450# @mem: memory size of this node; mutually exclusive with @memdev.
451#       Equally divide total memory among nodes if both @mem and @memdev are
452#       omitted.
453#
454# @memdev: memory backend object.  If specified for one node,
455#          it must be specified for all nodes.
456#
457# @initiator: defined in ACPI 6.3 Chapter 5.2.27.3 Table 5-145,
458#             points to the nodeid which has the memory controller
459#             responsible for this NUMA node. This field provides
460#             additional information as to the initiator node that
461#             is closest (as in directly attached) to this node, and
462#             therefore has the best performance (since 5.0)
463#
464# Since: 2.1
465##
466{ 'struct': 'NumaNodeOptions',
467  'data': {
468   '*nodeid': 'uint16',
469   '*cpus':   ['uint16'],
470   '*mem':    'size',
471   '*memdev': 'str',
472   '*initiator': 'uint16' }}
473
474##
475# @NumaDistOptions:
476#
477# Set the distance between 2 NUMA nodes.
478#
479# @src: source NUMA node.
480#
481# @dst: destination NUMA node.
482#
483# @val: NUMA distance from source node to destination node.
484#       When a node is unreachable from another node, set the distance
485#       between them to 255.
486#
487# Since: 2.10
488##
489{ 'struct': 'NumaDistOptions',
490  'data': {
491   'src': 'uint16',
492   'dst': 'uint16',
493   'val': 'uint8' }}
494
495##
496# @X86CPURegister32:
497#
498# A X86 32-bit register
499#
500# Since: 1.5
501##
502{ 'enum': 'X86CPURegister32',
503  'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
504
505##
506# @X86CPUFeatureWordInfo:
507#
508# Information about a X86 CPU feature word
509#
510# @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
511#
512# @cpuid-input-ecx: Input ECX value for CPUID instruction for that
513#                   feature word
514#
515# @cpuid-register: Output register containing the feature bits
516#
517# @features: value of output register, containing the feature bits
518#
519# Since: 1.5
520##
521{ 'struct': 'X86CPUFeatureWordInfo',
522  'data': { 'cpuid-input-eax': 'int',
523            '*cpuid-input-ecx': 'int',
524            'cpuid-register': 'X86CPURegister32',
525            'features': 'int' } }
526
527##
528# @DummyForceArrays:
529#
530# Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
531#
532# Since: 2.5
533##
534{ 'struct': 'DummyForceArrays',
535  'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
536
537##
538# @NumaCpuOptions:
539#
540# Option "-numa cpu" overrides default cpu to node mapping.
541# It accepts the same set of cpu properties as returned by
542# query-hotpluggable-cpus[].props, where node-id could be used to
543# override default node mapping.
544#
545# Since: 2.10
546##
547{ 'struct': 'NumaCpuOptions',
548   'base': 'CpuInstanceProperties',
549   'data' : {} }
550
551##
552# @HmatLBMemoryHierarchy:
553#
554# The memory hierarchy in the System Locality Latency and Bandwidth
555# Information Structure of HMAT (Heterogeneous Memory Attribute Table)
556#
557# For more information about @HmatLBMemoryHierarchy, see chapter
558# 5.2.27.4: Table 5-146: Field "Flags" of ACPI 6.3 spec.
559#
560# @memory: the structure represents the memory performance
561#
562# @first-level: first level of memory side cache
563#
564# @second-level: second level of memory side cache
565#
566# @third-level: third level of memory side cache
567#
568# Since: 5.0
569##
570{ 'enum': 'HmatLBMemoryHierarchy',
571  'data': [ 'memory', 'first-level', 'second-level', 'third-level' ] }
572
573##
574# @HmatLBDataType:
575#
576# Data type in the System Locality Latency and Bandwidth
577# Information Structure of HMAT (Heterogeneous Memory Attribute Table)
578#
579# For more information about @HmatLBDataType, see chapter
580# 5.2.27.4: Table 5-146:  Field "Data Type" of ACPI 6.3 spec.
581#
582# @access-latency: access latency (nanoseconds)
583#
584# @read-latency: read latency (nanoseconds)
585#
586# @write-latency: write latency (nanoseconds)
587#
588# @access-bandwidth: access bandwidth (Bytes per second)
589#
590# @read-bandwidth: read bandwidth (Bytes per second)
591#
592# @write-bandwidth: write bandwidth (Bytes per second)
593#
594# Since: 5.0
595##
596{ 'enum': 'HmatLBDataType',
597  'data': [ 'access-latency', 'read-latency', 'write-latency',
598            'access-bandwidth', 'read-bandwidth', 'write-bandwidth' ] }
599
600##
601# @NumaHmatLBOptions:
602#
603# Set the system locality latency and bandwidth information
604# between Initiator and Target proximity Domains.
605#
606# For more information about @NumaHmatLBOptions, see chapter
607# 5.2.27.4: Table 5-146 of ACPI 6.3 spec.
608#
609# @initiator: the Initiator Proximity Domain.
610#
611# @target: the Target Proximity Domain.
612#
613# @hierarchy: the Memory Hierarchy. Indicates the performance
614#             of memory or side cache.
615#
616# @data-type: presents the type of data, access/read/write
617#             latency or hit latency.
618#
619# @latency: the value of latency from @initiator to @target
620#           proximity domain, the latency unit is "ns(nanosecond)".
621#
622# @bandwidth: the value of bandwidth between @initiator and @target
623#             proximity domain, the bandwidth unit is
624#             "Bytes per second".
625#
626# Since: 5.0
627##
628{ 'struct': 'NumaHmatLBOptions',
629    'data': {
630    'initiator': 'uint16',
631    'target': 'uint16',
632    'hierarchy': 'HmatLBMemoryHierarchy',
633    'data-type': 'HmatLBDataType',
634    '*latency': 'uint64',
635    '*bandwidth': 'size' }}
636
637##
638# @HmatCacheAssociativity:
639#
640# Cache associativity in the Memory Side Cache Information Structure
641# of HMAT
642#
643# For more information of @HmatCacheAssociativity, see chapter
644# 5.2.27.5: Table 5-147 of ACPI 6.3 spec.
645#
646# @none: None (no memory side cache in this proximity domain,
647#              or cache associativity unknown)
648#
649# @direct: Direct Mapped
650#
651# @complex: Complex Cache Indexing (implementation specific)
652#
653# Since: 5.0
654##
655{ 'enum': 'HmatCacheAssociativity',
656  'data': [ 'none', 'direct', 'complex' ] }
657
658##
659# @HmatCacheWritePolicy:
660#
661# Cache write policy in the Memory Side Cache Information Structure
662# of HMAT
663#
664# For more information of @HmatCacheWritePolicy, see chapter
665# 5.2.27.5: Table 5-147: Field "Cache Attributes" of ACPI 6.3 spec.
666#
667# @none: None (no memory side cache in this proximity domain,
668#        or cache write policy unknown)
669#
670# @write-back: Write Back (WB)
671#
672# @write-through: Write Through (WT)
673#
674# Since: 5.0
675##
676{ 'enum': 'HmatCacheWritePolicy',
677  'data': [ 'none', 'write-back', 'write-through' ] }
678
679##
680# @NumaHmatCacheOptions:
681#
682# Set the memory side cache information for a given memory domain.
683#
684# For more information of @NumaHmatCacheOptions, see chapter
685# 5.2.27.5: Table 5-147: Field "Cache Attributes" of ACPI 6.3 spec.
686#
687# @node-id: the memory proximity domain to which the memory belongs.
688#
689# @size: the size of memory side cache in bytes.
690#
691# @level: the cache level described in this structure.
692#
693# @associativity: the cache associativity,
694#                 none/direct-mapped/complex(complex cache indexing).
695#
696# @policy: the write policy, none/write-back/write-through.
697#
698# @line: the cache Line size in bytes.
699#
700# Since: 5.0
701##
702{ 'struct': 'NumaHmatCacheOptions',
703  'data': {
704   'node-id': 'uint32',
705   'size': 'size',
706   'level': 'uint8',
707   'associativity': 'HmatCacheAssociativity',
708   'policy': 'HmatCacheWritePolicy',
709   'line': 'uint16' }}
710
711##
712# @HostMemPolicy:
713#
714# Host memory policy types
715#
716# @default: restore default policy, remove any nondefault policy
717#
718# @preferred: set the preferred host nodes for allocation
719#
720# @bind: a strict policy that restricts memory allocation to the
721#        host nodes specified
722#
723# @interleave: memory allocations are interleaved across the set
724#              of host nodes specified
725#
726# Since: 2.1
727##
728{ 'enum': 'HostMemPolicy',
729  'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
730
731##
732# @Memdev:
733#
734# Information about memory backend
735#
736# @id: backend's ID if backend has 'id' property (since 2.9)
737#
738# @size: memory backend size
739#
740# @merge: enables or disables memory merge support
741#
742# @dump: includes memory backend's memory in a core dump or not
743#
744# @prealloc: enables or disables memory preallocation
745#
746# @host-nodes: host nodes for its memory policy
747#
748# @policy: memory policy of memory backend
749#
750# Since: 2.1
751##
752{ 'struct': 'Memdev',
753  'data': {
754    '*id':        'str',
755    'size':       'size',
756    'merge':      'bool',
757    'dump':       'bool',
758    'prealloc':   'bool',
759    'host-nodes': ['uint16'],
760    'policy':     'HostMemPolicy' }}
761
762##
763# @query-memdev:
764#
765# Returns information for all memory backends.
766#
767# Returns: a list of @Memdev.
768#
769# Since: 2.1
770#
771# Example:
772#
773# -> { "execute": "query-memdev" }
774# <- { "return": [
775#        {
776#          "id": "mem1",
777#          "size": 536870912,
778#          "merge": false,
779#          "dump": true,
780#          "prealloc": false,
781#          "host-nodes": [0, 1],
782#          "policy": "bind"
783#        },
784#        {
785#          "size": 536870912,
786#          "merge": false,
787#          "dump": true,
788#          "prealloc": true,
789#          "host-nodes": [2, 3],
790#          "policy": "preferred"
791#        }
792#      ]
793#    }
794#
795##
796{ 'command': 'query-memdev', 'returns': ['Memdev'], 'allow-preconfig': true }
797
798##
799# @CpuInstanceProperties:
800#
801# List of properties to be used for hotplugging a CPU instance,
802# it should be passed by management with device_add command when
803# a CPU is being hotplugged.
804#
805# @node-id: NUMA node ID the CPU belongs to
806# @socket-id: socket number within node/board the CPU belongs to
807# @die-id: die number within node/board the CPU belongs to (Since 4.1)
808# @core-id: core number within die the CPU belongs to
809# @thread-id: thread number within core the CPU belongs to
810#
811# Note: currently there are 5 properties that could be present
812#       but management should be prepared to pass through other
813#       properties with device_add command to allow for future
814#       interface extension. This also requires the filed names to be kept in
815#       sync with the properties passed to -device/device_add.
816#
817# Since: 2.7
818##
819{ 'struct': 'CpuInstanceProperties',
820  'data': { '*node-id': 'int',
821            '*socket-id': 'int',
822            '*die-id': 'int',
823            '*core-id': 'int',
824            '*thread-id': 'int'
825  }
826}
827
828##
829# @HotpluggableCPU:
830#
831# @type: CPU object type for usage with device_add command
832# @props: list of properties to be used for hotplugging CPU
833# @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides
834# @qom-path: link to existing CPU object if CPU is present or
835#            omitted if CPU is not present.
836#
837# Since: 2.7
838##
839{ 'struct': 'HotpluggableCPU',
840  'data': { 'type': 'str',
841            'vcpus-count': 'int',
842            'props': 'CpuInstanceProperties',
843            '*qom-path': 'str'
844          }
845}
846
847##
848# @query-hotpluggable-cpus:
849#
850# TODO: Better documentation; currently there is none.
851#
852# Returns: a list of HotpluggableCPU objects.
853#
854# Since: 2.7
855#
856# Example:
857#
858# For pseries machine type started with -smp 2,cores=2,maxcpus=4 -cpu POWER8:
859#
860# -> { "execute": "query-hotpluggable-cpus" }
861# <- {"return": [
862#      { "props": { "core": 8 }, "type": "POWER8-spapr-cpu-core",
863#        "vcpus-count": 1 },
864#      { "props": { "core": 0 }, "type": "POWER8-spapr-cpu-core",
865#        "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"}
866#    ]}'
867#
868# For pc machine type started with -smp 1,maxcpus=2:
869#
870# -> { "execute": "query-hotpluggable-cpus" }
871# <- {"return": [
872#      {
873#         "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
874#         "props": {"core-id": 0, "socket-id": 1, "thread-id": 0}
875#      },
876#      {
877#         "qom-path": "/machine/unattached/device[0]",
878#         "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
879#         "props": {"core-id": 0, "socket-id": 0, "thread-id": 0}
880#      }
881#    ]}
882#
883# For s390x-virtio-ccw machine type started with -smp 1,maxcpus=2 -cpu qemu
884# (Since: 2.11):
885#
886# -> { "execute": "query-hotpluggable-cpus" }
887# <- {"return": [
888#      {
889#         "type": "qemu-s390x-cpu", "vcpus-count": 1,
890#         "props": { "core-id": 1 }
891#      },
892#      {
893#         "qom-path": "/machine/unattached/device[0]",
894#         "type": "qemu-s390x-cpu", "vcpus-count": 1,
895#         "props": { "core-id": 0 }
896#      }
897#    ]}
898#
899##
900{ 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'],
901             'allow-preconfig': true }
902
903##
904# @set-numa-node:
905#
906# Runtime equivalent of '-numa' CLI option, available at
907# preconfigure stage to configure numa mapping before initializing
908# machine.
909#
910# Since 3.0
911##
912{ 'command': 'set-numa-node', 'boxed': true,
913  'data': 'NumaOptions',
914  'allow-preconfig': true
915}
916