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