xref: /openbmc/qemu/qapi/misc.json (revision 8ac25c84)
1# -*- Mode: Python -*-
2#
3
4##
5# = Miscellanea
6##
7
8{ 'include': 'common.json' }
9
10##
11# @qmp_capabilities:
12#
13# Enable QMP capabilities.
14#
15# Arguments:
16#
17# @enable:   An optional list of QMPCapability values to enable.  The
18#            client must not enable any capability that is not
19#            mentioned in the QMP greeting message.  If the field is not
20#            provided, it means no QMP capabilities will be enabled.
21#            (since 2.12)
22#
23# Example:
24#
25# -> { "execute": "qmp_capabilities",
26#      "arguments": { "enable": [ "oob" ] } }
27# <- { "return": {} }
28#
29# Notes: This command is valid exactly when first connecting: it must be
30# issued before any other command will be accepted, and will fail once the
31# monitor is accepting other commands. (see qemu docs/interop/qmp-spec.txt)
32#
33# The QMP client needs to explicitly enable QMP capabilities, otherwise
34# all the QMP capabilities will be turned off by default.
35#
36# Since: 0.13
37#
38##
39{ 'command': 'qmp_capabilities',
40  'data': { '*enable': [ 'QMPCapability' ] },
41  'allow-preconfig': true }
42
43##
44# @QMPCapability:
45#
46# Enumeration of capabilities to be advertised during initial client
47# connection, used for agreeing on particular QMP extension behaviors.
48#
49# @oob:   QMP ability to support out-of-band requests.
50#         (Please refer to qmp-spec.txt for more information on OOB)
51#
52# Since: 2.12
53#
54##
55{ 'enum': 'QMPCapability',
56  'data': [ 'oob' ] }
57
58##
59# @VersionTriple:
60#
61# A three-part version number.
62#
63# @major:  The major version number.
64#
65# @minor:  The minor version number.
66#
67# @micro:  The micro version number.
68#
69# Since: 2.4
70##
71{ 'struct': 'VersionTriple',
72  'data': {'major': 'int', 'minor': 'int', 'micro': 'int'} }
73
74
75##
76# @VersionInfo:
77#
78# A description of QEMU's version.
79#
80# @qemu:        The version of QEMU.  By current convention, a micro
81#               version of 50 signifies a development branch.  A micro version
82#               greater than or equal to 90 signifies a release candidate for
83#               the next minor version.  A micro version of less than 50
84#               signifies a stable release.
85#
86# @package:     QEMU will always set this field to an empty string.  Downstream
87#               versions of QEMU should set this to a non-empty string.  The
88#               exact format depends on the downstream however it highly
89#               recommended that a unique name is used.
90#
91# Since: 0.14.0
92##
93{ 'struct': 'VersionInfo',
94  'data': {'qemu': 'VersionTriple', 'package': 'str'} }
95
96##
97# @query-version:
98#
99# Returns the current version of QEMU.
100#
101# Returns:  A @VersionInfo object describing the current version of QEMU.
102#
103# Since: 0.14.0
104#
105# Example:
106#
107# -> { "execute": "query-version" }
108# <- {
109#       "return":{
110#          "qemu":{
111#             "major":0,
112#             "minor":11,
113#             "micro":5
114#          },
115#          "package":""
116#       }
117#    }
118#
119##
120{ 'command': 'query-version', 'returns': 'VersionInfo',
121  'allow-preconfig': true }
122
123##
124# @CommandInfo:
125#
126# Information about a QMP command
127#
128# @name: The command name
129#
130# Since: 0.14.0
131##
132{ 'struct': 'CommandInfo', 'data': {'name': 'str'} }
133
134##
135# @query-commands:
136#
137# Return a list of supported QMP commands by this server
138#
139# Returns: A list of @CommandInfo for all supported commands
140#
141# Since: 0.14.0
142#
143# Example:
144#
145# -> { "execute": "query-commands" }
146# <- {
147#      "return":[
148#         {
149#            "name":"query-balloon"
150#         },
151#         {
152#            "name":"system_powerdown"
153#         }
154#      ]
155#    }
156#
157# Note: This example has been shortened as the real response is too long.
158#
159##
160{ 'command': 'query-commands', 'returns': ['CommandInfo'],
161  'allow-preconfig': true }
162
163##
164# @LostTickPolicy:
165#
166# Policy for handling lost ticks in timer devices.
167#
168# @discard: throw away the missed tick(s) and continue with future injection
169#           normally.  Guest time may be delayed, unless the OS has explicit
170#           handling of lost ticks
171#
172# @delay: continue to deliver ticks at the normal rate.  Guest time will be
173#         delayed due to the late tick
174#
175# @slew: deliver ticks at a higher rate to catch up with the missed tick. The
176#        guest time should not be delayed once catchup is complete.
177#
178# Since: 2.0
179##
180{ 'enum': 'LostTickPolicy',
181  'data': ['discard', 'delay', 'slew' ] }
182
183##
184# @add_client:
185#
186# Allow client connections for VNC, Spice and socket based
187# character devices to be passed in to QEMU via SCM_RIGHTS.
188#
189# @protocol: protocol name. Valid names are "vnc", "spice" or the
190#            name of a character device (eg. from -chardev id=XXXX)
191#
192# @fdname: file descriptor name previously passed via 'getfd' command
193#
194# @skipauth: whether to skip authentication. Only applies
195#            to "vnc" and "spice" protocols
196#
197# @tls: whether to perform TLS. Only applies to the "spice"
198#       protocol
199#
200# Returns: nothing on success.
201#
202# Since: 0.14.0
203#
204# Example:
205#
206# -> { "execute": "add_client", "arguments": { "protocol": "vnc",
207#                                              "fdname": "myclient" } }
208# <- { "return": {} }
209#
210##
211{ 'command': 'add_client',
212  'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
213            '*tls': 'bool' } }
214
215##
216# @NameInfo:
217#
218# Guest name information.
219#
220# @name: The name of the guest
221#
222# Since: 0.14.0
223##
224{ 'struct': 'NameInfo', 'data': {'*name': 'str'} }
225
226##
227# @query-name:
228#
229# Return the name information of a guest.
230#
231# Returns: @NameInfo of the guest
232#
233# Since: 0.14.0
234#
235# Example:
236#
237# -> { "execute": "query-name" }
238# <- { "return": { "name": "qemu-name" } }
239#
240##
241{ 'command': 'query-name', 'returns': 'NameInfo', 'allow-preconfig': true }
242
243##
244# @KvmInfo:
245#
246# Information about support for KVM acceleration
247#
248# @enabled: true if KVM acceleration is active
249#
250# @present: true if KVM acceleration is built into this executable
251#
252# Since: 0.14.0
253##
254{ 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
255
256##
257# @query-kvm:
258#
259# Returns information about KVM acceleration
260#
261# Returns: @KvmInfo
262#
263# Since: 0.14.0
264#
265# Example:
266#
267# -> { "execute": "query-kvm" }
268# <- { "return": { "enabled": true, "present": true } }
269#
270##
271{ 'command': 'query-kvm', 'returns': 'KvmInfo' }
272
273##
274# @UuidInfo:
275#
276# Guest UUID information (Universally Unique Identifier).
277#
278# @UUID: the UUID of the guest
279#
280# Since: 0.14.0
281#
282# Notes: If no UUID was specified for the guest, a null UUID is returned.
283##
284{ 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
285
286##
287# @query-uuid:
288#
289# Query the guest UUID information.
290#
291# Returns: The @UuidInfo for the guest
292#
293# Since: 0.14.0
294#
295# Example:
296#
297# -> { "execute": "query-uuid" }
298# <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
299#
300##
301{ 'command': 'query-uuid', 'returns': 'UuidInfo', 'allow-preconfig': true }
302
303##
304# @EventInfo:
305#
306# Information about a QMP event
307#
308# @name: The event name
309#
310# Since: 1.2.0
311##
312{ 'struct': 'EventInfo', 'data': {'name': 'str'} }
313
314##
315# @query-events:
316#
317# Return information on QMP events.
318#
319# Returns: A list of @EventInfo.
320#
321# Since: 1.2.0
322#
323# Note: This command is deprecated, because its output doesn't reflect
324# compile-time configuration.  Use query-qmp-schema instead.
325#
326# Example:
327#
328# -> { "execute": "query-events" }
329# <- {
330#      "return": [
331#          {
332#             "name":"SHUTDOWN"
333#          },
334#          {
335#             "name":"RESET"
336#          }
337#       ]
338#    }
339#
340# Note: This example has been shortened as the real response is too long.
341#
342##
343{ 'command': 'query-events', 'returns': ['EventInfo'] }
344
345##
346# @IOThreadInfo:
347#
348# Information about an iothread
349#
350# @id: the identifier of the iothread
351#
352# @thread-id: ID of the underlying host thread
353#
354# @poll-max-ns: maximum polling time in ns, 0 means polling is disabled
355#               (since 2.9)
356#
357# @poll-grow: how many ns will be added to polling time, 0 means that it's not
358#             configured (since 2.9)
359#
360# @poll-shrink: how many ns will be removed from polling time, 0 means that
361#               it's not configured (since 2.9)
362#
363# Since: 2.0
364##
365{ 'struct': 'IOThreadInfo',
366  'data': {'id': 'str',
367           'thread-id': 'int',
368           'poll-max-ns': 'int',
369           'poll-grow': 'int',
370           'poll-shrink': 'int' } }
371
372##
373# @query-iothreads:
374#
375# Returns a list of information about each iothread.
376#
377# Note: this list excludes the QEMU main loop thread, which is not declared
378# using the -object iothread command-line option.  It is always the main thread
379# of the process.
380#
381# Returns: a list of @IOThreadInfo for each iothread
382#
383# Since: 2.0
384#
385# Example:
386#
387# -> { "execute": "query-iothreads" }
388# <- { "return": [
389#          {
390#             "id":"iothread0",
391#             "thread-id":3134
392#          },
393#          {
394#             "id":"iothread1",
395#             "thread-id":3135
396#          }
397#       ]
398#    }
399#
400##
401{ 'command': 'query-iothreads', 'returns': ['IOThreadInfo'],
402  'allow-preconfig': true }
403
404##
405# @BalloonInfo:
406#
407# Information about the guest balloon device.
408#
409# @actual: the number of bytes the balloon currently contains
410#
411# Since: 0.14.0
412#
413##
414{ 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
415
416##
417# @query-balloon:
418#
419# Return information about the balloon device.
420#
421# Returns: @BalloonInfo on success
422#
423#          If the balloon driver is enabled but not functional because the KVM
424#          kernel module cannot support it, KvmMissingCap
425#
426#          If no balloon device is present, DeviceNotActive
427#
428# Since: 0.14.0
429#
430# Example:
431#
432# -> { "execute": "query-balloon" }
433# <- { "return": {
434#          "actual": 1073741824,
435#       }
436#    }
437#
438##
439{ 'command': 'query-balloon', 'returns': 'BalloonInfo' }
440
441##
442# @BALLOON_CHANGE:
443#
444# Emitted when the guest changes the actual BALLOON level. This value is
445# equivalent to the @actual field return by the 'query-balloon' command
446#
447# @actual: actual level of the guest memory balloon in bytes
448#
449# Note: this event is rate-limited.
450#
451# Since: 1.2
452#
453# Example:
454#
455# <- { "event": "BALLOON_CHANGE",
456#      "data": { "actual": 944766976 },
457#      "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
458#
459##
460{ 'event': 'BALLOON_CHANGE',
461  'data': { 'actual': 'int' } }
462
463##
464# @PciMemoryRange:
465#
466# A PCI device memory region
467#
468# @base: the starting address (guest physical)
469#
470# @limit: the ending address (guest physical)
471#
472# Since: 0.14.0
473##
474{ 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
475
476##
477# @PciMemoryRegion:
478#
479# Information about a PCI device I/O region.
480#
481# @bar: the index of the Base Address Register for this region
482#
483# @type: 'io' if the region is a PIO region
484#        'memory' if the region is a MMIO region
485#
486# @size: memory size
487#
488# @prefetch: if @type is 'memory', true if the memory is prefetchable
489#
490# @mem_type_64: if @type is 'memory', true if the BAR is 64-bit
491#
492# Since: 0.14.0
493##
494{ 'struct': 'PciMemoryRegion',
495  'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
496           '*prefetch': 'bool', '*mem_type_64': 'bool' } }
497
498##
499# @PciBusInfo:
500#
501# Information about a bus of a PCI Bridge device
502#
503# @number: primary bus interface number.  This should be the number of the
504#          bus the device resides on.
505#
506# @secondary: secondary bus interface number.  This is the number of the
507#             main bus for the bridge
508#
509# @subordinate: This is the highest number bus that resides below the
510#               bridge.
511#
512# @io_range: The PIO range for all devices on this bridge
513#
514# @memory_range: The MMIO range for all devices on this bridge
515#
516# @prefetchable_range: The range of prefetchable MMIO for all devices on
517#                      this bridge
518#
519# Since: 2.4
520##
521{ 'struct': 'PciBusInfo',
522  'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
523           'io_range': 'PciMemoryRange',
524           'memory_range': 'PciMemoryRange',
525           'prefetchable_range': 'PciMemoryRange' } }
526
527##
528# @PciBridgeInfo:
529#
530# Information about a PCI Bridge device
531#
532# @bus: information about the bus the device resides on
533#
534# @devices: a list of @PciDeviceInfo for each device on this bridge
535#
536# Since: 0.14.0
537##
538{ 'struct': 'PciBridgeInfo',
539  'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
540
541##
542# @PciDeviceClass:
543#
544# Information about the Class of a PCI device
545#
546# @desc: a string description of the device's class
547#
548# @class: the class code of the device
549#
550# Since: 2.4
551##
552{ 'struct': 'PciDeviceClass',
553  'data': {'*desc': 'str', 'class': 'int'} }
554
555##
556# @PciDeviceId:
557#
558# Information about the Id of a PCI device
559#
560# @device: the PCI device id
561#
562# @vendor: the PCI vendor id
563#
564# @subsystem: the PCI subsystem id (since 3.1)
565#
566# @subsystem-vendor: the PCI subsystem vendor id (since 3.1)
567#
568# Since: 2.4
569##
570{ 'struct': 'PciDeviceId',
571  'data': {'device': 'int', 'vendor': 'int', '*subsystem': 'int',
572            '*subsystem-vendor': 'int'} }
573
574##
575# @PciDeviceInfo:
576#
577# Information about a PCI device
578#
579# @bus: the bus number of the device
580#
581# @slot: the slot the device is located in
582#
583# @function: the function of the slot used by the device
584#
585# @class_info: the class of the device
586#
587# @id: the PCI device id
588#
589# @irq: if an IRQ is assigned to the device, the IRQ number
590#
591# @qdev_id: the device name of the PCI device
592#
593# @pci_bridge: if the device is a PCI bridge, the bridge information
594#
595# @regions: a list of the PCI I/O regions associated with the device
596#
597# Notes: the contents of @class_info.desc are not stable and should only be
598#        treated as informational.
599#
600# Since: 0.14.0
601##
602{ 'struct': 'PciDeviceInfo',
603  'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
604           'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
605           '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
606           'regions': ['PciMemoryRegion']} }
607
608##
609# @PciInfo:
610#
611# Information about a PCI bus
612#
613# @bus: the bus index
614#
615# @devices: a list of devices on this bus
616#
617# Since: 0.14.0
618##
619{ 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
620
621##
622# @query-pci:
623#
624# Return information about the PCI bus topology of the guest.
625#
626# Returns: a list of @PciInfo for each PCI bus. Each bus is
627# represented by a json-object, which has a key with a json-array of
628# all PCI devices attached to it. Each device is represented by a
629# json-object.
630#
631# Since: 0.14.0
632#
633# Example:
634#
635# -> { "execute": "query-pci" }
636# <- { "return": [
637#          {
638#             "bus": 0,
639#             "devices": [
640#                {
641#                   "bus": 0,
642#                   "qdev_id": "",
643#                   "slot": 0,
644#                   "class_info": {
645#                      "class": 1536,
646#                      "desc": "Host bridge"
647#                   },
648#                   "id": {
649#                      "device": 32902,
650#                      "vendor": 4663
651#                   },
652#                   "function": 0,
653#                   "regions": [
654#                   ]
655#                },
656#                {
657#                   "bus": 0,
658#                   "qdev_id": "",
659#                   "slot": 1,
660#                   "class_info": {
661#                      "class": 1537,
662#                      "desc": "ISA bridge"
663#                   },
664#                   "id": {
665#                      "device": 32902,
666#                      "vendor": 28672
667#                   },
668#                   "function": 0,
669#                   "regions": [
670#                   ]
671#                },
672#                {
673#                   "bus": 0,
674#                   "qdev_id": "",
675#                   "slot": 1,
676#                   "class_info": {
677#                      "class": 257,
678#                      "desc": "IDE controller"
679#                   },
680#                   "id": {
681#                      "device": 32902,
682#                      "vendor": 28688
683#                   },
684#                   "function": 1,
685#                   "regions": [
686#                      {
687#                         "bar": 4,
688#                         "size": 16,
689#                         "address": 49152,
690#                         "type": "io"
691#                      }
692#                   ]
693#                },
694#                {
695#                   "bus": 0,
696#                   "qdev_id": "",
697#                   "slot": 2,
698#                   "class_info": {
699#                      "class": 768,
700#                      "desc": "VGA controller"
701#                   },
702#                   "id": {
703#                      "device": 4115,
704#                      "vendor": 184
705#                   },
706#                   "function": 0,
707#                   "regions": [
708#                      {
709#                         "prefetch": true,
710#                         "mem_type_64": false,
711#                         "bar": 0,
712#                         "size": 33554432,
713#                         "address": 4026531840,
714#                         "type": "memory"
715#                      },
716#                      {
717#                         "prefetch": false,
718#                         "mem_type_64": false,
719#                         "bar": 1,
720#                         "size": 4096,
721#                         "address": 4060086272,
722#                         "type": "memory"
723#                      },
724#                      {
725#                         "prefetch": false,
726#                         "mem_type_64": false,
727#                         "bar": 6,
728#                         "size": 65536,
729#                         "address": -1,
730#                         "type": "memory"
731#                      }
732#                   ]
733#                },
734#                {
735#                   "bus": 0,
736#                   "qdev_id": "",
737#                   "irq": 11,
738#                   "slot": 4,
739#                   "class_info": {
740#                      "class": 1280,
741#                      "desc": "RAM controller"
742#                   },
743#                   "id": {
744#                      "device": 6900,
745#                      "vendor": 4098
746#                   },
747#                   "function": 0,
748#                   "regions": [
749#                      {
750#                         "bar": 0,
751#                         "size": 32,
752#                         "address": 49280,
753#                         "type": "io"
754#                      }
755#                   ]
756#                }
757#             ]
758#          }
759#       ]
760#    }
761#
762# Note: This example has been shortened as the real response is too long.
763#
764##
765{ 'command': 'query-pci', 'returns': ['PciInfo'] }
766
767##
768# @quit:
769#
770# This command will cause the QEMU process to exit gracefully.  While every
771# attempt is made to send the QMP response before terminating, this is not
772# guaranteed.  When using this interface, a premature EOF would not be
773# unexpected.
774#
775# Since: 0.14.0
776#
777# Example:
778#
779# -> { "execute": "quit" }
780# <- { "return": {} }
781##
782{ 'command': 'quit' }
783
784##
785# @stop:
786#
787# Stop all guest VCPU execution.
788#
789# Since:  0.14.0
790#
791# Notes:  This function will succeed even if the guest is already in the stopped
792#         state.  In "inmigrate" state, it will ensure that the guest
793#         remains paused once migration finishes, as if the -S option was
794#         passed on the command line.
795#
796# Example:
797#
798# -> { "execute": "stop" }
799# <- { "return": {} }
800#
801##
802{ 'command': 'stop' }
803
804##
805# @system_reset:
806#
807# Performs a hard reset of a guest.
808#
809# Since: 0.14.0
810#
811# Example:
812#
813# -> { "execute": "system_reset" }
814# <- { "return": {} }
815#
816##
817{ 'command': 'system_reset' }
818
819##
820# @system_powerdown:
821#
822# Requests that a guest perform a powerdown operation.
823#
824# Since: 0.14.0
825#
826# Notes: A guest may or may not respond to this command.  This command
827#        returning does not indicate that a guest has accepted the request or
828#        that it has shut down.  Many guests will respond to this command by
829#        prompting the user in some way.
830# Example:
831#
832# -> { "execute": "system_powerdown" }
833# <- { "return": {} }
834#
835##
836{ 'command': 'system_powerdown' }
837
838##
839# @memsave:
840#
841# Save a portion of guest memory to a file.
842#
843# @val: the virtual address of the guest to start from
844#
845# @size: the size of memory region to save
846#
847# @filename: the file to save the memory to as binary data
848#
849# @cpu-index: the index of the virtual CPU to use for translating the
850#                       virtual address (defaults to CPU 0)
851#
852# Returns: Nothing on success
853#
854# Since: 0.14.0
855#
856# Notes: Errors were not reliably returned until 1.1
857#
858# Example:
859#
860# -> { "execute": "memsave",
861#      "arguments": { "val": 10,
862#                     "size": 100,
863#                     "filename": "/tmp/virtual-mem-dump" } }
864# <- { "return": {} }
865#
866##
867{ 'command': 'memsave',
868  'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
869
870##
871# @pmemsave:
872#
873# Save a portion of guest physical memory to a file.
874#
875# @val: the physical address of the guest to start from
876#
877# @size: the size of memory region to save
878#
879# @filename: the file to save the memory to as binary data
880#
881# Returns: Nothing on success
882#
883# Since: 0.14.0
884#
885# Notes: Errors were not reliably returned until 1.1
886#
887# Example:
888#
889# -> { "execute": "pmemsave",
890#      "arguments": { "val": 10,
891#                     "size": 100,
892#                     "filename": "/tmp/physical-mem-dump" } }
893# <- { "return": {} }
894#
895##
896{ 'command': 'pmemsave',
897  'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
898
899##
900# @cont:
901#
902# Resume guest VCPU execution.
903#
904# Since:  0.14.0
905#
906# Returns:  If successful, nothing
907#
908# Notes:  This command will succeed if the guest is currently running.  It
909#         will also succeed if the guest is in the "inmigrate" state; in
910#         this case, the effect of the command is to make sure the guest
911#         starts once migration finishes, removing the effect of the -S
912#         command line option if it was passed.
913#
914# Example:
915#
916# -> { "execute": "cont" }
917# <- { "return": {} }
918#
919##
920{ 'command': 'cont' }
921
922##
923# @x-exit-preconfig:
924#
925# Exit from "preconfig" state
926#
927# This command makes QEMU exit the preconfig state and proceed with
928# VM initialization using configuration data provided on the command line
929# and via the QMP monitor during the preconfig state. The command is only
930# available during the preconfig state (i.e. when the --preconfig command
931# line option was in use).
932#
933# Since 3.0
934#
935# Returns: nothing
936#
937# Example:
938#
939# -> { "execute": "x-exit-preconfig" }
940# <- { "return": {} }
941#
942##
943{ 'command': 'x-exit-preconfig', 'allow-preconfig': true }
944
945##
946# @system_wakeup:
947#
948# Wake up guest from suspend. If the guest has wake-up from suspend
949# support enabled (wakeup-suspend-support flag from
950# query-current-machine), wake-up guest from suspend if the guest is
951# in SUSPENDED state. Return an error otherwise.
952#
953# Since:  1.1
954#
955# Returns:  nothing.
956#
957# Note: prior to 4.0, this command does nothing in case the guest
958# isn't suspended.
959#
960# Example:
961#
962# -> { "execute": "system_wakeup" }
963# <- { "return": {} }
964#
965##
966{ 'command': 'system_wakeup' }
967
968##
969# @inject-nmi:
970#
971# Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
972# The command fails when the guest doesn't support injecting.
973#
974# Returns:  If successful, nothing
975#
976# Since:  0.14.0
977#
978# Note: prior to 2.1, this command was only supported for x86 and s390 VMs
979#
980# Example:
981#
982# -> { "execute": "inject-nmi" }
983# <- { "return": {} }
984#
985##
986{ 'command': 'inject-nmi' }
987
988##
989# @balloon:
990#
991# Request the balloon driver to change its balloon size.
992#
993# @value: the target size of the balloon in bytes
994#
995# Returns: Nothing on success
996#          If the balloon driver is enabled but not functional because the KVM
997#            kernel module cannot support it, KvmMissingCap
998#          If no balloon device is present, DeviceNotActive
999#
1000# Notes: This command just issues a request to the guest.  When it returns,
1001#        the balloon size may not have changed.  A guest can change the balloon
1002#        size independent of this command.
1003#
1004# Since: 0.14.0
1005#
1006# Example:
1007#
1008# -> { "execute": "balloon", "arguments": { "value": 536870912 } }
1009# <- { "return": {} }
1010#
1011##
1012{ 'command': 'balloon', 'data': {'value': 'int'} }
1013
1014##
1015# @human-monitor-command:
1016#
1017# Execute a command on the human monitor and return the output.
1018#
1019# @command-line: the command to execute in the human monitor
1020#
1021# @cpu-index: The CPU to use for commands that require an implicit CPU
1022#
1023# Returns: the output of the command as a string
1024#
1025# Since: 0.14.0
1026#
1027# Notes: This command only exists as a stop-gap.  Its use is highly
1028#        discouraged.  The semantics of this command are not
1029#        guaranteed: this means that command names, arguments and
1030#        responses can change or be removed at ANY time.  Applications
1031#        that rely on long term stability guarantees should NOT
1032#        use this command.
1033#
1034#        Known limitations:
1035#
1036#        * This command is stateless, this means that commands that depend
1037#          on state information (such as getfd) might not work
1038#
1039#        * Commands that prompt the user for data don't currently work
1040#
1041# Example:
1042#
1043# -> { "execute": "human-monitor-command",
1044#      "arguments": { "command-line": "info kvm" } }
1045# <- { "return": "kvm support: enabled\r\n" }
1046#
1047##
1048{ 'command': 'human-monitor-command',
1049  'data': {'command-line': 'str', '*cpu-index': 'int'},
1050  'returns': 'str' }
1051
1052##
1053# @change:
1054#
1055# This command is multiple commands multiplexed together.
1056#
1057# @device: This is normally the name of a block device but it may also be 'vnc'.
1058#          when it's 'vnc', then sub command depends on @target
1059#
1060# @target: If @device is a block device, then this is the new filename.
1061#          If @device is 'vnc', then if the value 'password' selects the vnc
1062#          change password command.   Otherwise, this specifies a new server URI
1063#          address to listen to for VNC connections.
1064#
1065# @arg:    If @device is a block device, then this is an optional format to open
1066#          the device with.
1067#          If @device is 'vnc' and @target is 'password', this is the new VNC
1068#          password to set.  See change-vnc-password for additional notes.
1069#
1070# Returns: Nothing on success.
1071#          If @device is not a valid block device, DeviceNotFound
1072#
1073# Notes:  This interface is deprecated, and it is strongly recommended that you
1074#         avoid using it.  For changing block devices, use
1075#         blockdev-change-medium; for changing VNC parameters, use
1076#         change-vnc-password.
1077#
1078# Since: 0.14.0
1079#
1080# Example:
1081#
1082# 1. Change a removable medium
1083#
1084# -> { "execute": "change",
1085#      "arguments": { "device": "ide1-cd0",
1086#                     "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } }
1087# <- { "return": {} }
1088#
1089# 2. Change VNC password
1090#
1091# -> { "execute": "change",
1092#      "arguments": { "device": "vnc", "target": "password",
1093#                     "arg": "foobar1" } }
1094# <- { "return": {} }
1095#
1096##
1097{ 'command': 'change',
1098  'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
1099
1100##
1101# @xen-set-global-dirty-log:
1102#
1103# Enable or disable the global dirty log mode.
1104#
1105# @enable: true to enable, false to disable.
1106#
1107# Returns: nothing
1108#
1109# Since: 1.3
1110#
1111# Example:
1112#
1113# -> { "execute": "xen-set-global-dirty-log",
1114#      "arguments": { "enable": true } }
1115# <- { "return": {} }
1116#
1117##
1118{ 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
1119
1120##
1121# @DumpGuestMemoryFormat:
1122#
1123# An enumeration of guest-memory-dump's format.
1124#
1125# @elf: elf format
1126#
1127# @kdump-zlib: kdump-compressed format with zlib-compressed
1128#
1129# @kdump-lzo: kdump-compressed format with lzo-compressed
1130#
1131# @kdump-snappy: kdump-compressed format with snappy-compressed
1132#
1133# @win-dmp: Windows full crashdump format,
1134#           can be used instead of ELF converting (since 2.13)
1135#
1136# Since: 2.0
1137##
1138{ 'enum': 'DumpGuestMemoryFormat',
1139  'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy', 'win-dmp' ] }
1140
1141##
1142# @dump-guest-memory:
1143#
1144# Dump guest's memory to vmcore. It is a synchronous operation that can take
1145# very long depending on the amount of guest memory.
1146#
1147# @paging: if true, do paging to get guest's memory mapping. This allows
1148#          using gdb to process the core file.
1149#
1150#          IMPORTANT: this option can make QEMU allocate several gigabytes
1151#                     of RAM. This can happen for a large guest, or a
1152#                     malicious guest pretending to be large.
1153#
1154#          Also, paging=true has the following limitations:
1155#
1156#             1. The guest may be in a catastrophic state or can have corrupted
1157#                memory, which cannot be trusted
1158#             2. The guest can be in real-mode even if paging is enabled. For
1159#                example, the guest uses ACPI to sleep, and ACPI sleep state
1160#                goes in real-mode
1161#             3. Currently only supported on i386 and x86_64.
1162#
1163# @protocol: the filename or file descriptor of the vmcore. The supported
1164#            protocols are:
1165#
1166#            1. file: the protocol starts with "file:", and the following
1167#               string is the file's path.
1168#            2. fd: the protocol starts with "fd:", and the following string
1169#               is the fd's name.
1170#
1171# @detach: if true, QMP will return immediately rather than
1172#          waiting for the dump to finish. The user can track progress
1173#          using "query-dump". (since 2.6).
1174#
1175# @begin: if specified, the starting physical address.
1176#
1177# @length: if specified, the memory size, in bytes. If you don't
1178#          want to dump all guest's memory, please specify the start @begin
1179#          and @length
1180#
1181# @format: if specified, the format of guest memory dump. But non-elf
1182#          format is conflict with paging and filter, ie. @paging, @begin and
1183#          @length is not allowed to be specified with non-elf @format at the
1184#          same time (since 2.0)
1185#
1186# Note: All boolean arguments default to false
1187#
1188# Returns: nothing on success
1189#
1190# Since: 1.2
1191#
1192# Example:
1193#
1194# -> { "execute": "dump-guest-memory",
1195#      "arguments": { "protocol": "fd:dump" } }
1196# <- { "return": {} }
1197#
1198##
1199{ 'command': 'dump-guest-memory',
1200  'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool',
1201            '*begin': 'int', '*length': 'int',
1202            '*format': 'DumpGuestMemoryFormat'} }
1203
1204##
1205# @DumpStatus:
1206#
1207# Describe the status of a long-running background guest memory dump.
1208#
1209# @none: no dump-guest-memory has started yet.
1210#
1211# @active: there is one dump running in background.
1212#
1213# @completed: the last dump has finished successfully.
1214#
1215# @failed: the last dump has failed.
1216#
1217# Since: 2.6
1218##
1219{ 'enum': 'DumpStatus',
1220  'data': [ 'none', 'active', 'completed', 'failed' ] }
1221
1222##
1223# @DumpQueryResult:
1224#
1225# The result format for 'query-dump'.
1226#
1227# @status: enum of @DumpStatus, which shows current dump status
1228#
1229# @completed: bytes written in latest dump (uncompressed)
1230#
1231# @total: total bytes to be written in latest dump (uncompressed)
1232#
1233# Since: 2.6
1234##
1235{ 'struct': 'DumpQueryResult',
1236  'data': { 'status': 'DumpStatus',
1237            'completed': 'int',
1238            'total': 'int' } }
1239
1240##
1241# @query-dump:
1242#
1243# Query latest dump status.
1244#
1245# Returns: A @DumpStatus object showing the dump status.
1246#
1247# Since: 2.6
1248#
1249# Example:
1250#
1251# -> { "execute": "query-dump" }
1252# <- { "return": { "status": "active", "completed": 1024000,
1253#                  "total": 2048000 } }
1254#
1255##
1256{ 'command': 'query-dump', 'returns': 'DumpQueryResult' }
1257
1258##
1259# @DUMP_COMPLETED:
1260#
1261# Emitted when background dump has completed
1262#
1263# @result: final dump status
1264#
1265# @error: human-readable error string that provides
1266#         hint on why dump failed. Only presents on failure. The
1267#         user should not try to interpret the error string.
1268#
1269# Since: 2.6
1270#
1271# Example:
1272#
1273# { "event": "DUMP_COMPLETED",
1274#   "data": {"result": {"total": 1090650112, "status": "completed",
1275#                       "completed": 1090650112} } }
1276#
1277##
1278{ 'event': 'DUMP_COMPLETED' ,
1279  'data': { 'result': 'DumpQueryResult', '*error': 'str' } }
1280
1281##
1282# @DumpGuestMemoryCapability:
1283#
1284# A list of the available formats for dump-guest-memory
1285#
1286# Since: 2.0
1287##
1288{ 'struct': 'DumpGuestMemoryCapability',
1289  'data': {
1290      'formats': ['DumpGuestMemoryFormat'] } }
1291
1292##
1293# @query-dump-guest-memory-capability:
1294#
1295# Returns the available formats for dump-guest-memory
1296#
1297# Returns:  A @DumpGuestMemoryCapability object listing available formats for
1298#           dump-guest-memory
1299#
1300# Since: 2.0
1301#
1302# Example:
1303#
1304# -> { "execute": "query-dump-guest-memory-capability" }
1305# <- { "return": { "formats":
1306#                  ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] }
1307#
1308##
1309{ 'command': 'query-dump-guest-memory-capability',
1310  'returns': 'DumpGuestMemoryCapability' }
1311
1312##
1313# @getfd:
1314#
1315# Receive a file descriptor via SCM rights and assign it a name
1316#
1317# @fdname: file descriptor name
1318#
1319# Returns: Nothing on success
1320#
1321# Since: 0.14.0
1322#
1323# Notes: If @fdname already exists, the file descriptor assigned to
1324#        it will be closed and replaced by the received file
1325#        descriptor.
1326#
1327#        The 'closefd' command can be used to explicitly close the
1328#        file descriptor when it is no longer needed.
1329#
1330# Example:
1331#
1332# -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
1333# <- { "return": {} }
1334#
1335##
1336{ 'command': 'getfd', 'data': {'fdname': 'str'} }
1337
1338##
1339# @closefd:
1340#
1341# Close a file descriptor previously passed via SCM rights
1342#
1343# @fdname: file descriptor name
1344#
1345# Returns: Nothing on success
1346#
1347# Since: 0.14.0
1348#
1349# Example:
1350#
1351# -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
1352# <- { "return": {} }
1353#
1354##
1355{ 'command': 'closefd', 'data': {'fdname': 'str'} }
1356
1357##
1358# @MemoryInfo:
1359#
1360# Actual memory information in bytes.
1361#
1362# @base-memory: size of "base" memory specified with command line
1363#               option -m.
1364#
1365# @plugged-memory: size of memory that can be hot-unplugged. This field
1366#                  is omitted if target doesn't support memory hotplug
1367#                  (i.e. CONFIG_MEM_DEVICE not defined at build time).
1368#
1369# Since: 2.11.0
1370##
1371{ 'struct': 'MemoryInfo',
1372  'data'  : { 'base-memory': 'size', '*plugged-memory': 'size' } }
1373
1374##
1375# @query-memory-size-summary:
1376#
1377# Return the amount of initially allocated and present hotpluggable (if
1378# enabled) memory in bytes.
1379#
1380# Example:
1381#
1382# -> { "execute": "query-memory-size-summary" }
1383# <- { "return": { "base-memory": 4294967296, "plugged-memory": 0 } }
1384#
1385# Since: 2.11.0
1386##
1387{ 'command': 'query-memory-size-summary', 'returns': 'MemoryInfo' }
1388
1389
1390##
1391# @CpuModelInfo:
1392#
1393# Virtual CPU model.
1394#
1395# A CPU model consists of the name of a CPU definition, to which
1396# delta changes are applied (e.g. features added/removed). Most magic values
1397# that an architecture might require should be hidden behind the name.
1398# However, if required, architectures can expose relevant properties.
1399#
1400# @name: the name of the CPU definition the model is based on
1401# @props: a dictionary of QOM properties to be applied
1402#
1403# Since: 2.8.0
1404##
1405{ 'struct': 'CpuModelInfo',
1406  'data': { 'name': 'str',
1407            '*props': 'any' } }
1408
1409##
1410# @CpuModelExpansionType:
1411#
1412# An enumeration of CPU model expansion types.
1413#
1414# @static: Expand to a static CPU model, a combination of a static base
1415#          model name and property delta changes. As the static base model will
1416#          never change, the expanded CPU model will be the same, independent of
1417#          QEMU version, machine type, machine options, and accelerator options.
1418#          Therefore, the resulting model can be used by tooling without having
1419#          to specify a compatibility machine - e.g. when displaying the "host"
1420#          model. The @static CPU models are migration-safe.
1421
1422# @full: Expand all properties. The produced model is not guaranteed to be
1423#        migration-safe, but allows tooling to get an insight and work with
1424#        model details.
1425#
1426# Note: When a non-migration-safe CPU model is expanded in static mode, some
1427# features enabled by the CPU model may be omitted, because they can't be
1428# implemented by a static CPU model definition (e.g. cache info passthrough and
1429# PMU passthrough in x86). If you need an accurate representation of the
1430# features enabled by a non-migration-safe CPU model, use @full. If you need a
1431# static representation that will keep ABI compatibility even when changing QEMU
1432# version or machine-type, use @static (but keep in mind that some features may
1433# be omitted).
1434#
1435# Since: 2.8.0
1436##
1437{ 'enum': 'CpuModelExpansionType',
1438  'data': [ 'static', 'full' ] }
1439
1440
1441##
1442# @CpuModelCompareResult:
1443#
1444# An enumeration of CPU model comparison results. The result is usually
1445# calculated using e.g. CPU features or CPU generations.
1446#
1447# @incompatible: If model A is incompatible to model B, model A is not
1448#                guaranteed to run where model B runs and the other way around.
1449#
1450# @identical: If model A is identical to model B, model A is guaranteed to run
1451#             where model B runs and the other way around.
1452#
1453# @superset: If model A is a superset of model B, model B is guaranteed to run
1454#            where model A runs. There are no guarantees about the other way.
1455#
1456# @subset: If model A is a subset of model B, model A is guaranteed to run
1457#          where model B runs. There are no guarantees about the other way.
1458#
1459# Since: 2.8.0
1460##
1461{ 'enum': 'CpuModelCompareResult',
1462  'data': [ 'incompatible', 'identical', 'superset', 'subset' ] }
1463
1464##
1465# @AddfdInfo:
1466#
1467# Information about a file descriptor that was added to an fd set.
1468#
1469# @fdset-id: The ID of the fd set that @fd was added to.
1470#
1471# @fd: The file descriptor that was received via SCM rights and
1472#      added to the fd set.
1473#
1474# Since: 1.2.0
1475##
1476{ 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
1477
1478##
1479# @add-fd:
1480#
1481# Add a file descriptor, that was passed via SCM rights, to an fd set.
1482#
1483# @fdset-id: The ID of the fd set to add the file descriptor to.
1484#
1485# @opaque: A free-form string that can be used to describe the fd.
1486#
1487# Returns: @AddfdInfo on success
1488#
1489#          If file descriptor was not received, FdNotSupplied
1490#
1491#          If @fdset-id is a negative value, InvalidParameterValue
1492#
1493# Notes: The list of fd sets is shared by all monitor connections.
1494#
1495#        If @fdset-id is not specified, a new fd set will be created.
1496#
1497# Since: 1.2.0
1498#
1499# Example:
1500#
1501# -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
1502# <- { "return": { "fdset-id": 1, "fd": 3 } }
1503#
1504##
1505{ 'command': 'add-fd',
1506  'data': { '*fdset-id': 'int',
1507            '*opaque': 'str' },
1508  'returns': 'AddfdInfo' }
1509
1510##
1511# @remove-fd:
1512#
1513# Remove a file descriptor from an fd set.
1514#
1515# @fdset-id: The ID of the fd set that the file descriptor belongs to.
1516#
1517# @fd: The file descriptor that is to be removed.
1518#
1519# Returns: Nothing on success
1520#          If @fdset-id or @fd is not found, FdNotFound
1521#
1522# Since: 1.2.0
1523#
1524# Notes: The list of fd sets is shared by all monitor connections.
1525#
1526#        If @fd is not specified, all file descriptors in @fdset-id
1527#        will be removed.
1528#
1529# Example:
1530#
1531# -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
1532# <- { "return": {} }
1533#
1534##
1535{ 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
1536
1537##
1538# @FdsetFdInfo:
1539#
1540# Information about a file descriptor that belongs to an fd set.
1541#
1542# @fd: The file descriptor value.
1543#
1544# @opaque: A free-form string that can be used to describe the fd.
1545#
1546# Since: 1.2.0
1547##
1548{ 'struct': 'FdsetFdInfo',
1549  'data': {'fd': 'int', '*opaque': 'str'} }
1550
1551##
1552# @FdsetInfo:
1553#
1554# Information about an fd set.
1555#
1556# @fdset-id: The ID of the fd set.
1557#
1558# @fds: A list of file descriptors that belong to this fd set.
1559#
1560# Since: 1.2.0
1561##
1562{ 'struct': 'FdsetInfo',
1563  'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
1564
1565##
1566# @query-fdsets:
1567#
1568# Return information describing all fd sets.
1569#
1570# Returns: A list of @FdsetInfo
1571#
1572# Since: 1.2.0
1573#
1574# Note: The list of fd sets is shared by all monitor connections.
1575#
1576# Example:
1577#
1578# -> { "execute": "query-fdsets" }
1579# <- { "return": [
1580#        {
1581#          "fds": [
1582#            {
1583#              "fd": 30,
1584#              "opaque": "rdonly:/path/to/file"
1585#            },
1586#            {
1587#              "fd": 24,
1588#              "opaque": "rdwr:/path/to/file"
1589#            }
1590#          ],
1591#          "fdset-id": 1
1592#        },
1593#        {
1594#          "fds": [
1595#            {
1596#              "fd": 28
1597#            },
1598#            {
1599#              "fd": 29
1600#            }
1601#          ],
1602#          "fdset-id": 0
1603#        }
1604#      ]
1605#    }
1606#
1607##
1608{ 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
1609
1610##
1611# @TargetInfo:
1612#
1613# Information describing the QEMU target.
1614#
1615# @arch: the target architecture
1616#
1617# Since: 1.2.0
1618##
1619{ 'struct': 'TargetInfo',
1620  'data': { 'arch': 'SysEmuTarget' } }
1621
1622##
1623# @query-target:
1624#
1625# Return information about the target for this QEMU
1626#
1627# Returns: TargetInfo
1628#
1629# Since: 1.2.0
1630##
1631{ 'command': 'query-target', 'returns': 'TargetInfo' }
1632
1633##
1634# @AcpiTableOptions:
1635#
1636# Specify an ACPI table on the command line to load.
1637#
1638# At most one of @file and @data can be specified. The list of files specified
1639# by any one of them is loaded and concatenated in order. If both are omitted,
1640# @data is implied.
1641#
1642# Other fields / optargs can be used to override fields of the generic ACPI
1643# table header; refer to the ACPI specification 5.0, section 5.2.6 System
1644# Description Table Header. If a header field is not overridden, then the
1645# corresponding value from the concatenated blob is used (in case of @file), or
1646# it is filled in with a hard-coded value (in case of @data).
1647#
1648# String fields are copied into the matching ACPI member from lowest address
1649# upwards, and silently truncated / NUL-padded to length.
1650#
1651# @sig: table signature / identifier (4 bytes)
1652#
1653# @rev: table revision number (dependent on signature, 1 byte)
1654#
1655# @oem_id: OEM identifier (6 bytes)
1656#
1657# @oem_table_id: OEM table identifier (8 bytes)
1658#
1659# @oem_rev: OEM-supplied revision number (4 bytes)
1660#
1661# @asl_compiler_id: identifier of the utility that created the table
1662#                   (4 bytes)
1663#
1664# @asl_compiler_rev: revision number of the utility that created the
1665#                    table (4 bytes)
1666#
1667# @file: colon (:) separated list of pathnames to load and
1668#        concatenate as table data. The resultant binary blob is expected to
1669#        have an ACPI table header. At least one file is required. This field
1670#        excludes @data.
1671#
1672# @data: colon (:) separated list of pathnames to load and
1673#        concatenate as table data. The resultant binary blob must not have an
1674#        ACPI table header. At least one file is required. This field excludes
1675#        @file.
1676#
1677# Since: 1.5
1678##
1679{ 'struct': 'AcpiTableOptions',
1680  'data': {
1681    '*sig':               'str',
1682    '*rev':               'uint8',
1683    '*oem_id':            'str',
1684    '*oem_table_id':      'str',
1685    '*oem_rev':           'uint32',
1686    '*asl_compiler_id':   'str',
1687    '*asl_compiler_rev':  'uint32',
1688    '*file':              'str',
1689    '*data':              'str' }}
1690
1691##
1692# @CommandLineParameterType:
1693#
1694# Possible types for an option parameter.
1695#
1696# @string: accepts a character string
1697#
1698# @boolean: accepts "on" or "off"
1699#
1700# @number: accepts a number
1701#
1702# @size: accepts a number followed by an optional suffix (K)ilo,
1703#        (M)ega, (G)iga, (T)era
1704#
1705# Since: 1.5
1706##
1707{ 'enum': 'CommandLineParameterType',
1708  'data': ['string', 'boolean', 'number', 'size'] }
1709
1710##
1711# @CommandLineParameterInfo:
1712#
1713# Details about a single parameter of a command line option.
1714#
1715# @name: parameter name
1716#
1717# @type: parameter @CommandLineParameterType
1718#
1719# @help: human readable text string, not suitable for parsing.
1720#
1721# @default: default value string (since 2.1)
1722#
1723# Since: 1.5
1724##
1725{ 'struct': 'CommandLineParameterInfo',
1726  'data': { 'name': 'str',
1727            'type': 'CommandLineParameterType',
1728            '*help': 'str',
1729            '*default': 'str' } }
1730
1731##
1732# @CommandLineOptionInfo:
1733#
1734# Details about a command line option, including its list of parameter details
1735#
1736# @option: option name
1737#
1738# @parameters: an array of @CommandLineParameterInfo
1739#
1740# Since: 1.5
1741##
1742{ 'struct': 'CommandLineOptionInfo',
1743  'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
1744
1745##
1746# @query-command-line-options:
1747#
1748# Query command line option schema.
1749#
1750# @option: option name
1751#
1752# Returns: list of @CommandLineOptionInfo for all options (or for the given
1753#          @option).  Returns an error if the given @option doesn't exist.
1754#
1755# Since: 1.5
1756#
1757# Example:
1758#
1759# -> { "execute": "query-command-line-options",
1760#      "arguments": { "option": "option-rom" } }
1761# <- { "return": [
1762#         {
1763#             "parameters": [
1764#                 {
1765#                     "name": "romfile",
1766#                     "type": "string"
1767#                 },
1768#                 {
1769#                     "name": "bootindex",
1770#                     "type": "number"
1771#                 }
1772#             ],
1773#             "option": "option-rom"
1774#         }
1775#      ]
1776#    }
1777#
1778##
1779{'command': 'query-command-line-options',
1780 'data': { '*option': 'str' },
1781 'returns': ['CommandLineOptionInfo'],
1782 'allow-preconfig': true }
1783
1784##
1785# @PCDIMMDeviceInfo:
1786#
1787# PCDIMMDevice state information
1788#
1789# @id: device's ID
1790#
1791# @addr: physical address, where device is mapped
1792#
1793# @size: size of memory that the device provides
1794#
1795# @slot: slot number at which device is plugged in
1796#
1797# @node: NUMA node number where device is plugged in
1798#
1799# @memdev: memory backend linked with device
1800#
1801# @hotplugged: true if device was hotplugged
1802#
1803# @hotpluggable: true if device if could be added/removed while machine is running
1804#
1805# Since: 2.1
1806##
1807{ 'struct': 'PCDIMMDeviceInfo',
1808  'data': { '*id': 'str',
1809            'addr': 'int',
1810            'size': 'int',
1811            'slot': 'int',
1812            'node': 'int',
1813            'memdev': 'str',
1814            'hotplugged': 'bool',
1815            'hotpluggable': 'bool'
1816          }
1817}
1818
1819##
1820# @MemoryDeviceInfo:
1821#
1822# Union containing information about a memory device
1823#
1824# Since: 2.1
1825##
1826{ 'union': 'MemoryDeviceInfo',
1827  'data': { 'dimm': 'PCDIMMDeviceInfo',
1828            'nvdimm': 'PCDIMMDeviceInfo'
1829          }
1830}
1831
1832##
1833# @query-memory-devices:
1834#
1835# Lists available memory devices and their state
1836#
1837# Since: 2.1
1838#
1839# Example:
1840#
1841# -> { "execute": "query-memory-devices" }
1842# <- { "return": [ { "data":
1843#                       { "addr": 5368709120,
1844#                         "hotpluggable": true,
1845#                         "hotplugged": true,
1846#                         "id": "d1",
1847#                         "memdev": "/objects/memX",
1848#                         "node": 0,
1849#                         "size": 1073741824,
1850#                         "slot": 0},
1851#                    "type": "dimm"
1852#                  } ] }
1853#
1854##
1855{ 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
1856
1857##
1858# @MEM_UNPLUG_ERROR:
1859#
1860# Emitted when memory hot unplug error occurs.
1861#
1862# @device: device name
1863#
1864# @msg: Informative message
1865#
1866# Since: 2.4
1867#
1868# Example:
1869#
1870# <- { "event": "MEM_UNPLUG_ERROR"
1871#      "data": { "device": "dimm1",
1872#                "msg": "acpi: device unplug for unsupported device"
1873#      },
1874#      "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
1875#
1876##
1877{ 'event': 'MEM_UNPLUG_ERROR',
1878  'data': { 'device': 'str', 'msg': 'str' } }
1879
1880##
1881# @ACPISlotType:
1882#
1883# @DIMM: memory slot
1884# @CPU: logical CPU slot (since 2.7)
1885##
1886{ 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
1887
1888##
1889# @ACPIOSTInfo:
1890#
1891# OSPM Status Indication for a device
1892# For description of possible values of @source and @status fields
1893# see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
1894#
1895# @device: device ID associated with slot
1896#
1897# @slot: slot ID, unique per slot of a given @slot-type
1898#
1899# @slot-type: type of the slot
1900#
1901# @source: an integer containing the source event
1902#
1903# @status: an integer containing the status code
1904#
1905# Since: 2.1
1906##
1907{ 'struct': 'ACPIOSTInfo',
1908  'data'  : { '*device': 'str',
1909              'slot': 'str',
1910              'slot-type': 'ACPISlotType',
1911              'source': 'int',
1912              'status': 'int' } }
1913
1914##
1915# @query-acpi-ospm-status:
1916#
1917# Return a list of ACPIOSTInfo for devices that support status
1918# reporting via ACPI _OST method.
1919#
1920# Since: 2.1
1921#
1922# Example:
1923#
1924# -> { "execute": "query-acpi-ospm-status" }
1925# <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
1926#                  { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
1927#                  { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
1928#                  { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
1929#    ]}
1930#
1931##
1932{ 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
1933
1934##
1935# @ACPI_DEVICE_OST:
1936#
1937# Emitted when guest executes ACPI _OST method.
1938#
1939# @info: OSPM Status Indication
1940#
1941# Since: 2.1
1942#
1943# Example:
1944#
1945# <- { "event": "ACPI_DEVICE_OST",
1946#      "data": { "device": "d1", "slot": "0",
1947#                "slot-type": "DIMM", "source": 1, "status": 0 } }
1948#
1949##
1950{ 'event': 'ACPI_DEVICE_OST',
1951     'data': { 'info': 'ACPIOSTInfo' } }
1952
1953##
1954# @ReplayMode:
1955#
1956# Mode of the replay subsystem.
1957#
1958# @none: normal execution mode. Replay or record are not enabled.
1959#
1960# @record: record mode. All non-deterministic data is written into the
1961#          replay log.
1962#
1963# @play: replay mode. Non-deterministic data required for system execution
1964#        is read from the log.
1965#
1966# Since: 2.5
1967##
1968{ 'enum': 'ReplayMode',
1969  'data': [ 'none', 'record', 'play' ] }
1970
1971##
1972# @xen-load-devices-state:
1973#
1974# Load the state of all devices from file. The RAM and the block devices
1975# of the VM are not loaded by this command.
1976#
1977# @filename: the file to load the state of the devices from as binary
1978# data. See xen-save-devices-state.txt for a description of the binary
1979# format.
1980#
1981# Since: 2.7
1982#
1983# Example:
1984#
1985# -> { "execute": "xen-load-devices-state",
1986#      "arguments": { "filename": "/tmp/resume" } }
1987# <- { "return": {} }
1988#
1989##
1990{ 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
1991
1992##
1993# @GuidInfo:
1994#
1995# GUID information.
1996#
1997# @guid: the globally unique identifier
1998#
1999# Since: 2.9
2000##
2001{ 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
2002
2003##
2004# @query-vm-generation-id:
2005#
2006# Show Virtual Machine Generation ID
2007#
2008# Since: 2.9
2009##
2010{ 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }
2011
2012