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