]> Git Repo - qemu.git/blame - qapi/misc.json
qapi: Split qom.json and qdev.json off misc.json
[qemu.git] / qapi / misc.json
CommitLineData
112ed241
MA
1# -*- Mode: Python -*-
2#
3
4##
5# = Miscellanea
6##
7
b47aa7b3
LE
8{ 'include': 'common.json' }
9
112ed241
MA
10##
11# @qmp_capabilities:
12#
13# Enable QMP capabilities.
14#
02130314
PX
15# Arguments:
16#
17# @enable: An optional list of QMPCapability values to enable. The
18# client must not enable any capability that is not
19# mentioned in the QMP greeting message. If the field is not
20# provided, it means no QMP capabilities will be enabled.
21# (since 2.12)
112ed241
MA
22#
23# Example:
24#
02130314
PX
25# -> { "execute": "qmp_capabilities",
26# "arguments": { "enable": [ "oob" ] } }
112ed241
MA
27# <- { "return": {} }
28#
29# Notes: This command is valid exactly when first connecting: it must be
30# issued before any other command will be accepted, and will fail once the
31# monitor is accepting other commands. (see qemu docs/interop/qmp-spec.txt)
32#
02130314
PX
33# The QMP client needs to explicitly enable QMP capabilities, otherwise
34# all the QMP capabilities will be turned off by default.
35#
112ed241
MA
36# Since: 0.13
37#
38##
02130314 39{ 'command': 'qmp_capabilities',
d6fe3d02
IM
40 'data': { '*enable': [ 'QMPCapability' ] },
41 'allow-preconfig': true }
02130314
PX
42
43##
44# @QMPCapability:
45#
46# Enumeration of capabilities to be advertised during initial client
47# connection, used for agreeing on particular QMP extension behaviors.
48#
c0698212 49# @oob: QMP ability to support out-of-band requests.
02130314
PX
50# (Please refer to qmp-spec.txt for more information on OOB)
51#
52# Since: 2.12
53#
54##
55{ 'enum': 'QMPCapability',
56 'data': [ 'oob' ] }
112ed241
MA
57
58##
59# @VersionTriple:
60#
61# A three-part version number.
62#
63# @major: The major version number.
64#
65# @minor: The minor version number.
66#
67# @micro: The micro version number.
68#
69# Since: 2.4
70##
71{ 'struct': 'VersionTriple',
72 'data': {'major': 'int', 'minor': 'int', 'micro': 'int'} }
73
74
75##
76# @VersionInfo:
77#
78# A description of QEMU's version.
79#
80# @qemu: The version of QEMU. By current convention, a micro
81# version of 50 signifies a development branch. A micro version
82# greater than or equal to 90 signifies a release candidate for
83# the next minor version. A micro version of less than 50
84# signifies a stable release.
85#
86# @package: QEMU will always set this field to an empty string. Downstream
87# versions of QEMU should set this to a non-empty string. The
88# exact format depends on the downstream however it highly
89# recommended that a unique name is used.
90#
91# Since: 0.14.0
92##
93{ 'struct': 'VersionInfo',
94 'data': {'qemu': 'VersionTriple', 'package': 'str'} }
95
96##
97# @query-version:
98#
99# Returns the current version of QEMU.
100#
101# Returns: A @VersionInfo object describing the current version of QEMU.
102#
103# Since: 0.14.0
104#
105# Example:
106#
107# -> { "execute": "query-version" }
108# <- {
109# "return":{
110# "qemu":{
111# "major":0,
112# "minor":11,
113# "micro":5
114# },
115# "package":""
116# }
117# }
118#
119##
a87706c8
IM
120{ 'command': 'query-version', 'returns': 'VersionInfo',
121 'allow-preconfig': true }
112ed241
MA
122
123##
124# @CommandInfo:
125#
126# Information about a QMP command
127#
128# @name: The command name
129#
130# Since: 0.14.0
131##
132{ 'struct': 'CommandInfo', 'data': {'name': 'str'} }
133
134##
135# @query-commands:
136#
137# Return a list of supported QMP commands by this server
138#
139# Returns: A list of @CommandInfo for all supported commands
140#
141# Since: 0.14.0
142#
143# Example:
144#
145# -> { "execute": "query-commands" }
146# <- {
147# "return":[
148# {
149# "name":"query-balloon"
150# },
151# {
152# "name":"system_powerdown"
153# }
154# ]
155# }
156#
157# Note: This example has been shortened as the real response is too long.
158#
159##
d6fe3d02
IM
160{ 'command': 'query-commands', 'returns': ['CommandInfo'],
161 'allow-preconfig': true }
112ed241
MA
162
163##
164# @LostTickPolicy:
165#
166# Policy for handling lost ticks in timer devices.
167#
168# @discard: throw away the missed tick(s) and continue with future injection
169# normally. Guest time may be delayed, unless the OS has explicit
170# handling of lost ticks
171#
172# @delay: continue to deliver ticks at the normal rate. Guest time will be
173# delayed due to the late tick
174#
112ed241
MA
175# @slew: deliver ticks at a higher rate to catch up with the missed tick. The
176# guest time should not be delayed once catchup is complete.
177#
178# Since: 2.0
179##
180{ 'enum': 'LostTickPolicy',
4d209102 181 'data': ['discard', 'delay', 'slew' ] }
112ed241
MA
182
183##
184# @add_client:
185#
186# Allow client connections for VNC, Spice and socket based
187# character devices to be passed in to QEMU via SCM_RIGHTS.
188#
189# @protocol: protocol name. Valid names are "vnc", "spice" or the
190# name of a character device (eg. from -chardev id=XXXX)
191#
192# @fdname: file descriptor name previously passed via 'getfd' command
193#
194# @skipauth: whether to skip authentication. Only applies
195# to "vnc" and "spice" protocols
196#
197# @tls: whether to perform TLS. Only applies to the "spice"
198# protocol
199#
200# Returns: nothing on success.
201#
202# Since: 0.14.0
203#
204# Example:
205#
206# -> { "execute": "add_client", "arguments": { "protocol": "vnc",
207# "fdname": "myclient" } }
208# <- { "return": {} }
209#
210##
211{ 'command': 'add_client',
212 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
213 '*tls': 'bool' } }
214
215##
216# @NameInfo:
217#
218# Guest name information.
219#
220# @name: The name of the guest
221#
222# Since: 0.14.0
223##
224{ 'struct': 'NameInfo', 'data': {'*name': 'str'} }
225
226##
227# @query-name:
228#
229# Return the name information of a guest.
230#
231# Returns: @NameInfo of the guest
232#
233# Since: 0.14.0
234#
235# Example:
236#
237# -> { "execute": "query-name" }
238# <- { "return": { "name": "qemu-name" } }
239#
240##
a87706c8 241{ 'command': 'query-name', 'returns': 'NameInfo', 'allow-preconfig': true }
112ed241
MA
242
243##
244# @KvmInfo:
245#
246# Information about support for KVM acceleration
247#
248# @enabled: true if KVM acceleration is active
249#
250# @present: true if KVM acceleration is built into this executable
251#
252# Since: 0.14.0
253##
254{ 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
255
256##
257# @query-kvm:
258#
259# Returns information about KVM acceleration
260#
261# Returns: @KvmInfo
262#
263# Since: 0.14.0
264#
265# Example:
266#
267# -> { "execute": "query-kvm" }
268# <- { "return": { "enabled": true, "present": true } }
269#
270##
271{ 'command': 'query-kvm', 'returns': 'KvmInfo' }
272
273##
274# @UuidInfo:
275#
276# Guest UUID information (Universally Unique Identifier).
277#
278# @UUID: the UUID of the guest
279#
280# Since: 0.14.0
281#
282# Notes: If no UUID was specified for the guest, a null UUID is returned.
283##
284{ 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
285
286##
287# @query-uuid:
288#
289# Query the guest UUID information.
290#
291# Returns: The @UuidInfo for the guest
292#
293# Since: 0.14.0
294#
295# Example:
296#
297# -> { "execute": "query-uuid" }
298# <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
299#
300##
a87706c8 301{ 'command': 'query-uuid', 'returns': 'UuidInfo', 'allow-preconfig': true }
112ed241
MA
302
303##
304# @EventInfo:
305#
306# Information about a QMP event
307#
308# @name: The event name
309#
310# Since: 1.2.0
311##
312{ 'struct': 'EventInfo', 'data': {'name': 'str'} }
313
314##
315# @query-events:
316#
9d7b7086 317# Return information on QMP events.
112ed241 318#
9d7b7086 319# Returns: A list of @EventInfo.
112ed241
MA
320#
321# Since: 1.2.0
322#
9d7b7086
MA
323# Note: This command is deprecated, because its output doesn't reflect
324# compile-time configuration. Use query-qmp-schema instead.
325#
112ed241
MA
326# Example:
327#
328# -> { "execute": "query-events" }
329# <- {
330# "return": [
331# {
332# "name":"SHUTDOWN"
333# },
334# {
335# "name":"RESET"
336# }
337# ]
338# }
339#
340# Note: This example has been shortened as the real response is too long.
341#
342##
343{ 'command': 'query-events', 'returns': ['EventInfo'] }
344
345##
346# @CpuInfoArch:
347#
348# An enumeration of cpu types that enable additional information during
349# @query-cpus and @query-cpus-fast.
350#
351# @s390: since 2.12
352#
25fa194b
MC
353# @riscv: since 2.12
354#
112ed241
MA
355# Since: 2.6
356##
357{ 'enum': 'CpuInfoArch',
25fa194b 358 'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 's390', 'riscv', 'other' ] }
112ed241
MA
359
360##
361# @CpuInfo:
362#
363# Information about a virtual CPU
364#
365# @CPU: the index of the virtual CPU
366#
367# @current: this only exists for backwards compatibility and should be ignored
368#
369# @halted: true if the virtual CPU is in the halt state. Halt usually refers
370# to a processor specific low power mode.
371#
372# @qom_path: path to the CPU object in the QOM tree (since 2.4)
373#
374# @thread_id: ID of the underlying host thread
375#
376# @props: properties describing to which node/socket/core/thread
377# virtual CPU belongs to, provided if supported by board (since 2.10)
378#
379# @arch: architecture of the cpu, which determines which additional fields
380# will be listed (since 2.6)
381#
382# Since: 0.14.0
383#
384# Notes: @halted is a transient state that changes frequently. By the time the
385# data is sent to the client, the guest may no longer be halted.
386##
387{ 'union': 'CpuInfo',
388 'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool',
389 'qom_path': 'str', 'thread_id': 'int',
390 '*props': 'CpuInstanceProperties', 'arch': 'CpuInfoArch' },
391 'discriminator': 'arch',
392 'data': { 'x86': 'CpuInfoX86',
393 'sparc': 'CpuInfoSPARC',
394 'ppc': 'CpuInfoPPC',
395 'mips': 'CpuInfoMIPS',
396 'tricore': 'CpuInfoTricore',
397 's390': 'CpuInfoS390',
29cd0403 398 'riscv': 'CpuInfoRISCV' } }
112ed241
MA
399
400##
401# @CpuInfoX86:
402#
403# Additional information about a virtual i386 or x86_64 CPU
404#
405# @pc: the 64-bit instruction pointer
406#
407# Since: 2.6
408##
409{ 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } }
410
411##
412# @CpuInfoSPARC:
413#
414# Additional information about a virtual SPARC CPU
415#
416# @pc: the PC component of the instruction pointer
417#
418# @npc: the NPC component of the instruction pointer
419#
420# Since: 2.6
421##
422{ 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } }
423
424##
425# @CpuInfoPPC:
426#
427# Additional information about a virtual PPC CPU
428#
429# @nip: the instruction pointer
430#
431# Since: 2.6
432##
433{ 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } }
434
435##
436# @CpuInfoMIPS:
437#
438# Additional information about a virtual MIPS CPU
439#
440# @PC: the instruction pointer
441#
442# Since: 2.6
443##
444{ 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } }
445
446##
447# @CpuInfoTricore:
448#
449# Additional information about a virtual Tricore CPU
450#
451# @PC: the instruction pointer
452#
453# Since: 2.6
454##
455{ 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } }
456
25fa194b
MC
457##
458# @CpuInfoRISCV:
459#
460# Additional information about a virtual RISCV CPU
461#
462# @pc: the instruction pointer
463#
464# Since 2.12
465##
466{ 'struct': 'CpuInfoRISCV', 'data': { 'pc': 'int' } }
467
112ed241
MA
468##
469# @CpuS390State:
470#
471# An enumeration of cpu states that can be assumed by a virtual
472# S390 CPU
473#
474# Since: 2.12
475##
476{ 'enum': 'CpuS390State',
477 'prefix': 'S390_CPU_STATE',
478 'data': [ 'uninitialized', 'stopped', 'check-stop', 'operating', 'load' ] }
479
480##
481# @CpuInfoS390:
482#
483# Additional information about a virtual S390 CPU
484#
485# @cpu-state: the virtual CPU's state
486#
487# Since: 2.12
488##
489{ 'struct': 'CpuInfoS390', 'data': { 'cpu-state': 'CpuS390State' } }
490
491##
492# @query-cpus:
493#
494# Returns a list of information about each virtual CPU.
495#
496# This command causes vCPU threads to exit to userspace, which causes
497# a small interruption to guest CPU execution. This will have a negative
498# impact on realtime guests and other latency sensitive guest workloads.
499# It is recommended to use @query-cpus-fast instead of this command to
500# avoid the vCPU interruption.
501#
502# Returns: a list of @CpuInfo for each virtual CPU
503#
504# Since: 0.14.0
505#
506# Example:
507#
508# -> { "execute": "query-cpus" }
509# <- { "return": [
510# {
511# "CPU":0,
512# "current":true,
513# "halted":false,
514# "qom_path":"/machine/unattached/device[0]",
515# "arch":"x86",
516# "pc":3227107138,
517# "thread_id":3134
518# },
519# {
520# "CPU":1,
521# "current":false,
522# "halted":true,
523# "qom_path":"/machine/unattached/device[2]",
524# "arch":"x86",
525# "pc":7108165,
526# "thread_id":3135
527# }
528# ]
529# }
530#
531# Notes: This interface is deprecated (since 2.12.0), and it is strongly
532# recommended that you avoid using it. Use @query-cpus-fast to
533# obtain information about virtual CPUs.
534#
535##
536{ 'command': 'query-cpus', 'returns': ['CpuInfo'] }
537
538##
539# @CpuInfoFast:
540#
541# Information about a virtual CPU
542#
543# @cpu-index: index of the virtual CPU
544#
545# @qom-path: path to the CPU object in the QOM tree
546#
547# @thread-id: ID of the underlying host thread
548#
549# @props: properties describing to which node/socket/core/thread
550# virtual CPU belongs to, provided if supported by board
551#
51f63ec7 552# @arch: base architecture of the cpu; deprecated since 3.0.0 in favor
6ffa3ab4 553# of @target
daa9d2bc 554#
6ffa3ab4 555# @target: the QEMU system emulation target, which determines which
51f63ec7 556# additional fields will be listed (since 3.0)
112ed241
MA
557#
558# Since: 2.12
559#
560##
daa9d2bc
LE
561{ 'union' : 'CpuInfoFast',
562 'base' : { 'cpu-index' : 'int',
563 'qom-path' : 'str',
564 'thread-id' : 'int',
565 '*props' : 'CpuInstanceProperties',
566 'arch' : 'CpuInfoArch',
567 'target' : 'SysEmuTarget' },
568 'discriminator' : 'target',
29cd0403 569 'data' : { 's390x' : 'CpuInfoS390' } }
112ed241
MA
570
571##
572# @query-cpus-fast:
573#
574# Returns information about all virtual CPUs. This command does not
575# incur a performance penalty and should be used in production
576# instead of query-cpus.
577#
578# Returns: list of @CpuInfoFast
579#
580# Since: 2.12
581#
582# Example:
583#
584# -> { "execute": "query-cpus-fast" }
585# <- { "return": [
586# {
587# "thread-id": 25627,
588# "props": {
589# "core-id": 0,
590# "thread-id": 0,
591# "socket-id": 0
592# },
593# "qom-path": "/machine/unattached/device[0]",
594# "arch":"x86",
daa9d2bc 595# "target":"x86_64",
112ed241
MA
596# "cpu-index": 0
597# },
598# {
599# "thread-id": 25628,
600# "props": {
601# "core-id": 0,
602# "thread-id": 0,
603# "socket-id": 1
604# },
605# "qom-path": "/machine/unattached/device[2]",
606# "arch":"x86",
daa9d2bc 607# "target":"x86_64",
112ed241
MA
608# "cpu-index": 1
609# }
610# ]
611# }
612##
613{ 'command': 'query-cpus-fast', 'returns': [ 'CpuInfoFast' ] }
614
615##
616# @IOThreadInfo:
617#
618# Information about an iothread
619#
620# @id: the identifier of the iothread
621#
622# @thread-id: ID of the underlying host thread
623#
624# @poll-max-ns: maximum polling time in ns, 0 means polling is disabled
625# (since 2.9)
626#
627# @poll-grow: how many ns will be added to polling time, 0 means that it's not
628# configured (since 2.9)
629#
630# @poll-shrink: how many ns will be removed from polling time, 0 means that
631# it's not configured (since 2.9)
632#
633# Since: 2.0
634##
635{ 'struct': 'IOThreadInfo',
636 'data': {'id': 'str',
637 'thread-id': 'int',
638 'poll-max-ns': 'int',
639 'poll-grow': 'int',
640 'poll-shrink': 'int' } }
641
642##
643# @query-iothreads:
644#
645# Returns a list of information about each iothread.
646#
647# Note: this list excludes the QEMU main loop thread, which is not declared
648# using the -object iothread command-line option. It is always the main thread
649# of the process.
650#
651# Returns: a list of @IOThreadInfo for each iothread
652#
653# Since: 2.0
654#
655# Example:
656#
657# -> { "execute": "query-iothreads" }
658# <- { "return": [
659# {
660# "id":"iothread0",
661# "thread-id":3134
662# },
663# {
664# "id":"iothread1",
665# "thread-id":3135
666# }
667# ]
668# }
669#
670##
a87706c8
IM
671{ 'command': 'query-iothreads', 'returns': ['IOThreadInfo'],
672 'allow-preconfig': true }
112ed241
MA
673
674##
675# @BalloonInfo:
676#
677# Information about the guest balloon device.
678#
679# @actual: the number of bytes the balloon currently contains
680#
681# Since: 0.14.0
682#
683##
684{ 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
685
686##
687# @query-balloon:
688#
689# Return information about the balloon device.
690#
691# Returns: @BalloonInfo on success
692#
693# If the balloon driver is enabled but not functional because the KVM
694# kernel module cannot support it, KvmMissingCap
695#
696# If no balloon device is present, DeviceNotActive
697#
698# Since: 0.14.0
699#
700# Example:
701#
702# -> { "execute": "query-balloon" }
703# <- { "return": {
704# "actual": 1073741824,
705# }
706# }
707#
708##
709{ 'command': 'query-balloon', 'returns': 'BalloonInfo' }
710
711##
712# @BALLOON_CHANGE:
713#
714# Emitted when the guest changes the actual BALLOON level. This value is
715# equivalent to the @actual field return by the 'query-balloon' command
716#
717# @actual: actual level of the guest memory balloon in bytes
718#
719# Note: this event is rate-limited.
720#
721# Since: 1.2
722#
723# Example:
724#
725# <- { "event": "BALLOON_CHANGE",
726# "data": { "actual": 944766976 },
727# "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
728#
729##
730{ 'event': 'BALLOON_CHANGE',
731 'data': { 'actual': 'int' } }
732
733##
734# @PciMemoryRange:
735#
736# A PCI device memory region
737#
738# @base: the starting address (guest physical)
739#
740# @limit: the ending address (guest physical)
741#
742# Since: 0.14.0
743##
744{ 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
745
746##
747# @PciMemoryRegion:
748#
749# Information about a PCI device I/O region.
750#
751# @bar: the index of the Base Address Register for this region
752#
753# @type: 'io' if the region is a PIO region
754# 'memory' if the region is a MMIO region
755#
756# @size: memory size
757#
758# @prefetch: if @type is 'memory', true if the memory is prefetchable
759#
760# @mem_type_64: if @type is 'memory', true if the BAR is 64-bit
761#
762# Since: 0.14.0
763##
764{ 'struct': 'PciMemoryRegion',
765 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
766 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
767
768##
769# @PciBusInfo:
770#
771# Information about a bus of a PCI Bridge device
772#
773# @number: primary bus interface number. This should be the number of the
774# bus the device resides on.
775#
776# @secondary: secondary bus interface number. This is the number of the
777# main bus for the bridge
778#
779# @subordinate: This is the highest number bus that resides below the
780# bridge.
781#
782# @io_range: The PIO range for all devices on this bridge
783#
784# @memory_range: The MMIO range for all devices on this bridge
785#
786# @prefetchable_range: The range of prefetchable MMIO for all devices on
787# this bridge
788#
789# Since: 2.4
790##
791{ 'struct': 'PciBusInfo',
792 'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
793 'io_range': 'PciMemoryRange',
794 'memory_range': 'PciMemoryRange',
795 'prefetchable_range': 'PciMemoryRange' } }
796
797##
798# @PciBridgeInfo:
799#
800# Information about a PCI Bridge device
801#
802# @bus: information about the bus the device resides on
803#
804# @devices: a list of @PciDeviceInfo for each device on this bridge
805#
806# Since: 0.14.0
807##
808{ 'struct': 'PciBridgeInfo',
809 'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
810
811##
812# @PciDeviceClass:
813#
814# Information about the Class of a PCI device
815#
816# @desc: a string description of the device's class
817#
818# @class: the class code of the device
819#
820# Since: 2.4
821##
822{ 'struct': 'PciDeviceClass',
823 'data': {'*desc': 'str', 'class': 'int'} }
824
825##
826# @PciDeviceId:
827#
828# Information about the Id of a PCI device
829#
830# @device: the PCI device id
831#
832# @vendor: the PCI vendor id
833#
5383a705
DL
834# @subsystem: the PCI subsystem id (since 3.1)
835#
836# @subsystem-vendor: the PCI subsystem vendor id (since 3.1)
837#
112ed241
MA
838# Since: 2.4
839##
840{ 'struct': 'PciDeviceId',
18613dc6
DL
841 'data': {'device': 'int', 'vendor': 'int', '*subsystem': 'int',
842 '*subsystem-vendor': 'int'} }
112ed241
MA
843
844##
845# @PciDeviceInfo:
846#
847# Information about a PCI device
848#
849# @bus: the bus number of the device
850#
851# @slot: the slot the device is located in
852#
853# @function: the function of the slot used by the device
854#
855# @class_info: the class of the device
856#
857# @id: the PCI device id
858#
859# @irq: if an IRQ is assigned to the device, the IRQ number
860#
861# @qdev_id: the device name of the PCI device
862#
863# @pci_bridge: if the device is a PCI bridge, the bridge information
864#
865# @regions: a list of the PCI I/O regions associated with the device
866#
867# Notes: the contents of @class_info.desc are not stable and should only be
868# treated as informational.
869#
870# Since: 0.14.0
871##
872{ 'struct': 'PciDeviceInfo',
873 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
874 'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
875 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
876 'regions': ['PciMemoryRegion']} }
877
878##
879# @PciInfo:
880#
881# Information about a PCI bus
882#
883# @bus: the bus index
884#
885# @devices: a list of devices on this bus
886#
887# Since: 0.14.0
888##
889{ 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
890
891##
892# @query-pci:
893#
894# Return information about the PCI bus topology of the guest.
895#
896# Returns: a list of @PciInfo for each PCI bus. Each bus is
897# represented by a json-object, which has a key with a json-array of
898# all PCI devices attached to it. Each device is represented by a
899# json-object.
900#
901# Since: 0.14.0
902#
903# Example:
904#
905# -> { "execute": "query-pci" }
906# <- { "return": [
907# {
908# "bus": 0,
909# "devices": [
910# {
911# "bus": 0,
912# "qdev_id": "",
913# "slot": 0,
914# "class_info": {
915# "class": 1536,
916# "desc": "Host bridge"
917# },
918# "id": {
919# "device": 32902,
920# "vendor": 4663
921# },
922# "function": 0,
923# "regions": [
924# ]
925# },
926# {
927# "bus": 0,
928# "qdev_id": "",
929# "slot": 1,
930# "class_info": {
931# "class": 1537,
932# "desc": "ISA bridge"
933# },
934# "id": {
935# "device": 32902,
936# "vendor": 28672
937# },
938# "function": 0,
939# "regions": [
940# ]
941# },
942# {
943# "bus": 0,
944# "qdev_id": "",
945# "slot": 1,
946# "class_info": {
947# "class": 257,
948# "desc": "IDE controller"
949# },
950# "id": {
951# "device": 32902,
952# "vendor": 28688
953# },
954# "function": 1,
955# "regions": [
956# {
957# "bar": 4,
958# "size": 16,
959# "address": 49152,
960# "type": "io"
961# }
962# ]
963# },
964# {
965# "bus": 0,
966# "qdev_id": "",
967# "slot": 2,
968# "class_info": {
969# "class": 768,
970# "desc": "VGA controller"
971# },
972# "id": {
973# "device": 4115,
974# "vendor": 184
975# },
976# "function": 0,
977# "regions": [
978# {
979# "prefetch": true,
980# "mem_type_64": false,
981# "bar": 0,
982# "size": 33554432,
983# "address": 4026531840,
984# "type": "memory"
985# },
986# {
987# "prefetch": false,
988# "mem_type_64": false,
989# "bar": 1,
990# "size": 4096,
991# "address": 4060086272,
992# "type": "memory"
993# },
994# {
995# "prefetch": false,
996# "mem_type_64": false,
997# "bar": 6,
998# "size": 65536,
999# "address": -1,
1000# "type": "memory"
1001# }
1002# ]
1003# },
1004# {
1005# "bus": 0,
1006# "qdev_id": "",
1007# "irq": 11,
1008# "slot": 4,
1009# "class_info": {
1010# "class": 1280,
1011# "desc": "RAM controller"
1012# },
1013# "id": {
1014# "device": 6900,
1015# "vendor": 4098
1016# },
1017# "function": 0,
1018# "regions": [
1019# {
1020# "bar": 0,
1021# "size": 32,
1022# "address": 49280,
1023# "type": "io"
1024# }
1025# ]
1026# }
1027# ]
1028# }
1029# ]
1030# }
1031#
1032# Note: This example has been shortened as the real response is too long.
1033#
1034##
1035{ 'command': 'query-pci', 'returns': ['PciInfo'] }
1036
1037##
1038# @quit:
1039#
1040# This command will cause the QEMU process to exit gracefully. While every
1041# attempt is made to send the QMP response before terminating, this is not
1042# guaranteed. When using this interface, a premature EOF would not be
1043# unexpected.
1044#
1045# Since: 0.14.0
1046#
1047# Example:
1048#
1049# -> { "execute": "quit" }
1050# <- { "return": {} }
1051##
1052{ 'command': 'quit' }
1053
1054##
1055# @stop:
1056#
1057# Stop all guest VCPU execution.
1058#
1059# Since: 0.14.0
1060#
1061# Notes: This function will succeed even if the guest is already in the stopped
1062# state. In "inmigrate" state, it will ensure that the guest
1063# remains paused once migration finishes, as if the -S option was
1064# passed on the command line.
1065#
1066# Example:
1067#
1068# -> { "execute": "stop" }
1069# <- { "return": {} }
1070#
1071##
1072{ 'command': 'stop' }
1073
1074##
1075# @system_reset:
1076#
1077# Performs a hard reset of a guest.
1078#
1079# Since: 0.14.0
1080#
1081# Example:
1082#
1083# -> { "execute": "system_reset" }
1084# <- { "return": {} }
1085#
1086##
1087{ 'command': 'system_reset' }
1088
1089##
1090# @system_powerdown:
1091#
1092# Requests that a guest perform a powerdown operation.
1093#
1094# Since: 0.14.0
1095#
1096# Notes: A guest may or may not respond to this command. This command
1097# returning does not indicate that a guest has accepted the request or
1098# that it has shut down. Many guests will respond to this command by
1099# prompting the user in some way.
1100# Example:
1101#
1102# -> { "execute": "system_powerdown" }
1103# <- { "return": {} }
1104#
1105##
1106{ 'command': 'system_powerdown' }
1107
1108##
1109# @cpu-add:
1110#
3800db78 1111# Adds CPU with specified ID.
112ed241
MA
1112#
1113# @id: ID of CPU to be created, valid values [0..max_cpus)
1114#
1115# Returns: Nothing on success
1116#
1117# Since: 1.5
1118#
3800db78
KC
1119# Note: This command is deprecated. The `device_add` command should be
1120# used instead. See the `query-hotpluggable-cpus` command for
1121# details.
1122#
112ed241
MA
1123# Example:
1124#
1125# -> { "execute": "cpu-add", "arguments": { "id": 2 } }
1126# <- { "return": {} }
1127#
1128##
1129{ 'command': 'cpu-add', 'data': {'id': 'int'} }
1130
1131##
1132# @memsave:
1133#
1134# Save a portion of guest memory to a file.
1135#
1136# @val: the virtual address of the guest to start from
1137#
1138# @size: the size of memory region to save
1139#
1140# @filename: the file to save the memory to as binary data
1141#
1142# @cpu-index: the index of the virtual CPU to use for translating the
1143# virtual address (defaults to CPU 0)
1144#
1145# Returns: Nothing on success
1146#
1147# Since: 0.14.0
1148#
1149# Notes: Errors were not reliably returned until 1.1
1150#
1151# Example:
1152#
1153# -> { "execute": "memsave",
1154# "arguments": { "val": 10,
1155# "size": 100,
1156# "filename": "/tmp/virtual-mem-dump" } }
1157# <- { "return": {} }
1158#
1159##
1160{ 'command': 'memsave',
1161 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1162
1163##
1164# @pmemsave:
1165#
1166# Save a portion of guest physical memory to a file.
1167#
1168# @val: the physical address of the guest to start from
1169#
1170# @size: the size of memory region to save
1171#
1172# @filename: the file to save the memory to as binary data
1173#
1174# Returns: Nothing on success
1175#
1176# Since: 0.14.0
1177#
1178# Notes: Errors were not reliably returned until 1.1
1179#
1180# Example:
1181#
1182# -> { "execute": "pmemsave",
1183# "arguments": { "val": 10,
1184# "size": 100,
1185# "filename": "/tmp/physical-mem-dump" } }
1186# <- { "return": {} }
1187#
1188##
1189{ 'command': 'pmemsave',
1190 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1191
1192##
1193# @cont:
1194#
1195# Resume guest VCPU execution.
1196#
1197# Since: 0.14.0
1198#
1199# Returns: If successful, nothing
1200#
1201# Notes: This command will succeed if the guest is currently running. It
1202# will also succeed if the guest is in the "inmigrate" state; in
1203# this case, the effect of the command is to make sure the guest
1204# starts once migration finishes, removing the effect of the -S
1205# command line option if it was passed.
1206#
1207# Example:
1208#
1209# -> { "execute": "cont" }
1210# <- { "return": {} }
1211#
1212##
1213{ 'command': 'cont' }
1214
047f7038 1215##
361ac948 1216# @x-exit-preconfig:
047f7038
IM
1217#
1218# Exit from "preconfig" state
1219#
1220# This command makes QEMU exit the preconfig state and proceed with
1221# VM initialization using configuration data provided on the command line
1222# and via the QMP monitor during the preconfig state. The command is only
1223# available during the preconfig state (i.e. when the --preconfig command
1224# line option was in use).
1225#
1226# Since 3.0
1227#
1228# Returns: nothing
1229#
1230# Example:
1231#
361ac948 1232# -> { "execute": "x-exit-preconfig" }
047f7038
IM
1233# <- { "return": {} }
1234#
1235##
361ac948 1236{ 'command': 'x-exit-preconfig', 'allow-preconfig': true }
047f7038 1237
112ed241
MA
1238##
1239# @system_wakeup:
1240#
fb064112
DHB
1241# Wake up guest from suspend. If the guest has wake-up from suspend
1242# support enabled (wakeup-suspend-support flag from
1243# query-current-machine), wake-up guest from suspend if the guest is
1244# in SUSPENDED state. Return an error otherwise.
112ed241
MA
1245#
1246# Since: 1.1
1247#
1248# Returns: nothing.
1249#
fb064112
DHB
1250# Note: prior to 4.0, this command does nothing in case the guest
1251# isn't suspended.
1252#
112ed241
MA
1253# Example:
1254#
1255# -> { "execute": "system_wakeup" }
1256# <- { "return": {} }
1257#
1258##
1259{ 'command': 'system_wakeup' }
1260
1261##
1262# @inject-nmi:
1263#
1264# Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
1265# The command fails when the guest doesn't support injecting.
1266#
1267# Returns: If successful, nothing
1268#
1269# Since: 0.14.0
1270#
1271# Note: prior to 2.1, this command was only supported for x86 and s390 VMs
1272#
1273# Example:
1274#
1275# -> { "execute": "inject-nmi" }
1276# <- { "return": {} }
1277#
1278##
1279{ 'command': 'inject-nmi' }
1280
1281##
1282# @balloon:
1283#
1284# Request the balloon driver to change its balloon size.
1285#
1286# @value: the target size of the balloon in bytes
1287#
1288# Returns: Nothing on success
1289# If the balloon driver is enabled but not functional because the KVM
1290# kernel module cannot support it, KvmMissingCap
1291# If no balloon device is present, DeviceNotActive
1292#
1293# Notes: This command just issues a request to the guest. When it returns,
1294# the balloon size may not have changed. A guest can change the balloon
1295# size independent of this command.
1296#
1297# Since: 0.14.0
1298#
1299# Example:
1300#
1301# -> { "execute": "balloon", "arguments": { "value": 536870912 } }
1302# <- { "return": {} }
1303#
1304##
1305{ 'command': 'balloon', 'data': {'value': 'int'} }
1306
1307##
1308# @human-monitor-command:
1309#
1310# Execute a command on the human monitor and return the output.
1311#
1312# @command-line: the command to execute in the human monitor
1313#
1314# @cpu-index: The CPU to use for commands that require an implicit CPU
1315#
1316# Returns: the output of the command as a string
1317#
1318# Since: 0.14.0
1319#
1320# Notes: This command only exists as a stop-gap. Its use is highly
1321# discouraged. The semantics of this command are not
1322# guaranteed: this means that command names, arguments and
1323# responses can change or be removed at ANY time. Applications
1324# that rely on long term stability guarantees should NOT
1325# use this command.
1326#
1327# Known limitations:
1328#
1329# * This command is stateless, this means that commands that depend
1330# on state information (such as getfd) might not work
1331#
1332# * Commands that prompt the user for data don't currently work
1333#
1334# Example:
1335#
1336# -> { "execute": "human-monitor-command",
1337# "arguments": { "command-line": "info kvm" } }
1338# <- { "return": "kvm support: enabled\r\n" }
1339#
1340##
1341{ 'command': 'human-monitor-command',
1342 'data': {'command-line': 'str', '*cpu-index': 'int'},
1343 'returns': 'str' }
1344
112ed241
MA
1345##
1346# @change:
1347#
1348# This command is multiple commands multiplexed together.
1349#
1350# @device: This is normally the name of a block device but it may also be 'vnc'.
1351# when it's 'vnc', then sub command depends on @target
1352#
1353# @target: If @device is a block device, then this is the new filename.
1354# If @device is 'vnc', then if the value 'password' selects the vnc
1355# change password command. Otherwise, this specifies a new server URI
1356# address to listen to for VNC connections.
1357#
1358# @arg: If @device is a block device, then this is an optional format to open
1359# the device with.
1360# If @device is 'vnc' and @target is 'password', this is the new VNC
1361# password to set. See change-vnc-password for additional notes.
1362#
1363# Returns: Nothing on success.
1364# If @device is not a valid block device, DeviceNotFound
1365#
1366# Notes: This interface is deprecated, and it is strongly recommended that you
1367# avoid using it. For changing block devices, use
1368# blockdev-change-medium; for changing VNC parameters, use
1369# change-vnc-password.
1370#
1371# Since: 0.14.0
1372#
1373# Example:
1374#
1375# 1. Change a removable medium
1376#
1377# -> { "execute": "change",
1378# "arguments": { "device": "ide1-cd0",
1379# "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } }
1380# <- { "return": {} }
1381#
1382# 2. Change VNC password
1383#
1384# -> { "execute": "change",
1385# "arguments": { "device": "vnc", "target": "password",
1386# "arg": "foobar1" } }
1387# <- { "return": {} }
1388#
1389##
1390{ 'command': 'change',
1391 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
1392
112ed241
MA
1393##
1394# @xen-set-global-dirty-log:
1395#
1396# Enable or disable the global dirty log mode.
1397#
1398# @enable: true to enable, false to disable.
1399#
1400# Returns: nothing
1401#
1402# Since: 1.3
1403#
1404# Example:
1405#
1406# -> { "execute": "xen-set-global-dirty-log",
1407# "arguments": { "enable": true } }
1408# <- { "return": {} }
1409#
1410##
1411{ 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
1412
112ed241
MA
1413##
1414# @DumpGuestMemoryFormat:
1415#
1416# An enumeration of guest-memory-dump's format.
1417#
1418# @elf: elf format
1419#
1420# @kdump-zlib: kdump-compressed format with zlib-compressed
1421#
1422# @kdump-lzo: kdump-compressed format with lzo-compressed
1423#
1424# @kdump-snappy: kdump-compressed format with snappy-compressed
1425#
2da91b54
VP
1426# @win-dmp: Windows full crashdump format,
1427# can be used instead of ELF converting (since 2.13)
1428#
112ed241
MA
1429# Since: 2.0
1430##
1431{ 'enum': 'DumpGuestMemoryFormat',
2da91b54 1432 'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy', 'win-dmp' ] }
112ed241
MA
1433
1434##
1435# @dump-guest-memory:
1436#
1437# Dump guest's memory to vmcore. It is a synchronous operation that can take
1438# very long depending on the amount of guest memory.
1439#
1440# @paging: if true, do paging to get guest's memory mapping. This allows
1441# using gdb to process the core file.
1442#
1443# IMPORTANT: this option can make QEMU allocate several gigabytes
1444# of RAM. This can happen for a large guest, or a
1445# malicious guest pretending to be large.
1446#
1447# Also, paging=true has the following limitations:
1448#
1449# 1. The guest may be in a catastrophic state or can have corrupted
1450# memory, which cannot be trusted
1451# 2. The guest can be in real-mode even if paging is enabled. For
1452# example, the guest uses ACPI to sleep, and ACPI sleep state
1453# goes in real-mode
1454# 3. Currently only supported on i386 and x86_64.
1455#
1456# @protocol: the filename or file descriptor of the vmcore. The supported
1457# protocols are:
1458#
1459# 1. file: the protocol starts with "file:", and the following
1460# string is the file's path.
1461# 2. fd: the protocol starts with "fd:", and the following string
1462# is the fd's name.
1463#
1464# @detach: if true, QMP will return immediately rather than
1465# waiting for the dump to finish. The user can track progress
1466# using "query-dump". (since 2.6).
1467#
1468# @begin: if specified, the starting physical address.
1469#
1470# @length: if specified, the memory size, in bytes. If you don't
1471# want to dump all guest's memory, please specify the start @begin
1472# and @length
1473#
1474# @format: if specified, the format of guest memory dump. But non-elf
1475# format is conflict with paging and filter, ie. @paging, @begin and
1476# @length is not allowed to be specified with non-elf @format at the
1477# same time (since 2.0)
1478#
1479# Note: All boolean arguments default to false
1480#
1481# Returns: nothing on success
1482#
1483# Since: 1.2
1484#
1485# Example:
1486#
1487# -> { "execute": "dump-guest-memory",
1488# "arguments": { "protocol": "fd:dump" } }
1489# <- { "return": {} }
1490#
1491##
1492{ 'command': 'dump-guest-memory',
1493 'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool',
1494 '*begin': 'int', '*length': 'int',
1495 '*format': 'DumpGuestMemoryFormat'} }
1496
1497##
1498# @DumpStatus:
1499#
1500# Describe the status of a long-running background guest memory dump.
1501#
1502# @none: no dump-guest-memory has started yet.
1503#
1504# @active: there is one dump running in background.
1505#
1506# @completed: the last dump has finished successfully.
1507#
1508# @failed: the last dump has failed.
1509#
1510# Since: 2.6
1511##
1512{ 'enum': 'DumpStatus',
1513 'data': [ 'none', 'active', 'completed', 'failed' ] }
1514
1515##
1516# @DumpQueryResult:
1517#
1518# The result format for 'query-dump'.
1519#
1520# @status: enum of @DumpStatus, which shows current dump status
1521#
1522# @completed: bytes written in latest dump (uncompressed)
1523#
1524# @total: total bytes to be written in latest dump (uncompressed)
1525#
1526# Since: 2.6
1527##
1528{ 'struct': 'DumpQueryResult',
1529 'data': { 'status': 'DumpStatus',
1530 'completed': 'int',
1531 'total': 'int' } }
1532
1533##
1534# @query-dump:
1535#
1536# Query latest dump status.
1537#
1538# Returns: A @DumpStatus object showing the dump status.
1539#
1540# Since: 2.6
1541#
1542# Example:
1543#
1544# -> { "execute": "query-dump" }
1545# <- { "return": { "status": "active", "completed": 1024000,
1546# "total": 2048000 } }
1547#
1548##
1549{ 'command': 'query-dump', 'returns': 'DumpQueryResult' }
1550
1551##
1552# @DUMP_COMPLETED:
1553#
1554# Emitted when background dump has completed
1555#
eb815e24 1556# @result: final dump status
112ed241
MA
1557#
1558# @error: human-readable error string that provides
1559# hint on why dump failed. Only presents on failure. The
1560# user should not try to interpret the error string.
1561#
1562# Since: 2.6
1563#
1564# Example:
1565#
1566# { "event": "DUMP_COMPLETED",
1567# "data": {"result": {"total": 1090650112, "status": "completed",
1568# "completed": 1090650112} } }
1569#
1570##
1571{ 'event': 'DUMP_COMPLETED' ,
1572 'data': { 'result': 'DumpQueryResult', '*error': 'str' } }
1573
1574##
1575# @DumpGuestMemoryCapability:
1576#
1577# A list of the available formats for dump-guest-memory
1578#
1579# Since: 2.0
1580##
1581{ 'struct': 'DumpGuestMemoryCapability',
1582 'data': {
1583 'formats': ['DumpGuestMemoryFormat'] } }
1584
1585##
1586# @query-dump-guest-memory-capability:
1587#
1588# Returns the available formats for dump-guest-memory
1589#
1590# Returns: A @DumpGuestMemoryCapability object listing available formats for
1591# dump-guest-memory
1592#
1593# Since: 2.0
1594#
1595# Example:
1596#
1597# -> { "execute": "query-dump-guest-memory-capability" }
1598# <- { "return": { "formats":
1599# ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] }
1600#
1601##
1602{ 'command': 'query-dump-guest-memory-capability',
1603 'returns': 'DumpGuestMemoryCapability' }
1604
112ed241
MA
1605##
1606# @getfd:
1607#
1608# Receive a file descriptor via SCM rights and assign it a name
1609#
1610# @fdname: file descriptor name
1611#
1612# Returns: Nothing on success
1613#
1614# Since: 0.14.0
1615#
1616# Notes: If @fdname already exists, the file descriptor assigned to
1617# it will be closed and replaced by the received file
1618# descriptor.
1619#
1620# The 'closefd' command can be used to explicitly close the
1621# file descriptor when it is no longer needed.
1622#
1623# Example:
1624#
1625# -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
1626# <- { "return": {} }
1627#
1628##
1629{ 'command': 'getfd', 'data': {'fdname': 'str'} }
1630
1631##
1632# @closefd:
1633#
1634# Close a file descriptor previously passed via SCM rights
1635#
1636# @fdname: file descriptor name
1637#
1638# Returns: Nothing on success
1639#
1640# Since: 0.14.0
1641#
1642# Example:
1643#
1644# -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
1645# <- { "return": {} }
1646#
1647##
1648{ 'command': 'closefd', 'data': {'fdname': 'str'} }
1649
1650##
1651# @MachineInfo:
1652#
1653# Information describing a machine.
1654#
1655# @name: the name of the machine
1656#
1657# @alias: an alias for the machine name
1658#
1659# @is-default: whether the machine is default
1660#
1661# @cpu-max: maximum number of CPUs supported by the machine type
1662# (since 1.5.0)
1663#
1664# @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
1665#
1666# Since: 1.2.0
1667##
1668{ 'struct': 'MachineInfo',
1669 'data': { 'name': 'str', '*alias': 'str',
1670 '*is-default': 'bool', 'cpu-max': 'int',
1671 'hotpluggable-cpus': 'bool'} }
1672
1673##
1674# @query-machines:
1675#
1676# Return a list of supported machines
1677#
1678# Returns: a list of MachineInfo
1679#
1680# Since: 1.2.0
1681##
1682{ 'command': 'query-machines', 'returns': ['MachineInfo'] }
1683
46ea94ca
DHB
1684##
1685# @CurrentMachineParams:
1686#
1687# Information describing the running machine parameters.
1688#
1689# @wakeup-suspend-support: true if the machine supports wake up from
1690# suspend
1691#
1692# Since: 4.0
1693##
1694{ 'struct': 'CurrentMachineParams',
1695 'data': { 'wakeup-suspend-support': 'bool'} }
1696
1697##
1698# @query-current-machine:
1699#
1700# Return information on the current virtual machine.
1701#
1702# Returns: CurrentMachineParams
1703#
1704# Since: 4.0
1705##
1706{ 'command': 'query-current-machine', 'returns': 'CurrentMachineParams' }
1707
112ed241
MA
1708##
1709# @MemoryInfo:
1710#
1711# Actual memory information in bytes.
1712#
1713# @base-memory: size of "base" memory specified with command line
1714# option -m.
1715#
1716# @plugged-memory: size of memory that can be hot-unplugged. This field
1717# is omitted if target doesn't support memory hotplug
15cea5ae 1718# (i.e. CONFIG_MEM_DEVICE not defined at build time).
112ed241
MA
1719#
1720# Since: 2.11.0
1721##
1722{ 'struct': 'MemoryInfo',
1723 'data' : { 'base-memory': 'size', '*plugged-memory': 'size' } }
1724
1725##
1726# @query-memory-size-summary:
1727#
1728# Return the amount of initially allocated and present hotpluggable (if
1729# enabled) memory in bytes.
1730#
1731# Example:
1732#
1733# -> { "execute": "query-memory-size-summary" }
1734# <- { "return": { "base-memory": 4294967296, "plugged-memory": 0 } }
1735#
1736# Since: 2.11.0
1737##
1738{ 'command': 'query-memory-size-summary', 'returns': 'MemoryInfo' }
1739
112ed241
MA
1740
1741##
1742# @CpuModelInfo:
1743#
1744# Virtual CPU model.
1745#
1746# A CPU model consists of the name of a CPU definition, to which
1747# delta changes are applied (e.g. features added/removed). Most magic values
1748# that an architecture might require should be hidden behind the name.
1749# However, if required, architectures can expose relevant properties.
1750#
1751# @name: the name of the CPU definition the model is based on
1752# @props: a dictionary of QOM properties to be applied
1753#
1754# Since: 2.8.0
1755##
1756{ 'struct': 'CpuModelInfo',
1757 'data': { 'name': 'str',
1758 '*props': 'any' } }
1759
1760##
1761# @CpuModelExpansionType:
1762#
1763# An enumeration of CPU model expansion types.
1764#
1765# @static: Expand to a static CPU model, a combination of a static base
1766# model name and property delta changes. As the static base model will
1767# never change, the expanded CPU model will be the same, independent of
22801817
KC
1768# QEMU version, machine type, machine options, and accelerator options.
1769# Therefore, the resulting model can be used by tooling without having
1770# to specify a compatibility machine - e.g. when displaying the "host"
1771# model. The @static CPU models are migration-safe.
1772
112ed241
MA
1773# @full: Expand all properties. The produced model is not guaranteed to be
1774# migration-safe, but allows tooling to get an insight and work with
1775# model details.
1776#
1777# Note: When a non-migration-safe CPU model is expanded in static mode, some
1778# features enabled by the CPU model may be omitted, because they can't be
1779# implemented by a static CPU model definition (e.g. cache info passthrough and
1780# PMU passthrough in x86). If you need an accurate representation of the
1781# features enabled by a non-migration-safe CPU model, use @full. If you need a
1782# static representation that will keep ABI compatibility even when changing QEMU
1783# version or machine-type, use @static (but keep in mind that some features may
1784# be omitted).
1785#
1786# Since: 2.8.0
1787##
1788{ 'enum': 'CpuModelExpansionType',
1789 'data': [ 'static', 'full' ] }
1790
1791
112ed241
MA
1792##
1793# @CpuModelCompareResult:
1794#
1795# An enumeration of CPU model comparison results. The result is usually
1796# calculated using e.g. CPU features or CPU generations.
1797#
1798# @incompatible: If model A is incompatible to model B, model A is not
1799# guaranteed to run where model B runs and the other way around.
1800#
1801# @identical: If model A is identical to model B, model A is guaranteed to run
1802# where model B runs and the other way around.
1803#
1804# @superset: If model A is a superset of model B, model B is guaranteed to run
1805# where model A runs. There are no guarantees about the other way.
1806#
1807# @subset: If model A is a subset of model B, model A is guaranteed to run
1808# where model B runs. There are no guarantees about the other way.
1809#
1810# Since: 2.8.0
1811##
1812{ 'enum': 'CpuModelCompareResult',
1813 'data': [ 'incompatible', 'identical', 'superset', 'subset' ] }
1814
112ed241
MA
1815##
1816# @AddfdInfo:
1817#
1818# Information about a file descriptor that was added to an fd set.
1819#
1820# @fdset-id: The ID of the fd set that @fd was added to.
1821#
1822# @fd: The file descriptor that was received via SCM rights and
1823# added to the fd set.
1824#
1825# Since: 1.2.0
1826##
1827{ 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
1828
1829##
1830# @add-fd:
1831#
1832# Add a file descriptor, that was passed via SCM rights, to an fd set.
1833#
1834# @fdset-id: The ID of the fd set to add the file descriptor to.
1835#
1836# @opaque: A free-form string that can be used to describe the fd.
1837#
1838# Returns: @AddfdInfo on success
1839#
1840# If file descriptor was not received, FdNotSupplied
1841#
1842# If @fdset-id is a negative value, InvalidParameterValue
1843#
1844# Notes: The list of fd sets is shared by all monitor connections.
1845#
1846# If @fdset-id is not specified, a new fd set will be created.
1847#
1848# Since: 1.2.0
1849#
1850# Example:
1851#
1852# -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
1853# <- { "return": { "fdset-id": 1, "fd": 3 } }
1854#
1855##
b0ddeba2
MAL
1856{ 'command': 'add-fd',
1857 'data': { '*fdset-id': 'int',
1858 '*opaque': 'str' },
112ed241
MA
1859 'returns': 'AddfdInfo' }
1860
1861##
1862# @remove-fd:
1863#
1864# Remove a file descriptor from an fd set.
1865#
1866# @fdset-id: The ID of the fd set that the file descriptor belongs to.
1867#
1868# @fd: The file descriptor that is to be removed.
1869#
1870# Returns: Nothing on success
1871# If @fdset-id or @fd is not found, FdNotFound
1872#
1873# Since: 1.2.0
1874#
1875# Notes: The list of fd sets is shared by all monitor connections.
1876#
1877# If @fd is not specified, all file descriptors in @fdset-id
1878# will be removed.
1879#
1880# Example:
1881#
1882# -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
1883# <- { "return": {} }
1884#
1885##
1886{ 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
1887
1888##
1889# @FdsetFdInfo:
1890#
1891# Information about a file descriptor that belongs to an fd set.
1892#
1893# @fd: The file descriptor value.
1894#
1895# @opaque: A free-form string that can be used to describe the fd.
1896#
1897# Since: 1.2.0
1898##
1899{ 'struct': 'FdsetFdInfo',
1900 'data': {'fd': 'int', '*opaque': 'str'} }
1901
1902##
1903# @FdsetInfo:
1904#
1905# Information about an fd set.
1906#
1907# @fdset-id: The ID of the fd set.
1908#
1909# @fds: A list of file descriptors that belong to this fd set.
1910#
1911# Since: 1.2.0
1912##
1913{ 'struct': 'FdsetInfo',
1914 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
1915
1916##
1917# @query-fdsets:
1918#
1919# Return information describing all fd sets.
1920#
1921# Returns: A list of @FdsetInfo
1922#
1923# Since: 1.2.0
1924#
1925# Note: The list of fd sets is shared by all monitor connections.
1926#
1927# Example:
1928#
1929# -> { "execute": "query-fdsets" }
1930# <- { "return": [
1931# {
1932# "fds": [
1933# {
1934# "fd": 30,
1935# "opaque": "rdonly:/path/to/file"
1936# },
1937# {
1938# "fd": 24,
1939# "opaque": "rdwr:/path/to/file"
1940# }
1941# ],
1942# "fdset-id": 1
1943# },
1944# {
1945# "fds": [
1946# {
1947# "fd": 28
1948# },
1949# {
1950# "fd": 29
1951# }
1952# ],
1953# "fdset-id": 0
1954# }
1955# ]
1956# }
1957#
1958##
1959{ 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
1960
1961##
1962# @TargetInfo:
1963#
1964# Information describing the QEMU target.
1965#
b47aa7b3 1966# @arch: the target architecture
112ed241
MA
1967#
1968# Since: 1.2.0
1969##
1970{ 'struct': 'TargetInfo',
b47aa7b3 1971 'data': { 'arch': 'SysEmuTarget' } }
112ed241
MA
1972
1973##
1974# @query-target:
1975#
1976# Return information about the target for this QEMU
1977#
1978# Returns: TargetInfo
1979#
1980# Since: 1.2.0
1981##
1982{ 'command': 'query-target', 'returns': 'TargetInfo' }
1983
1984##
1985# @AcpiTableOptions:
1986#
1987# Specify an ACPI table on the command line to load.
1988#
1989# At most one of @file and @data can be specified. The list of files specified
1990# by any one of them is loaded and concatenated in order. If both are omitted,
1991# @data is implied.
1992#
1993# Other fields / optargs can be used to override fields of the generic ACPI
1994# table header; refer to the ACPI specification 5.0, section 5.2.6 System
1995# Description Table Header. If a header field is not overridden, then the
1996# corresponding value from the concatenated blob is used (in case of @file), or
1997# it is filled in with a hard-coded value (in case of @data).
1998#
1999# String fields are copied into the matching ACPI member from lowest address
2000# upwards, and silently truncated / NUL-padded to length.
2001#
2002# @sig: table signature / identifier (4 bytes)
2003#
2004# @rev: table revision number (dependent on signature, 1 byte)
2005#
2006# @oem_id: OEM identifier (6 bytes)
2007#
2008# @oem_table_id: OEM table identifier (8 bytes)
2009#
2010# @oem_rev: OEM-supplied revision number (4 bytes)
2011#
2012# @asl_compiler_id: identifier of the utility that created the table
2013# (4 bytes)
2014#
2015# @asl_compiler_rev: revision number of the utility that created the
2016# table (4 bytes)
2017#
2018# @file: colon (:) separated list of pathnames to load and
2019# concatenate as table data. The resultant binary blob is expected to
2020# have an ACPI table header. At least one file is required. This field
2021# excludes @data.
2022#
2023# @data: colon (:) separated list of pathnames to load and
2024# concatenate as table data. The resultant binary blob must not have an
2025# ACPI table header. At least one file is required. This field excludes
2026# @file.
2027#
2028# Since: 1.5
2029##
2030{ 'struct': 'AcpiTableOptions',
2031 'data': {
2032 '*sig': 'str',
2033 '*rev': 'uint8',
2034 '*oem_id': 'str',
2035 '*oem_table_id': 'str',
2036 '*oem_rev': 'uint32',
2037 '*asl_compiler_id': 'str',
2038 '*asl_compiler_rev': 'uint32',
2039 '*file': 'str',
2040 '*data': 'str' }}
2041
2042##
2043# @CommandLineParameterType:
2044#
2045# Possible types for an option parameter.
2046#
2047# @string: accepts a character string
2048#
2049# @boolean: accepts "on" or "off"
2050#
2051# @number: accepts a number
2052#
2053# @size: accepts a number followed by an optional suffix (K)ilo,
2054# (M)ega, (G)iga, (T)era
2055#
2056# Since: 1.5
2057##
2058{ 'enum': 'CommandLineParameterType',
2059 'data': ['string', 'boolean', 'number', 'size'] }
2060
2061##
2062# @CommandLineParameterInfo:
2063#
2064# Details about a single parameter of a command line option.
2065#
2066# @name: parameter name
2067#
2068# @type: parameter @CommandLineParameterType
2069#
2070# @help: human readable text string, not suitable for parsing.
2071#
2072# @default: default value string (since 2.1)
2073#
2074# Since: 1.5
2075##
2076{ 'struct': 'CommandLineParameterInfo',
2077 'data': { 'name': 'str',
2078 'type': 'CommandLineParameterType',
2079 '*help': 'str',
2080 '*default': 'str' } }
2081
2082##
2083# @CommandLineOptionInfo:
2084#
2085# Details about a command line option, including its list of parameter details
2086#
2087# @option: option name
2088#
2089# @parameters: an array of @CommandLineParameterInfo
2090#
2091# Since: 1.5
2092##
2093{ 'struct': 'CommandLineOptionInfo',
2094 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
2095
2096##
2097# @query-command-line-options:
2098#
2099# Query command line option schema.
2100#
2101# @option: option name
2102#
2103# Returns: list of @CommandLineOptionInfo for all options (or for the given
2104# @option). Returns an error if the given @option doesn't exist.
2105#
2106# Since: 1.5
2107#
2108# Example:
2109#
2110# -> { "execute": "query-command-line-options",
2111# "arguments": { "option": "option-rom" } }
2112# <- { "return": [
2113# {
2114# "parameters": [
2115# {
2116# "name": "romfile",
2117# "type": "string"
2118# },
2119# {
2120# "name": "bootindex",
2121# "type": "number"
2122# }
2123# ],
2124# "option": "option-rom"
2125# }
2126# ]
2127# }
2128#
2129##
b0ddeba2
MAL
2130{'command': 'query-command-line-options',
2131 'data': { '*option': 'str' },
d6fe3d02
IM
2132 'returns': ['CommandLineOptionInfo'],
2133 'allow-preconfig': true }
112ed241
MA
2134
2135##
2136# @X86CPURegister32:
2137#
2138# A X86 32-bit register
2139#
2140# Since: 1.5
2141##
2142{ 'enum': 'X86CPURegister32',
2143 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
2144
2145##
2146# @X86CPUFeatureWordInfo:
2147#
2148# Information about a X86 CPU feature word
2149#
2150# @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
2151#
2152# @cpuid-input-ecx: Input ECX value for CPUID instruction for that
2153# feature word
2154#
2155# @cpuid-register: Output register containing the feature bits
2156#
2157# @features: value of output register, containing the feature bits
2158#
2159# Since: 1.5
2160##
2161{ 'struct': 'X86CPUFeatureWordInfo',
2162 'data': { 'cpuid-input-eax': 'int',
2163 '*cpuid-input-ecx': 'int',
2164 'cpuid-register': 'X86CPURegister32',
2165 'features': 'int' } }
2166
2167##
2168# @DummyForceArrays:
2169#
2170# Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
2171#
2172# Since: 2.5
2173##
2174{ 'struct': 'DummyForceArrays',
2175 'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
2176
2177
2178##
2179# @NumaOptionsType:
2180#
2181# @node: NUMA nodes configuration
2182#
2183# @dist: NUMA distance configuration (since 2.10)
2184#
2185# @cpu: property based CPU(s) to node mapping (Since: 2.10)
2186#
2187# Since: 2.1
2188##
2189{ 'enum': 'NumaOptionsType',
2190 'data': [ 'node', 'dist', 'cpu' ] }
2191
2192##
2193# @NumaOptions:
2194#
2195# A discriminated record of NUMA options. (for OptsVisitor)
2196#
2197# Since: 2.1
2198##
2199{ 'union': 'NumaOptions',
2200 'base': { 'type': 'NumaOptionsType' },
2201 'discriminator': 'type',
2202 'data': {
2203 'node': 'NumaNodeOptions',
2204 'dist': 'NumaDistOptions',
2205 'cpu': 'NumaCpuOptions' }}
2206
2207##
2208# @NumaNodeOptions:
2209#
2210# Create a guest NUMA node. (for OptsVisitor)
2211#
2212# @nodeid: NUMA node ID (increase by 1 from 0 if omitted)
2213#
2214# @cpus: VCPUs belonging to this node (assign VCPUS round-robin
2215# if omitted)
2216#
2217# @mem: memory size of this node; mutually exclusive with @memdev.
2218# Equally divide total memory among nodes if both @mem and @memdev are
2219# omitted.
2220#
2221# @memdev: memory backend object. If specified for one node,
2222# it must be specified for all nodes.
2223#
2224# Since: 2.1
2225##
2226{ 'struct': 'NumaNodeOptions',
2227 'data': {
2228 '*nodeid': 'uint16',
2229 '*cpus': ['uint16'],
2230 '*mem': 'size',
2231 '*memdev': 'str' }}
2232
2233##
2234# @NumaDistOptions:
2235#
2236# Set the distance between 2 NUMA nodes.
2237#
2238# @src: source NUMA node.
2239#
2240# @dst: destination NUMA node.
2241#
2242# @val: NUMA distance from source node to destination node.
2243# When a node is unreachable from another node, set the distance
2244# between them to 255.
2245#
2246# Since: 2.10
2247##
2248{ 'struct': 'NumaDistOptions',
2249 'data': {
2250 'src': 'uint16',
2251 'dst': 'uint16',
2252 'val': 'uint8' }}
2253
2254##
2255# @NumaCpuOptions:
2256#
2257# Option "-numa cpu" overrides default cpu to node mapping.
2258# It accepts the same set of cpu properties as returned by
2259# query-hotpluggable-cpus[].props, where node-id could be used to
2260# override default node mapping.
2261#
2262# Since: 2.10
2263##
2264{ 'struct': 'NumaCpuOptions',
2265 'base': 'CpuInstanceProperties',
2266 'data' : {} }
2267
2268##
2269# @HostMemPolicy:
2270#
2271# Host memory policy types
2272#
2273# @default: restore default policy, remove any nondefault policy
2274#
2275# @preferred: set the preferred host nodes for allocation
2276#
2277# @bind: a strict policy that restricts memory allocation to the
2278# host nodes specified
2279#
2280# @interleave: memory allocations are interleaved across the set
2281# of host nodes specified
2282#
2283# Since: 2.1
2284##
2285{ 'enum': 'HostMemPolicy',
2286 'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
2287
2288##
2289# @Memdev:
2290#
2291# Information about memory backend
2292#
2293# @id: backend's ID if backend has 'id' property (since 2.9)
2294#
2295# @size: memory backend size
2296#
2297# @merge: enables or disables memory merge support
2298#
2299# @dump: includes memory backend's memory in a core dump or not
2300#
2301# @prealloc: enables or disables memory preallocation
2302#
2303# @host-nodes: host nodes for its memory policy
2304#
2305# @policy: memory policy of memory backend
2306#
2307# Since: 2.1
2308##
2309{ 'struct': 'Memdev',
2310 'data': {
2311 '*id': 'str',
2312 'size': 'size',
2313 'merge': 'bool',
2314 'dump': 'bool',
2315 'prealloc': 'bool',
2316 'host-nodes': ['uint16'],
2317 'policy': 'HostMemPolicy' }}
2318
2319##
2320# @query-memdev:
2321#
2322# Returns information for all memory backends.
2323#
2324# Returns: a list of @Memdev.
2325#
2326# Since: 2.1
2327#
2328# Example:
2329#
2330# -> { "execute": "query-memdev" }
2331# <- { "return": [
2332# {
2333# "id": "mem1",
2334# "size": 536870912,
2335# "merge": false,
2336# "dump": true,
2337# "prealloc": false,
2338# "host-nodes": [0, 1],
2339# "policy": "bind"
2340# },
2341# {
2342# "size": 536870912,
2343# "merge": false,
2344# "dump": true,
2345# "prealloc": true,
2346# "host-nodes": [2, 3],
2347# "policy": "preferred"
2348# }
2349# ]
2350# }
2351#
2352##
a87706c8 2353{ 'command': 'query-memdev', 'returns': ['Memdev'], 'allow-preconfig': true }
112ed241
MA
2354
2355##
2356# @PCDIMMDeviceInfo:
2357#
2358# PCDIMMDevice state information
2359#
2360# @id: device's ID
2361#
2362# @addr: physical address, where device is mapped
2363#
2364# @size: size of memory that the device provides
2365#
2366# @slot: slot number at which device is plugged in
2367#
2368# @node: NUMA node number where device is plugged in
2369#
2370# @memdev: memory backend linked with device
2371#
2372# @hotplugged: true if device was hotplugged
2373#
2374# @hotpluggable: true if device if could be added/removed while machine is running
2375#
2376# Since: 2.1
2377##
2378{ 'struct': 'PCDIMMDeviceInfo',
2379 'data': { '*id': 'str',
2380 'addr': 'int',
2381 'size': 'int',
2382 'slot': 'int',
2383 'node': 'int',
2384 'memdev': 'str',
2385 'hotplugged': 'bool',
2386 'hotpluggable': 'bool'
2387 }
2388}
2389
2390##
2391# @MemoryDeviceInfo:
2392#
2393# Union containing information about a memory device
2394#
2395# Since: 2.1
2396##
6388e18d
HZ
2397{ 'union': 'MemoryDeviceInfo',
2398 'data': { 'dimm': 'PCDIMMDeviceInfo',
2399 'nvdimm': 'PCDIMMDeviceInfo'
2400 }
2401}
112ed241
MA
2402
2403##
2404# @query-memory-devices:
2405#
2406# Lists available memory devices and their state
2407#
2408# Since: 2.1
2409#
2410# Example:
2411#
2412# -> { "execute": "query-memory-devices" }
2413# <- { "return": [ { "data":
2414# { "addr": 5368709120,
2415# "hotpluggable": true,
2416# "hotplugged": true,
2417# "id": "d1",
2418# "memdev": "/objects/memX",
2419# "node": 0,
2420# "size": 1073741824,
2421# "slot": 0},
2422# "type": "dimm"
2423# } ] }
2424#
2425##
2426{ 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
2427
2428##
2429# @MEM_UNPLUG_ERROR:
2430#
2431# Emitted when memory hot unplug error occurs.
2432#
2433# @device: device name
2434#
2435# @msg: Informative message
2436#
2437# Since: 2.4
2438#
2439# Example:
2440#
2441# <- { "event": "MEM_UNPLUG_ERROR"
2442# "data": { "device": "dimm1",
2443# "msg": "acpi: device unplug for unsupported device"
2444# },
2445# "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
2446#
2447##
2448{ 'event': 'MEM_UNPLUG_ERROR',
2449 'data': { 'device': 'str', 'msg': 'str' } }
2450
2451##
2452# @ACPISlotType:
2453#
2454# @DIMM: memory slot
2455# @CPU: logical CPU slot (since 2.7)
2456##
2457{ 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
2458
2459##
2460# @ACPIOSTInfo:
2461#
2462# OSPM Status Indication for a device
2463# For description of possible values of @source and @status fields
2464# see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
2465#
2466# @device: device ID associated with slot
2467#
2468# @slot: slot ID, unique per slot of a given @slot-type
2469#
2470# @slot-type: type of the slot
2471#
2472# @source: an integer containing the source event
2473#
2474# @status: an integer containing the status code
2475#
2476# Since: 2.1
2477##
2478{ 'struct': 'ACPIOSTInfo',
2479 'data' : { '*device': 'str',
2480 'slot': 'str',
2481 'slot-type': 'ACPISlotType',
2482 'source': 'int',
2483 'status': 'int' } }
2484
2485##
2486# @query-acpi-ospm-status:
2487#
2488# Return a list of ACPIOSTInfo for devices that support status
2489# reporting via ACPI _OST method.
2490#
2491# Since: 2.1
2492#
2493# Example:
2494#
2495# -> { "execute": "query-acpi-ospm-status" }
2496# <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
2497# { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
2498# { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
2499# { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
2500# ]}
2501#
2502##
2503{ 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
2504
2505##
2506# @ACPI_DEVICE_OST:
2507#
2508# Emitted when guest executes ACPI _OST method.
2509#
eb815e24 2510# @info: OSPM Status Indication
112ed241
MA
2511#
2512# Since: 2.1
2513#
2514# Example:
2515#
2516# <- { "event": "ACPI_DEVICE_OST",
2517# "data": { "device": "d1", "slot": "0",
2518# "slot-type": "DIMM", "source": 1, "status": 0 } }
2519#
2520##
2521{ 'event': 'ACPI_DEVICE_OST',
2522 'data': { 'info': 'ACPIOSTInfo' } }
2523
112ed241
MA
2524##
2525# @ReplayMode:
2526#
2527# Mode of the replay subsystem.
2528#
2529# @none: normal execution mode. Replay or record are not enabled.
2530#
2531# @record: record mode. All non-deterministic data is written into the
2532# replay log.
2533#
2534# @play: replay mode. Non-deterministic data required for system execution
2535# is read from the log.
2536#
2537# Since: 2.5
2538##
2539{ 'enum': 'ReplayMode',
2540 'data': [ 'none', 'record', 'play' ] }
2541
2542##
2543# @xen-load-devices-state:
2544#
2545# Load the state of all devices from file. The RAM and the block devices
2546# of the VM are not loaded by this command.
2547#
2548# @filename: the file to load the state of the devices from as binary
2549# data. See xen-save-devices-state.txt for a description of the binary
2550# format.
2551#
2552# Since: 2.7
2553#
2554# Example:
2555#
2556# -> { "execute": "xen-load-devices-state",
2557# "arguments": { "filename": "/tmp/resume" } }
2558# <- { "return": {} }
2559#
2560##
2561{ 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
2562
112ed241
MA
2563##
2564# @CpuInstanceProperties:
2565#
2566# List of properties to be used for hotplugging a CPU instance,
2567# it should be passed by management with device_add command when
2568# a CPU is being hotplugged.
2569#
2570# @node-id: NUMA node ID the CPU belongs to
2571# @socket-id: socket number within node/board the CPU belongs to
2572# @core-id: core number within socket the CPU belongs to
2573# @thread-id: thread number within core the CPU belongs to
2574#
2575# Note: currently there are 4 properties that could be present
2576# but management should be prepared to pass through other
2577# properties with device_add command to allow for future
2578# interface extension. This also requires the filed names to be kept in
2579# sync with the properties passed to -device/device_add.
2580#
2581# Since: 2.7
2582##
2583{ 'struct': 'CpuInstanceProperties',
2584 'data': { '*node-id': 'int',
2585 '*socket-id': 'int',
2586 '*core-id': 'int',
2587 '*thread-id': 'int'
2588 }
2589}
2590
2591##
2592# @HotpluggableCPU:
2593#
2594# @type: CPU object type for usage with device_add command
2595# @props: list of properties to be used for hotplugging CPU
2596# @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides
2597# @qom-path: link to existing CPU object if CPU is present or
2598# omitted if CPU is not present.
2599#
2600# Since: 2.7
2601##
2602{ 'struct': 'HotpluggableCPU',
2603 'data': { 'type': 'str',
2604 'vcpus-count': 'int',
2605 'props': 'CpuInstanceProperties',
2606 '*qom-path': 'str'
2607 }
2608}
2609
2610##
2611# @query-hotpluggable-cpus:
2612#
3800db78
KC
2613# TODO: Better documentation; currently there is none.
2614#
112ed241
MA
2615# Returns: a list of HotpluggableCPU objects.
2616#
2617# Since: 2.7
2618#
2619# Example:
2620#
2621# For pseries machine type started with -smp 2,cores=2,maxcpus=4 -cpu POWER8:
2622#
2623# -> { "execute": "query-hotpluggable-cpus" }
2624# <- {"return": [
2625# { "props": { "core": 8 }, "type": "POWER8-spapr-cpu-core",
2626# "vcpus-count": 1 },
2627# { "props": { "core": 0 }, "type": "POWER8-spapr-cpu-core",
2628# "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"}
2629# ]}'
2630#
2631# For pc machine type started with -smp 1,maxcpus=2:
2632#
2633# -> { "execute": "query-hotpluggable-cpus" }
2634# <- {"return": [
2635# {
2636# "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
2637# "props": {"core-id": 0, "socket-id": 1, "thread-id": 0}
2638# },
2639# {
2640# "qom-path": "/machine/unattached/device[0]",
2641# "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
2642# "props": {"core-id": 0, "socket-id": 0, "thread-id": 0}
2643# }
2644# ]}
2645#
2646# For s390x-virtio-ccw machine type started with -smp 1,maxcpus=2 -cpu qemu
2647# (Since: 2.11):
2648#
2649# -> { "execute": "query-hotpluggable-cpus" }
2650# <- {"return": [
2651# {
2652# "type": "qemu-s390x-cpu", "vcpus-count": 1,
2653# "props": { "core-id": 1 }
2654# },
2655# {
2656# "qom-path": "/machine/unattached/device[0]",
2657# "type": "qemu-s390x-cpu", "vcpus-count": 1,
2658# "props": { "core-id": 0 }
2659# }
2660# ]}
2661#
2662##
899eaab4
IM
2663{ 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'],
2664 'allow-preconfig': true }
112ed241
MA
2665
2666##
2667# @GuidInfo:
2668#
2669# GUID information.
2670#
2671# @guid: the globally unique identifier
2672#
2673# Since: 2.9
2674##
2675{ 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
2676
2677##
2678# @query-vm-generation-id:
2679#
2680# Show Virtual Machine Generation ID
2681#
2682# Since: 2.9
2683##
2684{ 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }
08a161fd 2685
f3be6781
IM
2686##
2687# @set-numa-node:
2688#
2689# Runtime equivalent of '-numa' CLI option, available at
2690# preconfigure stage to configure numa mapping before initializing
2691# machine.
2692#
2693# Since 3.0
2694##
2695{ 'command': 'set-numa-node', 'boxed': true,
2696 'data': 'NumaOptions',
2697 'allow-preconfig': true
2698}
This page took 0.477069 seconds and 4 git commands to generate.