blob: 5636f4a14997df75fcf87ef3c6c50c4cd2fa7a42 [file] [log] [blame]
Markus Armbruster112ed242018-02-26 17:13:27 -06001# -*- Mode: Python -*-
2#
3
4##
5# = Miscellanea
6##
7
8##
9# @qmp_capabilities:
10#
11# Enable QMP capabilities.
12#
Peter Xu02130312018-03-09 16:59:53 +080013# Arguments:
14#
15# @enable: An optional list of QMPCapability values to enable. The
16# client must not enable any capability that is not
17# mentioned in the QMP greeting message. If the field is not
18# provided, it means no QMP capabilities will be enabled.
19# (since 2.12)
Markus Armbruster112ed242018-02-26 17:13:27 -060020#
21# Example:
22#
Peter Xu02130312018-03-09 16:59:53 +080023# -> { "execute": "qmp_capabilities",
24# "arguments": { "enable": [ "oob" ] } }
Markus Armbruster112ed242018-02-26 17:13:27 -060025# <- { "return": {} }
26#
27# Notes: This command is valid exactly when first connecting: it must be
28# issued before any other command will be accepted, and will fail once the
29# monitor is accepting other commands. (see qemu docs/interop/qmp-spec.txt)
30#
Peter Xu02130312018-03-09 16:59:53 +080031# The QMP client needs to explicitly enable QMP capabilities, otherwise
32# all the QMP capabilities will be turned off by default.
33#
Markus Armbruster112ed242018-02-26 17:13:27 -060034# Since: 0.13
35#
36##
Peter Xu02130312018-03-09 16:59:53 +080037{ 'command': 'qmp_capabilities',
38 'data': { '*enable': [ 'QMPCapability' ] } }
39
40##
41# @QMPCapability:
42#
43# Enumeration of capabilities to be advertised during initial client
44# connection, used for agreeing on particular QMP extension behaviors.
45#
46# @oob: QMP ability to support Out-Of-Band requests.
47# (Please refer to qmp-spec.txt for more information on OOB)
48#
49# Since: 2.12
50#
51##
52{ 'enum': 'QMPCapability',
53 'data': [ 'oob' ] }
Markus Armbruster112ed242018-02-26 17:13:27 -060054
55##
56# @VersionTriple:
57#
58# A three-part version number.
59#
60# @major: The major version number.
61#
62# @minor: The minor version number.
63#
64# @micro: The micro version number.
65#
66# Since: 2.4
67##
68{ 'struct': 'VersionTriple',
69 'data': {'major': 'int', 'minor': 'int', 'micro': 'int'} }
70
71
72##
73# @VersionInfo:
74#
75# A description of QEMU's version.
76#
77# @qemu: The version of QEMU. By current convention, a micro
78# version of 50 signifies a development branch. A micro version
79# greater than or equal to 90 signifies a release candidate for
80# the next minor version. A micro version of less than 50
81# signifies a stable release.
82#
83# @package: QEMU will always set this field to an empty string. Downstream
84# versions of QEMU should set this to a non-empty string. The
85# exact format depends on the downstream however it highly
86# recommended that a unique name is used.
87#
88# Since: 0.14.0
89##
90{ 'struct': 'VersionInfo',
91 'data': {'qemu': 'VersionTriple', 'package': 'str'} }
92
93##
94# @query-version:
95#
96# Returns the current version of QEMU.
97#
98# Returns: A @VersionInfo object describing the current version of QEMU.
99#
100# Since: 0.14.0
101#
102# Example:
103#
104# -> { "execute": "query-version" }
105# <- {
106# "return":{
107# "qemu":{
108# "major":0,
109# "minor":11,
110# "micro":5
111# },
112# "package":""
113# }
114# }
115#
116##
117{ 'command': 'query-version', 'returns': 'VersionInfo' }
118
119##
120# @CommandInfo:
121#
122# Information about a QMP command
123#
124# @name: The command name
125#
126# Since: 0.14.0
127##
128{ 'struct': 'CommandInfo', 'data': {'name': 'str'} }
129
130##
131# @query-commands:
132#
133# Return a list of supported QMP commands by this server
134#
135# Returns: A list of @CommandInfo for all supported commands
136#
137# Since: 0.14.0
138#
139# Example:
140#
141# -> { "execute": "query-commands" }
142# <- {
143# "return":[
144# {
145# "name":"query-balloon"
146# },
147# {
148# "name":"system_powerdown"
149# }
150# ]
151# }
152#
153# Note: This example has been shortened as the real response is too long.
154#
155##
156{ 'command': 'query-commands', 'returns': ['CommandInfo'] }
157
158##
159# @LostTickPolicy:
160#
161# Policy for handling lost ticks in timer devices.
162#
163# @discard: throw away the missed tick(s) and continue with future injection
164# normally. Guest time may be delayed, unless the OS has explicit
165# handling of lost ticks
166#
167# @delay: continue to deliver ticks at the normal rate. Guest time will be
168# delayed due to the late tick
169#
170# @merge: merge the missed tick(s) into one tick and inject. Guest time
171# may be delayed, depending on how the OS reacts to the merging
172# of ticks
173#
174# @slew: deliver ticks at a higher rate to catch up with the missed tick. The
175# guest time should not be delayed once catchup is complete.
176#
177# Since: 2.0
178##
179{ 'enum': 'LostTickPolicy',
180 'data': ['discard', 'delay', 'merge', 'slew' ] }
181
182##
183# @add_client:
184#
185# Allow client connections for VNC, Spice and socket based
186# character devices to be passed in to QEMU via SCM_RIGHTS.
187#
188# @protocol: protocol name. Valid names are "vnc", "spice" or the
189# name of a character device (eg. from -chardev id=XXXX)
190#
191# @fdname: file descriptor name previously passed via 'getfd' command
192#
193# @skipauth: whether to skip authentication. Only applies
194# to "vnc" and "spice" protocols
195#
196# @tls: whether to perform TLS. Only applies to the "spice"
197# protocol
198#
199# Returns: nothing on success.
200#
201# Since: 0.14.0
202#
203# Example:
204#
205# -> { "execute": "add_client", "arguments": { "protocol": "vnc",
206# "fdname": "myclient" } }
207# <- { "return": {} }
208#
209##
210{ 'command': 'add_client',
211 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
212 '*tls': 'bool' } }
213
214##
215# @NameInfo:
216#
217# Guest name information.
218#
219# @name: The name of the guest
220#
221# Since: 0.14.0
222##
223{ 'struct': 'NameInfo', 'data': {'*name': 'str'} }
224
225##
226# @query-name:
227#
228# Return the name information of a guest.
229#
230# Returns: @NameInfo of the guest
231#
232# Since: 0.14.0
233#
234# Example:
235#
236# -> { "execute": "query-name" }
237# <- { "return": { "name": "qemu-name" } }
238#
239##
240{ 'command': 'query-name', 'returns': 'NameInfo' }
241
242##
243# @KvmInfo:
244#
245# Information about support for KVM acceleration
246#
247# @enabled: true if KVM acceleration is active
248#
249# @present: true if KVM acceleration is built into this executable
250#
251# Since: 0.14.0
252##
253{ 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
254
255##
256# @query-kvm:
257#
258# Returns information about KVM acceleration
259#
260# Returns: @KvmInfo
261#
262# Since: 0.14.0
263#
264# Example:
265#
266# -> { "execute": "query-kvm" }
267# <- { "return": { "enabled": true, "present": true } }
268#
269##
270{ 'command': 'query-kvm', 'returns': 'KvmInfo' }
271
272##
273# @UuidInfo:
274#
275# Guest UUID information (Universally Unique Identifier).
276#
277# @UUID: the UUID of the guest
278#
279# Since: 0.14.0
280#
281# Notes: If no UUID was specified for the guest, a null UUID is returned.
282##
283{ 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
284
285##
286# @query-uuid:
287#
288# Query the guest UUID information.
289#
290# Returns: The @UuidInfo for the guest
291#
292# Since: 0.14.0
293#
294# Example:
295#
296# -> { "execute": "query-uuid" }
297# <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
298#
299##
300{ 'command': 'query-uuid', 'returns': 'UuidInfo' }
301
302##
303# @EventInfo:
304#
305# Information about a QMP event
306#
307# @name: The event name
308#
309# Since: 1.2.0
310##
311{ 'struct': 'EventInfo', 'data': {'name': 'str'} }
312
313##
314# @query-events:
315#
316# Return a list of supported QMP events by this server
317#
318# Returns: A list of @EventInfo for all supported events
319#
320# Since: 1.2.0
321#
322# Example:
323#
324# -> { "execute": "query-events" }
325# <- {
326# "return": [
327# {
328# "name":"SHUTDOWN"
329# },
330# {
331# "name":"RESET"
332# }
333# ]
334# }
335#
336# Note: This example has been shortened as the real response is too long.
337#
338##
339{ 'command': 'query-events', 'returns': ['EventInfo'] }
340
341##
342# @CpuInfoArch:
343#
344# An enumeration of cpu types that enable additional information during
345# @query-cpus and @query-cpus-fast.
346#
347# @s390: since 2.12
348#
Michael Clark25fa1942018-03-03 01:32:59 +1300349# @riscv: since 2.12
350#
Markus Armbruster112ed242018-02-26 17:13:27 -0600351# Since: 2.6
352##
353{ 'enum': 'CpuInfoArch',
Michael Clark25fa1942018-03-03 01:32:59 +1300354 'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 's390', 'riscv', 'other' ] }
Markus Armbruster112ed242018-02-26 17:13:27 -0600355
356##
357# @CpuInfo:
358#
359# Information about a virtual CPU
360#
361# @CPU: the index of the virtual CPU
362#
363# @current: this only exists for backwards compatibility and should be ignored
364#
365# @halted: true if the virtual CPU is in the halt state. Halt usually refers
366# to a processor specific low power mode.
367#
368# @qom_path: path to the CPU object in the QOM tree (since 2.4)
369#
370# @thread_id: ID of the underlying host thread
371#
372# @props: properties describing to which node/socket/core/thread
373# virtual CPU belongs to, provided if supported by board (since 2.10)
374#
375# @arch: architecture of the cpu, which determines which additional fields
376# will be listed (since 2.6)
377#
378# Since: 0.14.0
379#
380# Notes: @halted is a transient state that changes frequently. By the time the
381# data is sent to the client, the guest may no longer be halted.
382##
383{ 'union': 'CpuInfo',
384 'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool',
385 'qom_path': 'str', 'thread_id': 'int',
386 '*props': 'CpuInstanceProperties', 'arch': 'CpuInfoArch' },
387 'discriminator': 'arch',
388 'data': { 'x86': 'CpuInfoX86',
389 'sparc': 'CpuInfoSPARC',
390 'ppc': 'CpuInfoPPC',
391 'mips': 'CpuInfoMIPS',
392 'tricore': 'CpuInfoTricore',
393 's390': 'CpuInfoS390',
Michael Clark25fa1942018-03-03 01:32:59 +1300394 'riscv': 'CpuInfoRISCV',
Markus Armbruster112ed242018-02-26 17:13:27 -0600395 'other': 'CpuInfoOther' } }
396
397##
398# @CpuInfoX86:
399#
400# Additional information about a virtual i386 or x86_64 CPU
401#
402# @pc: the 64-bit instruction pointer
403#
404# Since: 2.6
405##
406{ 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } }
407
408##
409# @CpuInfoSPARC:
410#
411# Additional information about a virtual SPARC CPU
412#
413# @pc: the PC component of the instruction pointer
414#
415# @npc: the NPC component of the instruction pointer
416#
417# Since: 2.6
418##
419{ 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } }
420
421##
422# @CpuInfoPPC:
423#
424# Additional information about a virtual PPC CPU
425#
426# @nip: the instruction pointer
427#
428# Since: 2.6
429##
430{ 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } }
431
432##
433# @CpuInfoMIPS:
434#
435# Additional information about a virtual MIPS CPU
436#
437# @PC: the instruction pointer
438#
439# Since: 2.6
440##
441{ 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } }
442
443##
444# @CpuInfoTricore:
445#
446# Additional information about a virtual Tricore CPU
447#
448# @PC: the instruction pointer
449#
450# Since: 2.6
451##
452{ 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } }
453
454##
Michael Clark25fa1942018-03-03 01:32:59 +1300455# @CpuInfoRISCV:
456#
457# Additional information about a virtual RISCV CPU
458#
459# @pc: the instruction pointer
460#
461# Since 2.12
462##
463{ 'struct': 'CpuInfoRISCV', 'data': { 'pc': 'int' } }
464
465##
Markus Armbruster112ed242018-02-26 17:13:27 -0600466# @CpuInfoOther:
467#
468# No additional information is available about the virtual CPU
469#
470# Since: 2.6
471#
472##
473{ 'struct': 'CpuInfoOther', 'data': { } }
474
475##
476# @CpuS390State:
477#
478# An enumeration of cpu states that can be assumed by a virtual
479# S390 CPU
480#
481# Since: 2.12
482##
483{ 'enum': 'CpuS390State',
484 'prefix': 'S390_CPU_STATE',
485 'data': [ 'uninitialized', 'stopped', 'check-stop', 'operating', 'load' ] }
486
487##
488# @CpuInfoS390:
489#
490# Additional information about a virtual S390 CPU
491#
492# @cpu-state: the virtual CPU's state
493#
494# Since: 2.12
495##
496{ 'struct': 'CpuInfoS390', 'data': { 'cpu-state': 'CpuS390State' } }
497
498##
499# @query-cpus:
500#
501# Returns a list of information about each virtual CPU.
502#
503# This command causes vCPU threads to exit to userspace, which causes
504# a small interruption to guest CPU execution. This will have a negative
505# impact on realtime guests and other latency sensitive guest workloads.
506# It is recommended to use @query-cpus-fast instead of this command to
507# avoid the vCPU interruption.
508#
509# Returns: a list of @CpuInfo for each virtual CPU
510#
511# Since: 0.14.0
512#
513# Example:
514#
515# -> { "execute": "query-cpus" }
516# <- { "return": [
517# {
518# "CPU":0,
519# "current":true,
520# "halted":false,
521# "qom_path":"/machine/unattached/device[0]",
522# "arch":"x86",
523# "pc":3227107138,
524# "thread_id":3134
525# },
526# {
527# "CPU":1,
528# "current":false,
529# "halted":true,
530# "qom_path":"/machine/unattached/device[2]",
531# "arch":"x86",
532# "pc":7108165,
533# "thread_id":3135
534# }
535# ]
536# }
537#
538# Notes: This interface is deprecated (since 2.12.0), and it is strongly
539# recommended that you avoid using it. Use @query-cpus-fast to
540# obtain information about virtual CPUs.
541#
542##
543{ 'command': 'query-cpus', 'returns': ['CpuInfo'] }
544
545##
546# @CpuInfoFast:
547#
548# Information about a virtual CPU
549#
550# @cpu-index: index of the virtual CPU
551#
552# @qom-path: path to the CPU object in the QOM tree
553#
554# @thread-id: ID of the underlying host thread
555#
556# @props: properties describing to which node/socket/core/thread
557# virtual CPU belongs to, provided if supported by board
558#
559# @arch: architecture of the cpu, which determines which additional fields
560# will be listed
561#
562# Since: 2.12
563#
564##
565{ 'union': 'CpuInfoFast',
566 'base': {'cpu-index': 'int', 'qom-path': 'str',
567 'thread-id': 'int', '*props': 'CpuInstanceProperties',
568 'arch': 'CpuInfoArch' },
569 'discriminator': 'arch',
570 'data': { 'x86': 'CpuInfoOther',
571 'sparc': 'CpuInfoOther',
572 'ppc': 'CpuInfoOther',
573 'mips': 'CpuInfoOther',
574 'tricore': 'CpuInfoOther',
575 's390': 'CpuInfoS390',
Michael Clark25fa1942018-03-03 01:32:59 +1300576 'riscv': 'CpuInfoRISCV',
Markus Armbruster112ed242018-02-26 17:13:27 -0600577 'other': 'CpuInfoOther' } }
578
579##
580# @query-cpus-fast:
581#
582# Returns information about all virtual CPUs. This command does not
583# incur a performance penalty and should be used in production
584# instead of query-cpus.
585#
586# Returns: list of @CpuInfoFast
587#
588# Since: 2.12
589#
590# Example:
591#
592# -> { "execute": "query-cpus-fast" }
593# <- { "return": [
594# {
595# "thread-id": 25627,
596# "props": {
597# "core-id": 0,
598# "thread-id": 0,
599# "socket-id": 0
600# },
601# "qom-path": "/machine/unattached/device[0]",
602# "arch":"x86",
603# "cpu-index": 0
604# },
605# {
606# "thread-id": 25628,
607# "props": {
608# "core-id": 0,
609# "thread-id": 0,
610# "socket-id": 1
611# },
612# "qom-path": "/machine/unattached/device[2]",
613# "arch":"x86",
614# "cpu-index": 1
615# }
616# ]
617# }
618##
619{ 'command': 'query-cpus-fast', 'returns': [ 'CpuInfoFast' ] }
620
621##
622# @IOThreadInfo:
623#
624# Information about an iothread
625#
626# @id: the identifier of the iothread
627#
628# @thread-id: ID of the underlying host thread
629#
630# @poll-max-ns: maximum polling time in ns, 0 means polling is disabled
631# (since 2.9)
632#
633# @poll-grow: how many ns will be added to polling time, 0 means that it's not
634# configured (since 2.9)
635#
636# @poll-shrink: how many ns will be removed from polling time, 0 means that
637# it's not configured (since 2.9)
638#
639# Since: 2.0
640##
641{ 'struct': 'IOThreadInfo',
642 'data': {'id': 'str',
643 'thread-id': 'int',
644 'poll-max-ns': 'int',
645 'poll-grow': 'int',
646 'poll-shrink': 'int' } }
647
648##
649# @query-iothreads:
650#
651# Returns a list of information about each iothread.
652#
653# Note: this list excludes the QEMU main loop thread, which is not declared
654# using the -object iothread command-line option. It is always the main thread
655# of the process.
656#
657# Returns: a list of @IOThreadInfo for each iothread
658#
659# Since: 2.0
660#
661# Example:
662#
663# -> { "execute": "query-iothreads" }
664# <- { "return": [
665# {
666# "id":"iothread0",
667# "thread-id":3134
668# },
669# {
670# "id":"iothread1",
671# "thread-id":3135
672# }
673# ]
674# }
675#
676##
677{ 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
678
679##
680# @BalloonInfo:
681#
682# Information about the guest balloon device.
683#
684# @actual: the number of bytes the balloon currently contains
685#
686# Since: 0.14.0
687#
688##
689{ 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
690
691##
692# @query-balloon:
693#
694# Return information about the balloon device.
695#
696# Returns: @BalloonInfo on success
697#
698# If the balloon driver is enabled but not functional because the KVM
699# kernel module cannot support it, KvmMissingCap
700#
701# If no balloon device is present, DeviceNotActive
702#
703# Since: 0.14.0
704#
705# Example:
706#
707# -> { "execute": "query-balloon" }
708# <- { "return": {
709# "actual": 1073741824,
710# }
711# }
712#
713##
714{ 'command': 'query-balloon', 'returns': 'BalloonInfo' }
715
716##
717# @BALLOON_CHANGE:
718#
719# Emitted when the guest changes the actual BALLOON level. This value is
720# equivalent to the @actual field return by the 'query-balloon' command
721#
722# @actual: actual level of the guest memory balloon in bytes
723#
724# Note: this event is rate-limited.
725#
726# Since: 1.2
727#
728# Example:
729#
730# <- { "event": "BALLOON_CHANGE",
731# "data": { "actual": 944766976 },
732# "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
733#
734##
735{ 'event': 'BALLOON_CHANGE',
736 'data': { 'actual': 'int' } }
737
738##
739# @PciMemoryRange:
740#
741# A PCI device memory region
742#
743# @base: the starting address (guest physical)
744#
745# @limit: the ending address (guest physical)
746#
747# Since: 0.14.0
748##
749{ 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
750
751##
752# @PciMemoryRegion:
753#
754# Information about a PCI device I/O region.
755#
756# @bar: the index of the Base Address Register for this region
757#
758# @type: 'io' if the region is a PIO region
759# 'memory' if the region is a MMIO region
760#
761# @size: memory size
762#
763# @prefetch: if @type is 'memory', true if the memory is prefetchable
764#
765# @mem_type_64: if @type is 'memory', true if the BAR is 64-bit
766#
767# Since: 0.14.0
768##
769{ 'struct': 'PciMemoryRegion',
770 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
771 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
772
773##
774# @PciBusInfo:
775#
776# Information about a bus of a PCI Bridge device
777#
778# @number: primary bus interface number. This should be the number of the
779# bus the device resides on.
780#
781# @secondary: secondary bus interface number. This is the number of the
782# main bus for the bridge
783#
784# @subordinate: This is the highest number bus that resides below the
785# bridge.
786#
787# @io_range: The PIO range for all devices on this bridge
788#
789# @memory_range: The MMIO range for all devices on this bridge
790#
791# @prefetchable_range: The range of prefetchable MMIO for all devices on
792# this bridge
793#
794# Since: 2.4
795##
796{ 'struct': 'PciBusInfo',
797 'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
798 'io_range': 'PciMemoryRange',
799 'memory_range': 'PciMemoryRange',
800 'prefetchable_range': 'PciMemoryRange' } }
801
802##
803# @PciBridgeInfo:
804#
805# Information about a PCI Bridge device
806#
807# @bus: information about the bus the device resides on
808#
809# @devices: a list of @PciDeviceInfo for each device on this bridge
810#
811# Since: 0.14.0
812##
813{ 'struct': 'PciBridgeInfo',
814 'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
815
816##
817# @PciDeviceClass:
818#
819# Information about the Class of a PCI device
820#
821# @desc: a string description of the device's class
822#
823# @class: the class code of the device
824#
825# Since: 2.4
826##
827{ 'struct': 'PciDeviceClass',
828 'data': {'*desc': 'str', 'class': 'int'} }
829
830##
831# @PciDeviceId:
832#
833# Information about the Id of a PCI device
834#
835# @device: the PCI device id
836#
837# @vendor: the PCI vendor id
838#
839# Since: 2.4
840##
841{ 'struct': 'PciDeviceId',
842 'data': {'device': 'int', 'vendor': 'int'} }
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#
1111# Adds CPU with specified ID
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#
1119# Example:
1120#
1121# -> { "execute": "cpu-add", "arguments": { "id": 2 } }
1122# <- { "return": {} }
1123#
1124##
1125{ 'command': 'cpu-add', 'data': {'id': 'int'} }
1126
1127##
1128# @memsave:
1129#
1130# Save a portion of guest memory to a file.
1131#
1132# @val: the virtual address of the guest to start from
1133#
1134# @size: the size of memory region to save
1135#
1136# @filename: the file to save the memory to as binary data
1137#
1138# @cpu-index: the index of the virtual CPU to use for translating the
1139# virtual address (defaults to CPU 0)
1140#
1141# Returns: Nothing on success
1142#
1143# Since: 0.14.0
1144#
1145# Notes: Errors were not reliably returned until 1.1
1146#
1147# Example:
1148#
1149# -> { "execute": "memsave",
1150# "arguments": { "val": 10,
1151# "size": 100,
1152# "filename": "/tmp/virtual-mem-dump" } }
1153# <- { "return": {} }
1154#
1155##
1156{ 'command': 'memsave',
1157 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1158
1159##
1160# @pmemsave:
1161#
1162# Save a portion of guest physical memory to a file.
1163#
1164# @val: the physical address of the guest to start from
1165#
1166# @size: the size of memory region to save
1167#
1168# @filename: the file to save the memory to as binary data
1169#
1170# Returns: Nothing on success
1171#
1172# Since: 0.14.0
1173#
1174# Notes: Errors were not reliably returned until 1.1
1175#
1176# Example:
1177#
1178# -> { "execute": "pmemsave",
1179# "arguments": { "val": 10,
1180# "size": 100,
1181# "filename": "/tmp/physical-mem-dump" } }
1182# <- { "return": {} }
1183#
1184##
1185{ 'command': 'pmemsave',
1186 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1187
1188##
1189# @cont:
1190#
1191# Resume guest VCPU execution.
1192#
1193# Since: 0.14.0
1194#
1195# Returns: If successful, nothing
1196#
1197# Notes: This command will succeed if the guest is currently running. It
1198# will also succeed if the guest is in the "inmigrate" state; in
1199# this case, the effect of the command is to make sure the guest
1200# starts once migration finishes, removing the effect of the -S
1201# command line option if it was passed.
1202#
1203# Example:
1204#
1205# -> { "execute": "cont" }
1206# <- { "return": {} }
1207#
1208##
1209{ 'command': 'cont' }
1210
1211##
1212# @system_wakeup:
1213#
1214# Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1215#
1216# Since: 1.1
1217#
1218# Returns: nothing.
1219#
1220# Example:
1221#
1222# -> { "execute": "system_wakeup" }
1223# <- { "return": {} }
1224#
1225##
1226{ 'command': 'system_wakeup' }
1227
1228##
1229# @inject-nmi:
1230#
1231# Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
1232# The command fails when the guest doesn't support injecting.
1233#
1234# Returns: If successful, nothing
1235#
1236# Since: 0.14.0
1237#
1238# Note: prior to 2.1, this command was only supported for x86 and s390 VMs
1239#
1240# Example:
1241#
1242# -> { "execute": "inject-nmi" }
1243# <- { "return": {} }
1244#
1245##
1246{ 'command': 'inject-nmi' }
1247
1248##
1249# @balloon:
1250#
1251# Request the balloon driver to change its balloon size.
1252#
1253# @value: the target size of the balloon in bytes
1254#
1255# Returns: Nothing on success
1256# If the balloon driver is enabled but not functional because the KVM
1257# kernel module cannot support it, KvmMissingCap
1258# If no balloon device is present, DeviceNotActive
1259#
1260# Notes: This command just issues a request to the guest. When it returns,
1261# the balloon size may not have changed. A guest can change the balloon
1262# size independent of this command.
1263#
1264# Since: 0.14.0
1265#
1266# Example:
1267#
1268# -> { "execute": "balloon", "arguments": { "value": 536870912 } }
1269# <- { "return": {} }
1270#
1271##
1272{ 'command': 'balloon', 'data': {'value': 'int'} }
1273
1274##
1275# @human-monitor-command:
1276#
1277# Execute a command on the human monitor and return the output.
1278#
1279# @command-line: the command to execute in the human monitor
1280#
1281# @cpu-index: The CPU to use for commands that require an implicit CPU
1282#
1283# Returns: the output of the command as a string
1284#
1285# Since: 0.14.0
1286#
1287# Notes: This command only exists as a stop-gap. Its use is highly
1288# discouraged. The semantics of this command are not
1289# guaranteed: this means that command names, arguments and
1290# responses can change or be removed at ANY time. Applications
1291# that rely on long term stability guarantees should NOT
1292# use this command.
1293#
1294# Known limitations:
1295#
1296# * This command is stateless, this means that commands that depend
1297# on state information (such as getfd) might not work
1298#
1299# * Commands that prompt the user for data don't currently work
1300#
1301# Example:
1302#
1303# -> { "execute": "human-monitor-command",
1304# "arguments": { "command-line": "info kvm" } }
1305# <- { "return": "kvm support: enabled\r\n" }
1306#
1307##
1308{ 'command': 'human-monitor-command',
1309 'data': {'command-line': 'str', '*cpu-index': 'int'},
1310 'returns': 'str' }
1311
1312##
1313# @ObjectPropertyInfo:
1314#
1315# @name: the name of the property
1316#
1317# @type: the type of the property. This will typically come in one of four
1318# forms:
1319#
1320# 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1321# These types are mapped to the appropriate JSON type.
1322#
1323# 2) A child type in the form 'child<subtype>' where subtype is a qdev
1324# device type name. Child properties create the composition tree.
1325#
1326# 3) A link type in the form 'link<subtype>' where subtype is a qdev
1327# device type name. Link properties form the device model graph.
1328#
Alexey Kardashevskiy35f63762018-03-02 00:09:38 +11001329# @description: if specified, the description of the property.
1330#
Markus Armbruster112ed242018-02-26 17:13:27 -06001331# Since: 1.2
1332##
1333{ 'struct': 'ObjectPropertyInfo',
Alexey Kardashevskiy35f63762018-03-02 00:09:38 +11001334 'data': { 'name': 'str', 'type': 'str', '*description': 'str' } }
Markus Armbruster112ed242018-02-26 17:13:27 -06001335
1336##
1337# @qom-list:
1338#
1339# This command will list any properties of a object given a path in the object
1340# model.
1341#
1342# @path: the path within the object model. See @qom-get for a description of
1343# this parameter.
1344#
1345# Returns: a list of @ObjectPropertyInfo that describe the properties of the
1346# object.
1347#
1348# Since: 1.2
1349##
1350{ 'command': 'qom-list',
1351 'data': { 'path': 'str' },
1352 'returns': [ 'ObjectPropertyInfo' ] }
1353
1354##
1355# @qom-get:
1356#
1357# This command will get a property from a object model path and return the
1358# value.
1359#
1360# @path: The path within the object model. There are two forms of supported
1361# paths--absolute and partial paths.
1362#
1363# Absolute paths are derived from the root object and can follow child<>
1364# or link<> properties. Since they can follow link<> properties, they
1365# can be arbitrarily long. Absolute paths look like absolute filenames
1366# and are prefixed with a leading slash.
1367#
1368# Partial paths look like relative filenames. They do not begin
1369# with a prefix. The matching rules for partial paths are subtle but
1370# designed to make specifying objects easy. At each level of the
1371# composition tree, the partial path is matched as an absolute path.
1372# The first match is not returned. At least two matches are searched
1373# for. A successful result is only returned if only one match is
1374# found. If more than one match is found, a flag is return to
1375# indicate that the match was ambiguous.
1376#
1377# @property: The property name to read
1378#
1379# Returns: The property value. The type depends on the property
1380# type. child<> and link<> properties are returned as #str
1381# pathnames. All integer property types (u8, u16, etc) are
1382# returned as #int.
1383#
1384# Since: 1.2
1385##
1386{ 'command': 'qom-get',
1387 'data': { 'path': 'str', 'property': 'str' },
1388 'returns': 'any' }
1389
1390##
1391# @qom-set:
1392#
1393# This command will set a property from a object model path.
1394#
1395# @path: see @qom-get for a description of this parameter
1396#
1397# @property: the property name to set
1398#
1399# @value: a value who's type is appropriate for the property type. See @qom-get
1400# for a description of type mapping.
1401#
1402# Since: 1.2
1403##
1404{ 'command': 'qom-set',
1405 'data': { 'path': 'str', 'property': 'str', 'value': 'any' } }
1406
1407##
1408# @change:
1409#
1410# This command is multiple commands multiplexed together.
1411#
1412# @device: This is normally the name of a block device but it may also be 'vnc'.
1413# when it's 'vnc', then sub command depends on @target
1414#
1415# @target: If @device is a block device, then this is the new filename.
1416# If @device is 'vnc', then if the value 'password' selects the vnc
1417# change password command. Otherwise, this specifies a new server URI
1418# address to listen to for VNC connections.
1419#
1420# @arg: If @device is a block device, then this is an optional format to open
1421# the device with.
1422# If @device is 'vnc' and @target is 'password', this is the new VNC
1423# password to set. See change-vnc-password for additional notes.
1424#
1425# Returns: Nothing on success.
1426# If @device is not a valid block device, DeviceNotFound
1427#
1428# Notes: This interface is deprecated, and it is strongly recommended that you
1429# avoid using it. For changing block devices, use
1430# blockdev-change-medium; for changing VNC parameters, use
1431# change-vnc-password.
1432#
1433# Since: 0.14.0
1434#
1435# Example:
1436#
1437# 1. Change a removable medium
1438#
1439# -> { "execute": "change",
1440# "arguments": { "device": "ide1-cd0",
1441# "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } }
1442# <- { "return": {} }
1443#
1444# 2. Change VNC password
1445#
1446# -> { "execute": "change",
1447# "arguments": { "device": "vnc", "target": "password",
1448# "arg": "foobar1" } }
1449# <- { "return": {} }
1450#
1451##
1452{ 'command': 'change',
1453 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
1454
1455##
1456# @ObjectTypeInfo:
1457#
1458# This structure describes a search result from @qom-list-types
1459#
1460# @name: the type name found in the search
1461#
1462# @abstract: the type is abstract and can't be directly instantiated.
1463# Omitted if false. (since 2.10)
1464#
1465# @parent: Name of parent type, if any (since 2.10)
1466#
1467# Since: 1.1
1468##
1469{ 'struct': 'ObjectTypeInfo',
1470 'data': { 'name': 'str', '*abstract': 'bool', '*parent': 'str' } }
1471
1472##
1473# @qom-list-types:
1474#
1475# This command will return a list of types given search parameters
1476#
1477# @implements: if specified, only return types that implement this type name
1478#
1479# @abstract: if true, include abstract types in the results
1480#
1481# Returns: a list of @ObjectTypeInfo or an empty list if no results are found
1482#
1483# Since: 1.1
1484##
1485{ 'command': 'qom-list-types',
1486 'data': { '*implements': 'str', '*abstract': 'bool' },
1487 'returns': [ 'ObjectTypeInfo' ] }
1488
1489##
Markus Armbruster112ed242018-02-26 17:13:27 -06001490# @device-list-properties:
1491#
1492# List properties associated with a device.
1493#
1494# @typename: the type name of a device
1495#
Alexey Kardashevskiy35f63762018-03-02 00:09:38 +11001496# Returns: a list of ObjectPropertyInfo describing a devices properties
Markus Armbruster112ed242018-02-26 17:13:27 -06001497#
1498# Since: 1.2
1499##
1500{ 'command': 'device-list-properties',
1501 'data': { 'typename': 'str'},
Alexey Kardashevskiy35f63762018-03-02 00:09:38 +11001502 'returns': [ 'ObjectPropertyInfo' ] }
Markus Armbruster112ed242018-02-26 17:13:27 -06001503
1504##
Alexey Kardashevskiy961c47b2018-03-02 00:09:39 +11001505# @qom-list-properties:
1506#
1507# List properties associated with a QOM object.
1508#
1509# @typename: the type name of an object
1510#
1511# Returns: a list of ObjectPropertyInfo describing object properties
1512#
1513# Since: 2.12
1514##
1515{ 'command': 'qom-list-properties',
1516 'data': { 'typename': 'str'},
1517 'returns': [ 'ObjectPropertyInfo' ] }
1518
1519##
Markus Armbruster112ed242018-02-26 17:13:27 -06001520# @xen-set-global-dirty-log:
1521#
1522# Enable or disable the global dirty log mode.
1523#
1524# @enable: true to enable, false to disable.
1525#
1526# Returns: nothing
1527#
1528# Since: 1.3
1529#
1530# Example:
1531#
1532# -> { "execute": "xen-set-global-dirty-log",
1533# "arguments": { "enable": true } }
1534# <- { "return": {} }
1535#
1536##
1537{ 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
1538
1539##
1540# @device_add:
1541#
1542# @driver: the name of the new device's driver
1543#
1544# @bus: the device's parent bus (device tree path)
1545#
1546# @id: the device's ID, must be unique
1547#
1548# Additional arguments depend on the type.
1549#
1550# Add a device.
1551#
1552# Notes:
1553# 1. For detailed information about this command, please refer to the
1554# 'docs/qdev-device-use.txt' file.
1555#
1556# 2. It's possible to list device properties by running QEMU with the
1557# "-device DEVICE,help" command-line argument, where DEVICE is the
1558# device's name
1559#
1560# Example:
1561#
1562# -> { "execute": "device_add",
1563# "arguments": { "driver": "e1000", "id": "net1",
1564# "bus": "pci.0",
1565# "mac": "52:54:00:12:34:56" } }
1566# <- { "return": {} }
1567#
1568# TODO: This command effectively bypasses QAPI completely due to its
1569# "additional arguments" business. It shouldn't have been added to
1570# the schema in this form. It should be qapified properly, or
1571# replaced by a properly qapified command.
1572#
1573# Since: 0.13
1574##
1575{ 'command': 'device_add',
1576 'data': {'driver': 'str', '*bus': 'str', '*id': 'str'},
1577 'gen': false } # so we can get the additional arguments
1578
1579##
1580# @device_del:
1581#
1582# Remove a device from a guest
1583#
1584# @id: the device's ID or QOM path
1585#
1586# Returns: Nothing on success
1587# If @id is not a valid device, DeviceNotFound
1588#
1589# Notes: When this command completes, the device may not be removed from the
1590# guest. Hot removal is an operation that requires guest cooperation.
1591# This command merely requests that the guest begin the hot removal
1592# process. Completion of the device removal process is signaled with a
1593# DEVICE_DELETED event. Guest reset will automatically complete removal
1594# for all devices.
1595#
1596# Since: 0.14.0
1597#
1598# Example:
1599#
1600# -> { "execute": "device_del",
1601# "arguments": { "id": "net1" } }
1602# <- { "return": {} }
1603#
1604# -> { "execute": "device_del",
1605# "arguments": { "id": "/machine/peripheral-anon/device[0]" } }
1606# <- { "return": {} }
1607#
1608##
1609{ 'command': 'device_del', 'data': {'id': 'str'} }
1610
1611##
1612# @DEVICE_DELETED:
1613#
1614# Emitted whenever the device removal completion is acknowledged by the guest.
1615# At this point, it's safe to reuse the specified device ID. Device removal can
1616# be initiated by the guest or by HMP/QMP commands.
1617#
1618# @device: device name
1619#
1620# @path: device path
1621#
1622# Since: 1.5
1623#
1624# Example:
1625#
1626# <- { "event": "DEVICE_DELETED",
1627# "data": { "device": "virtio-net-pci-0",
1628# "path": "/machine/peripheral/virtio-net-pci-0" },
1629# "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
1630#
1631##
1632{ 'event': 'DEVICE_DELETED',
1633 'data': { '*device': 'str', 'path': 'str' } }
1634
1635##
1636# @DumpGuestMemoryFormat:
1637#
1638# An enumeration of guest-memory-dump's format.
1639#
1640# @elf: elf format
1641#
1642# @kdump-zlib: kdump-compressed format with zlib-compressed
1643#
1644# @kdump-lzo: kdump-compressed format with lzo-compressed
1645#
1646# @kdump-snappy: kdump-compressed format with snappy-compressed
1647#
1648# Since: 2.0
1649##
1650{ 'enum': 'DumpGuestMemoryFormat',
1651 'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
1652
1653##
1654# @dump-guest-memory:
1655#
1656# Dump guest's memory to vmcore. It is a synchronous operation that can take
1657# very long depending on the amount of guest memory.
1658#
1659# @paging: if true, do paging to get guest's memory mapping. This allows
1660# using gdb to process the core file.
1661#
1662# IMPORTANT: this option can make QEMU allocate several gigabytes
1663# of RAM. This can happen for a large guest, or a
1664# malicious guest pretending to be large.
1665#
1666# Also, paging=true has the following limitations:
1667#
1668# 1. The guest may be in a catastrophic state or can have corrupted
1669# memory, which cannot be trusted
1670# 2. The guest can be in real-mode even if paging is enabled. For
1671# example, the guest uses ACPI to sleep, and ACPI sleep state
1672# goes in real-mode
1673# 3. Currently only supported on i386 and x86_64.
1674#
1675# @protocol: the filename or file descriptor of the vmcore. The supported
1676# protocols are:
1677#
1678# 1. file: the protocol starts with "file:", and the following
1679# string is the file's path.
1680# 2. fd: the protocol starts with "fd:", and the following string
1681# is the fd's name.
1682#
1683# @detach: if true, QMP will return immediately rather than
1684# waiting for the dump to finish. The user can track progress
1685# using "query-dump". (since 2.6).
1686#
1687# @begin: if specified, the starting physical address.
1688#
1689# @length: if specified, the memory size, in bytes. If you don't
1690# want to dump all guest's memory, please specify the start @begin
1691# and @length
1692#
1693# @format: if specified, the format of guest memory dump. But non-elf
1694# format is conflict with paging and filter, ie. @paging, @begin and
1695# @length is not allowed to be specified with non-elf @format at the
1696# same time (since 2.0)
1697#
1698# Note: All boolean arguments default to false
1699#
1700# Returns: nothing on success
1701#
1702# Since: 1.2
1703#
1704# Example:
1705#
1706# -> { "execute": "dump-guest-memory",
1707# "arguments": { "protocol": "fd:dump" } }
1708# <- { "return": {} }
1709#
1710##
1711{ 'command': 'dump-guest-memory',
1712 'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool',
1713 '*begin': 'int', '*length': 'int',
1714 '*format': 'DumpGuestMemoryFormat'} }
1715
1716##
1717# @DumpStatus:
1718#
1719# Describe the status of a long-running background guest memory dump.
1720#
1721# @none: no dump-guest-memory has started yet.
1722#
1723# @active: there is one dump running in background.
1724#
1725# @completed: the last dump has finished successfully.
1726#
1727# @failed: the last dump has failed.
1728#
1729# Since: 2.6
1730##
1731{ 'enum': 'DumpStatus',
1732 'data': [ 'none', 'active', 'completed', 'failed' ] }
1733
1734##
1735# @DumpQueryResult:
1736#
1737# The result format for 'query-dump'.
1738#
1739# @status: enum of @DumpStatus, which shows current dump status
1740#
1741# @completed: bytes written in latest dump (uncompressed)
1742#
1743# @total: total bytes to be written in latest dump (uncompressed)
1744#
1745# Since: 2.6
1746##
1747{ 'struct': 'DumpQueryResult',
1748 'data': { 'status': 'DumpStatus',
1749 'completed': 'int',
1750 'total': 'int' } }
1751
1752##
1753# @query-dump:
1754#
1755# Query latest dump status.
1756#
1757# Returns: A @DumpStatus object showing the dump status.
1758#
1759# Since: 2.6
1760#
1761# Example:
1762#
1763# -> { "execute": "query-dump" }
1764# <- { "return": { "status": "active", "completed": 1024000,
1765# "total": 2048000 } }
1766#
1767##
1768{ 'command': 'query-dump', 'returns': 'DumpQueryResult' }
1769
1770##
1771# @DUMP_COMPLETED:
1772#
1773# Emitted when background dump has completed
1774#
Markus Armbrustereb815e22018-02-11 10:36:05 +01001775# @result: final dump status
Markus Armbruster112ed242018-02-26 17:13:27 -06001776#
1777# @error: human-readable error string that provides
1778# hint on why dump failed. Only presents on failure. The
1779# user should not try to interpret the error string.
1780#
1781# Since: 2.6
1782#
1783# Example:
1784#
1785# { "event": "DUMP_COMPLETED",
1786# "data": {"result": {"total": 1090650112, "status": "completed",
1787# "completed": 1090650112} } }
1788#
1789##
1790{ 'event': 'DUMP_COMPLETED' ,
1791 'data': { 'result': 'DumpQueryResult', '*error': 'str' } }
1792
1793##
1794# @DumpGuestMemoryCapability:
1795#
1796# A list of the available formats for dump-guest-memory
1797#
1798# Since: 2.0
1799##
1800{ 'struct': 'DumpGuestMemoryCapability',
1801 'data': {
1802 'formats': ['DumpGuestMemoryFormat'] } }
1803
1804##
1805# @query-dump-guest-memory-capability:
1806#
1807# Returns the available formats for dump-guest-memory
1808#
1809# Returns: A @DumpGuestMemoryCapability object listing available formats for
1810# dump-guest-memory
1811#
1812# Since: 2.0
1813#
1814# Example:
1815#
1816# -> { "execute": "query-dump-guest-memory-capability" }
1817# <- { "return": { "formats":
1818# ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] }
1819#
1820##
1821{ 'command': 'query-dump-guest-memory-capability',
1822 'returns': 'DumpGuestMemoryCapability' }
1823
1824##
1825# @dump-skeys:
1826#
1827# Dump guest's storage keys
1828#
1829# @filename: the path to the file to dump to
1830#
1831# This command is only supported on s390 architecture.
1832#
1833# Since: 2.5
1834#
1835# Example:
1836#
1837# -> { "execute": "dump-skeys",
1838# "arguments": { "filename": "/tmp/skeys" } }
1839# <- { "return": {} }
1840#
1841##
1842{ 'command': 'dump-skeys',
1843 'data': { 'filename': 'str' } }
1844
1845##
1846# @object-add:
1847#
1848# Create a QOM object.
1849#
1850# @qom-type: the class name for the object to be created
1851#
1852# @id: the name of the new object
1853#
1854# @props: a dictionary of properties to be passed to the backend
1855#
1856# Returns: Nothing on success
1857# Error if @qom-type is not a valid class name
1858#
1859# Since: 2.0
1860#
1861# Example:
1862#
1863# -> { "execute": "object-add",
1864# "arguments": { "qom-type": "rng-random", "id": "rng1",
1865# "props": { "filename": "/dev/hwrng" } } }
1866# <- { "return": {} }
1867#
1868##
1869{ 'command': 'object-add',
1870 'data': {'qom-type': 'str', 'id': 'str', '*props': 'any'} }
1871
1872##
1873# @object-del:
1874#
1875# Remove a QOM object.
1876#
1877# @id: the name of the QOM object to remove
1878#
1879# Returns: Nothing on success
1880# Error if @id is not a valid id for a QOM object
1881#
1882# Since: 2.0
1883#
1884# Example:
1885#
1886# -> { "execute": "object-del", "arguments": { "id": "rng1" } }
1887# <- { "return": {} }
1888#
1889##
1890{ 'command': 'object-del', 'data': {'id': 'str'} }
1891
1892##
1893# @getfd:
1894#
1895# Receive a file descriptor via SCM rights and assign it a name
1896#
1897# @fdname: file descriptor name
1898#
1899# Returns: Nothing on success
1900#
1901# Since: 0.14.0
1902#
1903# Notes: If @fdname already exists, the file descriptor assigned to
1904# it will be closed and replaced by the received file
1905# descriptor.
1906#
1907# The 'closefd' command can be used to explicitly close the
1908# file descriptor when it is no longer needed.
1909#
1910# Example:
1911#
1912# -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
1913# <- { "return": {} }
1914#
1915##
1916{ 'command': 'getfd', 'data': {'fdname': 'str'} }
1917
1918##
1919# @closefd:
1920#
1921# Close a file descriptor previously passed via SCM rights
1922#
1923# @fdname: file descriptor name
1924#
1925# Returns: Nothing on success
1926#
1927# Since: 0.14.0
1928#
1929# Example:
1930#
1931# -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
1932# <- { "return": {} }
1933#
1934##
1935{ 'command': 'closefd', 'data': {'fdname': 'str'} }
1936
1937##
1938# @MachineInfo:
1939#
1940# Information describing a machine.
1941#
1942# @name: the name of the machine
1943#
1944# @alias: an alias for the machine name
1945#
1946# @is-default: whether the machine is default
1947#
1948# @cpu-max: maximum number of CPUs supported by the machine type
1949# (since 1.5.0)
1950#
1951# @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
1952#
1953# Since: 1.2.0
1954##
1955{ 'struct': 'MachineInfo',
1956 'data': { 'name': 'str', '*alias': 'str',
1957 '*is-default': 'bool', 'cpu-max': 'int',
1958 'hotpluggable-cpus': 'bool'} }
1959
1960##
1961# @query-machines:
1962#
1963# Return a list of supported machines
1964#
1965# Returns: a list of MachineInfo
1966#
1967# Since: 1.2.0
1968##
1969{ 'command': 'query-machines', 'returns': ['MachineInfo'] }
1970
1971##
1972# @CpuDefinitionInfo:
1973#
1974# Virtual CPU definition.
1975#
1976# @name: the name of the CPU definition
1977#
1978# @migration-safe: whether a CPU definition can be safely used for
1979# migration in combination with a QEMU compatibility machine
1980# when migrating between different QMU versions and between
1981# hosts with different sets of (hardware or software)
1982# capabilities. If not provided, information is not available
1983# and callers should not assume the CPU definition to be
1984# migration-safe. (since 2.8)
1985#
1986# @static: whether a CPU definition is static and will not change depending on
1987# QEMU version, machine type, machine options and accelerator options.
1988# A static model is always migration-safe. (since 2.8)
1989#
1990# @unavailable-features: List of properties that prevent
1991# the CPU model from running in the current
1992# host. (since 2.8)
1993# @typename: Type name that can be used as argument to @device-list-properties,
1994# to introspect properties configurable using -cpu or -global.
1995# (since 2.9)
1996#
1997# @unavailable-features is a list of QOM property names that
1998# represent CPU model attributes that prevent the CPU from running.
1999# If the QOM property is read-only, that means there's no known
2000# way to make the CPU model run in the current host. Implementations
2001# that choose not to provide specific information return the
2002# property name "type".
2003# If the property is read-write, it means that it MAY be possible
2004# to run the CPU model in the current host if that property is
2005# changed. Management software can use it as hints to suggest or
2006# choose an alternative for the user, or just to generate meaningful
2007# error messages explaining why the CPU model can't be used.
2008# If @unavailable-features is an empty list, the CPU model is
2009# runnable using the current host and machine-type.
2010# If @unavailable-features is not present, runnability
2011# information for the CPU is not available.
2012#
2013# Since: 1.2.0
2014##
2015{ 'struct': 'CpuDefinitionInfo',
2016 'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool',
2017 '*unavailable-features': [ 'str' ], 'typename': 'str' } }
2018
2019##
2020# @MemoryInfo:
2021#
2022# Actual memory information in bytes.
2023#
2024# @base-memory: size of "base" memory specified with command line
2025# option -m.
2026#
2027# @plugged-memory: size of memory that can be hot-unplugged. This field
2028# is omitted if target doesn't support memory hotplug
2029# (i.e. CONFIG_MEM_HOTPLUG not defined on build time).
2030#
2031# Since: 2.11.0
2032##
2033{ 'struct': 'MemoryInfo',
2034 'data' : { 'base-memory': 'size', '*plugged-memory': 'size' } }
2035
2036##
2037# @query-memory-size-summary:
2038#
2039# Return the amount of initially allocated and present hotpluggable (if
2040# enabled) memory in bytes.
2041#
2042# Example:
2043#
2044# -> { "execute": "query-memory-size-summary" }
2045# <- { "return": { "base-memory": 4294967296, "plugged-memory": 0 } }
2046#
2047# Since: 2.11.0
2048##
2049{ 'command': 'query-memory-size-summary', 'returns': 'MemoryInfo' }
2050
2051##
2052# @query-cpu-definitions:
2053#
2054# Return a list of supported virtual CPU definitions
2055#
2056# Returns: a list of CpuDefInfo
2057#
2058# Since: 1.2.0
2059##
2060{ 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
2061
2062##
2063# @CpuModelInfo:
2064#
2065# Virtual CPU model.
2066#
2067# A CPU model consists of the name of a CPU definition, to which
2068# delta changes are applied (e.g. features added/removed). Most magic values
2069# that an architecture might require should be hidden behind the name.
2070# However, if required, architectures can expose relevant properties.
2071#
2072# @name: the name of the CPU definition the model is based on
2073# @props: a dictionary of QOM properties to be applied
2074#
2075# Since: 2.8.0
2076##
2077{ 'struct': 'CpuModelInfo',
2078 'data': { 'name': 'str',
2079 '*props': 'any' } }
2080
2081##
2082# @CpuModelExpansionType:
2083#
2084# An enumeration of CPU model expansion types.
2085#
2086# @static: Expand to a static CPU model, a combination of a static base
2087# model name and property delta changes. As the static base model will
2088# never change, the expanded CPU model will be the same, independent of
2089# independent of QEMU version, machine type, machine options, and
2090# accelerator options. Therefore, the resulting model can be used by
2091# tooling without having to specify a compatibility machine - e.g. when
2092# displaying the "host" model. static CPU models are migration-safe.
2093#
2094# @full: Expand all properties. The produced model is not guaranteed to be
2095# migration-safe, but allows tooling to get an insight and work with
2096# model details.
2097#
2098# Note: When a non-migration-safe CPU model is expanded in static mode, some
2099# features enabled by the CPU model may be omitted, because they can't be
2100# implemented by a static CPU model definition (e.g. cache info passthrough and
2101# PMU passthrough in x86). If you need an accurate representation of the
2102# features enabled by a non-migration-safe CPU model, use @full. If you need a
2103# static representation that will keep ABI compatibility even when changing QEMU
2104# version or machine-type, use @static (but keep in mind that some features may
2105# be omitted).
2106#
2107# Since: 2.8.0
2108##
2109{ 'enum': 'CpuModelExpansionType',
2110 'data': [ 'static', 'full' ] }
2111
2112
2113##
2114# @CpuModelExpansionInfo:
2115#
2116# The result of a cpu model expansion.
2117#
2118# @model: the expanded CpuModelInfo.
2119#
2120# Since: 2.8.0
2121##
2122{ 'struct': 'CpuModelExpansionInfo',
2123 'data': { 'model': 'CpuModelInfo' } }
2124
2125
2126##
2127# @query-cpu-model-expansion:
2128#
2129# Expands a given CPU model (or a combination of CPU model + additional options)
2130# to different granularities, allowing tooling to get an understanding what a
2131# specific CPU model looks like in QEMU under a certain configuration.
2132#
2133# This interface can be used to query the "host" CPU model.
2134#
2135# The data returned by this command may be affected by:
2136#
2137# * QEMU version: CPU models may look different depending on the QEMU version.
2138# (Except for CPU models reported as "static" in query-cpu-definitions.)
2139# * machine-type: CPU model may look different depending on the machine-type.
2140# (Except for CPU models reported as "static" in query-cpu-definitions.)
2141# * machine options (including accelerator): in some architectures, CPU models
2142# may look different depending on machine and accelerator options. (Except for
2143# CPU models reported as "static" in query-cpu-definitions.)
2144# * "-cpu" arguments and global properties: arguments to the -cpu option and
2145# global properties may affect expansion of CPU models. Using
2146# query-cpu-model-expansion while using these is not advised.
2147#
2148# Some architectures may not support all expansion types. s390x supports
2149# "full" and "static".
2150#
2151# Returns: a CpuModelExpansionInfo. Returns an error if expanding CPU models is
2152# not supported, if the model cannot be expanded, if the model contains
2153# an unknown CPU definition name, unknown properties or properties
2154# with a wrong type. Also returns an error if an expansion type is
2155# not supported.
2156#
2157# Since: 2.8.0
2158##
2159{ 'command': 'query-cpu-model-expansion',
2160 'data': { 'type': 'CpuModelExpansionType',
2161 'model': 'CpuModelInfo' },
2162 'returns': 'CpuModelExpansionInfo' }
2163
2164##
2165# @CpuModelCompareResult:
2166#
2167# An enumeration of CPU model comparison results. The result is usually
2168# calculated using e.g. CPU features or CPU generations.
2169#
2170# @incompatible: If model A is incompatible to model B, model A is not
2171# guaranteed to run where model B runs and the other way around.
2172#
2173# @identical: If model A is identical to model B, model A is guaranteed to run
2174# where model B runs and the other way around.
2175#
2176# @superset: If model A is a superset of model B, model B is guaranteed to run
2177# where model A runs. There are no guarantees about the other way.
2178#
2179# @subset: If model A is a subset of model B, model A is guaranteed to run
2180# where model B runs. There are no guarantees about the other way.
2181#
2182# Since: 2.8.0
2183##
2184{ 'enum': 'CpuModelCompareResult',
2185 'data': [ 'incompatible', 'identical', 'superset', 'subset' ] }
2186
2187##
2188# @CpuModelCompareInfo:
2189#
2190# The result of a CPU model comparison.
2191#
2192# @result: The result of the compare operation.
2193# @responsible-properties: List of properties that led to the comparison result
2194# not being identical.
2195#
2196# @responsible-properties is a list of QOM property names that led to
2197# both CPUs not being detected as identical. For identical models, this
2198# list is empty.
2199# If a QOM property is read-only, that means there's no known way to make the
2200# CPU models identical. If the special property name "type" is included, the
2201# models are by definition not identical and cannot be made identical.
2202#
2203# Since: 2.8.0
2204##
2205{ 'struct': 'CpuModelCompareInfo',
2206 'data': {'result': 'CpuModelCompareResult',
2207 'responsible-properties': ['str']
2208 }
2209}
2210
2211##
2212# @query-cpu-model-comparison:
2213#
2214# Compares two CPU models, returning how they compare in a specific
2215# configuration. The results indicates how both models compare regarding
2216# runnability. This result can be used by tooling to make decisions if a
2217# certain CPU model will run in a certain configuration or if a compatible
2218# CPU model has to be created by baselining.
2219#
2220# Usually, a CPU model is compared against the maximum possible CPU model
2221# of a certain configuration (e.g. the "host" model for KVM). If that CPU
2222# model is identical or a subset, it will run in that configuration.
2223#
2224# The result returned by this command may be affected by:
2225#
2226# * QEMU version: CPU models may look different depending on the QEMU version.
2227# (Except for CPU models reported as "static" in query-cpu-definitions.)
2228# * machine-type: CPU model may look different depending on the machine-type.
2229# (Except for CPU models reported as "static" in query-cpu-definitions.)
2230# * machine options (including accelerator): in some architectures, CPU models
2231# may look different depending on machine and accelerator options. (Except for
2232# CPU models reported as "static" in query-cpu-definitions.)
2233# * "-cpu" arguments and global properties: arguments to the -cpu option and
2234# global properties may affect expansion of CPU models. Using
2235# query-cpu-model-expansion while using these is not advised.
2236#
2237# Some architectures may not support comparing CPU models. s390x supports
2238# comparing CPU models.
2239#
2240# Returns: a CpuModelBaselineInfo. Returns an error if comparing CPU models is
2241# not supported, if a model cannot be used, if a model contains
2242# an unknown cpu definition name, unknown properties or properties
2243# with wrong types.
2244#
2245# Since: 2.8.0
2246##
2247{ 'command': 'query-cpu-model-comparison',
2248 'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' },
2249 'returns': 'CpuModelCompareInfo' }
2250
2251##
2252# @CpuModelBaselineInfo:
2253#
2254# The result of a CPU model baseline.
2255#
2256# @model: the baselined CpuModelInfo.
2257#
2258# Since: 2.8.0
2259##
2260{ 'struct': 'CpuModelBaselineInfo',
2261 'data': { 'model': 'CpuModelInfo' } }
2262
2263##
2264# @query-cpu-model-baseline:
2265#
2266# Baseline two CPU models, creating a compatible third model. The created
2267# model will always be a static, migration-safe CPU model (see "static"
2268# CPU model expansion for details).
2269#
2270# This interface can be used by tooling to create a compatible CPU model out
2271# two CPU models. The created CPU model will be identical to or a subset of
2272# both CPU models when comparing them. Therefore, the created CPU model is
2273# guaranteed to run where the given CPU models run.
2274#
2275# The result returned by this command may be affected by:
2276#
2277# * QEMU version: CPU models may look different depending on the QEMU version.
2278# (Except for CPU models reported as "static" in query-cpu-definitions.)
2279# * machine-type: CPU model may look different depending on the machine-type.
2280# (Except for CPU models reported as "static" in query-cpu-definitions.)
2281# * machine options (including accelerator): in some architectures, CPU models
2282# may look different depending on machine and accelerator options. (Except for
2283# CPU models reported as "static" in query-cpu-definitions.)
2284# * "-cpu" arguments and global properties: arguments to the -cpu option and
2285# global properties may affect expansion of CPU models. Using
2286# query-cpu-model-expansion while using these is not advised.
2287#
2288# Some architectures may not support baselining CPU models. s390x supports
2289# baselining CPU models.
2290#
2291# Returns: a CpuModelBaselineInfo. Returns an error if baselining CPU models is
2292# not supported, if a model cannot be used, if a model contains
2293# an unknown cpu definition name, unknown properties or properties
2294# with wrong types.
2295#
2296# Since: 2.8.0
2297##
2298{ 'command': 'query-cpu-model-baseline',
2299 'data': { 'modela': 'CpuModelInfo',
2300 'modelb': 'CpuModelInfo' },
2301 'returns': 'CpuModelBaselineInfo' }
2302
2303##
2304# @AddfdInfo:
2305#
2306# Information about a file descriptor that was added to an fd set.
2307#
2308# @fdset-id: The ID of the fd set that @fd was added to.
2309#
2310# @fd: The file descriptor that was received via SCM rights and
2311# added to the fd set.
2312#
2313# Since: 1.2.0
2314##
2315{ 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
2316
2317##
2318# @add-fd:
2319#
2320# Add a file descriptor, that was passed via SCM rights, to an fd set.
2321#
2322# @fdset-id: The ID of the fd set to add the file descriptor to.
2323#
2324# @opaque: A free-form string that can be used to describe the fd.
2325#
2326# Returns: @AddfdInfo on success
2327#
2328# If file descriptor was not received, FdNotSupplied
2329#
2330# If @fdset-id is a negative value, InvalidParameterValue
2331#
2332# Notes: The list of fd sets is shared by all monitor connections.
2333#
2334# If @fdset-id is not specified, a new fd set will be created.
2335#
2336# Since: 1.2.0
2337#
2338# Example:
2339#
2340# -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
2341# <- { "return": { "fdset-id": 1, "fd": 3 } }
2342#
2343##
2344{ 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
2345 'returns': 'AddfdInfo' }
2346
2347##
2348# @remove-fd:
2349#
2350# Remove a file descriptor from an fd set.
2351#
2352# @fdset-id: The ID of the fd set that the file descriptor belongs to.
2353#
2354# @fd: The file descriptor that is to be removed.
2355#
2356# Returns: Nothing on success
2357# If @fdset-id or @fd is not found, FdNotFound
2358#
2359# Since: 1.2.0
2360#
2361# Notes: The list of fd sets is shared by all monitor connections.
2362#
2363# If @fd is not specified, all file descriptors in @fdset-id
2364# will be removed.
2365#
2366# Example:
2367#
2368# -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
2369# <- { "return": {} }
2370#
2371##
2372{ 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
2373
2374##
2375# @FdsetFdInfo:
2376#
2377# Information about a file descriptor that belongs to an fd set.
2378#
2379# @fd: The file descriptor value.
2380#
2381# @opaque: A free-form string that can be used to describe the fd.
2382#
2383# Since: 1.2.0
2384##
2385{ 'struct': 'FdsetFdInfo',
2386 'data': {'fd': 'int', '*opaque': 'str'} }
2387
2388##
2389# @FdsetInfo:
2390#
2391# Information about an fd set.
2392#
2393# @fdset-id: The ID of the fd set.
2394#
2395# @fds: A list of file descriptors that belong to this fd set.
2396#
2397# Since: 1.2.0
2398##
2399{ 'struct': 'FdsetInfo',
2400 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
2401
2402##
2403# @query-fdsets:
2404#
2405# Return information describing all fd sets.
2406#
2407# Returns: A list of @FdsetInfo
2408#
2409# Since: 1.2.0
2410#
2411# Note: The list of fd sets is shared by all monitor connections.
2412#
2413# Example:
2414#
2415# -> { "execute": "query-fdsets" }
2416# <- { "return": [
2417# {
2418# "fds": [
2419# {
2420# "fd": 30,
2421# "opaque": "rdonly:/path/to/file"
2422# },
2423# {
2424# "fd": 24,
2425# "opaque": "rdwr:/path/to/file"
2426# }
2427# ],
2428# "fdset-id": 1
2429# },
2430# {
2431# "fds": [
2432# {
2433# "fd": 28
2434# },
2435# {
2436# "fd": 29
2437# }
2438# ],
2439# "fdset-id": 0
2440# }
2441# ]
2442# }
2443#
2444##
2445{ 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
2446
2447##
2448# @TargetInfo:
2449#
2450# Information describing the QEMU target.
2451#
2452# @arch: the target architecture (eg "x86_64", "i386", etc)
2453#
2454# Since: 1.2.0
2455##
2456{ 'struct': 'TargetInfo',
2457 'data': { 'arch': 'str' } }
2458
2459##
2460# @query-target:
2461#
2462# Return information about the target for this QEMU
2463#
2464# Returns: TargetInfo
2465#
2466# Since: 1.2.0
2467##
2468{ 'command': 'query-target', 'returns': 'TargetInfo' }
2469
2470##
2471# @AcpiTableOptions:
2472#
2473# Specify an ACPI table on the command line to load.
2474#
2475# At most one of @file and @data can be specified. The list of files specified
2476# by any one of them is loaded and concatenated in order. If both are omitted,
2477# @data is implied.
2478#
2479# Other fields / optargs can be used to override fields of the generic ACPI
2480# table header; refer to the ACPI specification 5.0, section 5.2.6 System
2481# Description Table Header. If a header field is not overridden, then the
2482# corresponding value from the concatenated blob is used (in case of @file), or
2483# it is filled in with a hard-coded value (in case of @data).
2484#
2485# String fields are copied into the matching ACPI member from lowest address
2486# upwards, and silently truncated / NUL-padded to length.
2487#
2488# @sig: table signature / identifier (4 bytes)
2489#
2490# @rev: table revision number (dependent on signature, 1 byte)
2491#
2492# @oem_id: OEM identifier (6 bytes)
2493#
2494# @oem_table_id: OEM table identifier (8 bytes)
2495#
2496# @oem_rev: OEM-supplied revision number (4 bytes)
2497#
2498# @asl_compiler_id: identifier of the utility that created the table
2499# (4 bytes)
2500#
2501# @asl_compiler_rev: revision number of the utility that created the
2502# table (4 bytes)
2503#
2504# @file: colon (:) separated list of pathnames to load and
2505# concatenate as table data. The resultant binary blob is expected to
2506# have an ACPI table header. At least one file is required. This field
2507# excludes @data.
2508#
2509# @data: colon (:) separated list of pathnames to load and
2510# concatenate as table data. The resultant binary blob must not have an
2511# ACPI table header. At least one file is required. This field excludes
2512# @file.
2513#
2514# Since: 1.5
2515##
2516{ 'struct': 'AcpiTableOptions',
2517 'data': {
2518 '*sig': 'str',
2519 '*rev': 'uint8',
2520 '*oem_id': 'str',
2521 '*oem_table_id': 'str',
2522 '*oem_rev': 'uint32',
2523 '*asl_compiler_id': 'str',
2524 '*asl_compiler_rev': 'uint32',
2525 '*file': 'str',
2526 '*data': 'str' }}
2527
2528##
2529# @CommandLineParameterType:
2530#
2531# Possible types for an option parameter.
2532#
2533# @string: accepts a character string
2534#
2535# @boolean: accepts "on" or "off"
2536#
2537# @number: accepts a number
2538#
2539# @size: accepts a number followed by an optional suffix (K)ilo,
2540# (M)ega, (G)iga, (T)era
2541#
2542# Since: 1.5
2543##
2544{ 'enum': 'CommandLineParameterType',
2545 'data': ['string', 'boolean', 'number', 'size'] }
2546
2547##
2548# @CommandLineParameterInfo:
2549#
2550# Details about a single parameter of a command line option.
2551#
2552# @name: parameter name
2553#
2554# @type: parameter @CommandLineParameterType
2555#
2556# @help: human readable text string, not suitable for parsing.
2557#
2558# @default: default value string (since 2.1)
2559#
2560# Since: 1.5
2561##
2562{ 'struct': 'CommandLineParameterInfo',
2563 'data': { 'name': 'str',
2564 'type': 'CommandLineParameterType',
2565 '*help': 'str',
2566 '*default': 'str' } }
2567
2568##
2569# @CommandLineOptionInfo:
2570#
2571# Details about a command line option, including its list of parameter details
2572#
2573# @option: option name
2574#
2575# @parameters: an array of @CommandLineParameterInfo
2576#
2577# Since: 1.5
2578##
2579{ 'struct': 'CommandLineOptionInfo',
2580 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
2581
2582##
2583# @query-command-line-options:
2584#
2585# Query command line option schema.
2586#
2587# @option: option name
2588#
2589# Returns: list of @CommandLineOptionInfo for all options (or for the given
2590# @option). Returns an error if the given @option doesn't exist.
2591#
2592# Since: 1.5
2593#
2594# Example:
2595#
2596# -> { "execute": "query-command-line-options",
2597# "arguments": { "option": "option-rom" } }
2598# <- { "return": [
2599# {
2600# "parameters": [
2601# {
2602# "name": "romfile",
2603# "type": "string"
2604# },
2605# {
2606# "name": "bootindex",
2607# "type": "number"
2608# }
2609# ],
2610# "option": "option-rom"
2611# }
2612# ]
2613# }
2614#
2615##
2616{'command': 'query-command-line-options', 'data': { '*option': 'str' },
2617 'returns': ['CommandLineOptionInfo'] }
2618
2619##
2620# @X86CPURegister32:
2621#
2622# A X86 32-bit register
2623#
2624# Since: 1.5
2625##
2626{ 'enum': 'X86CPURegister32',
2627 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
2628
2629##
2630# @X86CPUFeatureWordInfo:
2631#
2632# Information about a X86 CPU feature word
2633#
2634# @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
2635#
2636# @cpuid-input-ecx: Input ECX value for CPUID instruction for that
2637# feature word
2638#
2639# @cpuid-register: Output register containing the feature bits
2640#
2641# @features: value of output register, containing the feature bits
2642#
2643# Since: 1.5
2644##
2645{ 'struct': 'X86CPUFeatureWordInfo',
2646 'data': { 'cpuid-input-eax': 'int',
2647 '*cpuid-input-ecx': 'int',
2648 'cpuid-register': 'X86CPURegister32',
2649 'features': 'int' } }
2650
2651##
2652# @DummyForceArrays:
2653#
2654# Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
2655#
2656# Since: 2.5
2657##
2658{ 'struct': 'DummyForceArrays',
2659 'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
2660
2661
2662##
2663# @NumaOptionsType:
2664#
2665# @node: NUMA nodes configuration
2666#
2667# @dist: NUMA distance configuration (since 2.10)
2668#
2669# @cpu: property based CPU(s) to node mapping (Since: 2.10)
2670#
2671# Since: 2.1
2672##
2673{ 'enum': 'NumaOptionsType',
2674 'data': [ 'node', 'dist', 'cpu' ] }
2675
2676##
2677# @NumaOptions:
2678#
2679# A discriminated record of NUMA options. (for OptsVisitor)
2680#
2681# Since: 2.1
2682##
2683{ 'union': 'NumaOptions',
2684 'base': { 'type': 'NumaOptionsType' },
2685 'discriminator': 'type',
2686 'data': {
2687 'node': 'NumaNodeOptions',
2688 'dist': 'NumaDistOptions',
2689 'cpu': 'NumaCpuOptions' }}
2690
2691##
2692# @NumaNodeOptions:
2693#
2694# Create a guest NUMA node. (for OptsVisitor)
2695#
2696# @nodeid: NUMA node ID (increase by 1 from 0 if omitted)
2697#
2698# @cpus: VCPUs belonging to this node (assign VCPUS round-robin
2699# if omitted)
2700#
2701# @mem: memory size of this node; mutually exclusive with @memdev.
2702# Equally divide total memory among nodes if both @mem and @memdev are
2703# omitted.
2704#
2705# @memdev: memory backend object. If specified for one node,
2706# it must be specified for all nodes.
2707#
2708# Since: 2.1
2709##
2710{ 'struct': 'NumaNodeOptions',
2711 'data': {
2712 '*nodeid': 'uint16',
2713 '*cpus': ['uint16'],
2714 '*mem': 'size',
2715 '*memdev': 'str' }}
2716
2717##
2718# @NumaDistOptions:
2719#
2720# Set the distance between 2 NUMA nodes.
2721#
2722# @src: source NUMA node.
2723#
2724# @dst: destination NUMA node.
2725#
2726# @val: NUMA distance from source node to destination node.
2727# When a node is unreachable from another node, set the distance
2728# between them to 255.
2729#
2730# Since: 2.10
2731##
2732{ 'struct': 'NumaDistOptions',
2733 'data': {
2734 'src': 'uint16',
2735 'dst': 'uint16',
2736 'val': 'uint8' }}
2737
2738##
2739# @NumaCpuOptions:
2740#
2741# Option "-numa cpu" overrides default cpu to node mapping.
2742# It accepts the same set of cpu properties as returned by
2743# query-hotpluggable-cpus[].props, where node-id could be used to
2744# override default node mapping.
2745#
2746# Since: 2.10
2747##
2748{ 'struct': 'NumaCpuOptions',
2749 'base': 'CpuInstanceProperties',
2750 'data' : {} }
2751
2752##
2753# @HostMemPolicy:
2754#
2755# Host memory policy types
2756#
2757# @default: restore default policy, remove any nondefault policy
2758#
2759# @preferred: set the preferred host nodes for allocation
2760#
2761# @bind: a strict policy that restricts memory allocation to the
2762# host nodes specified
2763#
2764# @interleave: memory allocations are interleaved across the set
2765# of host nodes specified
2766#
2767# Since: 2.1
2768##
2769{ 'enum': 'HostMemPolicy',
2770 'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
2771
2772##
2773# @Memdev:
2774#
2775# Information about memory backend
2776#
2777# @id: backend's ID if backend has 'id' property (since 2.9)
2778#
2779# @size: memory backend size
2780#
2781# @merge: enables or disables memory merge support
2782#
2783# @dump: includes memory backend's memory in a core dump or not
2784#
2785# @prealloc: enables or disables memory preallocation
2786#
2787# @host-nodes: host nodes for its memory policy
2788#
2789# @policy: memory policy of memory backend
2790#
2791# Since: 2.1
2792##
2793{ 'struct': 'Memdev',
2794 'data': {
2795 '*id': 'str',
2796 'size': 'size',
2797 'merge': 'bool',
2798 'dump': 'bool',
2799 'prealloc': 'bool',
2800 'host-nodes': ['uint16'],
2801 'policy': 'HostMemPolicy' }}
2802
2803##
2804# @query-memdev:
2805#
2806# Returns information for all memory backends.
2807#
2808# Returns: a list of @Memdev.
2809#
2810# Since: 2.1
2811#
2812# Example:
2813#
2814# -> { "execute": "query-memdev" }
2815# <- { "return": [
2816# {
2817# "id": "mem1",
2818# "size": 536870912,
2819# "merge": false,
2820# "dump": true,
2821# "prealloc": false,
2822# "host-nodes": [0, 1],
2823# "policy": "bind"
2824# },
2825# {
2826# "size": 536870912,
2827# "merge": false,
2828# "dump": true,
2829# "prealloc": true,
2830# "host-nodes": [2, 3],
2831# "policy": "preferred"
2832# }
2833# ]
2834# }
2835#
2836##
2837{ 'command': 'query-memdev', 'returns': ['Memdev'] }
2838
2839##
2840# @PCDIMMDeviceInfo:
2841#
2842# PCDIMMDevice state information
2843#
2844# @id: device's ID
2845#
2846# @addr: physical address, where device is mapped
2847#
2848# @size: size of memory that the device provides
2849#
2850# @slot: slot number at which device is plugged in
2851#
2852# @node: NUMA node number where device is plugged in
2853#
2854# @memdev: memory backend linked with device
2855#
2856# @hotplugged: true if device was hotplugged
2857#
2858# @hotpluggable: true if device if could be added/removed while machine is running
2859#
2860# Since: 2.1
2861##
2862{ 'struct': 'PCDIMMDeviceInfo',
2863 'data': { '*id': 'str',
2864 'addr': 'int',
2865 'size': 'int',
2866 'slot': 'int',
2867 'node': 'int',
2868 'memdev': 'str',
2869 'hotplugged': 'bool',
2870 'hotpluggable': 'bool'
2871 }
2872}
2873
2874##
2875# @MemoryDeviceInfo:
2876#
2877# Union containing information about a memory device
2878#
2879# Since: 2.1
2880##
Haozhong Zhang6388e182018-03-11 11:02:12 +08002881{ 'union': 'MemoryDeviceInfo',
2882 'data': { 'dimm': 'PCDIMMDeviceInfo',
2883 'nvdimm': 'PCDIMMDeviceInfo'
2884 }
2885}
Markus Armbruster112ed242018-02-26 17:13:27 -06002886
2887##
2888# @query-memory-devices:
2889#
2890# Lists available memory devices and their state
2891#
2892# Since: 2.1
2893#
2894# Example:
2895#
2896# -> { "execute": "query-memory-devices" }
2897# <- { "return": [ { "data":
2898# { "addr": 5368709120,
2899# "hotpluggable": true,
2900# "hotplugged": true,
2901# "id": "d1",
2902# "memdev": "/objects/memX",
2903# "node": 0,
2904# "size": 1073741824,
2905# "slot": 0},
2906# "type": "dimm"
2907# } ] }
2908#
2909##
2910{ 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
2911
2912##
2913# @MEM_UNPLUG_ERROR:
2914#
2915# Emitted when memory hot unplug error occurs.
2916#
2917# @device: device name
2918#
2919# @msg: Informative message
2920#
2921# Since: 2.4
2922#
2923# Example:
2924#
2925# <- { "event": "MEM_UNPLUG_ERROR"
2926# "data": { "device": "dimm1",
2927# "msg": "acpi: device unplug for unsupported device"
2928# },
2929# "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
2930#
2931##
2932{ 'event': 'MEM_UNPLUG_ERROR',
2933 'data': { 'device': 'str', 'msg': 'str' } }
2934
2935##
2936# @ACPISlotType:
2937#
2938# @DIMM: memory slot
2939# @CPU: logical CPU slot (since 2.7)
2940##
2941{ 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
2942
2943##
2944# @ACPIOSTInfo:
2945#
2946# OSPM Status Indication for a device
2947# For description of possible values of @source and @status fields
2948# see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
2949#
2950# @device: device ID associated with slot
2951#
2952# @slot: slot ID, unique per slot of a given @slot-type
2953#
2954# @slot-type: type of the slot
2955#
2956# @source: an integer containing the source event
2957#
2958# @status: an integer containing the status code
2959#
2960# Since: 2.1
2961##
2962{ 'struct': 'ACPIOSTInfo',
2963 'data' : { '*device': 'str',
2964 'slot': 'str',
2965 'slot-type': 'ACPISlotType',
2966 'source': 'int',
2967 'status': 'int' } }
2968
2969##
2970# @query-acpi-ospm-status:
2971#
2972# Return a list of ACPIOSTInfo for devices that support status
2973# reporting via ACPI _OST method.
2974#
2975# Since: 2.1
2976#
2977# Example:
2978#
2979# -> { "execute": "query-acpi-ospm-status" }
2980# <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
2981# { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
2982# { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
2983# { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
2984# ]}
2985#
2986##
2987{ 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
2988
2989##
2990# @ACPI_DEVICE_OST:
2991#
2992# Emitted when guest executes ACPI _OST method.
2993#
Markus Armbrustereb815e22018-02-11 10:36:05 +01002994# @info: OSPM Status Indication
Markus Armbruster112ed242018-02-26 17:13:27 -06002995#
2996# Since: 2.1
2997#
2998# Example:
2999#
3000# <- { "event": "ACPI_DEVICE_OST",
3001# "data": { "device": "d1", "slot": "0",
3002# "slot-type": "DIMM", "source": 1, "status": 0 } }
3003#
3004##
3005{ 'event': 'ACPI_DEVICE_OST',
3006 'data': { 'info': 'ACPIOSTInfo' } }
3007
3008##
3009# @rtc-reset-reinjection:
3010#
3011# This command will reset the RTC interrupt reinjection backlog.
3012# Can be used if another mechanism to synchronize guest time
3013# is in effect, for example QEMU guest agent's guest-set-time
3014# command.
3015#
3016# Since: 2.1
3017#
3018# Example:
3019#
3020# -> { "execute": "rtc-reset-reinjection" }
3021# <- { "return": {} }
3022#
3023##
3024{ 'command': 'rtc-reset-reinjection' }
3025
3026##
3027# @RTC_CHANGE:
3028#
3029# Emitted when the guest changes the RTC time.
3030#
3031# @offset: offset between base RTC clock (as specified by -rtc base), and
3032# new RTC clock value
3033#
3034# Note: This event is rate-limited.
3035#
3036# Since: 0.13.0
3037#
3038# Example:
3039#
3040# <- { "event": "RTC_CHANGE",
3041# "data": { "offset": 78 },
3042# "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
3043#
3044##
3045{ 'event': 'RTC_CHANGE',
3046 'data': { 'offset': 'int' } }
3047
3048##
3049# @ReplayMode:
3050#
3051# Mode of the replay subsystem.
3052#
3053# @none: normal execution mode. Replay or record are not enabled.
3054#
3055# @record: record mode. All non-deterministic data is written into the
3056# replay log.
3057#
3058# @play: replay mode. Non-deterministic data required for system execution
3059# is read from the log.
3060#
3061# Since: 2.5
3062##
3063{ 'enum': 'ReplayMode',
3064 'data': [ 'none', 'record', 'play' ] }
3065
3066##
3067# @xen-load-devices-state:
3068#
3069# Load the state of all devices from file. The RAM and the block devices
3070# of the VM are not loaded by this command.
3071#
3072# @filename: the file to load the state of the devices from as binary
3073# data. See xen-save-devices-state.txt for a description of the binary
3074# format.
3075#
3076# Since: 2.7
3077#
3078# Example:
3079#
3080# -> { "execute": "xen-load-devices-state",
3081# "arguments": { "filename": "/tmp/resume" } }
3082# <- { "return": {} }
3083#
3084##
3085{ 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
3086
3087##
3088# @GICCapability:
3089#
3090# The struct describes capability for a specific GIC (Generic
3091# Interrupt Controller) version. These bits are not only decided by
3092# QEMU/KVM software version, but also decided by the hardware that
3093# the program is running upon.
3094#
3095# @version: version of GIC to be described. Currently, only 2 and 3
3096# are supported.
3097#
3098# @emulated: whether current QEMU/hardware supports emulated GIC
3099# device in user space.
3100#
3101# @kernel: whether current QEMU/hardware supports hardware
3102# accelerated GIC device in kernel.
3103#
3104# Since: 2.6
3105##
3106{ 'struct': 'GICCapability',
3107 'data': { 'version': 'int',
3108 'emulated': 'bool',
3109 'kernel': 'bool' } }
3110
3111##
3112# @query-gic-capabilities:
3113#
3114# This command is ARM-only. It will return a list of GICCapability
3115# objects that describe its capability bits.
3116#
3117# Returns: a list of GICCapability objects.
3118#
3119# Since: 2.6
3120#
3121# Example:
3122#
3123# -> { "execute": "query-gic-capabilities" }
3124# <- { "return": [{ "version": 2, "emulated": true, "kernel": false },
3125# { "version": 3, "emulated": false, "kernel": true } ] }
3126#
3127##
3128{ 'command': 'query-gic-capabilities', 'returns': ['GICCapability'] }
3129
3130##
3131# @CpuInstanceProperties:
3132#
3133# List of properties to be used for hotplugging a CPU instance,
3134# it should be passed by management with device_add command when
3135# a CPU is being hotplugged.
3136#
3137# @node-id: NUMA node ID the CPU belongs to
3138# @socket-id: socket number within node/board the CPU belongs to
3139# @core-id: core number within socket the CPU belongs to
3140# @thread-id: thread number within core the CPU belongs to
3141#
3142# Note: currently there are 4 properties that could be present
3143# but management should be prepared to pass through other
3144# properties with device_add command to allow for future
3145# interface extension. This also requires the filed names to be kept in
3146# sync with the properties passed to -device/device_add.
3147#
3148# Since: 2.7
3149##
3150{ 'struct': 'CpuInstanceProperties',
3151 'data': { '*node-id': 'int',
3152 '*socket-id': 'int',
3153 '*core-id': 'int',
3154 '*thread-id': 'int'
3155 }
3156}
3157
3158##
3159# @HotpluggableCPU:
3160#
3161# @type: CPU object type for usage with device_add command
3162# @props: list of properties to be used for hotplugging CPU
3163# @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides
3164# @qom-path: link to existing CPU object if CPU is present or
3165# omitted if CPU is not present.
3166#
3167# Since: 2.7
3168##
3169{ 'struct': 'HotpluggableCPU',
3170 'data': { 'type': 'str',
3171 'vcpus-count': 'int',
3172 'props': 'CpuInstanceProperties',
3173 '*qom-path': 'str'
3174 }
3175}
3176
3177##
3178# @query-hotpluggable-cpus:
3179#
3180# Returns: a list of HotpluggableCPU objects.
3181#
3182# Since: 2.7
3183#
3184# Example:
3185#
3186# For pseries machine type started with -smp 2,cores=2,maxcpus=4 -cpu POWER8:
3187#
3188# -> { "execute": "query-hotpluggable-cpus" }
3189# <- {"return": [
3190# { "props": { "core": 8 }, "type": "POWER8-spapr-cpu-core",
3191# "vcpus-count": 1 },
3192# { "props": { "core": 0 }, "type": "POWER8-spapr-cpu-core",
3193# "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"}
3194# ]}'
3195#
3196# For pc machine type started with -smp 1,maxcpus=2:
3197#
3198# -> { "execute": "query-hotpluggable-cpus" }
3199# <- {"return": [
3200# {
3201# "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
3202# "props": {"core-id": 0, "socket-id": 1, "thread-id": 0}
3203# },
3204# {
3205# "qom-path": "/machine/unattached/device[0]",
3206# "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
3207# "props": {"core-id": 0, "socket-id": 0, "thread-id": 0}
3208# }
3209# ]}
3210#
3211# For s390x-virtio-ccw machine type started with -smp 1,maxcpus=2 -cpu qemu
3212# (Since: 2.11):
3213#
3214# -> { "execute": "query-hotpluggable-cpus" }
3215# <- {"return": [
3216# {
3217# "type": "qemu-s390x-cpu", "vcpus-count": 1,
3218# "props": { "core-id": 1 }
3219# },
3220# {
3221# "qom-path": "/machine/unattached/device[0]",
3222# "type": "qemu-s390x-cpu", "vcpus-count": 1,
3223# "props": { "core-id": 0 }
3224# }
3225# ]}
3226#
3227##
3228{ 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'] }
3229
3230##
3231# @GuidInfo:
3232#
3233# GUID information.
3234#
3235# @guid: the globally unique identifier
3236#
3237# Since: 2.9
3238##
3239{ 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
3240
3241##
3242# @query-vm-generation-id:
3243#
3244# Show Virtual Machine Generation ID
3245#
3246# Since: 2.9
3247##
3248{ 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }
Brijesh Singh08a161f2018-03-08 06:48:42 -06003249
3250
3251##
3252# @SevState:
3253#
3254# An enumeration of SEV state information used during @query-sev.
3255#
3256# @uninit: The guest is uninitialized.
3257#
3258# @launch-update: The guest is currently being launched; plaintext data and
3259# register state is being imported.
3260#
3261# @launch-secret: The guest is currently being launched; ciphertext data
3262# is being imported.
3263#
3264# @running: The guest is fully launched or migrated in.
3265#
3266# @send-update: The guest is currently being migrated out to another machine.
3267#
3268# @receive-update: The guest is currently being migrated from another machine.
3269#
3270# Since: 2.12
3271##
3272{ 'enum': 'SevState',
3273 'data': ['uninit', 'launch-update', 'launch-secret', 'running',
3274 'send-update', 'receive-update' ] }
3275
3276##
3277# @SevInfo:
3278#
3279# Information about Secure Encrypted Virtualization (SEV) support
3280#
3281# @enabled: true if SEV is active
3282#
3283# @api-major: SEV API major version
3284#
3285# @api-minor: SEV API minor version
3286#
3287# @build-id: SEV FW build id
3288#
3289# @policy: SEV policy value
3290#
3291# @state: SEV guest state
3292#
3293# @handle: SEV firmware handle
3294#
3295# Since: 2.12
3296##
3297{ 'struct': 'SevInfo',
3298 'data': { 'enabled': 'bool',
3299 'api-major': 'uint8',
3300 'api-minor' : 'uint8',
3301 'build-id' : 'uint8',
3302 'policy' : 'uint32',
3303 'state' : 'SevState',
3304 'handle' : 'uint32'
3305 }
3306}
3307
3308##
3309# @query-sev:
3310#
3311# Returns information about SEV
3312#
3313# Returns: @SevInfo
3314#
3315# Since: 2.12
3316#
3317# Example:
3318#
3319# -> { "execute": "query-sev" }
3320# <- { "return": { "enabled": true, "api-major" : 0, "api-minor" : 0,
3321# "build-id" : 0, "policy" : 0, "state" : "running",
3322# "handle" : 1 } }
3323#
3324##
3325{ 'command': 'query-sev', 'returns': 'SevInfo' }
Brijesh Singh1b6a0342018-03-08 06:48:56 -06003326
3327##
3328# @SevLaunchMeasureInfo:
3329#
3330# SEV Guest Launch measurement information
3331#
3332# @data: the measurement value encoded in base64
3333#
3334# Since: 2.12
3335#
3336##
3337{ 'struct': 'SevLaunchMeasureInfo', 'data': {'data': 'str'} }
3338
3339##
3340# @query-sev-launch-measure:
3341#
3342# Query the SEV guest launch information.
3343#
3344# Returns: The @SevLaunchMeasureInfo for the guest
3345#
3346# Since: 2.12
3347#
3348# Example:
3349#
3350# -> { "execute": "query-sev-launch-measure" }
3351# <- { "return": { "data": "4l8LXeNlSPUDlXPJG5966/8%YZ" } }
3352#
3353##
3354{ 'command': 'query-sev-launch-measure', 'returns': 'SevLaunchMeasureInfo' }
Brijesh Singh31dd67f2018-03-08 06:48:59 -06003355
3356##
3357# @SevCapability:
3358#
3359# The struct describes capability for a Secure Encrypted Virtualization
3360# feature.
3361#
3362# @pdh: Platform Diffie-Hellman key (base64 encoded)
3363#
3364# @cert-chain: PDH certificate chain (base64 encoded)
3365#
3366# @cbitpos: C-bit location in page table entry
3367#
3368# @reduced-phys-bits: Number of physical Address bit reduction when SEV is
3369# enabled
3370#
3371# Since: 2.12
3372##
3373{ 'struct': 'SevCapability',
3374 'data': { 'pdh': 'str',
3375 'cert-chain': 'str',
3376 'cbitpos': 'int',
3377 'reduced-phys-bits': 'int'} }
3378
3379##
3380# @query-sev-capabilities:
3381#
3382# This command is used to get the SEV capabilities, and is supported on AMD
3383# X86 platforms only.
3384#
3385# Returns: SevCapability objects.
3386#
3387# Since: 2.12
3388#
3389# Example:
3390#
3391# -> { "execute": "query-sev-capabilities" }
3392# <- { "return": { "pdh": "8CCDD8DDD", "cert-chain": "888CCCDDDEE",
3393# "cbitpos": 47, "reduced-phys-bits": 5}}
3394#
3395##
3396{ 'command': 'query-sev-capabilities', 'returns': 'SevCapability' }
Eric Blake8167d8b2018-03-16 07:33:35 -05003397
3398##
3399# @CommandDropReason:
3400#
3401# Reasons that caused one command to be dropped.
3402#
3403# @queue-full: the command queue is full. This can only occur when
3404# the client sends a new non-oob command before the
3405# response to the previous non-oob command has been
3406# received.
3407#
3408# Since: 2.12
3409##
3410{ 'enum': 'CommandDropReason',
3411 'data': [ 'queue-full' ] }
3412
3413##
3414# @COMMAND_DROPPED:
3415#
3416# Emitted when a command is dropped due to some reason. Commands can
3417# only be dropped when the oob capability is enabled.
3418#
3419# @id: The dropped command's "id" field.
3420#
3421# @reason: The reason why the command is dropped.
3422#
3423# Since: 2.12
3424#
3425# Example:
3426#
3427# { "event": "COMMAND_DROPPED",
3428# "data": {"result": {"id": "libvirt-102",
3429# "reason": "queue-full" } } }
3430#
3431##
3432{ 'event': 'COMMAND_DROPPED' ,
3433 'data': { 'id': 'any', 'reason': 'CommandDropReason' } }
Peter Xu469638f2018-03-09 17:00:04 +08003434
3435##
3436# @x-oob-test:
3437#
3438# Test OOB functionality. When sending this command with lock=true,
3439# it'll try to hang the dispatcher. When sending it with lock=false,
3440# it'll try to notify the locked thread to continue. Note: it should
3441# only be used by QMP test program rather than anything else.
3442#
3443# Since: 2.12
3444#
3445# Example:
3446#
3447# { "execute": "x-oob-test",
3448# "arguments": { "lock": true } }
3449##
3450{ 'command': 'x-oob-test', 'data' : { 'lock': 'bool' },
3451 'allow-oob': true }