-# "CPU":0,
-# "current":true,
-# "halted":false,
-# "qom_path":"/machine/unattached/device[0]",
-# "arch":"x86",
-# "pc":3227107138,
-# "thread_id":3134
-# },
-# {
-# "CPU":1,
-# "current":false,
-# "halted":true,
-# "qom_path":"/machine/unattached/device[2]",
-# "arch":"x86",
-# "pc":7108165,
-# "thread_id":3135
-# }
-# ]
-# }
-#
-##
-{ 'command': 'query-cpus', 'returns': ['CpuInfo'] }
-
-##
-# @IOThreadInfo:
-#
-# Information about an iothread
-#
-# @id: the identifier of the iothread
-#
-# @thread-id: ID of the underlying host thread
-#
-# @poll-max-ns: maximum polling time in ns, 0 means polling is disabled
-# (since 2.9)
-#
-# @poll-grow: how many ns will be added to polling time, 0 means that it's not
-# configured (since 2.9)
-#
-# @poll-shrink: how many ns will be removed from polling time, 0 means that
-# it's not configured (since 2.9)
-#
-# Since: 2.0
-##
-{ 'struct': 'IOThreadInfo',
- 'data': {'id': 'str',
- 'thread-id': 'int',
- 'poll-max-ns': 'int',
- 'poll-grow': 'int',
- 'poll-shrink': 'int' } }
-
-##
-# @query-iothreads:
-#
-# Returns a list of information about each iothread.
-#
-# Note: this list excludes the QEMU main loop thread, which is not declared
-# using the -object iothread command-line option. It is always the main thread
-# of the process.
-#
-# Returns: a list of @IOThreadInfo for each iothread
-#
-# Since: 2.0
-#
-# Example:
-#
-# -> { "execute": "query-iothreads" }
-# <- { "return": [
-# {
-# "id":"iothread0",
-# "thread-id":3134
-# },
-# {
-# "id":"iothread1",
-# "thread-id":3135
-# }
-# ]
-# }
-#
-##
-{ 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
-
-##
-# @NetworkAddressFamily:
-#
-# The network address family
-#
-# @ipv4: IPV4 family
-#
-# @ipv6: IPV6 family
-#
-# @unix: unix socket
-#
-# @vsock: vsock family (since 2.8)
-#
-# @unknown: otherwise
-#
-# Since: 2.1
-##
-{ 'enum': 'NetworkAddressFamily',
- 'data': [ 'ipv4', 'ipv6', 'unix', 'vsock', 'unknown' ] }
-
-##
-# @VncBasicInfo:
-#
-# The basic information for vnc network connection
-#
-# @host: IP address
-#
-# @service: The service name of the vnc port. This may depend on the host
-# system's service database so symbolic names should not be relied
-# on.
-#
-# @family: address family
-#
-# @websocket: true in case the socket is a websocket (since 2.3).
-#
-# Since: 2.1
-##
-{ 'struct': 'VncBasicInfo',
- 'data': { 'host': 'str',
- 'service': 'str',
- 'family': 'NetworkAddressFamily',
- 'websocket': 'bool' } }
-
-##
-# @VncServerInfo:
-#
-# The network connection information for server
-#
-# @auth: authentication method used for
-# the plain (non-websocket) VNC server
-#
-# Since: 2.1
-##
-{ 'struct': 'VncServerInfo',
- 'base': 'VncBasicInfo',
- 'data': { '*auth': 'str' } }
-
-##
-# @VncClientInfo:
-#
-# Information about a connected VNC client.
-#
-# @x509_dname: If x509 authentication is in use, the Distinguished
-# Name of the client.
-#
-# @sasl_username: If SASL authentication is in use, the SASL username
-# used for authentication.
-#
-# Since: 0.14.0
-##
-{ 'struct': 'VncClientInfo',
- 'base': 'VncBasicInfo',
- 'data': { '*x509_dname': 'str', '*sasl_username': 'str' } }
-
-##
-# @VncInfo:
-#
-# Information about the VNC session.
-#
-# @enabled: true if the VNC server is enabled, false otherwise
-#
-# @host: The hostname the VNC server is bound to. This depends on
-# the name resolution on the host and may be an IP address.
-#
-# @family: 'ipv6' if the host is listening for IPv6 connections
-# 'ipv4' if the host is listening for IPv4 connections
-# 'unix' if the host is listening on a unix domain socket
-# 'unknown' otherwise
-#
-# @service: The service name of the server's port. This may depends
-# on the host system's service database so symbolic names should not
-# be relied on.
-#
-# @auth: the current authentication type used by the server
-# 'none' if no authentication is being used
-# 'vnc' if VNC authentication is being used
-# 'vencrypt+plain' if VEncrypt is used with plain text authentication
-# 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
-# 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
-# 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
-# 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
-# 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
-# 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
-# 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
-# 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
-#
-# @clients: a list of @VncClientInfo of all currently connected clients
-#
-# Since: 0.14.0
-##
-{ 'struct': 'VncInfo',
- 'data': {'enabled': 'bool', '*host': 'str',
- '*family': 'NetworkAddressFamily',
- '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
-
-##
-# @VncPrimaryAuth:
-#
-# vnc primary authentication method.
-#
-# Since: 2.3
-##
-{ 'enum': 'VncPrimaryAuth',
- 'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
- 'tls', 'vencrypt', 'sasl' ] }
-
-##
-# @VncVencryptSubAuth:
-#
-# vnc sub authentication method with vencrypt.
-#
-# Since: 2.3
-##
-{ 'enum': 'VncVencryptSubAuth',
- 'data': [ 'plain',
- 'tls-none', 'x509-none',
- 'tls-vnc', 'x509-vnc',
- 'tls-plain', 'x509-plain',
- 'tls-sasl', 'x509-sasl' ] }
-
-
-##
-# @VncServerInfo2:
-#
-# The network connection information for server
-#
-# @auth: The current authentication type used by the servers
-#
-# @vencrypt: The vencrypt sub authentication type used by the
-# servers, only specified in case auth == vencrypt.
-#
-# Since: 2.9
-##
-{ 'struct': 'VncServerInfo2',
- 'base': 'VncBasicInfo',
- 'data': { 'auth' : 'VncPrimaryAuth',
- '*vencrypt' : 'VncVencryptSubAuth' } }
-
-
-##
-# @VncInfo2:
-#
-# Information about a vnc server
-#
-# @id: vnc server name.
-#
-# @server: A list of @VncBasincInfo describing all listening sockets.
-# The list can be empty (in case the vnc server is disabled).
-# It also may have multiple entries: normal + websocket,
-# possibly also ipv4 + ipv6 in the future.
-#
-# @clients: A list of @VncClientInfo of all currently connected clients.
-# The list can be empty, for obvious reasons.
-#
-# @auth: The current authentication type used by the non-websockets servers
-#
-# @vencrypt: The vencrypt authentication type used by the servers,
-# only specified in case auth == vencrypt.
-#
-# @display: The display device the vnc server is linked to.
-#
-# Since: 2.3
-##
-{ 'struct': 'VncInfo2',
- 'data': { 'id' : 'str',
- 'server' : ['VncServerInfo2'],
- 'clients' : ['VncClientInfo'],
- 'auth' : 'VncPrimaryAuth',
- '*vencrypt' : 'VncVencryptSubAuth',
- '*display' : 'str' } }
-
-##
-# @query-vnc:
-#
-# Returns information about the current VNC server
-#
-# Returns: @VncInfo
-#
-# Since: 0.14.0
-#
-# Example:
-#
-# -> { "execute": "query-vnc" }
-# <- { "return": {
-# "enabled":true,
-# "host":"0.0.0.0",
-# "service":"50402",
-# "auth":"vnc",
-# "family":"ipv4",
-# "clients":[
-# {
-# "host":"127.0.0.1",
-# "service":"50401",
-# "family":"ipv4"
-# }
-# ]
-# }
-# }
-#
-##
-{ 'command': 'query-vnc', 'returns': 'VncInfo' }
-
-##
-# @query-vnc-servers:
-#
-# Returns a list of vnc servers. The list can be empty.
-#
-# Returns: a list of @VncInfo2
-#
-# Since: 2.3
-##
-{ 'command': 'query-vnc-servers', 'returns': ['VncInfo2'] }
-
-##
-# @SpiceBasicInfo:
-#
-# The basic information for SPICE network connection
-#
-# @host: IP address
-#
-# @port: port number
-#
-# @family: address family
-#
-# Since: 2.1
-##
-{ 'struct': 'SpiceBasicInfo',
- 'data': { 'host': 'str',
- 'port': 'str',
- 'family': 'NetworkAddressFamily' } }
-
-##
-# @SpiceServerInfo:
-#
-# Information about a SPICE server
-#
-# @auth: authentication method
-#
-# Since: 2.1
-##
-{ 'struct': 'SpiceServerInfo',
- 'base': 'SpiceBasicInfo',
- 'data': { '*auth': 'str' } }
-
-##
-# @SpiceChannel:
-#
-# Information about a SPICE client channel.
-#
-# @connection-id: SPICE connection id number. All channels with the same id
-# belong to the same SPICE session.
-#
-# @channel-type: SPICE channel type number. "1" is the main control
-# channel, filter for this one if you want to track spice
-# sessions only
-#
-# @channel-id: SPICE channel ID number. Usually "0", might be different when
-# multiple channels of the same type exist, such as multiple
-# display channels in a multihead setup
-#
-# @tls: true if the channel is encrypted, false otherwise.
-#
-# Since: 0.14.0
-##
-{ 'struct': 'SpiceChannel',
- 'base': 'SpiceBasicInfo',
- 'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
- 'tls': 'bool'} }
-
-##
-# @SpiceQueryMouseMode:
-#
-# An enumeration of Spice mouse states.
-#
-# @client: Mouse cursor position is determined by the client.
-#
-# @server: Mouse cursor position is determined by the server.
-#
-# @unknown: No information is available about mouse mode used by
-# the spice server.
-#
-# Note: spice/enums.h has a SpiceMouseMode already, hence the name.
-#
-# Since: 1.1
-##
-{ 'enum': 'SpiceQueryMouseMode',
- 'data': [ 'client', 'server', 'unknown' ] }
-
-##
-# @SpiceInfo:
-#
-# Information about the SPICE session.
-#
-# @enabled: true if the SPICE server is enabled, false otherwise
-#
-# @migrated: true if the last guest migration completed and spice
-# migration had completed as well. false otherwise. (since 1.4)
-#
-# @host: The hostname the SPICE server is bound to. This depends on
-# the name resolution on the host and may be an IP address.
-#
-# @port: The SPICE server's port number.
-#
-# @compiled-version: SPICE server version.
-#
-# @tls-port: The SPICE server's TLS port number.
-#
-# @auth: the current authentication type used by the server
-# 'none' if no authentication is being used
-# 'spice' uses SASL or direct TLS authentication, depending on command
-# line options
-#
-# @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
-# be determined by the client or the server, or unknown if spice
-# server doesn't provide this information. (since: 1.1)
-#
-# @channels: a list of @SpiceChannel for each active spice channel
-#
-# Since: 0.14.0
-##
-{ 'struct': 'SpiceInfo',
- 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
- '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
- 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
-
-##
-# @query-spice:
-#
-# Returns information about the current SPICE server
-#
-# Returns: @SpiceInfo
-#
-# Since: 0.14.0
-#
-# Example:
-#
-# -> { "execute": "query-spice" }
-# <- { "return": {
-# "enabled": true,
-# "auth": "spice",
-# "port": 5920,
-# "tls-port": 5921,
-# "host": "0.0.0.0",
-# "channels": [
-# {
-# "port": "54924",
-# "family": "ipv4",
-# "channel-type": 1,
-# "connection-id": 1804289383,
-# "host": "127.0.0.1",
-# "channel-id": 0,
-# "tls": true
-# },
-# {
-# "port": "36710",
-# "family": "ipv4",
-# "channel-type": 4,
-# "connection-id": 1804289383,
-# "host": "127.0.0.1",
-# "channel-id": 0,
-# "tls": false
-# },
-# [ ... more channels follow ... ]
-# ]
-# }
-# }
-#
-##
-{ 'command': 'query-spice', 'returns': 'SpiceInfo' }
-
-##
-# @BalloonInfo:
-#
-# Information about the guest balloon device.
-#
-# @actual: the number of bytes the balloon currently contains
-#
-# Since: 0.14.0
-#
-##
-{ 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
-
-##
-# @query-balloon:
-#
-# Return information about the balloon device.
-#
-# Returns: @BalloonInfo on success
-#
-# If the balloon driver is enabled but not functional because the KVM
-# kernel module cannot support it, KvmMissingCap
-#
-# If no balloon device is present, DeviceNotActive
-#
-# Since: 0.14.0
-#
-# Example:
-#
-# -> { "execute": "query-balloon" }
-# <- { "return": {
-# "actual": 1073741824,
-# }
-# }
-#
-##
-{ 'command': 'query-balloon', 'returns': 'BalloonInfo' }
-
-##
-# @PciMemoryRange:
-#
-# A PCI device memory region
-#
-# @base: the starting address (guest physical)
-#
-# @limit: the ending address (guest physical)
-#
-# Since: 0.14.0
-##
-{ 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
-
-##
-# @PciMemoryRegion:
-#
-# Information about a PCI device I/O region.
-#
-# @bar: the index of the Base Address Register for this region
-#
-# @type: 'io' if the region is a PIO region
-# 'memory' if the region is a MMIO region
-#
-# @size: memory size
-#
-# @prefetch: if @type is 'memory', true if the memory is prefetchable
-#
-# @mem_type_64: if @type is 'memory', true if the BAR is 64-bit
-#
-# Since: 0.14.0
-##
-{ 'struct': 'PciMemoryRegion',
- 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
- '*prefetch': 'bool', '*mem_type_64': 'bool' } }
-
-##
-# @PciBusInfo:
-#
-# Information about a bus of a PCI Bridge device
-#
-# @number: primary bus interface number. This should be the number of the
-# bus the device resides on.
-#
-# @secondary: secondary bus interface number. This is the number of the
-# main bus for the bridge
-#
-# @subordinate: This is the highest number bus that resides below the
-# bridge.
-#
-# @io_range: The PIO range for all devices on this bridge
-#
-# @memory_range: The MMIO range for all devices on this bridge
-#
-# @prefetchable_range: The range of prefetchable MMIO for all devices on
-# this bridge
-#
-# Since: 2.4
-##
-{ 'struct': 'PciBusInfo',
- 'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
- 'io_range': 'PciMemoryRange',
- 'memory_range': 'PciMemoryRange',
- 'prefetchable_range': 'PciMemoryRange' } }
-
-##
-# @PciBridgeInfo:
-#
-# Information about a PCI Bridge device
-#
-# @bus: information about the bus the device resides on
-#
-# @devices: a list of @PciDeviceInfo for each device on this bridge
-#
-# Since: 0.14.0
-##
-{ 'struct': 'PciBridgeInfo',
- 'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
-
-##
-# @PciDeviceClass:
-#
-# Information about the Class of a PCI device
-#
-# @desc: a string description of the device's class
-#
-# @class: the class code of the device
-#
-# Since: 2.4
-##
-{ 'struct': 'PciDeviceClass',
- 'data': {'*desc': 'str', 'class': 'int'} }
-
-##
-# @PciDeviceId:
-#
-# Information about the Id of a PCI device
-#
-# @device: the PCI device id
-#
-# @vendor: the PCI vendor id
-#
-# Since: 2.4
-##
-{ 'struct': 'PciDeviceId',
- 'data': {'device': 'int', 'vendor': 'int'} }
-
-##
-# @PciDeviceInfo:
-#
-# Information about a PCI device
-#
-# @bus: the bus number of the device
-#
-# @slot: the slot the device is located in
-#
-# @function: the function of the slot used by the device
-#
-# @class_info: the class of the device
-#
-# @id: the PCI device id
-#
-# @irq: if an IRQ is assigned to the device, the IRQ number
-#
-# @qdev_id: the device name of the PCI device
-#
-# @pci_bridge: if the device is a PCI bridge, the bridge information
-#
-# @regions: a list of the PCI I/O regions associated with the device
-#
-# Notes: the contents of @class_info.desc are not stable and should only be
-# treated as informational.
-#
-# Since: 0.14.0
-##
-{ 'struct': 'PciDeviceInfo',
- 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
- 'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
- '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
- 'regions': ['PciMemoryRegion']} }
-
-##
-# @PciInfo:
-#
-# Information about a PCI bus
-#
-# @bus: the bus index
-#
-# @devices: a list of devices on this bus
-#
-# Since: 0.14.0
-##
-{ 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
-
-##
-# @query-pci:
-#
-# Return information about the PCI bus topology of the guest.
-#
-# Returns: a list of @PciInfo for each PCI bus. Each bus is
-# represented by a json-object, which has a key with a json-array of
-# all PCI devices attached to it. Each device is represented by a
-# json-object.
-#
-# Since: 0.14.0
-#
-# Example:
-#
-# -> { "execute": "query-pci" }
-# <- { "return": [
-# {
-# "bus": 0,
-# "devices": [
-# {
-# "bus": 0,
-# "qdev_id": "",
-# "slot": 0,
-# "class_info": {
-# "class": 1536,
-# "desc": "Host bridge"
-# },
-# "id": {
-# "device": 32902,
-# "vendor": 4663
-# },
-# "function": 0,
-# "regions": [
-# ]
-# },
-# {
-# "bus": 0,
-# "qdev_id": "",
-# "slot": 1,
-# "class_info": {
-# "class": 1537,
-# "desc": "ISA bridge"
-# },
-# "id": {
-# "device": 32902,
-# "vendor": 28672
-# },
-# "function": 0,
-# "regions": [
-# ]
-# },
-# {
-# "bus": 0,
-# "qdev_id": "",
-# "slot": 1,
-# "class_info": {
-# "class": 257,
-# "desc": "IDE controller"
-# },
-# "id": {
-# "device": 32902,
-# "vendor": 28688
-# },
-# "function": 1,
-# "regions": [
-# {
-# "bar": 4,
-# "size": 16,
-# "address": 49152,
-# "type": "io"
-# }
-# ]
-# },
-# {
-# "bus": 0,
-# "qdev_id": "",
-# "slot": 2,
-# "class_info": {
-# "class": 768,
-# "desc": "VGA controller"
-# },
-# "id": {
-# "device": 4115,
-# "vendor": 184
-# },
-# "function": 0,
-# "regions": [
-# {
-# "prefetch": true,
-# "mem_type_64": false,
-# "bar": 0,
-# "size": 33554432,
-# "address": 4026531840,
-# "type": "memory"
-# },
-# {
-# "prefetch": false,
-# "mem_type_64": false,
-# "bar": 1,
-# "size": 4096,
-# "address": 4060086272,
-# "type": "memory"
-# },
-# {
-# "prefetch": false,
-# "mem_type_64": false,
-# "bar": 6,
-# "size": 65536,
-# "address": -1,
-# "type": "memory"
-# }
-# ]
-# },
-# {
-# "bus": 0,
-# "qdev_id": "",
-# "irq": 11,
-# "slot": 4,
-# "class_info": {
-# "class": 1280,
-# "desc": "RAM controller"
-# },
-# "id": {
-# "device": 6900,
-# "vendor": 4098
-# },
-# "function": 0,
-# "regions": [
-# {
-# "bar": 0,
-# "size": 32,
-# "address": 49280,
-# "type": "io"
-# }
-# ]
-# }
-# ]
-# }
-# ]
-# }
-#
-# Note: This example has been shortened as the real response is too long.
-#
-##
-{ 'command': 'query-pci', 'returns': ['PciInfo'] }
-
-##
-# @quit:
-#
-# This command will cause the QEMU process to exit gracefully. While every
-# attempt is made to send the QMP response before terminating, this is not
-# guaranteed. When using this interface, a premature EOF would not be
-# unexpected.
-#
-# Since: 0.14.0
-#
-# Example:
-#
-# -> { "execute": "quit" }
-# <- { "return": {} }
-##
-{ 'command': 'quit' }
-
-##
-# @stop:
-#
-# Stop all guest VCPU execution.
-#
-# Since: 0.14.0
-#
-# Notes: This function will succeed even if the guest is already in the stopped
-# state. In "inmigrate" state, it will ensure that the guest
-# remains paused once migration finishes, as if the -S option was
-# passed on the command line.
-#
-# Example:
-#
-# -> { "execute": "stop" }
-# <- { "return": {} }
-#
-##
-{ 'command': 'stop' }
-
-##
-# @system_reset:
-#
-# Performs a hard reset of a guest.
-#
-# Since: 0.14.0
-#
-# Example:
-#
-# -> { "execute": "system_reset" }
-# <- { "return": {} }
-#
-##
-{ 'command': 'system_reset' }
-
-##
-# @system_powerdown:
-#
-# Requests that a guest perform a powerdown operation.
-#
-# Since: 0.14.0
-#
-# Notes: A guest may or may not respond to this command. This command
-# returning does not indicate that a guest has accepted the request or
-# that it has shut down. Many guests will respond to this command by
-# prompting the user in some way.
-# Example:
-#
-# -> { "execute": "system_powerdown" }
-# <- { "return": {} }
-#
-##
-{ 'command': 'system_powerdown' }
-
-##
-# @cpu:
-#
-# This command is a nop that is only provided for the purposes of compatibility.
-#
-# Since: 0.14.0
-#
-# Notes: Do not use this command.
-##
-{ 'command': 'cpu', 'data': {'index': 'int'} }
-
-##
-# @cpu-add:
-#
-# Adds CPU with specified ID
-#
-# @id: ID of CPU to be created, valid values [0..max_cpus)
-#
-# Returns: Nothing on success
-#
-# Since: 1.5
-#
-# Example:
-#
-# -> { "execute": "cpu-add", "arguments": { "id": 2 } }
-# <- { "return": {} }
-#
-##
-{ 'command': 'cpu-add', 'data': {'id': 'int'} }
-
-##
-# @memsave:
-#
-# Save a portion of guest memory to a file.
-#
-# @val: the virtual address of the guest to start from
-#
-# @size: the size of memory region to save
-#
-# @filename: the file to save the memory to as binary data
-#
-# @cpu-index: the index of the virtual CPU to use for translating the
-# virtual address (defaults to CPU 0)
-#
-# Returns: Nothing on success
-#
-# Since: 0.14.0
-#
-# Notes: Errors were not reliably returned until 1.1
-#
-# Example:
-#
-# -> { "execute": "memsave",
-# "arguments": { "val": 10,
-# "size": 100,
-# "filename": "/tmp/virtual-mem-dump" } }
-# <- { "return": {} }
-#
-##
-{ 'command': 'memsave',
- 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
-
-##
-# @pmemsave:
-#
-# Save a portion of guest physical memory to a file.
-#
-# @val: the physical address of the guest to start from
-#
-# @size: the size of memory region to save
-#
-# @filename: the file to save the memory to as binary data
-#
-# Returns: Nothing on success
-#
-# Since: 0.14.0
-#
-# Notes: Errors were not reliably returned until 1.1
-#
-# Example:
-#
-# -> { "execute": "pmemsave",
-# "arguments": { "val": 10,
-# "size": 100,
-# "filename": "/tmp/physical-mem-dump" } }
-# <- { "return": {} }
-#
-##
-{ 'command': 'pmemsave',
- 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
-
-##
-# @cont:
-#
-# Resume guest VCPU execution.
-#
-# Since: 0.14.0
-#
-# Returns: If successful, nothing
-#
-# Notes: This command will succeed if the guest is currently running. It
-# will also succeed if the guest is in the "inmigrate" state; in
-# this case, the effect of the command is to make sure the guest
-# starts once migration finishes, removing the effect of the -S
-# command line option if it was passed.
-#
-# Example:
-#
-# -> { "execute": "cont" }
-# <- { "return": {} }
-#
-##
-{ 'command': 'cont' }
-
-##
-# @system_wakeup:
-#
-# Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
-#
-# Since: 1.1
-#
-# Returns: nothing.
-#
-# Example:
-#
-# -> { "execute": "system_wakeup" }
-# <- { "return": {} }
-#
-##
-{ 'command': 'system_wakeup' }
-
-##
-# @inject-nmi:
-#
-# Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
-# The command fails when the guest doesn't support injecting.
-#
-# Returns: If successful, nothing
-#
-# Since: 0.14.0
-#
-# Note: prior to 2.1, this command was only supported for x86 and s390 VMs
-#
-# Example:
-#
-# -> { "execute": "inject-nmi" }
-# <- { "return": {} }
-#
-##
-{ 'command': 'inject-nmi' }
-
-##
-# @set_link:
-#
-# Sets the link status of a virtual network adapter.
-#
-# @name: the device name of the virtual network adapter
-#
-# @up: true to set the link status to be up
-#
-# Returns: Nothing on success
-# If @name is not a valid network device, DeviceNotFound
-#
-# Since: 0.14.0
-#
-# Notes: Not all network adapters support setting link status. This command
-# will succeed even if the network adapter does not support link status
-# notification.
-#
-# Example:
-#
-# -> { "execute": "set_link",
-# "arguments": { "name": "e1000.0", "up": false } }
-# <- { "return": {} }
-#
-##
-{ 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
-
-##
-# @balloon:
-#
-# Request the balloon driver to change its balloon size.
-#
-# @value: the target size of the balloon in bytes
-#
-# Returns: Nothing on success
-# If the balloon driver is enabled but not functional because the KVM
-# kernel module cannot support it, KvmMissingCap
-# If no balloon device is present, DeviceNotActive
-#
-# Notes: This command just issues a request to the guest. When it returns,
-# the balloon size may not have changed. A guest can change the balloon
-# size independent of this command.
-#
-# Since: 0.14.0
-#
-# Example:
-#
-# -> { "execute": "balloon", "arguments": { "value": 536870912 } }
-# <- { "return": {} }
-#
-##
-{ 'command': 'balloon', 'data': {'value': 'int'} }
-
-##
-# @Abort:
-#
-# This action can be used to test transaction failure.
-#
-# Since: 1.6
-##
-{ 'struct': 'Abort',
- 'data': { } }
-
-##
-# @ActionCompletionMode:
-#
-# An enumeration of Transactional completion modes.
-#
-# @individual: Do not attempt to cancel any other Actions if any Actions fail
-# after the Transaction request succeeds. All Actions that
-# can complete successfully will do so without waiting on others.
-# This is the default.
-#
-# @grouped: If any Action fails after the Transaction succeeds, cancel all
-# Actions. Actions do not complete until all Actions are ready to
-# complete. May be rejected by Actions that do not support this
-# completion mode.
-#
-# Since: 2.5
-##
-{ 'enum': 'ActionCompletionMode',
- 'data': [ 'individual', 'grouped' ] }
-
-##
-# @TransactionAction:
-#
-# A discriminated record of operations that can be performed with
-# @transaction. Action @type can be:
-#
-# - @abort: since 1.6
-# - @block-dirty-bitmap-add: since 2.5
-# - @block-dirty-bitmap-clear: since 2.5
-# - @blockdev-backup: since 2.3
-# - @blockdev-snapshot: since 2.5
-# - @blockdev-snapshot-internal-sync: since 1.7
-# - @blockdev-snapshot-sync: since 1.1
-# - @drive-backup: since 1.6
-#
-# Since: 1.1
-##
-{ 'union': 'TransactionAction',
- 'data': {
- 'abort': 'Abort',
- 'block-dirty-bitmap-add': 'BlockDirtyBitmapAdd',
- 'block-dirty-bitmap-clear': 'BlockDirtyBitmap',
- 'blockdev-backup': 'BlockdevBackup',
- 'blockdev-snapshot': 'BlockdevSnapshot',
- 'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal',
- 'blockdev-snapshot-sync': 'BlockdevSnapshotSync',
- 'drive-backup': 'DriveBackup'
- } }
-
-##
-# @TransactionProperties:
-#
-# Optional arguments to modify the behavior of a Transaction.
-#
-# @completion-mode: Controls how jobs launched asynchronously by
-# Actions will complete or fail as a group.
-# See @ActionCompletionMode for details.
-#
-# Since: 2.5
-##
-{ 'struct': 'TransactionProperties',
- 'data': {
- '*completion-mode': 'ActionCompletionMode'
- }
-}
-
-##
-# @transaction:
-#
-# Executes a number of transactionable QMP commands atomically. If any
-# operation fails, then the entire set of actions will be abandoned and the
-# appropriate error returned.
-#
-# For external snapshots, the dictionary contains the device, the file to use for
-# the new snapshot, and the format. The default format, if not specified, is
-# qcow2.
-#
-# Each new snapshot defaults to being created by QEMU (wiping any
-# contents if the file already exists), but it is also possible to reuse
-# an externally-created file. In the latter case, you should ensure that
-# the new image file has the same contents as the current one; QEMU cannot
-# perform any meaningful check. Typically this is achieved by using the
-# current image file as the backing file for the new image.
-#
-# On failure, the original disks pre-snapshot attempt will be used.
-#
-# For internal snapshots, the dictionary contains the device and the snapshot's
-# name. If an internal snapshot matching name already exists, the request will
-# be rejected. Only some image formats support it, for example, qcow2, rbd,
-# and sheepdog.
-#
-# On failure, qemu will try delete the newly created internal snapshot in the
-# transaction. When an I/O error occurs during deletion, the user needs to fix
-# it later with qemu-img or other command.
-#
-# @actions: List of @TransactionAction;
-# information needed for the respective operations.
-#
-# @properties: structure of additional options to control the
-# execution of the transaction. See @TransactionProperties
-# for additional detail.
-#
-# Returns: nothing on success
-#
-# Errors depend on the operations of the transaction
-#
-# Note: The transaction aborts on the first failure. Therefore, there will be
-# information on only one failed operation returned in an error condition, and
-# subsequent actions will not have been attempted.
-#
-# Since: 1.1
-#
-# Example:
-#
-# -> { "execute": "transaction",
-# "arguments": { "actions": [
-# { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd0",
-# "snapshot-file": "/some/place/my-image",
-# "format": "qcow2" } },
-# { "type": "blockdev-snapshot-sync", "data" : { "node-name": "myfile",
-# "snapshot-file": "/some/place/my-image2",
-# "snapshot-node-name": "node3432",
-# "mode": "existing",
-# "format": "qcow2" } },
-# { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd1",
-# "snapshot-file": "/some/place/my-image2",
-# "mode": "existing",
-# "format": "qcow2" } },
-# { "type": "blockdev-snapshot-internal-sync", "data" : {
-# "device": "ide-hd2",
-# "name": "snapshot0" } } ] } }
-# <- { "return": {} }
-#
-##
-{ 'command': 'transaction',
- 'data': { 'actions': [ 'TransactionAction' ],
- '*properties': 'TransactionProperties'
- }
-}
-
-##
-# @human-monitor-command:
-#
-# Execute a command on the human monitor and return the output.
-#
-# @command-line: the command to execute in the human monitor
-#
-# @cpu-index: The CPU to use for commands that require an implicit CPU
-#
-# Returns: the output of the command as a string
-#
-# Since: 0.14.0
-#
-# Notes: This command only exists as a stop-gap. Its use is highly
-# discouraged. The semantics of this command are not
-# guaranteed: this means that command names, arguments and
-# responses can change or be removed at ANY time. Applications
-# that rely on long term stability guarantees should NOT
-# use this command.
-#
-# Known limitations:
-#
-# * This command is stateless, this means that commands that depend
-# on state information (such as getfd) might not work
-#
-# * Commands that prompt the user for data don't currently work
-#
-# Example:
-#
-# -> { "execute": "human-monitor-command",
-# "arguments": { "command-line": "info kvm" } }
-# <- { "return": "kvm support: enabled\r\n" }
-#
-##
-{ 'command': 'human-monitor-command',
- 'data': {'command-line': 'str', '*cpu-index': 'int'},
- 'returns': 'str' }
-
-##
-# @migrate_cancel:
-#
-# Cancel the current executing migration process.
-#
-# Returns: nothing on success
-#
-# Notes: This command succeeds even if there is no migration process running.
-#
-# Since: 0.14.0
-#
-# Example:
-#
-# -> { "execute": "migrate_cancel" }
-# <- { "return": {} }
-#
-##
-{ 'command': 'migrate_cancel' }
-
-##
-# @migrate_set_downtime:
-#
-# Set maximum tolerated downtime for migration.
-#
-# @value: maximum downtime in seconds
-#
-# Returns: nothing on success
-#
-# Notes: This command is deprecated in favor of 'migrate-set-parameters'
-#
-# Since: 0.14.0
-#
-# Example:
-#
-# -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
-# <- { "return": {} }
-#
-##
-{ 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
-
-##
-# @migrate_set_speed:
-#
-# Set maximum speed for migration.
-#
-# @value: maximum speed in bytes per second.
-#
-# Returns: nothing on success
-#
-# Notes: This command is deprecated in favor of 'migrate-set-parameters'
-#
-# Since: 0.14.0
-#
-# Example:
-#
-# -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
-# <- { "return": {} }
-#
-##
-{ 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
-
-##
-# @migrate-set-cache-size:
-#
-# Set cache size to be used by XBZRLE migration
-#
-# @value: cache size in bytes
-#
-# The size will be rounded down to the nearest power of 2.
-# The cache size can be modified before and during ongoing migration
-#
-# Returns: nothing on success
-#
-# Since: 1.2
-#
-# Example:
-#
-# -> { "execute": "migrate-set-cache-size",
-# "arguments": { "value": 536870912 } }
-# <- { "return": {} }
-#
-##
-{ 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
-
-##
-# @query-migrate-cache-size:
-#
-# Query migration XBZRLE cache size
-#
-# Returns: XBZRLE cache size in bytes
-#
-# Since: 1.2
-#
-# Example:
-#
-# -> { "execute": "query-migrate-cache-size" }
-# <- { "return": 67108864 }
-#
-##
-{ 'command': 'query-migrate-cache-size', 'returns': 'int' }
-
-##
-# @ObjectPropertyInfo:
-#
-# @name: the name of the property
-#
-# @type: the type of the property. This will typically come in one of four
-# forms:
-#
-# 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
-# These types are mapped to the appropriate JSON type.
-#
-# 2) A child type in the form 'child<subtype>' where subtype is a qdev
-# device type name. Child properties create the composition tree.
-#
-# 3) A link type in the form 'link<subtype>' where subtype is a qdev
-# device type name. Link properties form the device model graph.
-#
-# Since: 1.2
-##
-{ 'struct': 'ObjectPropertyInfo',
- 'data': { 'name': 'str', 'type': 'str' } }
-
-##
-# @qom-list:
-#
-# This command will list any properties of a object given a path in the object
-# model.
-#
-# @path: the path within the object model. See @qom-get for a description of
-# this parameter.
-#
-# Returns: a list of @ObjectPropertyInfo that describe the properties of the
-# object.
-#
-# Since: 1.2
-##
-{ 'command': 'qom-list',
- 'data': { 'path': 'str' },
- 'returns': [ 'ObjectPropertyInfo' ] }
-
-##
-# @qom-get:
-#
-# This command will get a property from a object model path and return the
-# value.
-#
-# @path: The path within the object model. There are two forms of supported
-# paths--absolute and partial paths.
-#
-# Absolute paths are derived from the root object and can follow child<>
-# or link<> properties. Since they can follow link<> properties, they
-# can be arbitrarily long. Absolute paths look like absolute filenames
-# and are prefixed with a leading slash.
-#
-# Partial paths look like relative filenames. They do not begin
-# with a prefix. The matching rules for partial paths are subtle but
-# designed to make specifying objects easy. At each level of the
-# composition tree, the partial path is matched as an absolute path.
-# The first match is not returned. At least two matches are searched
-# for. A successful result is only returned if only one match is
-# found. If more than one match is found, a flag is return to
-# indicate that the match was ambiguous.
-#
-# @property: The property name to read
-#
-# Returns: The property value. The type depends on the property
-# type. child<> and link<> properties are returned as #str
-# pathnames. All integer property types (u8, u16, etc) are
-# returned as #int.
-#
-# Since: 1.2
-##
-{ 'command': 'qom-get',
- 'data': { 'path': 'str', 'property': 'str' },
- 'returns': 'any' }
-
-##
-# @qom-set:
-#
-# This command will set a property from a object model path.
-#
-# @path: see @qom-get for a description of this parameter
-#
-# @property: the property name to set
-#
-# @value: a value who's type is appropriate for the property type. See @qom-get
-# for a description of type mapping.
-#
-# Since: 1.2
-##
-{ 'command': 'qom-set',
- 'data': { 'path': 'str', 'property': 'str', 'value': 'any' } }
-
-##
-# @set_password:
-#
-# Sets the password of a remote display session.
-#
-# @protocol: `vnc' to modify the VNC server password
-# `spice' to modify the Spice server password
-#
-# @password: the new password
-#
-# @connected: how to handle existing clients when changing the
-# password. If nothing is specified, defaults to `keep'
-# `fail' to fail the command if clients are connected
-# `disconnect' to disconnect existing clients
-# `keep' to maintain existing clients
-#
-# Returns: Nothing on success
-# If Spice is not enabled, DeviceNotFound
-#
-# Since: 0.14.0
-#
-# Example:
-#
-# -> { "execute": "set_password", "arguments": { "protocol": "vnc",
-# "password": "secret" } }
-# <- { "return": {} }
-#
-##
-{ 'command': 'set_password',
- 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
-
-##
-# @expire_password:
-#
-# Expire the password of a remote display server.
-#
-# @protocol: the name of the remote display protocol `vnc' or `spice'
-#
-# @time: when to expire the password.
-# `now' to expire the password immediately
-# `never' to cancel password expiration
-# `+INT' where INT is the number of seconds from now (integer)
-# `INT' where INT is the absolute time in seconds
-#
-# Returns: Nothing on success
-# If @protocol is `spice' and Spice is not active, DeviceNotFound
-#
-# Since: 0.14.0
-#
-# Notes: Time is relative to the server and currently there is no way to
-# coordinate server time with client time. It is not recommended to
-# use the absolute time version of the @time parameter unless you're
-# sure you are on the same machine as the QEMU instance.
-#
-# Example:
-#
-# -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
-# "time": "+60" } }
-# <- { "return": {} }
-#
-##
-{ 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
-
-##
-# @change-vnc-password:
-#
-# Change the VNC server password.
-#
-# @password: the new password to use with VNC authentication
-#
-# Since: 1.1
-#
-# Notes: An empty password in this command will set the password to the empty
-# string. Existing clients are unaffected by executing this command.
-##
-{ 'command': 'change-vnc-password', 'data': {'password': 'str'} }
-
-##
-# @change:
-#
-# This command is multiple commands multiplexed together.
-#
-# @device: This is normally the name of a block device but it may also be 'vnc'.
-# when it's 'vnc', then sub command depends on @target
-#
-# @target: If @device is a block device, then this is the new filename.
-# If @device is 'vnc', then if the value 'password' selects the vnc
-# change password command. Otherwise, this specifies a new server URI
-# address to listen to for VNC connections.
-#
-# @arg: If @device is a block device, then this is an optional format to open
-# the device with.
-# If @device is 'vnc' and @target is 'password', this is the new VNC
-# password to set. See change-vnc-password for additional notes.
-#
-# Returns: Nothing on success.
-# If @device is not a valid block device, DeviceNotFound
-#
-# Notes: This interface is deprecated, and it is strongly recommended that you
-# avoid using it. For changing block devices, use
-# blockdev-change-medium; for changing VNC parameters, use
-# change-vnc-password.
-#
-# Since: 0.14.0
-#
-# Example:
-#
-# 1. Change a removable medium
-#
-# -> { "execute": "change",
-# "arguments": { "device": "ide1-cd0",
-# "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } }
-# <- { "return": {} }
-#
-# 2. Change VNC password
-#
-# -> { "execute": "change",
-# "arguments": { "device": "vnc", "target": "password",
-# "arg": "foobar1" } }
-# <- { "return": {} }
-#
-##
-{ 'command': 'change',
- 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
-
-##
-# @ObjectTypeInfo:
-#
-# This structure describes a search result from @qom-list-types
-#
-# @name: the type name found in the search
-#
-# @abstract: the type is abstract and can't be directly instantiated.
-# Omitted if false. (since 2.10)
-#
-# @parent: Name of parent type, if any (since 2.10)
-#
-# Since: 1.1
-##
-{ 'struct': 'ObjectTypeInfo',
- 'data': { 'name': 'str', '*abstract': 'bool', '*parent': 'str' } }
-
-##
-# @qom-list-types:
-#
-# This command will return a list of types given search parameters
-#
-# @implements: if specified, only return types that implement this type name
-#
-# @abstract: if true, include abstract types in the results
-#
-# Returns: a list of @ObjectTypeInfo or an empty list if no results are found
-#
-# Since: 1.1
-##
-{ 'command': 'qom-list-types',
- 'data': { '*implements': 'str', '*abstract': 'bool' },
- 'returns': [ 'ObjectTypeInfo' ] }
-
-##
-# @DevicePropertyInfo:
-#
-# Information about device properties.
-#
-# @name: the name of the property
-# @type: the typename of the property
-# @description: if specified, the description of the property.
-# (since 2.2)
-#
-# Since: 1.2
-##
-{ 'struct': 'DevicePropertyInfo',
- 'data': { 'name': 'str', 'type': 'str', '*description': 'str' } }
-
-##
-# @device-list-properties:
-#
-# List properties associated with a device.
-#
-# @typename: the type name of a device
-#
-# Returns: a list of DevicePropertyInfo describing a devices properties
-#
-# Since: 1.2
-##
-{ 'command': 'device-list-properties',
- 'data': { 'typename': 'str'},
- 'returns': [ 'DevicePropertyInfo' ] }
-
-##
-# @migrate:
-#
-# Migrates the current running guest to another Virtual Machine.
-#
-# @uri: the Uniform Resource Identifier of the destination VM
-#
-# @blk: do block migration (full disk copy)
-#
-# @inc: incremental disk copy migration
-#
-# @detach: this argument exists only for compatibility reasons and
-# is ignored by QEMU
-#
-# Returns: nothing on success
-#
-# Since: 0.14.0
-#
-# Notes:
-#
-# 1. The 'query-migrate' command should be used to check migration's progress
-# and final result (this information is provided by the 'status' member)
-#
-# 2. All boolean arguments default to false
-#
-# 3. The user Monitor's "detach" argument is invalid in QMP and should not
-# be used
-#
-# Example:
-#
-# -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
-# <- { "return": {} }
-#
-##
-{ 'command': 'migrate',
- 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
-
-##
-# @migrate-incoming:
-#
-# Start an incoming migration, the qemu must have been started
-# with -incoming defer
-#
-# @uri: The Uniform Resource Identifier identifying the source or
-# address to listen on
-#
-# Returns: nothing on success
-#
-# Since: 2.3
-#
-# Notes:
-#
-# 1. It's a bad idea to use a string for the uri, but it needs to stay
-# compatible with -incoming and the format of the uri is already exposed
-# above libvirt.
-#
-# 2. QEMU must be started with -incoming defer to allow migrate-incoming to
-# be used.
-#
-# 3. The uri format is the same as for -incoming
-#
-# Example:
-#
-# -> { "execute": "migrate-incoming",
-# "arguments": { "uri": "tcp::4446" } }
-# <- { "return": {} }
-#
-##
-{ 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
-
-##
-# @xen-save-devices-state:
-#
-# Save the state of all devices to file. The RAM and the block devices
-# of the VM are not saved by this command.
-#
-# @filename: the file to save the state of the devices to as binary
-# data. See xen-save-devices-state.txt for a description of the binary
-# format.
-#
-# Returns: Nothing on success
-#
-# Since: 1.1
-#
-# Example:
-#
-# -> { "execute": "xen-save-devices-state",
-# "arguments": { "filename": "/tmp/save" } }
-# <- { "return": {} }
-#
-##
-{ 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
-
-##
-# @xen-set-global-dirty-log:
-#
-# Enable or disable the global dirty log mode.
-#
-# @enable: true to enable, false to disable.
-#
-# Returns: nothing
-#
-# Since: 1.3
-#
-# Example:
-#
-# -> { "execute": "xen-set-global-dirty-log",
-# "arguments": { "enable": true } }
-# <- { "return": {} }
-#
-##
-{ 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
-
-##
-# @device_add:
-#
-# @driver: the name of the new device's driver
-#
-# @bus: the device's parent bus (device tree path)
-#
-# @id: the device's ID, must be unique
-#
-# Additional arguments depend on the type.
-#
-# Add a device.
-#
-# Notes:
-# 1. For detailed information about this command, please refer to the
-# 'docs/qdev-device-use.txt' file.
-#
-# 2. It's possible to list device properties by running QEMU with the
-# "-device DEVICE,help" command-line argument, where DEVICE is the
-# device's name
-#
-# Example:
-#
-# -> { "execute": "device_add",
-# "arguments": { "driver": "e1000", "id": "net1",
-# "bus": "pci.0",
-# "mac": "52:54:00:12:34:56" } }
-# <- { "return": {} }