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