tests/qtest: do not list ahci-test twice
[qemu/ar7.git] / qapi / misc.json
blob9d32820dc1b6aa5573d8691f3a8301826b7b3c0b
1 # -*- Mode: Python -*-
2 # vim: filetype=python
5 ##
6 # = Miscellanea
7 ##
9 { 'include': 'common.json' }
12 # @LostTickPolicy:
14 # Policy for handling lost ticks in timer devices.  Ticks end up getting
15 # lost when, for example, the guest is paused.
17 # @discard: throw away the missed ticks and continue with future injection
18 #           normally.  The guest OS will see the timer jump ahead by a
19 #           potentially quite significant amount all at once, as if the
20 #           intervening chunk of time had simply not existed; needless to
21 #           say, such a sudden jump can easily confuse a guest OS which is
22 #           not specifically prepared to deal with it.  Assuming the guest
23 #           OS can deal correctly with the time jump, the time in the guest
24 #           and in the host should now match.
26 # @delay: continue to deliver ticks at the normal rate.  The guest OS will
27 #         not notice anything is amiss, as from its point of view time will
28 #         have continued to flow normally.  The time in the guest should now
29 #         be behind the time in the host by exactly the amount of time during
30 #         which ticks have been missed.
32 # @slew: deliver ticks at a higher rate to catch up with the missed ticks.
33 #        The guest OS will not notice anything is amiss, as from its point
34 #        of view time will have continued to flow normally.  Once the timer
35 #        has managed to catch up with all the missing ticks, the time in
36 #        the guest and in the host should match.
38 # Since: 2.0
40 { 'enum': 'LostTickPolicy',
41   'data': ['discard', 'delay', 'slew' ] }
44 # @add_client:
46 # Allow client connections for VNC, Spice and socket based
47 # character devices to be passed in to QEMU via SCM_RIGHTS.
49 # @protocol: protocol name. Valid names are "vnc", "spice" or the
50 #            name of a character device (eg. from -chardev id=XXXX)
52 # @fdname: file descriptor name previously passed via 'getfd' command
54 # @skipauth: whether to skip authentication. Only applies
55 #            to "vnc" and "spice" protocols
57 # @tls: whether to perform TLS. Only applies to the "spice"
58 #       protocol
60 # Returns: nothing on success.
62 # Since: 0.14.0
64 # Example:
66 # -> { "execute": "add_client", "arguments": { "protocol": "vnc",
67 #                                              "fdname": "myclient" } }
68 # <- { "return": {} }
71 { 'command': 'add_client',
72   'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
73             '*tls': 'bool' } }
76 # @NameInfo:
78 # Guest name information.
80 # @name: The name of the guest
82 # Since: 0.14.0
84 { 'struct': 'NameInfo', 'data': {'*name': 'str'} }
87 # @query-name:
89 # Return the name information of a guest.
91 # Returns: @NameInfo of the guest
93 # Since: 0.14.0
95 # Example:
97 # -> { "execute": "query-name" }
98 # <- { "return": { "name": "qemu-name" } }
101 { 'command': 'query-name', 'returns': 'NameInfo', 'allow-preconfig': true }
104 # @KvmInfo:
106 # Information about support for KVM acceleration
108 # @enabled: true if KVM acceleration is active
110 # @present: true if KVM acceleration is built into this executable
112 # Since: 0.14.0
114 { 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
117 # @query-kvm:
119 # Returns information about KVM acceleration
121 # Returns: @KvmInfo
123 # Since: 0.14.0
125 # Example:
127 # -> { "execute": "query-kvm" }
128 # <- { "return": { "enabled": true, "present": true } }
131 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
134 # @UuidInfo:
136 # Guest UUID information (Universally Unique Identifier).
138 # @UUID: the UUID of the guest
140 # Since: 0.14.0
142 # Notes: If no UUID was specified for the guest, a null UUID is returned.
144 { 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
147 # @query-uuid:
149 # Query the guest UUID information.
151 # Returns: The @UuidInfo for the guest
153 # Since: 0.14.0
155 # Example:
157 # -> { "execute": "query-uuid" }
158 # <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
161 { 'command': 'query-uuid', 'returns': 'UuidInfo', 'allow-preconfig': true }
164 # @IOThreadInfo:
166 # Information about an iothread
168 # @id: the identifier of the iothread
170 # @thread-id: ID of the underlying host thread
172 # @poll-max-ns: maximum polling time in ns, 0 means polling is disabled
173 #               (since 2.9)
175 # @poll-grow: how many ns will be added to polling time, 0 means that it's not
176 #             configured (since 2.9)
178 # @poll-shrink: how many ns will be removed from polling time, 0 means that
179 #               it's not configured (since 2.9)
181 # Since: 2.0
183 { 'struct': 'IOThreadInfo',
184   'data': {'id': 'str',
185            'thread-id': 'int',
186            'poll-max-ns': 'int',
187            'poll-grow': 'int',
188            'poll-shrink': 'int' } }
191 # @query-iothreads:
193 # Returns a list of information about each iothread.
195 # Note: this list excludes the QEMU main loop thread, which is not declared
196 #       using the -object iothread command-line option.  It is always the main thread
197 #       of the process.
199 # Returns: a list of @IOThreadInfo for each iothread
201 # Since: 2.0
203 # Example:
205 # -> { "execute": "query-iothreads" }
206 # <- { "return": [
207 #          {
208 #             "id":"iothread0",
209 #             "thread-id":3134
210 #          },
211 #          {
212 #             "id":"iothread1",
213 #             "thread-id":3135
214 #          }
215 #       ]
216 #    }
219 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'],
220   'allow-preconfig': true }
223 # @BalloonInfo:
225 # Information about the guest balloon device.
227 # @actual: the number of bytes the balloon currently contains
229 # Since: 0.14.0
232 { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
235 # @query-balloon:
237 # Return information about the balloon device.
239 # Returns: - @BalloonInfo on success
240 #          - If the balloon driver is enabled but not functional because the KVM
241 #            kernel module cannot support it, KvmMissingCap
242 #          - If no balloon device is present, DeviceNotActive
244 # Since: 0.14.0
246 # Example:
248 # -> { "execute": "query-balloon" }
249 # <- { "return": {
250 #          "actual": 1073741824,
251 #       }
252 #    }
255 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
258 # @BALLOON_CHANGE:
260 # Emitted when the guest changes the actual BALLOON level. This value is
261 # equivalent to the @actual field return by the 'query-balloon' command
263 # @actual: actual level of the guest memory balloon in bytes
265 # Note: this event is rate-limited.
267 # Since: 1.2
269 # Example:
271 # <- { "event": "BALLOON_CHANGE",
272 #      "data": { "actual": 944766976 },
273 #      "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
276 { 'event': 'BALLOON_CHANGE',
277   'data': { 'actual': 'int' } }
280 # @PciMemoryRange:
282 # A PCI device memory region
284 # @base: the starting address (guest physical)
286 # @limit: the ending address (guest physical)
288 # Since: 0.14.0
290 { 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
293 # @PciMemoryRegion:
295 # Information about a PCI device I/O region.
297 # @bar: the index of the Base Address Register for this region
299 # @type: - 'io' if the region is a PIO region
300 #        - 'memory' if the region is a MMIO region
302 # @size: memory size
304 # @prefetch: if @type is 'memory', true if the memory is prefetchable
306 # @mem_type_64: if @type is 'memory', true if the BAR is 64-bit
308 # Since: 0.14.0
310 { 'struct': 'PciMemoryRegion',
311   'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
312            '*prefetch': 'bool', '*mem_type_64': 'bool' } }
315 # @PciBusInfo:
317 # Information about a bus of a PCI Bridge device
319 # @number: primary bus interface number.  This should be the number of the
320 #          bus the device resides on.
322 # @secondary: secondary bus interface number.  This is the number of the
323 #             main bus for the bridge
325 # @subordinate: This is the highest number bus that resides below the
326 #               bridge.
328 # @io_range: The PIO range for all devices on this bridge
330 # @memory_range: The MMIO range for all devices on this bridge
332 # @prefetchable_range: The range of prefetchable MMIO for all devices on
333 #                      this bridge
335 # Since: 2.4
337 { 'struct': 'PciBusInfo',
338   'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
339            'io_range': 'PciMemoryRange',
340            'memory_range': 'PciMemoryRange',
341            'prefetchable_range': 'PciMemoryRange' } }
344 # @PciBridgeInfo:
346 # Information about a PCI Bridge device
348 # @bus: information about the bus the device resides on
350 # @devices: a list of @PciDeviceInfo for each device on this bridge
352 # Since: 0.14.0
354 { 'struct': 'PciBridgeInfo',
355   'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
358 # @PciDeviceClass:
360 # Information about the Class of a PCI device
362 # @desc: a string description of the device's class
364 # @class: the class code of the device
366 # Since: 2.4
368 { 'struct': 'PciDeviceClass',
369   'data': {'*desc': 'str', 'class': 'int'} }
372 # @PciDeviceId:
374 # Information about the Id of a PCI device
376 # @device: the PCI device id
378 # @vendor: the PCI vendor id
380 # @subsystem: the PCI subsystem id (since 3.1)
382 # @subsystem-vendor: the PCI subsystem vendor id (since 3.1)
384 # Since: 2.4
386 { 'struct': 'PciDeviceId',
387   'data': {'device': 'int', 'vendor': 'int', '*subsystem': 'int',
388             '*subsystem-vendor': 'int'} }
391 # @PciDeviceInfo:
393 # Information about a PCI device
395 # @bus: the bus number of the device
397 # @slot: the slot the device is located in
399 # @function: the function of the slot used by the device
401 # @class_info: the class of the device
403 # @id: the PCI device id
405 # @irq: if an IRQ is assigned to the device, the IRQ number
407 # @irq_pin: the IRQ pin, zero means no IRQ (since 5.1)
409 # @qdev_id: the device name of the PCI device
411 # @pci_bridge: if the device is a PCI bridge, the bridge information
413 # @regions: a list of the PCI I/O regions associated with the device
415 # Notes: the contents of @class_info.desc are not stable and should only be
416 #        treated as informational.
418 # Since: 0.14.0
420 { 'struct': 'PciDeviceInfo',
421   'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
422            'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
423            '*irq': 'int', 'irq_pin': 'int', 'qdev_id': 'str',
424            '*pci_bridge': 'PciBridgeInfo', 'regions': ['PciMemoryRegion'] }}
427 # @PciInfo:
429 # Information about a PCI bus
431 # @bus: the bus index
433 # @devices: a list of devices on this bus
435 # Since: 0.14.0
437 { 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
440 # @query-pci:
442 # Return information about the PCI bus topology of the guest.
444 # Returns: a list of @PciInfo for each PCI bus. Each bus is
445 #          represented by a json-object, which has a key with a json-array of
446 #          all PCI devices attached to it. Each device is represented by a
447 #          json-object.
449 # Since: 0.14.0
451 # Example:
453 # -> { "execute": "query-pci" }
454 # <- { "return": [
455 #          {
456 #             "bus": 0,
457 #             "devices": [
458 #                {
459 #                   "bus": 0,
460 #                   "qdev_id": "",
461 #                   "slot": 0,
462 #                   "class_info": {
463 #                      "class": 1536,
464 #                      "desc": "Host bridge"
465 #                   },
466 #                   "id": {
467 #                      "device": 32902,
468 #                      "vendor": 4663
469 #                   },
470 #                   "function": 0,
471 #                   "regions": [
472 #                   ]
473 #                },
474 #                {
475 #                   "bus": 0,
476 #                   "qdev_id": "",
477 #                   "slot": 1,
478 #                   "class_info": {
479 #                      "class": 1537,
480 #                      "desc": "ISA bridge"
481 #                   },
482 #                   "id": {
483 #                      "device": 32902,
484 #                      "vendor": 28672
485 #                   },
486 #                   "function": 0,
487 #                   "regions": [
488 #                   ]
489 #                },
490 #                {
491 #                   "bus": 0,
492 #                   "qdev_id": "",
493 #                   "slot": 1,
494 #                   "class_info": {
495 #                      "class": 257,
496 #                      "desc": "IDE controller"
497 #                   },
498 #                   "id": {
499 #                      "device": 32902,
500 #                      "vendor": 28688
501 #                   },
502 #                   "function": 1,
503 #                   "regions": [
504 #                      {
505 #                         "bar": 4,
506 #                         "size": 16,
507 #                         "address": 49152,
508 #                         "type": "io"
509 #                      }
510 #                   ]
511 #                },
512 #                {
513 #                   "bus": 0,
514 #                   "qdev_id": "",
515 #                   "slot": 2,
516 #                   "class_info": {
517 #                      "class": 768,
518 #                      "desc": "VGA controller"
519 #                   },
520 #                   "id": {
521 #                      "device": 4115,
522 #                      "vendor": 184
523 #                   },
524 #                   "function": 0,
525 #                   "regions": [
526 #                      {
527 #                         "prefetch": true,
528 #                         "mem_type_64": false,
529 #                         "bar": 0,
530 #                         "size": 33554432,
531 #                         "address": 4026531840,
532 #                         "type": "memory"
533 #                      },
534 #                      {
535 #                         "prefetch": false,
536 #                         "mem_type_64": false,
537 #                         "bar": 1,
538 #                         "size": 4096,
539 #                         "address": 4060086272,
540 #                         "type": "memory"
541 #                      },
542 #                      {
543 #                         "prefetch": false,
544 #                         "mem_type_64": false,
545 #                         "bar": 6,
546 #                         "size": 65536,
547 #                         "address": -1,
548 #                         "type": "memory"
549 #                      }
550 #                   ]
551 #                },
552 #                {
553 #                   "bus": 0,
554 #                   "qdev_id": "",
555 #                   "irq": 11,
556 #                   "slot": 4,
557 #                   "class_info": {
558 #                      "class": 1280,
559 #                      "desc": "RAM controller"
560 #                   },
561 #                   "id": {
562 #                      "device": 6900,
563 #                      "vendor": 4098
564 #                   },
565 #                   "function": 0,
566 #                   "regions": [
567 #                      {
568 #                         "bar": 0,
569 #                         "size": 32,
570 #                         "address": 49280,
571 #                         "type": "io"
572 #                      }
573 #                   ]
574 #                }
575 #             ]
576 #          }
577 #       ]
578 #    }
580 # Note: This example has been shortened as the real response is too long.
583 { 'command': 'query-pci', 'returns': ['PciInfo'] }
586 # @stop:
588 # Stop all guest VCPU execution.
590 # Since:  0.14.0
592 # Notes: This function will succeed even if the guest is already in the stopped
593 #        state.  In "inmigrate" state, it will ensure that the guest
594 #        remains paused once migration finishes, as if the -S option was
595 #        passed on the command line.
597 # Example:
599 # -> { "execute": "stop" }
600 # <- { "return": {} }
603 { 'command': 'stop' }
606 # @system_reset:
608 # Performs a hard reset of a guest.
610 # Since: 0.14.0
612 # Example:
614 # -> { "execute": "system_reset" }
615 # <- { "return": {} }
618 { 'command': 'system_reset' }
621 # @system_powerdown:
623 # Requests that a guest perform a powerdown operation.
625 # Since: 0.14.0
627 # Notes: A guest may or may not respond to this command.  This command
628 #        returning does not indicate that a guest has accepted the request or
629 #        that it has shut down.  Many guests will respond to this command by
630 #        prompting the user in some way.
631 # Example:
633 # -> { "execute": "system_powerdown" }
634 # <- { "return": {} }
637 { 'command': 'system_powerdown' }
640 # @memsave:
642 # Save a portion of guest memory to a file.
644 # @val: the virtual address of the guest to start from
646 # @size: the size of memory region to save
648 # @filename: the file to save the memory to as binary data
650 # @cpu-index: the index of the virtual CPU to use for translating the
651 #             virtual address (defaults to CPU 0)
653 # Returns: Nothing on success
655 # Since: 0.14.0
657 # Notes: Errors were not reliably returned until 1.1
659 # Example:
661 # -> { "execute": "memsave",
662 #      "arguments": { "val": 10,
663 #                     "size": 100,
664 #                     "filename": "/tmp/virtual-mem-dump" } }
665 # <- { "return": {} }
668 { 'command': 'memsave',
669   'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
672 # @pmemsave:
674 # Save a portion of guest physical memory to a file.
676 # @val: the physical address of the guest to start from
678 # @size: the size of memory region to save
680 # @filename: the file to save the memory to as binary data
682 # Returns: Nothing on success
684 # Since: 0.14.0
686 # Notes: Errors were not reliably returned until 1.1
688 # Example:
690 # -> { "execute": "pmemsave",
691 #      "arguments": { "val": 10,
692 #                     "size": 100,
693 #                     "filename": "/tmp/physical-mem-dump" } }
694 # <- { "return": {} }
697 { 'command': 'pmemsave',
698   'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
701 # @cont:
703 # Resume guest VCPU execution.
705 # Since:  0.14.0
707 # Returns:  If successful, nothing
709 # Notes: This command will succeed if the guest is currently running.  It
710 #        will also succeed if the guest is in the "inmigrate" state; in
711 #        this case, the effect of the command is to make sure the guest
712 #        starts once migration finishes, removing the effect of the -S
713 #        command line option if it was passed.
715 # Example:
717 # -> { "execute": "cont" }
718 # <- { "return": {} }
721 { 'command': 'cont' }
724 # @x-exit-preconfig:
726 # Exit from "preconfig" state
728 # This command makes QEMU exit the preconfig state and proceed with
729 # VM initialization using configuration data provided on the command line
730 # and via the QMP monitor during the preconfig state. The command is only
731 # available during the preconfig state (i.e. when the --preconfig command
732 # line option was in use).
734 # Since 3.0
736 # Returns: nothing
738 # Example:
740 # -> { "execute": "x-exit-preconfig" }
741 # <- { "return": {} }
744 { 'command': 'x-exit-preconfig', 'allow-preconfig': true }
747 # @system_wakeup:
749 # Wake up guest from suspend. If the guest has wake-up from suspend
750 # support enabled (wakeup-suspend-support flag from
751 # query-current-machine), wake-up guest from suspend if the guest is
752 # in SUSPENDED state. Return an error otherwise.
754 # Since:  1.1
756 # Returns:  nothing.
758 # Note: prior to 4.0, this command does nothing in case the guest
759 #       isn't suspended.
761 # Example:
763 # -> { "execute": "system_wakeup" }
764 # <- { "return": {} }
767 { 'command': 'system_wakeup' }
770 # @inject-nmi:
772 # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
773 # The command fails when the guest doesn't support injecting.
775 # Returns:  If successful, nothing
777 # Since:  0.14.0
779 # Note: prior to 2.1, this command was only supported for x86 and s390 VMs
781 # Example:
783 # -> { "execute": "inject-nmi" }
784 # <- { "return": {} }
787 { 'command': 'inject-nmi' }
790 # @balloon:
792 # Request the balloon driver to change its balloon size.
794 # @value: the target size of the balloon in bytes
796 # Returns: - Nothing on success
797 #          - If the balloon driver is enabled but not functional because the KVM
798 #            kernel module cannot support it, KvmMissingCap
799 #          - If no balloon device is present, DeviceNotActive
801 # Notes: This command just issues a request to the guest.  When it returns,
802 #        the balloon size may not have changed.  A guest can change the balloon
803 #        size independent of this command.
805 # Since: 0.14.0
807 # Example:
809 # -> { "execute": "balloon", "arguments": { "value": 536870912 } }
810 # <- { "return": {} }
813 { 'command': 'balloon', 'data': {'value': 'int'} }
816 # @human-monitor-command:
818 # Execute a command on the human monitor and return the output.
820 # @command-line: the command to execute in the human monitor
822 # @cpu-index: The CPU to use for commands that require an implicit CPU
824 # Features:
825 # @savevm-monitor-nodes: If present, HMP command savevm only snapshots
826 #                        monitor-owned nodes if they have no parents.
827 #                        This allows the use of 'savevm' with
828 #                        -blockdev. (since 4.2)
830 # Returns: the output of the command as a string
832 # Since: 0.14.0
834 # Notes: This command only exists as a stop-gap.  Its use is highly
835 #        discouraged.  The semantics of this command are not
836 #        guaranteed: this means that command names, arguments and
837 #        responses can change or be removed at ANY time.  Applications
838 #        that rely on long term stability guarantees should NOT
839 #        use this command.
841 #        Known limitations:
843 #        * This command is stateless, this means that commands that depend
844 #          on state information (such as getfd) might not work
846 #        * Commands that prompt the user for data don't currently work
848 # Example:
850 # -> { "execute": "human-monitor-command",
851 #      "arguments": { "command-line": "info kvm" } }
852 # <- { "return": "kvm support: enabled\r\n" }
855 { 'command': 'human-monitor-command',
856   'data': {'command-line': 'str', '*cpu-index': 'int'},
857   'returns': 'str',
858   'features': [ 'savevm-monitor-nodes' ] }
861 # @change:
863 # This command is multiple commands multiplexed together.
865 # @device: This is normally the name of a block device but it may also be 'vnc'.
866 #          when it's 'vnc', then sub command depends on @target
868 # @target: If @device is a block device, then this is the new filename.
869 #          If @device is 'vnc', then if the value 'password' selects the vnc
870 #          change password command.   Otherwise, this specifies a new server URI
871 #          address to listen to for VNC connections.
873 # @arg: If @device is a block device, then this is an optional format to open
874 #       the device with.
875 #       If @device is 'vnc' and @target is 'password', this is the new VNC
876 #       password to set.  See change-vnc-password for additional notes.
878 # Features:
879 # @deprecated: This command is deprecated.  For changing block
880 #     devices, use 'blockdev-change-medium' instead; for changing VNC
881 #     parameters, use 'change-vnc-password' instead.
883 # Returns: - Nothing on success.
884 #          - If @device is not a valid block device, DeviceNotFound
886 # Since: 0.14.0
888 # Example:
890 # 1. Change a removable medium
892 # -> { "execute": "change",
893 #      "arguments": { "device": "ide1-cd0",
894 #                     "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } }
895 # <- { "return": {} }
897 # 2. Change VNC password
899 # -> { "execute": "change",
900 #      "arguments": { "device": "vnc", "target": "password",
901 #                     "arg": "foobar1" } }
902 # <- { "return": {} }
905 { 'command': 'change',
906   'data': {'device': 'str', 'target': 'str', '*arg': 'str'},
907   'features': [ 'deprecated' ] }
910 # @xen-set-global-dirty-log:
912 # Enable or disable the global dirty log mode.
914 # @enable: true to enable, false to disable.
916 # Returns: nothing
918 # Since: 1.3
920 # Example:
922 # -> { "execute": "xen-set-global-dirty-log",
923 #      "arguments": { "enable": true } }
924 # <- { "return": {} }
927 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
930 # @getfd:
932 # Receive a file descriptor via SCM rights and assign it a name
934 # @fdname: file descriptor name
936 # Returns: Nothing on success
938 # Since: 0.14.0
940 # Notes: If @fdname already exists, the file descriptor assigned to
941 #        it will be closed and replaced by the received file
942 #        descriptor.
944 #        The 'closefd' command can be used to explicitly close the
945 #        file descriptor when it is no longer needed.
947 # Example:
949 # -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
950 # <- { "return": {} }
953 { 'command': 'getfd', 'data': {'fdname': 'str'} }
956 # @closefd:
958 # Close a file descriptor previously passed via SCM rights
960 # @fdname: file descriptor name
962 # Returns: Nothing on success
964 # Since: 0.14.0
966 # Example:
968 # -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
969 # <- { "return": {} }
972 { 'command': 'closefd', 'data': {'fdname': 'str'} }
975 # @MemoryInfo:
977 # Actual memory information in bytes.
979 # @base-memory: size of "base" memory specified with command line
980 #               option -m.
982 # @plugged-memory: size of memory that can be hot-unplugged. This field
983 #                  is omitted if target doesn't support memory hotplug
984 #                  (i.e. CONFIG_MEM_DEVICE not defined at build time).
986 # Since: 2.11.0
988 { 'struct': 'MemoryInfo',
989   'data'  : { 'base-memory': 'size', '*plugged-memory': 'size' } }
992 # @query-memory-size-summary:
994 # Return the amount of initially allocated and present hotpluggable (if
995 # enabled) memory in bytes.
997 # Example:
999 # -> { "execute": "query-memory-size-summary" }
1000 # <- { "return": { "base-memory": 4294967296, "plugged-memory": 0 } }
1002 # Since: 2.11.0
1004 { 'command': 'query-memory-size-summary', 'returns': 'MemoryInfo' }
1008 # @AddfdInfo:
1010 # Information about a file descriptor that was added to an fd set.
1012 # @fdset-id: The ID of the fd set that @fd was added to.
1014 # @fd: The file descriptor that was received via SCM rights and
1015 #      added to the fd set.
1017 # Since: 1.2.0
1019 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
1022 # @add-fd:
1024 # Add a file descriptor, that was passed via SCM rights, to an fd set.
1026 # @fdset-id: The ID of the fd set to add the file descriptor to.
1028 # @opaque: A free-form string that can be used to describe the fd.
1030 # Returns: - @AddfdInfo on success
1031 #          - If file descriptor was not received, FdNotSupplied
1032 #          - If @fdset-id is a negative value, InvalidParameterValue
1034 # Notes: The list of fd sets is shared by all monitor connections.
1036 #        If @fdset-id is not specified, a new fd set will be created.
1038 # Since: 1.2.0
1040 # Example:
1042 # -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
1043 # <- { "return": { "fdset-id": 1, "fd": 3 } }
1046 { 'command': 'add-fd',
1047   'data': { '*fdset-id': 'int',
1048             '*opaque': 'str' },
1049   'returns': 'AddfdInfo' }
1052 # @remove-fd:
1054 # Remove a file descriptor from an fd set.
1056 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
1058 # @fd: The file descriptor that is to be removed.
1060 # Returns: - Nothing on success
1061 #          - If @fdset-id or @fd is not found, FdNotFound
1063 # Since: 1.2.0
1065 # Notes: The list of fd sets is shared by all monitor connections.
1067 #        If @fd is not specified, all file descriptors in @fdset-id
1068 #        will be removed.
1070 # Example:
1072 # -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
1073 # <- { "return": {} }
1076 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
1079 # @FdsetFdInfo:
1081 # Information about a file descriptor that belongs to an fd set.
1083 # @fd: The file descriptor value.
1085 # @opaque: A free-form string that can be used to describe the fd.
1087 # Since: 1.2.0
1089 { 'struct': 'FdsetFdInfo',
1090   'data': {'fd': 'int', '*opaque': 'str'} }
1093 # @FdsetInfo:
1095 # Information about an fd set.
1097 # @fdset-id: The ID of the fd set.
1099 # @fds: A list of file descriptors that belong to this fd set.
1101 # Since: 1.2.0
1103 { 'struct': 'FdsetInfo',
1104   'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
1107 # @query-fdsets:
1109 # Return information describing all fd sets.
1111 # Returns: A list of @FdsetInfo
1113 # Since: 1.2.0
1115 # Note: The list of fd sets is shared by all monitor connections.
1117 # Example:
1119 # -> { "execute": "query-fdsets" }
1120 # <- { "return": [
1121 #        {
1122 #          "fds": [
1123 #            {
1124 #              "fd": 30,
1125 #              "opaque": "rdonly:/path/to/file"
1126 #            },
1127 #            {
1128 #              "fd": 24,
1129 #              "opaque": "rdwr:/path/to/file"
1130 #            }
1131 #          ],
1132 #          "fdset-id": 1
1133 #        },
1134 #        {
1135 #          "fds": [
1136 #            {
1137 #              "fd": 28
1138 #            },
1139 #            {
1140 #              "fd": 29
1141 #            }
1142 #          ],
1143 #          "fdset-id": 0
1144 #        }
1145 #      ]
1146 #    }
1149 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
1152 # @AcpiTableOptions:
1154 # Specify an ACPI table on the command line to load.
1156 # At most one of @file and @data can be specified. The list of files specified
1157 # by any one of them is loaded and concatenated in order. If both are omitted,
1158 # @data is implied.
1160 # Other fields / optargs can be used to override fields of the generic ACPI
1161 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
1162 # Description Table Header. If a header field is not overridden, then the
1163 # corresponding value from the concatenated blob is used (in case of @file), or
1164 # it is filled in with a hard-coded value (in case of @data).
1166 # String fields are copied into the matching ACPI member from lowest address
1167 # upwards, and silently truncated / NUL-padded to length.
1169 # @sig: table signature / identifier (4 bytes)
1171 # @rev: table revision number (dependent on signature, 1 byte)
1173 # @oem_id: OEM identifier (6 bytes)
1175 # @oem_table_id: OEM table identifier (8 bytes)
1177 # @oem_rev: OEM-supplied revision number (4 bytes)
1179 # @asl_compiler_id: identifier of the utility that created the table
1180 #                   (4 bytes)
1182 # @asl_compiler_rev: revision number of the utility that created the
1183 #                    table (4 bytes)
1185 # @file: colon (:) separated list of pathnames to load and
1186 #        concatenate as table data. The resultant binary blob is expected to
1187 #        have an ACPI table header. At least one file is required. This field
1188 #        excludes @data.
1190 # @data: colon (:) separated list of pathnames to load and
1191 #        concatenate as table data. The resultant binary blob must not have an
1192 #        ACPI table header. At least one file is required. This field excludes
1193 #        @file.
1195 # Since: 1.5
1197 { 'struct': 'AcpiTableOptions',
1198   'data': {
1199     '*sig':               'str',
1200     '*rev':               'uint8',
1201     '*oem_id':            'str',
1202     '*oem_table_id':      'str',
1203     '*oem_rev':           'uint32',
1204     '*asl_compiler_id':   'str',
1205     '*asl_compiler_rev':  'uint32',
1206     '*file':              'str',
1207     '*data':              'str' }}
1210 # @CommandLineParameterType:
1212 # Possible types for an option parameter.
1214 # @string: accepts a character string
1216 # @boolean: accepts "on" or "off"
1218 # @number: accepts a number
1220 # @size: accepts a number followed by an optional suffix (K)ilo,
1221 #        (M)ega, (G)iga, (T)era
1223 # Since: 1.5
1225 { 'enum': 'CommandLineParameterType',
1226   'data': ['string', 'boolean', 'number', 'size'] }
1229 # @CommandLineParameterInfo:
1231 # Details about a single parameter of a command line option.
1233 # @name: parameter name
1235 # @type: parameter @CommandLineParameterType
1237 # @help: human readable text string, not suitable for parsing.
1239 # @default: default value string (since 2.1)
1241 # Since: 1.5
1243 { 'struct': 'CommandLineParameterInfo',
1244   'data': { 'name': 'str',
1245             'type': 'CommandLineParameterType',
1246             '*help': 'str',
1247             '*default': 'str' } }
1250 # @CommandLineOptionInfo:
1252 # Details about a command line option, including its list of parameter details
1254 # @option: option name
1256 # @parameters: an array of @CommandLineParameterInfo
1258 # Since: 1.5
1260 { 'struct': 'CommandLineOptionInfo',
1261   'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
1264 # @query-command-line-options:
1266 # Query command line option schema.
1268 # @option: option name
1270 # Returns: list of @CommandLineOptionInfo for all options (or for the given
1271 #          @option).  Returns an error if the given @option doesn't exist.
1273 # Since: 1.5
1275 # Example:
1277 # -> { "execute": "query-command-line-options",
1278 #      "arguments": { "option": "option-rom" } }
1279 # <- { "return": [
1280 #         {
1281 #             "parameters": [
1282 #                 {
1283 #                     "name": "romfile",
1284 #                     "type": "string"
1285 #                 },
1286 #                 {
1287 #                     "name": "bootindex",
1288 #                     "type": "number"
1289 #                 }
1290 #             ],
1291 #             "option": "option-rom"
1292 #         }
1293 #      ]
1294 #    }
1297 {'command': 'query-command-line-options',
1298  'data': { '*option': 'str' },
1299  'returns': ['CommandLineOptionInfo'],
1300  'allow-preconfig': true }
1303 # @PCDIMMDeviceInfo:
1305 # PCDIMMDevice state information
1307 # @id: device's ID
1309 # @addr: physical address, where device is mapped
1311 # @size: size of memory that the device provides
1313 # @slot: slot number at which device is plugged in
1315 # @node: NUMA node number where device is plugged in
1317 # @memdev: memory backend linked with device
1319 # @hotplugged: true if device was hotplugged
1321 # @hotpluggable: true if device if could be added/removed while machine is running
1323 # Since: 2.1
1325 { 'struct': 'PCDIMMDeviceInfo',
1326   'data': { '*id': 'str',
1327             'addr': 'int',
1328             'size': 'int',
1329             'slot': 'int',
1330             'node': 'int',
1331             'memdev': 'str',
1332             'hotplugged': 'bool',
1333             'hotpluggable': 'bool'
1334           }
1338 # @VirtioPMEMDeviceInfo:
1340 # VirtioPMEM state information
1342 # @id: device's ID
1344 # @memaddr: physical address in memory, where device is mapped
1346 # @size: size of memory that the device provides
1348 # @memdev: memory backend linked with device
1350 # Since: 4.1
1352 { 'struct': 'VirtioPMEMDeviceInfo',
1353   'data': { '*id': 'str',
1354             'memaddr': 'size',
1355             'size': 'size',
1356             'memdev': 'str'
1357           }
1361 # @VirtioMEMDeviceInfo:
1363 # VirtioMEMDevice state information
1365 # @id: device's ID
1367 # @memaddr: physical address in memory, where device is mapped
1369 # @requested-size: the user requested size of the device
1371 # @size: the (current) size of memory that the device provides
1373 # @max-size: the maximum size of memory that the device can provide
1375 # @block-size: the block size of memory that the device provides
1377 # @node: NUMA node number where device is assigned to
1379 # @memdev: memory backend linked with the region
1381 # Since: 5.1
1383 { 'struct': 'VirtioMEMDeviceInfo',
1384   'data': { '*id': 'str',
1385             'memaddr': 'size',
1386             'requested-size': 'size',
1387             'size': 'size',
1388             'max-size': 'size',
1389             'block-size': 'size',
1390             'node': 'int',
1391             'memdev': 'str'
1392           }
1396 # @MemoryDeviceInfo:
1398 # Union containing information about a memory device
1400 # nvdimm is included since 2.12. virtio-pmem is included since 4.1.
1401 # virtio-mem is included since 5.1.
1403 # Since: 2.1
1405 { 'union': 'MemoryDeviceInfo',
1406   'data': { 'dimm': 'PCDIMMDeviceInfo',
1407             'nvdimm': 'PCDIMMDeviceInfo',
1408             'virtio-pmem': 'VirtioPMEMDeviceInfo',
1409             'virtio-mem': 'VirtioMEMDeviceInfo'
1410           }
1414 # @query-memory-devices:
1416 # Lists available memory devices and their state
1418 # Since: 2.1
1420 # Example:
1422 # -> { "execute": "query-memory-devices" }
1423 # <- { "return": [ { "data":
1424 #                       { "addr": 5368709120,
1425 #                         "hotpluggable": true,
1426 #                         "hotplugged": true,
1427 #                         "id": "d1",
1428 #                         "memdev": "/objects/memX",
1429 #                         "node": 0,
1430 #                         "size": 1073741824,
1431 #                         "slot": 0},
1432 #                    "type": "dimm"
1433 #                  } ] }
1436 { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
1439 # @MEMORY_DEVICE_SIZE_CHANGE:
1441 # Emitted when the size of a memory device changes. Only emitted for memory
1442 # devices that can actually change the size (e.g., virtio-mem due to guest
1443 # action).
1445 # @id: device's ID
1446 # @size: the new size of memory that the device provides
1448 # Note: this event is rate-limited.
1450 # Since: 5.1
1452 # Example:
1454 # <- { "event": "MEMORY_DEVICE_SIZE_CHANGE",
1455 #      "data": { "id": "vm0", "size": 1073741824},
1456 #      "timestamp": { "seconds": 1588168529, "microseconds": 201316 } }
1459 { 'event': 'MEMORY_DEVICE_SIZE_CHANGE',
1460   'data': { '*id': 'str', 'size': 'size' } }
1464 # @MEM_UNPLUG_ERROR:
1466 # Emitted when memory hot unplug error occurs.
1468 # @device: device name
1470 # @msg: Informative message
1472 # Since: 2.4
1474 # Example:
1476 # <- { "event": "MEM_UNPLUG_ERROR"
1477 #      "data": { "device": "dimm1",
1478 #                "msg": "acpi: device unplug for unsupported device"
1479 #      },
1480 #      "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
1483 { 'event': 'MEM_UNPLUG_ERROR',
1484   'data': { 'device': 'str', 'msg': 'str' } }
1487 # @ACPISlotType:
1489 # @DIMM: memory slot
1490 # @CPU: logical CPU slot (since 2.7)
1492 { 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
1495 # @ACPIOSTInfo:
1497 # OSPM Status Indication for a device
1498 # For description of possible values of @source and @status fields
1499 # see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
1501 # @device: device ID associated with slot
1503 # @slot: slot ID, unique per slot of a given @slot-type
1505 # @slot-type: type of the slot
1507 # @source: an integer containing the source event
1509 # @status: an integer containing the status code
1511 # Since: 2.1
1513 { 'struct': 'ACPIOSTInfo',
1514   'data'  : { '*device': 'str',
1515               'slot': 'str',
1516               'slot-type': 'ACPISlotType',
1517               'source': 'int',
1518               'status': 'int' } }
1521 # @query-acpi-ospm-status:
1523 # Return a list of ACPIOSTInfo for devices that support status
1524 # reporting via ACPI _OST method.
1526 # Since: 2.1
1528 # Example:
1530 # -> { "execute": "query-acpi-ospm-status" }
1531 # <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
1532 #                  { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
1533 #                  { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
1534 #                  { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
1535 #    ]}
1538 { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
1541 # @ACPI_DEVICE_OST:
1543 # Emitted when guest executes ACPI _OST method.
1545 # @info: OSPM Status Indication
1547 # Since: 2.1
1549 # Example:
1551 # <- { "event": "ACPI_DEVICE_OST",
1552 #      "data": { "device": "d1", "slot": "0",
1553 #                "slot-type": "DIMM", "source": 1, "status": 0 } }
1556 { 'event': 'ACPI_DEVICE_OST',
1557      'data': { 'info': 'ACPIOSTInfo' } }
1560 # @ReplayMode:
1562 # Mode of the replay subsystem.
1564 # @none: normal execution mode. Replay or record are not enabled.
1566 # @record: record mode. All non-deterministic data is written into the
1567 #          replay log.
1569 # @play: replay mode. Non-deterministic data required for system execution
1570 #        is read from the log.
1572 # Since: 2.5
1574 { 'enum': 'ReplayMode',
1575   'data': [ 'none', 'record', 'play' ] }
1578 # @xen-load-devices-state:
1580 # Load the state of all devices from file. The RAM and the block devices
1581 # of the VM are not loaded by this command.
1583 # @filename: the file to load the state of the devices from as binary
1584 #            data. See xen-save-devices-state.txt for a description of the binary
1585 #            format.
1587 # Since: 2.7
1589 # Example:
1591 # -> { "execute": "xen-load-devices-state",
1592 #      "arguments": { "filename": "/tmp/resume" } }
1593 # <- { "return": {} }
1596 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
1599 # @GuidInfo:
1601 # GUID information.
1603 # @guid: the globally unique identifier
1605 # Since: 2.9
1607 { 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
1610 # @query-vm-generation-id:
1612 # Show Virtual Machine Generation ID
1614 # Since: 2.9
1616 { 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }