9 { 'include': 'common.json' }
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.
40 { 'enum': 'LostTickPolicy',
41 'data': ['discard', 'delay', 'slew' ] }
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"
60 # Returns: nothing on success.
66 # -> { "execute": "add_client", "arguments": { "protocol": "vnc",
67 # "fdname": "myclient" } }
71 { 'command': 'add_client',
72 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
78 # Guest name information.
80 # @name: The name of the guest
84 { 'struct': 'NameInfo', 'data': {'*name': 'str'} }
89 # Return the name information of a guest.
91 # Returns: @NameInfo of the guest
97 # -> { "execute": "query-name" }
98 # <- { "return": { "name": "qemu-name" } }
101 { 'command': 'query-name', 'returns': 'NameInfo', 'allow-preconfig': true }
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
114 { 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
119 # Returns information about KVM acceleration
127 # -> { "execute": "query-kvm" }
128 # <- { "return": { "enabled": true, "present": true } }
131 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
136 # Guest UUID information (Universally Unique Identifier).
138 # @UUID: the UUID of the guest
142 # Notes: If no UUID was specified for the guest, a null UUID is returned.
144 { 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
149 # Query the guest UUID information.
151 # Returns: The @UuidInfo for the guest
157 # -> { "execute": "query-uuid" }
158 # <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
161 { 'command': 'query-uuid', 'returns': 'UuidInfo', 'allow-preconfig': true }
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
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)
183 { 'struct': 'IOThreadInfo',
184 'data': {'id': 'str',
186 'poll-max-ns': 'int',
188 'poll-shrink': 'int' } }
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
199 # Returns: a list of @IOThreadInfo for each iothread
205 # -> { "execute": "query-iothreads" }
219 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'],
220 'allow-preconfig': true }
225 # Information about the guest balloon device.
227 # @actual: the number of bytes the balloon currently contains
232 { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
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
248 # -> { "execute": "query-balloon" }
250 # "actual": 1073741824,
255 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
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.
271 # <- { "event": "BALLOON_CHANGE",
272 # "data": { "actual": 944766976 },
273 # "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
276 { 'event': 'BALLOON_CHANGE',
277 'data': { 'actual': 'int' } }
282 # A PCI device memory region
284 # @base: the starting address (guest physical)
286 # @limit: the ending address (guest physical)
290 { 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
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
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
310 { 'struct': 'PciMemoryRegion',
311 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
312 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
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
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
337 { 'struct': 'PciBusInfo',
338 'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
339 'io_range': 'PciMemoryRange',
340 'memory_range': 'PciMemoryRange',
341 'prefetchable_range': 'PciMemoryRange' } }
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
354 { 'struct': 'PciBridgeInfo',
355 'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
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
368 { 'struct': 'PciDeviceClass',
369 'data': {'*desc': 'str', 'class': 'int'} }
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)
386 { 'struct': 'PciDeviceId',
387 'data': {'device': 'int', 'vendor': 'int', '*subsystem': 'int',
388 '*subsystem-vendor': 'int'} }
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.
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'] }}
429 # Information about a PCI bus
431 # @bus: the bus index
433 # @devices: a list of devices on this bus
437 { 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
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
453 # -> { "execute": "query-pci" }
464 # "desc": "Host bridge"
480 # "desc": "ISA bridge"
496 # "desc": "IDE controller"
518 # "desc": "VGA controller"
528 # "mem_type_64": false,
531 # "address": 4026531840,
536 # "mem_type_64": false,
539 # "address": 4060086272,
544 # "mem_type_64": false,
559 # "desc": "RAM controller"
580 # Note: This example has been shortened as the real response is too long.
583 { 'command': 'query-pci', 'returns': ['PciInfo'] }
588 # Stop all guest VCPU execution.
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.
599 # -> { "execute": "stop" }
600 # <- { "return": {} }
603 { 'command': 'stop' }
608 # Performs a hard reset of a guest.
614 # -> { "execute": "system_reset" }
615 # <- { "return": {} }
618 { 'command': 'system_reset' }
623 # Requests that a guest perform a powerdown operation.
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.
633 # -> { "execute": "system_powerdown" }
634 # <- { "return": {} }
637 { 'command': 'system_powerdown' }
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
657 # Notes: Errors were not reliably returned until 1.1
661 # -> { "execute": "memsave",
662 # "arguments": { "val": 10,
664 # "filename": "/tmp/virtual-mem-dump" } }
665 # <- { "return": {} }
668 { 'command': 'memsave',
669 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
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
686 # Notes: Errors were not reliably returned until 1.1
690 # -> { "execute": "pmemsave",
691 # "arguments": { "val": 10,
693 # "filename": "/tmp/physical-mem-dump" } }
694 # <- { "return": {} }
697 { 'command': 'pmemsave',
698 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
703 # Resume guest VCPU execution.
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.
717 # -> { "execute": "cont" }
718 # <- { "return": {} }
721 { 'command': 'cont' }
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).
740 # -> { "execute": "x-exit-preconfig" }
741 # <- { "return": {} }
744 { 'command': 'x-exit-preconfig', 'allow-preconfig': true }
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.
758 # Note: prior to 4.0, this command does nothing in case the guest
763 # -> { "execute": "system_wakeup" }
764 # <- { "return": {} }
767 { 'command': 'system_wakeup' }
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
779 # Note: prior to 2.1, this command was only supported for x86 and s390 VMs
783 # -> { "execute": "inject-nmi" }
784 # <- { "return": {} }
787 { 'command': 'inject-nmi' }
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.
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
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
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
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
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'},
858 'features': [ 'savevm-monitor-nodes' ] }
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
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.
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
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.
922 # -> { "execute": "xen-set-global-dirty-log",
923 # "arguments": { "enable": true } }
924 # <- { "return": {} }
927 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
932 # Receive a file descriptor via SCM rights and assign it a name
934 # @fdname: file descriptor name
936 # Returns: Nothing on success
940 # Notes: If @fdname already exists, the file descriptor assigned to
941 # it will be closed and replaced by the received file
944 # The 'closefd' command can be used to explicitly close the
945 # file descriptor when it is no longer needed.
949 # -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
950 # <- { "return": {} }
953 { 'command': 'getfd', 'data': {'fdname': 'str'} }
958 # Close a file descriptor previously passed via SCM rights
960 # @fdname: file descriptor name
962 # Returns: Nothing on success
968 # -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
969 # <- { "return": {} }
972 { 'command': 'closefd', 'data': {'fdname': 'str'} }
977 # Actual memory information in bytes.
979 # @base-memory: size of "base" memory specified with command line
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).
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.
999 # -> { "execute": "query-memory-size-summary" }
1000 # <- { "return": { "base-memory": 4294967296, "plugged-memory": 0 } }
1004 { 'command': 'query-memory-size-summary', 'returns': 'MemoryInfo' }
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.
1019 { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
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.
1042 # -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
1043 # <- { "return": { "fdset-id": 1, "fd": 3 } }
1046 { 'command': 'add-fd',
1047 'data': { '*fdset-id': 'int',
1049 'returns': 'AddfdInfo' }
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
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
1072 # -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
1073 # <- { "return": {} }
1076 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
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.
1089 { 'struct': 'FdsetFdInfo',
1090 'data': {'fd': 'int', '*opaque': 'str'} }
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.
1103 { 'struct': 'FdsetInfo',
1104 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
1109 # Return information describing all fd sets.
1111 # Returns: A list of @FdsetInfo
1115 # Note: The list of fd sets is shared by all monitor connections.
1119 # -> { "execute": "query-fdsets" }
1125 # "opaque": "rdonly:/path/to/file"
1129 # "opaque": "rdwr:/path/to/file"
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,
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
1182 # @asl_compiler_rev: revision number of the utility that created the
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
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
1197 { 'struct': 'AcpiTableOptions',
1202 '*oem_table_id': 'str',
1203 '*oem_rev': 'uint32',
1204 '*asl_compiler_id': 'str',
1205 '*asl_compiler_rev': 'uint32',
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
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)
1243 { 'struct': 'CommandLineParameterInfo',
1244 'data': { 'name': 'str',
1245 'type': 'CommandLineParameterType',
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
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.
1277 # -> { "execute": "query-command-line-options",
1278 # "arguments": { "option": "option-rom" } }
1283 # "name": "romfile",
1287 # "name": "bootindex",
1291 # "option": "option-rom"
1297 {'command': 'query-command-line-options',
1298 'data': { '*option': 'str' },
1299 'returns': ['CommandLineOptionInfo'],
1300 'allow-preconfig': true }
1303 # @PCDIMMDeviceInfo:
1305 # PCDIMMDevice state information
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
1325 { 'struct': 'PCDIMMDeviceInfo',
1326 'data': { '*id': 'str',
1332 'hotplugged': 'bool',
1333 'hotpluggable': 'bool'
1338 # @VirtioPMEMDeviceInfo:
1340 # VirtioPMEM state information
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
1352 { 'struct': 'VirtioPMEMDeviceInfo',
1353 'data': { '*id': 'str',
1361 # @VirtioMEMDeviceInfo:
1363 # VirtioMEMDevice state information
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
1383 { 'struct': 'VirtioMEMDeviceInfo',
1384 'data': { '*id': 'str',
1386 'requested-size': 'size',
1389 'block-size': 'size',
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.
1405 { 'union': 'MemoryDeviceInfo',
1406 'data': { 'dimm': 'PCDIMMDeviceInfo',
1407 'nvdimm': 'PCDIMMDeviceInfo',
1408 'virtio-pmem': 'VirtioPMEMDeviceInfo',
1409 'virtio-mem': 'VirtioMEMDeviceInfo'
1414 # @query-memory-devices:
1416 # Lists available memory devices and their state
1422 # -> { "execute": "query-memory-devices" }
1423 # <- { "return": [ { "data":
1424 # { "addr": 5368709120,
1425 # "hotpluggable": true,
1426 # "hotplugged": true,
1428 # "memdev": "/objects/memX",
1430 # "size": 1073741824,
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
1446 # @size: the new size of memory that the device provides
1448 # Note: this event is rate-limited.
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
1476 # <- { "event": "MEM_UNPLUG_ERROR"
1477 # "data": { "device": "dimm1",
1478 # "msg": "acpi: device unplug for unsupported device"
1480 # "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
1483 { 'event': 'MEM_UNPLUG_ERROR',
1484 'data': { 'device': 'str', 'msg': 'str' } }
1489 # @DIMM: memory slot
1490 # @CPU: logical CPU slot (since 2.7)
1492 { 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
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
1513 { 'struct': 'ACPIOSTInfo',
1514 'data' : { '*device': 'str',
1516 'slot-type': 'ACPISlotType',
1521 # @query-acpi-ospm-status:
1523 # Return a list of ACPIOSTInfo for devices that support status
1524 # reporting via ACPI _OST method.
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}
1538 { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
1543 # Emitted when guest executes ACPI _OST method.
1545 # @info: OSPM Status Indication
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' } }
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
1569 # @play: replay mode. Non-deterministic data required for system execution
1570 # is read from the log.
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
1591 # -> { "execute": "xen-load-devices-state",
1592 # "arguments": { "filename": "/tmp/resume" } }
1593 # <- { "return": {} }
1596 { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
1603 # @guid: the globally unique identifier
1607 { 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
1610 # @query-vm-generation-id:
1612 # Show Virtual Machine Generation ID
1616 { 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }