xref: /qemu/qapi/machine.json (revision 159fb790)
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{ 'include': 'common.json' }
12{ 'include': 'machine-common.json' }
13
14##
15# @SysEmuTarget:
16#
17# The comprehensive enumeration of QEMU system emulation ("softmmu")
18# targets.  Run "./configure --help" in the project root directory,
19# and look for the \*-softmmu targets near the "--target-list" option.
20# The individual target constants are not documented here, for the
21# time being.
22#
23# @rx: since 5.0
24#
25# @avr: since 5.1
26#
27# Notes: The resulting QMP strings can be appended to the
28#     "qemu-system-" prefix to produce the corresponding QEMU
29#     executable name.  This is true even for "qemu-system-x86_64".
30#
31# Since: 3.0
32##
33{ 'enum' : 'SysEmuTarget',
34  'data' : [ 'aarch64', 'alpha', 'arm', 'avr', 'cris', 'hppa', 'i386',
35             'loongarch64', 'm68k', 'microblaze', 'microblazeel', 'mips', 'mips64',
36             'mips64el', 'mipsel', 'or1k', 'ppc',
37             'ppc64', 'riscv32', 'riscv64', 'rx', 's390x', 'sh4',
38             'sh4eb', 'sparc', 'sparc64', 'tricore',
39             'x86_64', 'xtensa', 'xtensaeb' ] }
40
41##
42# @CpuS390State:
43#
44# An enumeration of cpu states that can be assumed by a virtual S390
45# CPU
46#
47# Since: 2.12
48##
49{ 'enum': 'CpuS390State',
50  'prefix': 'S390_CPU_STATE',
51  'data': [ 'uninitialized', 'stopped', 'check-stop', 'operating', 'load' ] }
52
53##
54# @CpuInfoS390:
55#
56# Additional information about a virtual S390 CPU
57#
58# @cpu-state: the virtual CPU's state
59#
60# @dedicated: the virtual CPU's dedication (since 8.2)
61#
62# @entitlement: the virtual CPU's entitlement (since 8.2)
63#
64# Since: 2.12
65##
66{ 'struct': 'CpuInfoS390',
67  'data': { 'cpu-state': 'CpuS390State',
68            '*dedicated': 'bool',
69            '*entitlement': 'CpuS390Entitlement' } }
70
71##
72# @CpuInfoFast:
73#
74# Information about a virtual CPU
75#
76# @cpu-index: index of the virtual CPU
77#
78# @qom-path: path to the CPU object in the QOM tree
79#
80# @thread-id: ID of the underlying host thread
81#
82# @props: properties associated with a virtual CPU, e.g. the socket id
83#
84# @target: the QEMU system emulation target, which determines which
85#     additional fields will be listed (since 3.0)
86#
87# Since: 2.12
88##
89{ 'union'         : 'CpuInfoFast',
90  'base'          : { 'cpu-index'    : 'int',
91                      'qom-path'     : 'str',
92                      'thread-id'    : 'int',
93                      '*props'       : 'CpuInstanceProperties',
94                      'target'       : 'SysEmuTarget' },
95  'discriminator' : 'target',
96  'data'          : { 's390x'        : 'CpuInfoS390' } }
97
98##
99# @query-cpus-fast:
100#
101# Returns information about all virtual CPUs.
102#
103# Returns: list of @CpuInfoFast
104#
105# Since: 2.12
106#
107# Example:
108#
109#     -> { "execute": "query-cpus-fast" }
110#     <- { "return": [
111#             {
112#                 "thread-id": 25627,
113#                 "props": {
114#                     "core-id": 0,
115#                     "thread-id": 0,
116#                     "socket-id": 0
117#                 },
118#                 "qom-path": "/machine/unattached/device[0]",
119#                 "target":"x86_64",
120#                 "cpu-index": 0
121#             },
122#             {
123#                 "thread-id": 25628,
124#                 "props": {
125#                     "core-id": 0,
126#                     "thread-id": 0,
127#                     "socket-id": 1
128#                 },
129#                 "qom-path": "/machine/unattached/device[2]",
130#                 "target":"x86_64",
131#                 "cpu-index": 1
132#             }
133#         ]
134#     }
135##
136{ 'command': 'query-cpus-fast', 'returns': [ 'CpuInfoFast' ] }
137
138##
139# @CompatProperty:
140#
141# Property default values specific to a machine type, for use by
142# scripts/compare-machine-types.
143#
144# @qom-type: name of the QOM type to which the default applies
145#
146# @property: name of its property to which the default applies
147#
148# @value: the default value (machine-specific default can overwrite
149#     the "default" default, to avoid this use -machine none)
150#
151# Since: 9.1
152##
153{ 'struct': 'CompatProperty',
154  'data': { 'qom-type': 'str',
155            'property': 'str',
156            'value': 'str' } }
157
158##
159# @MachineInfo:
160#
161# Information describing a machine.
162#
163# @name: the name of the machine
164#
165# @alias: an alias for the machine name
166#
167# @is-default: whether the machine is default
168#
169# @cpu-max: maximum number of CPUs supported by the machine type
170#     (since 1.5)
171#
172# @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7)
173#
174# @numa-mem-supported: true if '-numa node,mem' option is supported by
175#     the machine type and false otherwise (since 4.1)
176#
177# @deprecated: if true, the machine type is deprecated and may be
178#     removed in future versions of QEMU according to the QEMU
179#     deprecation policy (since 4.1)
180#
181# @default-cpu-type: default CPU model typename if none is requested
182#     via the -cpu argument.  (since 4.2)
183#
184# @default-ram-id: the default ID of initial RAM memory backend (since
185#     5.2)
186#
187# @acpi: machine type supports ACPI (since 8.0)
188#
189# @compat-props: The machine type's compatibility properties.  Only
190#     present when query-machines argument @compat-props is true.
191#     (since 9.1)
192#
193# Features:
194#
195# @unstable: Member @compat-props is experimental.
196#
197# Since: 1.2
198##
199{ 'struct': 'MachineInfo',
200  'data': { 'name': 'str', '*alias': 'str',
201            '*is-default': 'bool', 'cpu-max': 'int',
202            'hotpluggable-cpus': 'bool',  'numa-mem-supported': 'bool',
203            'deprecated': 'bool', '*default-cpu-type': 'str',
204            '*default-ram-id': 'str', 'acpi': 'bool',
205            '*compat-props': { 'type': ['CompatProperty'],
206                               'features': ['unstable'] } } }
207
208##
209# @query-machines:
210#
211# Return a list of supported machines
212#
213# @compat-props: if true, also return compatibility properties.
214#     (default: false) (since 9.1)
215#
216# Features:
217#
218# @unstable: Argument @compat-props is experimental.
219#
220# Returns: a list of MachineInfo
221#
222# Since: 1.2
223#
224# Example:
225#
226#     -> { "execute": "query-machines", "arguments": { "compat-props": true } }
227#     <- { "return": [
228#               {
229#                  "hotpluggable-cpus": true,
230#                  "name": "pc-q35-6.2",
231#                  "compat-props": [
232#                       {
233#                          "qom-type": "virtio-mem",
234#                          "property": "unplugged-inaccessible",
235#                          "value": "off"
236#                       }
237#                   ],
238#                   "numa-mem-supported": false,
239#                   "default-cpu-type": "qemu64-x86_64-cpu",
240#                   "cpu-max": 288,
241#                   "deprecated": false,
242#                   "default-ram-id": "pc.ram"
243#               },
244#               ...
245#        }
246##
247{ 'command': 'query-machines',
248  'data': { '*compat-props': { 'type': 'bool',
249                               'features': [ 'unstable' ] } },
250  'returns': ['MachineInfo'] }
251
252##
253# @CurrentMachineParams:
254#
255# Information describing the running machine parameters.
256#
257# @wakeup-suspend-support: true if the machine supports wake up from
258#     suspend
259#
260# Since: 4.0
261##
262{ 'struct': 'CurrentMachineParams',
263  'data': { 'wakeup-suspend-support': 'bool'} }
264
265##
266# @query-current-machine:
267#
268# Return information on the current virtual machine.
269#
270# Returns: CurrentMachineParams
271#
272# Since: 4.0
273##
274{ 'command': 'query-current-machine', 'returns': 'CurrentMachineParams' }
275
276##
277# @TargetInfo:
278#
279# Information describing the QEMU target.
280#
281# @arch: the target architecture
282#
283# Since: 1.2
284##
285{ 'struct': 'TargetInfo',
286  'data': { 'arch': 'SysEmuTarget' } }
287
288##
289# @query-target:
290#
291# Return information about the target for this QEMU
292#
293# Returns: TargetInfo
294#
295# Since: 1.2
296##
297{ 'command': 'query-target', 'returns': 'TargetInfo' }
298
299##
300# @UuidInfo:
301#
302# Guest UUID information (Universally Unique Identifier).
303#
304# @UUID: the UUID of the guest
305#
306# Since: 0.14
307#
308# Notes: If no UUID was specified for the guest, a null UUID is
309#     returned.
310##
311{ 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
312
313##
314# @query-uuid:
315#
316# Query the guest UUID information.
317#
318# Returns: The @UuidInfo for the guest
319#
320# Since: 0.14
321#
322# Example:
323#
324#     -> { "execute": "query-uuid" }
325#     <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
326##
327{ 'command': 'query-uuid', 'returns': 'UuidInfo', 'allow-preconfig': true }
328
329##
330# @GuidInfo:
331#
332# GUID information.
333#
334# @guid: the globally unique identifier
335#
336# Since: 2.9
337##
338{ 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
339
340##
341# @query-vm-generation-id:
342#
343# Show Virtual Machine Generation ID
344#
345# Since: 2.9
346##
347{ 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }
348
349##
350# @system_reset:
351#
352# Performs a hard reset of a guest.
353#
354# Since: 0.14
355#
356# Example:
357#
358#     -> { "execute": "system_reset" }
359#     <- { "return": {} }
360##
361{ 'command': 'system_reset' }
362
363##
364# @system_powerdown:
365#
366# Requests that a guest perform a powerdown operation.
367#
368# Since: 0.14
369#
370# Notes: A guest may or may not respond to this command.  This command
371#     returning does not indicate that a guest has accepted the
372#     request or that it has shut down.  Many guests will respond to
373#     this command by prompting the user in some way.
374#
375# Example:
376#
377#     -> { "execute": "system_powerdown" }
378#     <- { "return": {} }
379##
380{ 'command': 'system_powerdown' }
381
382##
383# @system_wakeup:
384#
385# Wake up guest from suspend.  If the guest has wake-up from suspend
386# support enabled (wakeup-suspend-support flag from
387# query-current-machine), wake-up guest from suspend if the guest is
388# in SUSPENDED state.  Return an error otherwise.
389#
390# Since: 1.1
391#
392# Note: prior to 4.0, this command does nothing in case the guest
393#     isn't suspended.
394#
395# Example:
396#
397#     -> { "execute": "system_wakeup" }
398#     <- { "return": {} }
399##
400{ 'command': 'system_wakeup' }
401
402##
403# @LostTickPolicy:
404#
405# Policy for handling lost ticks in timer devices.  Ticks end up
406# getting lost when, for example, the guest is paused.
407#
408# @discard: throw away the missed ticks and continue with future
409#     injection normally.  The guest OS will see the timer jump ahead
410#     by a potentially quite significant amount all at once, as if the
411#     intervening chunk of time had simply not existed; needless to
412#     say, such a sudden jump can easily confuse a guest OS which is
413#     not specifically prepared to deal with it.  Assuming the guest
414#     OS can deal correctly with the time jump, the time in the guest
415#     and in the host should now match.
416#
417# @delay: continue to deliver ticks at the normal rate.  The guest OS
418#     will not notice anything is amiss, as from its point of view
419#     time will have continued to flow normally.  The time in the
420#     guest should now be behind the time in the host by exactly the
421#     amount of time during which ticks have been missed.
422#
423# @slew: deliver ticks at a higher rate to catch up with the missed
424#     ticks.  The guest OS will not notice anything is amiss, as from
425#     its point of view time will have continued to flow normally.
426#     Once the timer has managed to catch up with all the missing
427#     ticks, the time in the guest and in the host should match.
428#
429# Since: 2.0
430##
431{ 'enum': 'LostTickPolicy',
432  'data': ['discard', 'delay', 'slew' ] }
433
434##
435# @inject-nmi:
436#
437# Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or
438# all CPUs (ppc64). The command fails when the guest doesn't support
439# injecting.
440#
441# Since: 0.14
442#
443# Note: prior to 2.1, this command was only supported for x86 and s390
444#     VMs
445#
446# Example:
447#
448#     -> { "execute": "inject-nmi" }
449#     <- { "return": {} }
450##
451{ 'command': 'inject-nmi' }
452
453##
454# @KvmInfo:
455#
456# Information about support for KVM acceleration
457#
458# @enabled: true if KVM acceleration is active
459#
460# @present: true if KVM acceleration is built into this executable
461#
462# Since: 0.14
463##
464{ 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
465
466##
467# @query-kvm:
468#
469# Returns information about KVM acceleration
470#
471# Returns: @KvmInfo
472#
473# Since: 0.14
474#
475# Example:
476#
477#     -> { "execute": "query-kvm" }
478#     <- { "return": { "enabled": true, "present": true } }
479##
480{ 'command': 'query-kvm', 'returns': 'KvmInfo' }
481
482##
483# @NumaOptionsType:
484#
485# @node: NUMA nodes configuration
486#
487# @dist: NUMA distance configuration (since 2.10)
488#
489# @cpu: property based CPU(s) to node mapping (Since: 2.10)
490#
491# @hmat-lb: memory latency and bandwidth information (Since: 5.0)
492#
493# @hmat-cache: memory side cache information (Since: 5.0)
494#
495# Since: 2.1
496##
497{ 'enum': 'NumaOptionsType',
498  'data': [ 'node', 'dist', 'cpu', 'hmat-lb', 'hmat-cache' ] }
499
500##
501# @NumaOptions:
502#
503# A discriminated record of NUMA options.  (for OptsVisitor)
504#
505# @type: NUMA option type
506#
507# Since: 2.1
508##
509{ 'union': 'NumaOptions',
510  'base': { 'type': 'NumaOptionsType' },
511  'discriminator': 'type',
512  'data': {
513    'node': 'NumaNodeOptions',
514    'dist': 'NumaDistOptions',
515    'cpu': 'NumaCpuOptions',
516    'hmat-lb': 'NumaHmatLBOptions',
517    'hmat-cache': 'NumaHmatCacheOptions' }}
518
519##
520# @NumaNodeOptions:
521#
522# Create a guest NUMA node.  (for OptsVisitor)
523#
524# @nodeid: NUMA node ID (increase by 1 from 0 if omitted)
525#
526# @cpus: VCPUs belonging to this node (assign VCPUS round-robin if
527#     omitted)
528#
529# @mem: memory size of this node; mutually exclusive with @memdev.
530#     Equally divide total memory among nodes if both @mem and @memdev
531#     are omitted.
532#
533# @memdev: memory backend object.  If specified for one node, it must
534#     be specified for all nodes.
535#
536# @initiator: defined in ACPI 6.3 Chapter 5.2.27.3 Table 5-145, points
537#     to the nodeid which has the memory controller responsible for
538#     this NUMA node.  This field provides additional information as
539#     to the initiator node that is closest (as in directly attached)
540#     to this node, and therefore has the best performance (since 5.0)
541#
542# Since: 2.1
543##
544{ 'struct': 'NumaNodeOptions',
545  'data': {
546   '*nodeid': 'uint16',
547   '*cpus':   ['uint16'],
548   '*mem':    'size',
549   '*memdev': 'str',
550   '*initiator': 'uint16' }}
551
552##
553# @NumaDistOptions:
554#
555# Set the distance between 2 NUMA nodes.
556#
557# @src: source NUMA node.
558#
559# @dst: destination NUMA node.
560#
561# @val: NUMA distance from source node to destination node.  When a
562#     node is unreachable from another node, set the distance between
563#     them to 255.
564#
565# Since: 2.10
566##
567{ 'struct': 'NumaDistOptions',
568  'data': {
569   'src': 'uint16',
570   'dst': 'uint16',
571   'val': 'uint8' }}
572
573##
574# @CXLFixedMemoryWindowOptions:
575#
576# Create a CXL Fixed Memory Window
577#
578# @size: Size of the Fixed Memory Window in bytes.  Must be a multiple
579#     of 256MiB.
580#
581# @interleave-granularity: Number of contiguous bytes for which
582#     accesses will go to a given interleave target.  Accepted values
583#     [256, 512, 1k, 2k, 4k, 8k, 16k]
584#
585# @targets: Target root bridge IDs from -device ...,id=<ID> for each
586#     root bridge.
587#
588# Since: 7.1
589##
590{ 'struct': 'CXLFixedMemoryWindowOptions',
591  'data': {
592      'size': 'size',
593      '*interleave-granularity': 'size',
594      'targets': ['str'] }}
595
596##
597# @CXLFMWProperties:
598#
599# List of CXL Fixed Memory Windows.
600#
601# @cxl-fmw: List of CXLFixedMemoryWindowOptions
602#
603# Since: 7.1
604##
605{ 'struct' : 'CXLFMWProperties',
606  'data': { 'cxl-fmw': ['CXLFixedMemoryWindowOptions'] }
607}
608
609##
610# @X86CPURegister32:
611#
612# A X86 32-bit register
613#
614# Since: 1.5
615##
616{ 'enum': 'X86CPURegister32',
617  'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
618
619##
620# @X86CPUFeatureWordInfo:
621#
622# Information about a X86 CPU feature word
623#
624# @cpuid-input-eax: Input EAX value for CPUID instruction for that
625#     feature word
626#
627# @cpuid-input-ecx: Input ECX value for CPUID instruction for that
628#     feature word
629#
630# @cpuid-register: Output register containing the feature bits
631#
632# @features: value of output register, containing the feature bits
633#
634# Since: 1.5
635##
636{ 'struct': 'X86CPUFeatureWordInfo',
637  'data': { 'cpuid-input-eax': 'int',
638            '*cpuid-input-ecx': 'int',
639            'cpuid-register': 'X86CPURegister32',
640            'features': 'int' } }
641
642##
643# @DummyForceArrays:
644#
645# Not used by QMP; hack to let us use X86CPUFeatureWordInfoList
646# internally
647#
648# Since: 2.5
649##
650{ 'struct': 'DummyForceArrays',
651  'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
652
653##
654# @NumaCpuOptions:
655#
656# Option "-numa cpu" overrides default cpu to node mapping.  It
657# accepts the same set of cpu properties as returned by
658# query-hotpluggable-cpus[].props, where node-id could be used to
659# override default node mapping.
660#
661# Since: 2.10
662##
663{ 'struct': 'NumaCpuOptions',
664   'base': 'CpuInstanceProperties',
665   'data' : {} }
666
667##
668# @HmatLBMemoryHierarchy:
669#
670# The memory hierarchy in the System Locality Latency and Bandwidth
671# Information Structure of HMAT (Heterogeneous Memory Attribute Table)
672#
673# For more information about @HmatLBMemoryHierarchy, see chapter
674# 5.2.27.4: Table 5-146: Field "Flags" of ACPI 6.3 spec.
675#
676# @memory: the structure represents the memory performance
677#
678# @first-level: first level of memory side cache
679#
680# @second-level: second level of memory side cache
681#
682# @third-level: third level of memory side cache
683#
684# Since: 5.0
685##
686{ 'enum': 'HmatLBMemoryHierarchy',
687  'data': [ 'memory', 'first-level', 'second-level', 'third-level' ] }
688
689##
690# @HmatLBDataType:
691#
692# Data type in the System Locality Latency and Bandwidth Information
693# Structure of HMAT (Heterogeneous Memory Attribute Table)
694#
695# For more information about @HmatLBDataType, see chapter 5.2.27.4:
696# Table 5-146:  Field "Data Type" of ACPI 6.3 spec.
697#
698# @access-latency: access latency (nanoseconds)
699#
700# @read-latency: read latency (nanoseconds)
701#
702# @write-latency: write latency (nanoseconds)
703#
704# @access-bandwidth: access bandwidth (Bytes per second)
705#
706# @read-bandwidth: read bandwidth (Bytes per second)
707#
708# @write-bandwidth: write bandwidth (Bytes per second)
709#
710# Since: 5.0
711##
712{ 'enum': 'HmatLBDataType',
713  'data': [ 'access-latency', 'read-latency', 'write-latency',
714            'access-bandwidth', 'read-bandwidth', 'write-bandwidth' ] }
715
716##
717# @NumaHmatLBOptions:
718#
719# Set the system locality latency and bandwidth information between
720# Initiator and Target proximity Domains.
721#
722# For more information about @NumaHmatLBOptions, see chapter 5.2.27.4:
723# Table 5-146 of ACPI 6.3 spec.
724#
725# @initiator: the Initiator Proximity Domain.
726#
727# @target: the Target Proximity Domain.
728#
729# @hierarchy: the Memory Hierarchy.  Indicates the performance of
730#     memory or side cache.
731#
732# @data-type: presents the type of data, access/read/write latency or
733#     hit latency.
734#
735# @latency: the value of latency from @initiator to @target proximity
736#     domain, the latency unit is "ns(nanosecond)".
737#
738# @bandwidth: the value of bandwidth between @initiator and @target
739#     proximity domain, the bandwidth unit is "Bytes per second".
740#
741# Since: 5.0
742##
743{ 'struct': 'NumaHmatLBOptions',
744    'data': {
745    'initiator': 'uint16',
746    'target': 'uint16',
747    'hierarchy': 'HmatLBMemoryHierarchy',
748    'data-type': 'HmatLBDataType',
749    '*latency': 'uint64',
750    '*bandwidth': 'size' }}
751
752##
753# @HmatCacheAssociativity:
754#
755# Cache associativity in the Memory Side Cache Information Structure
756# of HMAT
757#
758# For more information of @HmatCacheAssociativity, see chapter
759# 5.2.27.5: Table 5-147 of ACPI 6.3 spec.
760#
761# @none: None (no memory side cache in this proximity domain, or cache
762#     associativity unknown)
763#
764# @direct: Direct Mapped
765#
766# @complex: Complex Cache Indexing (implementation specific)
767#
768# Since: 5.0
769##
770{ 'enum': 'HmatCacheAssociativity',
771  'data': [ 'none', 'direct', 'complex' ] }
772
773##
774# @HmatCacheWritePolicy:
775#
776# Cache write policy in the Memory Side Cache Information Structure of
777# HMAT
778#
779# For more information of @HmatCacheWritePolicy, see chapter 5.2.27.5:
780# Table 5-147: Field "Cache Attributes" of ACPI 6.3 spec.
781#
782# @none: None (no memory side cache in this proximity domain, or cache
783#     write policy unknown)
784#
785# @write-back: Write Back (WB)
786#
787# @write-through: Write Through (WT)
788#
789# Since: 5.0
790##
791{ 'enum': 'HmatCacheWritePolicy',
792  'data': [ 'none', 'write-back', 'write-through' ] }
793
794##
795# @NumaHmatCacheOptions:
796#
797# Set the memory side cache information for a given memory domain.
798#
799# For more information of @NumaHmatCacheOptions, see chapter 5.2.27.5:
800# Table 5-147: Field "Cache Attributes" of ACPI 6.3 spec.
801#
802# @node-id: the memory proximity domain to which the memory belongs.
803#
804# @size: the size of memory side cache in bytes.
805#
806# @level: the cache level described in this structure.
807#
808# @associativity: the cache associativity,
809#     none/direct-mapped/complex(complex cache indexing).
810#
811# @policy: the write policy, none/write-back/write-through.
812#
813# @line: the cache Line size in bytes.
814#
815# Since: 5.0
816##
817{ 'struct': 'NumaHmatCacheOptions',
818  'data': {
819   'node-id': 'uint32',
820   'size': 'size',
821   'level': 'uint8',
822   'associativity': 'HmatCacheAssociativity',
823   'policy': 'HmatCacheWritePolicy',
824   'line': 'uint16' }}
825
826##
827# @memsave:
828#
829# Save a portion of guest memory to a file.
830#
831# @val: the virtual address of the guest to start from
832#
833# @size: the size of memory region to save
834#
835# @filename: the file to save the memory to as binary data
836#
837# @cpu-index: the index of the virtual CPU to use for translating the
838#     virtual address (defaults to CPU 0)
839#
840# Since: 0.14
841#
842# Notes: Errors were not reliably returned until 1.1
843#
844# Example:
845#
846#     -> { "execute": "memsave",
847#          "arguments": { "val": 10,
848#                         "size": 100,
849#                         "filename": "/tmp/virtual-mem-dump" } }
850#     <- { "return": {} }
851##
852{ 'command': 'memsave',
853  'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
854
855##
856# @pmemsave:
857#
858# Save a portion of guest physical memory to a file.
859#
860# @val: the physical address of the guest to start from
861#
862# @size: the size of memory region to save
863#
864# @filename: the file to save the memory to as binary data
865#
866# Since: 0.14
867#
868# Notes: Errors were not reliably returned until 1.1
869#
870# Example:
871#
872#     -> { "execute": "pmemsave",
873#          "arguments": { "val": 10,
874#                         "size": 100,
875#                         "filename": "/tmp/physical-mem-dump" } }
876#     <- { "return": {} }
877##
878{ 'command': 'pmemsave',
879  'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
880
881##
882# @Memdev:
883#
884# Information about memory backend
885#
886# @id: backend's ID if backend has 'id' property (since 2.9)
887#
888# @size: memory backend size
889#
890# @merge: whether memory merge support is enabled
891#
892# @dump: whether memory backend's memory is included in a core dump
893#
894# @prealloc: whether memory was preallocated
895#
896# @share: whether memory is private to QEMU or shared (since 6.1)
897#
898# @reserve: whether swap space (or huge pages) was reserved if
899#     applicable.  This corresponds to the user configuration and not
900#     the actual behavior implemented in the OS to perform the
901#     reservation.  For example, Linux will never reserve swap space
902#     for shared file mappings.  (since 6.1)
903#
904# @host-nodes: host nodes for its memory policy
905#
906# @policy: memory policy of memory backend
907#
908# Since: 2.1
909##
910{ 'struct': 'Memdev',
911  'data': {
912    '*id':        'str',
913    'size':       'size',
914    'merge':      'bool',
915    'dump':       'bool',
916    'prealloc':   'bool',
917    'share':      'bool',
918    '*reserve':    'bool',
919    'host-nodes': ['uint16'],
920    'policy':     'HostMemPolicy' }}
921
922##
923# @query-memdev:
924#
925# Returns information for all memory backends.
926#
927# Returns: a list of @Memdev.
928#
929# Since: 2.1
930#
931# Example:
932#
933#     -> { "execute": "query-memdev" }
934#     <- { "return": [
935#            {
936#              "id": "mem1",
937#              "size": 536870912,
938#              "merge": false,
939#              "dump": true,
940#              "prealloc": false,
941#              "share": false,
942#              "host-nodes": [0, 1],
943#              "policy": "bind"
944#            },
945#            {
946#              "size": 536870912,
947#              "merge": false,
948#              "dump": true,
949#              "prealloc": true,
950#              "share": false,
951#              "host-nodes": [2, 3],
952#              "policy": "preferred"
953#            }
954#          ]
955#        }
956##
957{ 'command': 'query-memdev', 'returns': ['Memdev'], 'allow-preconfig': true }
958
959##
960# @CpuInstanceProperties:
961#
962# List of properties to be used for hotplugging a CPU instance, it
963# should be passed by management with device_add command when a CPU is
964# being hotplugged.
965#
966# Which members are optional and which mandatory depends on the
967# architecture and board.
968#
969# For s390x see :ref:`cpu-topology-s390x`.
970#
971# The ids other than the node-id specify the position of the CPU
972# within the CPU topology (as defined by the machine property "smp",
973# thus see also type @SMPConfiguration)
974#
975# @node-id: NUMA node ID the CPU belongs to
976#
977# @drawer-id: drawer number within CPU topology the CPU belongs to
978#     (since 8.2)
979#
980# @book-id: book number within parent container the CPU belongs to
981#     (since 8.2)
982#
983# @socket-id: socket number within parent container the CPU belongs to
984#
985# @die-id: die number within the parent container the CPU belongs to
986#     (since 4.1)
987#
988# @cluster-id: cluster number within the parent container the CPU
989#     belongs to (since 7.1)
990#
991# @core-id: core number within the parent container the CPU belongs to
992#
993# @thread-id: thread number within the core the CPU  belongs to
994#
995# Note: management should be prepared to pass through additional
996#     properties with device_add.
997#
998# Since: 2.7
999##
1000{ 'struct': 'CpuInstanceProperties',
1001  # Keep these in sync with the properties device_add accepts
1002  'data': { '*node-id': 'int',
1003            '*drawer-id': 'int',
1004            '*book-id': 'int',
1005            '*socket-id': 'int',
1006            '*die-id': 'int',
1007            '*cluster-id': 'int',
1008            '*core-id': 'int',
1009            '*thread-id': 'int'
1010  }
1011}
1012
1013##
1014# @HotpluggableCPU:
1015#
1016# @type: CPU object type for usage with device_add command
1017#
1018# @props: list of properties to be used for hotplugging CPU
1019#
1020# @vcpus-count: number of logical VCPU threads @HotpluggableCPU
1021#     provides
1022#
1023# @qom-path: link to existing CPU object if CPU is present or omitted
1024#     if CPU is not present.
1025#
1026# Since: 2.7
1027##
1028{ 'struct': 'HotpluggableCPU',
1029  'data': { 'type': 'str',
1030            'vcpus-count': 'int',
1031            'props': 'CpuInstanceProperties',
1032            '*qom-path': 'str'
1033          }
1034}
1035
1036##
1037# @query-hotpluggable-cpus:
1038#
1039# TODO: Better documentation; currently there is none.
1040#
1041# Returns: a list of HotpluggableCPU objects.
1042#
1043# Since: 2.7
1044#
1045# Examples:
1046#
1047#     For pseries machine type started with -smp 2,cores=2,maxcpus=4
1048#     -cpu POWER8:
1049#
1050#     -> { "execute": "query-hotpluggable-cpus" }
1051#     <- {"return": [
1052#          { "props": { "core-id": 8 }, "type": "POWER8-spapr-cpu-core",
1053#            "vcpus-count": 1 },
1054#          { "props": { "core-id": 0 }, "type": "POWER8-spapr-cpu-core",
1055#            "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"}
1056#        ]}'
1057#
1058#     For pc machine type started with -smp 1,maxcpus=2:
1059#
1060#     -> { "execute": "query-hotpluggable-cpus" }
1061#     <- {"return": [
1062#          {
1063#             "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
1064#             "props": {"core-id": 0, "socket-id": 1, "thread-id": 0}
1065#          },
1066#          {
1067#             "qom-path": "/machine/unattached/device[0]",
1068#             "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
1069#             "props": {"core-id": 0, "socket-id": 0, "thread-id": 0}
1070#          }
1071#        ]}
1072#
1073#     For s390x-virtio-ccw machine type started with -smp 1,maxcpus=2
1074#     -cpu qemu (Since: 2.11):
1075#
1076#     -> { "execute": "query-hotpluggable-cpus" }
1077#     <- {"return": [
1078#          {
1079#             "type": "qemu-s390x-cpu", "vcpus-count": 1,
1080#             "props": { "core-id": 1 }
1081#          },
1082#          {
1083#             "qom-path": "/machine/unattached/device[0]",
1084#             "type": "qemu-s390x-cpu", "vcpus-count": 1,
1085#             "props": { "core-id": 0 }
1086#          }
1087#        ]}
1088##
1089{ 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'],
1090             'allow-preconfig': true }
1091
1092##
1093# @set-numa-node:
1094#
1095# Runtime equivalent of '-numa' CLI option, available at preconfigure
1096# stage to configure numa mapping before initializing machine.
1097#
1098# Since: 3.0
1099##
1100{ 'command': 'set-numa-node', 'boxed': true,
1101  'data': 'NumaOptions',
1102  'allow-preconfig': true
1103}
1104
1105##
1106# @balloon:
1107#
1108# Request the balloon driver to change its balloon size.
1109#
1110# @value: the target logical size of the VM in bytes.  We can deduce
1111#     the size of the balloon using this formula:
1112#
1113#        logical_vm_size = vm_ram_size - balloon_size
1114#
1115#     From it we have: balloon_size = vm_ram_size - @value
1116#
1117# Errors:
1118#     - If the balloon driver is enabled but not functional because
1119#       the KVM kernel module cannot support it, KVMMissingCap
1120#     - If no balloon device is present, DeviceNotActive
1121#
1122# Notes: This command just issues a request to the guest.  When it
1123#     returns, the balloon size may not have changed.  A guest can
1124#     change the balloon size independent of this command.
1125#
1126# Since: 0.14
1127#
1128# Example:
1129#
1130#     -> { "execute": "balloon", "arguments": { "value": 536870912 } }
1131#     <- { "return": {} }
1132#
1133#     With a 2.5GiB guest this command inflated the ballon to 3GiB.
1134##
1135{ 'command': 'balloon', 'data': {'value': 'int'} }
1136
1137##
1138# @BalloonInfo:
1139#
1140# Information about the guest balloon device.
1141#
1142# @actual: the logical size of the VM in bytes Formula used:
1143#     logical_vm_size = vm_ram_size - balloon_size
1144#
1145# Since: 0.14
1146##
1147{ 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
1148
1149##
1150# @query-balloon:
1151#
1152# Return information about the balloon device.
1153#
1154# Returns:
1155#     @BalloonInfo
1156#
1157# Errors:
1158#     - If the balloon driver is enabled but not functional because
1159#       the KVM kernel module cannot support it, KVMMissingCap
1160#     - If no balloon device is present, DeviceNotActive
1161#
1162# Since: 0.14
1163#
1164# Example:
1165#
1166#     -> { "execute": "query-balloon" }
1167#     <- { "return": {
1168#              "actual": 1073741824
1169#           }
1170#        }
1171##
1172{ 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1173
1174##
1175# @BALLOON_CHANGE:
1176#
1177# Emitted when the guest changes the actual BALLOON level.  This value
1178# is equivalent to the @actual field return by the 'query-balloon'
1179# command
1180#
1181# @actual: the logical size of the VM in bytes Formula used:
1182#     logical_vm_size = vm_ram_size - balloon_size
1183#
1184# Note: this event is rate-limited.
1185#
1186# Since: 1.2
1187#
1188# Example:
1189#
1190#     <- { "event": "BALLOON_CHANGE",
1191#          "data": { "actual": 944766976 },
1192#          "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
1193##
1194{ 'event': 'BALLOON_CHANGE',
1195  'data': { 'actual': 'int' } }
1196
1197##
1198# @HvBalloonInfo:
1199#
1200# hv-balloon guest-provided memory status information.
1201#
1202# @committed: the amount of memory in use inside the guest plus the
1203#     amount of the memory unusable inside the guest (ballooned out,
1204#     offline, etc.)
1205#
1206# @available: the amount of the memory inside the guest available for
1207#     new allocations ("free")
1208#
1209# Since: 8.2
1210##
1211{ 'struct': 'HvBalloonInfo',
1212  'data': { 'committed': 'size', 'available': 'size' } }
1213
1214##
1215# @query-hv-balloon-status-report:
1216#
1217# Returns the hv-balloon driver data contained in the last received
1218# "STATUS" message from the guest.
1219#
1220# Returns:
1221#     @HvBalloonInfo
1222#
1223# Errors:
1224#     - If no hv-balloon device is present, guest memory status
1225#       reporting is not enabled or no guest memory status report
1226#       received yet, GenericError
1227#
1228# Since: 8.2
1229#
1230# Example:
1231#
1232#     -> { "execute": "query-hv-balloon-status-report" }
1233#     <- { "return": {
1234#              "committed": 816640000,
1235#              "available": 3333054464
1236#           }
1237#        }
1238##
1239{ 'command': 'query-hv-balloon-status-report', 'returns': 'HvBalloonInfo' }
1240
1241##
1242# @HV_BALLOON_STATUS_REPORT:
1243#
1244# Emitted when the hv-balloon driver receives a "STATUS" message from
1245# the guest.
1246#
1247# Note: this event is rate-limited.
1248#
1249# Since: 8.2
1250#
1251# Example:
1252#
1253#     <- { "event": "HV_BALLOON_STATUS_REPORT",
1254#          "data": { "committed": 816640000, "available": 3333054464 },
1255#          "timestamp": { "seconds": 1600295492, "microseconds": 661044 } }
1256##
1257{ 'event': 'HV_BALLOON_STATUS_REPORT',
1258  'data': 'HvBalloonInfo' }
1259
1260##
1261# @MemoryInfo:
1262#
1263# Actual memory information in bytes.
1264#
1265# @base-memory: size of "base" memory specified with command line
1266#     option -m.
1267#
1268# @plugged-memory: size of memory that can be hot-unplugged.  This
1269#     field is omitted if target doesn't support memory hotplug (i.e.
1270#     CONFIG_MEM_DEVICE not defined at build time).
1271#
1272# Since: 2.11
1273##
1274{ 'struct': 'MemoryInfo',
1275  'data'  : { 'base-memory': 'size', '*plugged-memory': 'size' } }
1276
1277##
1278# @query-memory-size-summary:
1279#
1280# Return the amount of initially allocated and present hotpluggable
1281# (if enabled) memory in bytes.
1282#
1283# Example:
1284#
1285#     -> { "execute": "query-memory-size-summary" }
1286#     <- { "return": { "base-memory": 4294967296, "plugged-memory": 0 } }
1287#
1288# Since: 2.11
1289##
1290{ 'command': 'query-memory-size-summary', 'returns': 'MemoryInfo' }
1291
1292##
1293# @PCDIMMDeviceInfo:
1294#
1295# PCDIMMDevice state information
1296#
1297# @id: device's ID
1298#
1299# @addr: physical address, where device is mapped
1300#
1301# @size: size of memory that the device provides
1302#
1303# @slot: slot number at which device is plugged in
1304#
1305# @node: NUMA node number where device is plugged in
1306#
1307# @memdev: memory backend linked with device
1308#
1309# @hotplugged: true if device was hotplugged
1310#
1311# @hotpluggable: true if device if could be added/removed while
1312#     machine is running
1313#
1314# Since: 2.1
1315##
1316{ 'struct': 'PCDIMMDeviceInfo',
1317  'data': { '*id': 'str',
1318            'addr': 'int',
1319            'size': 'int',
1320            'slot': 'int',
1321            'node': 'int',
1322            'memdev': 'str',
1323            'hotplugged': 'bool',
1324            'hotpluggable': 'bool'
1325          }
1326}
1327
1328##
1329# @VirtioPMEMDeviceInfo:
1330#
1331# VirtioPMEM state information
1332#
1333# @id: device's ID
1334#
1335# @memaddr: physical address in memory, where device is mapped
1336#
1337# @size: size of memory that the device provides
1338#
1339# @memdev: memory backend linked with device
1340#
1341# Since: 4.1
1342##
1343{ 'struct': 'VirtioPMEMDeviceInfo',
1344  'data': { '*id': 'str',
1345            'memaddr': 'size',
1346            'size': 'size',
1347            'memdev': 'str'
1348          }
1349}
1350
1351##
1352# @VirtioMEMDeviceInfo:
1353#
1354# VirtioMEMDevice state information
1355#
1356# @id: device's ID
1357#
1358# @memaddr: physical address in memory, where device is mapped
1359#
1360# @requested-size: the user requested size of the device
1361#
1362# @size: the (current) size of memory that the device provides
1363#
1364# @max-size: the maximum size of memory that the device can provide
1365#
1366# @block-size: the block size of memory that the device provides
1367#
1368# @node: NUMA node number where device is assigned to
1369#
1370# @memdev: memory backend linked with the region
1371#
1372# Since: 5.1
1373##
1374{ 'struct': 'VirtioMEMDeviceInfo',
1375  'data': { '*id': 'str',
1376            'memaddr': 'size',
1377            'requested-size': 'size',
1378            'size': 'size',
1379            'max-size': 'size',
1380            'block-size': 'size',
1381            'node': 'int',
1382            'memdev': 'str'
1383          }
1384}
1385
1386##
1387# @SgxEPCDeviceInfo:
1388#
1389# Sgx EPC state information
1390#
1391# @id: device's ID
1392#
1393# @memaddr: physical address in memory, where device is mapped
1394#
1395# @size: size of memory that the device provides
1396#
1397# @memdev: memory backend linked with device
1398#
1399# @node: the numa node (Since: 7.0)
1400#
1401# Since: 6.2
1402##
1403{ 'struct': 'SgxEPCDeviceInfo',
1404  'data': { '*id': 'str',
1405            'memaddr': 'size',
1406            'size': 'size',
1407            'node': 'int',
1408            'memdev': 'str'
1409          }
1410}
1411
1412##
1413# @HvBalloonDeviceInfo:
1414#
1415# hv-balloon provided memory state information
1416#
1417# @id: device's ID
1418#
1419# @memaddr: physical address in memory, where device is mapped
1420#
1421# @max-size: the maximum size of memory that the device can provide
1422#
1423# @memdev: memory backend linked with device
1424#
1425# Since: 8.2
1426##
1427{ 'struct': 'HvBalloonDeviceInfo',
1428  'data': { '*id': 'str',
1429            '*memaddr': 'size',
1430            'max-size': 'size',
1431            '*memdev': 'str'
1432          }
1433}
1434
1435##
1436# @MemoryDeviceInfoKind:
1437#
1438# @nvdimm: since 2.12
1439#
1440# @virtio-pmem: since 4.1
1441#
1442# @virtio-mem: since 5.1
1443#
1444# @sgx-epc: since 6.2.
1445#
1446# @hv-balloon: since 8.2.
1447#
1448# Since: 2.1
1449##
1450{ 'enum': 'MemoryDeviceInfoKind',
1451  'data': [ 'dimm', 'nvdimm', 'virtio-pmem', 'virtio-mem', 'sgx-epc',
1452            'hv-balloon' ] }
1453
1454##
1455# @PCDIMMDeviceInfoWrapper:
1456#
1457# @data: PCDIMMDevice state information
1458#
1459# Since: 2.1
1460##
1461{ 'struct': 'PCDIMMDeviceInfoWrapper',
1462  'data': { 'data': 'PCDIMMDeviceInfo' } }
1463
1464##
1465# @VirtioPMEMDeviceInfoWrapper:
1466#
1467# @data: VirtioPMEM state information
1468#
1469# Since: 2.1
1470##
1471{ 'struct': 'VirtioPMEMDeviceInfoWrapper',
1472  'data': { 'data': 'VirtioPMEMDeviceInfo' } }
1473
1474##
1475# @VirtioMEMDeviceInfoWrapper:
1476#
1477# @data: VirtioMEMDevice state information
1478#
1479# Since: 2.1
1480##
1481{ 'struct': 'VirtioMEMDeviceInfoWrapper',
1482  'data': { 'data': 'VirtioMEMDeviceInfo' } }
1483
1484##
1485# @SgxEPCDeviceInfoWrapper:
1486#
1487# @data: Sgx EPC state information
1488#
1489# Since: 6.2
1490##
1491{ 'struct': 'SgxEPCDeviceInfoWrapper',
1492  'data': { 'data': 'SgxEPCDeviceInfo' } }
1493
1494##
1495# @HvBalloonDeviceInfoWrapper:
1496#
1497# @data: hv-balloon provided memory state information
1498#
1499# Since: 8.2
1500##
1501{ 'struct': 'HvBalloonDeviceInfoWrapper',
1502  'data': { 'data': 'HvBalloonDeviceInfo' } }
1503
1504##
1505# @MemoryDeviceInfo:
1506#
1507# Union containing information about a memory device
1508#
1509# @type: memory device type
1510#
1511# Since: 2.1
1512##
1513{ 'union': 'MemoryDeviceInfo',
1514  'base': { 'type': 'MemoryDeviceInfoKind' },
1515  'discriminator': 'type',
1516  'data': { 'dimm': 'PCDIMMDeviceInfoWrapper',
1517            'nvdimm': 'PCDIMMDeviceInfoWrapper',
1518            'virtio-pmem': 'VirtioPMEMDeviceInfoWrapper',
1519            'virtio-mem': 'VirtioMEMDeviceInfoWrapper',
1520            'sgx-epc': 'SgxEPCDeviceInfoWrapper',
1521            'hv-balloon': 'HvBalloonDeviceInfoWrapper'
1522          }
1523}
1524
1525##
1526# @SgxEPC:
1527#
1528# Sgx EPC cmdline information
1529#
1530# @memdev: memory backend linked with device
1531#
1532# @node: the numa node (Since: 7.0)
1533#
1534# Since: 6.2
1535##
1536{ 'struct': 'SgxEPC',
1537  'data': { 'memdev': 'str',
1538            'node': 'int'
1539          }
1540}
1541
1542##
1543# @SgxEPCProperties:
1544#
1545# SGX properties of machine types.
1546#
1547# @sgx-epc: list of ids of memory-backend-epc objects.
1548#
1549# Since: 6.2
1550##
1551{ 'struct': 'SgxEPCProperties',
1552  'data': { 'sgx-epc': ['SgxEPC'] }
1553}
1554
1555##
1556# @query-memory-devices:
1557#
1558# Lists available memory devices and their state
1559#
1560# Since: 2.1
1561#
1562# Example:
1563#
1564#     -> { "execute": "query-memory-devices" }
1565#     <- { "return": [ { "data":
1566#                           { "addr": 5368709120,
1567#                             "hotpluggable": true,
1568#                             "hotplugged": true,
1569#                             "id": "d1",
1570#                             "memdev": "/objects/memX",
1571#                             "node": 0,
1572#                             "size": 1073741824,
1573#                             "slot": 0},
1574#                        "type": "dimm"
1575#                      } ] }
1576##
1577{ 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
1578
1579##
1580# @MEMORY_DEVICE_SIZE_CHANGE:
1581#
1582# Emitted when the size of a memory device changes.  Only emitted for
1583# memory devices that can actually change the size (e.g., virtio-mem
1584# due to guest action).
1585#
1586# @id: device's ID
1587#
1588# @size: the new size of memory that the device provides
1589#
1590# @qom-path: path to the device object in the QOM tree (since 6.2)
1591#
1592# Note: this event is rate-limited.
1593#
1594# Since: 5.1
1595#
1596# Example:
1597#
1598#     <- { "event": "MEMORY_DEVICE_SIZE_CHANGE",
1599#          "data": { "id": "vm0", "size": 1073741824,
1600#                    "qom-path": "/machine/unattached/device[2]" },
1601#          "timestamp": { "seconds": 1588168529, "microseconds": 201316 } }
1602##
1603{ 'event': 'MEMORY_DEVICE_SIZE_CHANGE',
1604  'data': { '*id': 'str', 'size': 'size', 'qom-path' : 'str'} }
1605
1606##
1607# @MEM_UNPLUG_ERROR:
1608#
1609# Emitted when memory hot unplug error occurs.
1610#
1611# @device: device name
1612#
1613# @msg: Informative message
1614#
1615# Features:
1616#
1617# @deprecated: This event is deprecated.  Use
1618#     @DEVICE_UNPLUG_GUEST_ERROR instead.
1619#
1620# Since: 2.4
1621#
1622# Example:
1623#
1624#     <- { "event": "MEM_UNPLUG_ERROR",
1625#          "data": { "device": "dimm1",
1626#                    "msg": "acpi: device unplug for unsupported device"
1627#          },
1628#          "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
1629##
1630{ 'event': 'MEM_UNPLUG_ERROR',
1631  'data': { 'device': 'str', 'msg': 'str' },
1632  'features': ['deprecated'] }
1633
1634##
1635# @BootConfiguration:
1636#
1637# Schema for virtual machine boot configuration.
1638#
1639# @order: Boot order (a=floppy, c=hard disk, d=CD-ROM, n=network)
1640#
1641# @once: Boot order to apply on first boot
1642#
1643# @menu: Whether to show a boot menu
1644#
1645# @splash: The name of the file to be passed to the firmware as logo
1646#     picture, if @menu is true.
1647#
1648# @splash-time: How long to show the logo picture, in milliseconds
1649#
1650# @reboot-timeout: Timeout before guest reboots after boot fails
1651#
1652# @strict: Whether to attempt booting from devices not included in the
1653#     boot order
1654#
1655# Since: 7.1
1656##
1657{ 'struct': 'BootConfiguration', 'data': {
1658     '*order': 'str',
1659     '*once': 'str',
1660     '*menu': 'bool',
1661     '*splash': 'str',
1662     '*splash-time': 'int',
1663     '*reboot-timeout': 'int',
1664     '*strict': 'bool' } }
1665
1666##
1667# @SMPConfiguration:
1668#
1669# Schema for CPU topology configuration.  A missing value lets QEMU
1670# figure out a suitable value based on the ones that are provided.
1671#
1672# The members other than @cpus and @maxcpus define a topology of
1673# containers.
1674#
1675# The ordering from highest/coarsest to lowest/finest is:
1676# @drawers, @books, @sockets, @dies, @clusters, @cores, @threads.
1677#
1678# Different architectures support different subsets of topology
1679# containers.
1680#
1681# For example, s390x does not have clusters and dies, and the socket
1682# is the parent container of cores.
1683#
1684# @cpus: number of virtual CPUs in the virtual machine
1685#
1686# @maxcpus: maximum number of hotpluggable virtual CPUs in the virtual
1687#     machine
1688#
1689# @drawers: number of drawers in the CPU topology (since 8.2)
1690#
1691# @books: number of books in the CPU topology (since 8.2)
1692#
1693# @sockets: number of sockets per parent container
1694#
1695# @dies: number of dies per parent container
1696#
1697# @clusters: number of clusters per parent container (since 7.0)
1698#
1699# @cores: number of cores per parent container
1700#
1701# @threads: number of threads per core
1702#
1703# Since: 6.1
1704##
1705{ 'struct': 'SMPConfiguration', 'data': {
1706     '*cpus': 'int',
1707     '*drawers': 'int',
1708     '*books': 'int',
1709     '*sockets': 'int',
1710     '*dies': 'int',
1711     '*clusters': 'int',
1712     '*cores': 'int',
1713     '*threads': 'int',
1714     '*maxcpus': 'int' } }
1715
1716##
1717# @x-query-irq:
1718#
1719# Query interrupt statistics
1720#
1721# Features:
1722#
1723# @unstable: This command is meant for debugging.
1724#
1725# Returns: interrupt statistics
1726#
1727# Since: 6.2
1728##
1729{ 'command': 'x-query-irq',
1730  'returns': 'HumanReadableText',
1731  'features': [ 'unstable' ] }
1732
1733##
1734# @x-query-jit:
1735#
1736# Query TCG compiler statistics
1737#
1738# Features:
1739#
1740# @unstable: This command is meant for debugging.
1741#
1742# Returns: TCG compiler statistics
1743#
1744# Since: 6.2
1745##
1746{ 'command': 'x-query-jit',
1747  'returns': 'HumanReadableText',
1748  'if': 'CONFIG_TCG',
1749  'features': [ 'unstable' ] }
1750
1751##
1752# @x-query-numa:
1753#
1754# Query NUMA topology information
1755#
1756# Features:
1757#
1758# @unstable: This command is meant for debugging.
1759#
1760# Returns: topology information
1761#
1762# Since: 6.2
1763##
1764{ 'command': 'x-query-numa',
1765  'returns': 'HumanReadableText',
1766  'features': [ 'unstable' ] }
1767
1768##
1769# @x-query-opcount:
1770#
1771# Query TCG opcode counters
1772#
1773# Features:
1774#
1775# @unstable: This command is meant for debugging.
1776#
1777# Returns: TCG opcode counters
1778#
1779# Since: 6.2
1780##
1781{ 'command': 'x-query-opcount',
1782  'returns': 'HumanReadableText',
1783  'if': 'CONFIG_TCG',
1784  'features': [ 'unstable' ] }
1785
1786##
1787# @x-query-ramblock:
1788#
1789# Query system ramblock information
1790#
1791# Features:
1792#
1793# @unstable: This command is meant for debugging.
1794#
1795# Returns: system ramblock information
1796#
1797# Since: 6.2
1798##
1799{ 'command': 'x-query-ramblock',
1800  'returns': 'HumanReadableText',
1801  'features': [ 'unstable' ] }
1802
1803##
1804# @x-query-roms:
1805#
1806# Query information on the registered ROMS
1807#
1808# Features:
1809#
1810# @unstable: This command is meant for debugging.
1811#
1812# Returns: registered ROMs
1813#
1814# Since: 6.2
1815##
1816{ 'command': 'x-query-roms',
1817  'returns': 'HumanReadableText',
1818  'features': [ 'unstable' ] }
1819
1820##
1821# @x-query-usb:
1822#
1823# Query information on the USB devices
1824#
1825# Features:
1826#
1827# @unstable: This command is meant for debugging.
1828#
1829# Returns: USB device information
1830#
1831# Since: 6.2
1832##
1833{ 'command': 'x-query-usb',
1834  'returns': 'HumanReadableText',
1835  'features': [ 'unstable' ] }
1836
1837##
1838# @SmbiosEntryPointType:
1839#
1840# @32: SMBIOS version 2.1 (32-bit) Entry Point
1841#
1842# @64: SMBIOS version 3.0 (64-bit) Entry Point
1843#
1844# @auto: Either 2.x or 3.x SMBIOS version, 2.x if configuration can be
1845#     described by it and 3.x otherwise (since: 9.0)
1846#
1847# Since: 7.0
1848##
1849{ 'enum': 'SmbiosEntryPointType',
1850  'data': [ '32', '64', 'auto' ] }
1851
1852##
1853# @MemorySizeConfiguration:
1854#
1855# Schema for memory size configuration.
1856#
1857# @size: memory size in bytes
1858#
1859# @max-size: maximum hotpluggable memory size in bytes
1860#
1861# @slots: number of available memory slots for hotplug
1862#
1863# Since: 7.1
1864##
1865{ 'struct': 'MemorySizeConfiguration', 'data': {
1866     '*size': 'size',
1867     '*max-size': 'size',
1868     '*slots': 'uint64' } }
1869
1870##
1871# @dumpdtb:
1872#
1873# Save the FDT in dtb format.
1874#
1875# @filename: name of the dtb file to be created
1876#
1877# Since: 7.2
1878#
1879# Example:
1880#
1881#     -> { "execute": "dumpdtb" }
1882#          "arguments": { "filename": "fdt.dtb" } }
1883#     <- { "return": {} }
1884##
1885{ 'command': 'dumpdtb',
1886  'data': { 'filename': 'str' },
1887  'if': 'CONFIG_FDT' }
1888