#
# QAPI Schema
-##
-# @ErrorClass
-#
-# QEMU error classes
-#
-# @GenericError: this is used for errors that don't require a specific error
-# class. This should be the default case for most errors
-#
-# @CommandNotFound: the requested command has not been found
-#
-# @DeviceEncrypted: the requested operation can't be fulfilled because the
-# selected device is encrypted
-#
-# @DeviceNotActive: a device has failed to be become active
-#
-# @DeviceNotFound: the requested device has not been found
-#
-# @KVMMissingCap: the requested operation can't be fulfilled because a
-# required KVM capability is missing
-#
-# Since: 1.2
-##
-{ 'enum': 'ErrorClass',
- 'data': [ 'GenericError', 'CommandNotFound', 'DeviceEncrypted',
- 'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] }
+# QAPI common definitions
+{ 'include': 'qapi/common.json' }
+
+# QAPI block definitions
+{ 'include': 'qapi/block.json' }
+# QAPI event definitions
+{ 'include': 'qapi/event.json' }
##
# LostTickPolicy:
{ 'enum': 'LostTickPolicy',
'data': ['discard', 'delay', 'merge', 'slew' ] }
-##
-# BiosAtaTranslation:
-#
-# Policy that BIOS should use to interpret cylinder/head/sector
-# addresses. Note that Bochs BIOS and SeaBIOS will not actually
-# translate logical CHS to physical; instead, they will use logical
-# block addressing.
-#
-# @auto: If cylinder/heads/sizes are passed, choose between none and LBA
-# depending on the size of the disk. If they are not passed,
-# choose none if QEMU can guess that the disk had 16 or fewer
-# heads, large if QEMU can guess that the disk had 131072 or
-# fewer tracks across all heads (i.e. cylinders*heads<131072),
-# otherwise LBA.
-#
-# @none: The physical disk geometry is equal to the logical geometry.
-#
-# @lba: Assume 63 sectors per track and one of 16, 32, 64, 128 or 255
-# heads (if fewer than 255 are enough to cover the whole disk
-# with 1024 cylinders/head). The number of cylinders/head is
-# then computed based on the number of sectors and heads.
-#
-# @large: The number of cylinders per head is scaled down to 1024
-# by correspondingly scaling up the number of heads.
-#
-# @rechs: Same as @large, but first convert a 16-head geometry to
-# 15-head, by proportionally scaling up the number of
-# cylinders/head.
-#
-# Since: 2.0
-##
-{ 'enum': 'BiosAtaTranslation',
- 'data': ['auto', 'none', 'lba', 'large', 'rechs']}
-
# @add_client
#
# Allow client connections for VNC, Spice and socket based
##
{ 'command': 'query-name', 'returns': 'NameInfo' }
-##
-# @VersionInfo:
-#
-# A description of QEMU's version.
-#
-# @qemu.major: The major version of QEMU
-#
-# @qemu.minor: The minor version of QEMU
-#
-# @qemu.micro: The micro version of QEMU. By current convention, a micro
-# version of 50 signifies a development branch. A micro version
-# greater than or equal to 90 signifies a release candidate for
-# the next minor version. A micro version of less than 50
-# signifies a stable release.
-#
-# @package: QEMU will always set this field to an empty string. Downstream
-# versions of QEMU should set this to a non-empty string. The
-# exact format depends on the downstream however it highly
-# recommended that a unique name is used.
-#
-# Since: 0.14.0
-##
-{ 'type': 'VersionInfo',
- 'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'},
- 'package': 'str'} }
-
-##
-# @query-version:
-#
-# Returns the current version of QEMU.
-#
-# Returns: A @VersionInfo object describing the current version of QEMU.
-#
-# Since: 0.14.0
-##
-{ 'command': 'query-version', 'returns': 'VersionInfo' }
-
##
# @KvmInfo:
#
'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
'guest-panicked' ] }
-##
-# @SnapshotInfo
-#
-# @id: unique snapshot id
-#
-# @name: user chosen name
-#
-# @vm-state-size: size of the VM state
-#
-# @date-sec: UTC date of the snapshot in seconds
-#
-# @date-nsec: fractional part in nano seconds to be used with date-sec
-#
-# @vm-clock-sec: VM clock relative to boot in seconds
-#
-# @vm-clock-nsec: fractional part in nano seconds to be used with vm-clock-sec
-#
-# Since: 1.3
-#
-##
-
-{ 'type': 'SnapshotInfo',
- 'data': { 'id': 'str', 'name': 'str', 'vm-state-size': 'int',
- 'date-sec': 'int', 'date-nsec': 'int',
- 'vm-clock-sec': 'int', 'vm-clock-nsec': 'int' } }
-
-##
-# @ImageInfoSpecificQCow2:
-#
-# @compat: compatibility level
-#
-# @lazy-refcounts: #optional on or off; only valid for compat >= 1.1
-#
-# Since: 1.7
-##
-{ 'type': 'ImageInfoSpecificQCow2',
- 'data': {
- 'compat': 'str',
- '*lazy-refcounts': 'bool'
- } }
-
-##
-# @ImageInfoSpecificVmdk:
-#
-# @create-type: The create type of VMDK image
-#
-# @cid: Content id of image
-#
-# @parent-cid: Parent VMDK image's cid
-#
-# @extents: List of extent files
-#
-# Since: 1.7
-##
-{ 'type': 'ImageInfoSpecificVmdk',
- 'data': {
- 'create-type': 'str',
- 'cid': 'int',
- 'parent-cid': 'int',
- 'extents': ['ImageInfo']
- } }
-
-##
-# @ImageInfoSpecific:
-#
-# A discriminated record of image format specific information structures.
-#
-# Since: 1.7
-##
-
-{ 'union': 'ImageInfoSpecific',
- 'data': {
- 'qcow2': 'ImageInfoSpecificQCow2',
- 'vmdk': 'ImageInfoSpecificVmdk'
- } }
-
-##
-# @ImageInfo:
-#
-# Information about a QEMU image file
-#
-# @filename: name of the image file
-#
-# @format: format of the image file
-#
-# @virtual-size: maximum capacity in bytes of the image
-#
-# @actual-size: #optional actual size on disk in bytes of the image
-#
-# @dirty-flag: #optional true if image is not cleanly closed
-#
-# @cluster-size: #optional size of a cluster in bytes
-#
-# @encrypted: #optional true if the image is encrypted
-#
-# @compressed: #optional true if the image is compressed (Since 1.7)
-#
-# @backing-filename: #optional name of the backing file
-#
-# @full-backing-filename: #optional full path of the backing file
-#
-# @backing-filename-format: #optional the format of the backing file
-#
-# @snapshots: #optional list of VM snapshots
-#
-# @backing-image: #optional info of the backing image (since 1.6)
-#
-# @format-specific: #optional structure supplying additional format-specific
-# information (since 1.7)
-#
-# Since: 1.3
-#
-##
-
-{ 'type': 'ImageInfo',
- 'data': {'filename': 'str', 'format': 'str', '*dirty-flag': 'bool',
- '*actual-size': 'int', 'virtual-size': 'int',
- '*cluster-size': 'int', '*encrypted': 'bool', '*compressed': 'bool',
- '*backing-filename': 'str', '*full-backing-filename': 'str',
- '*backing-filename-format': 'str', '*snapshots': ['SnapshotInfo'],
- '*backing-image': 'ImageInfo',
- '*format-specific': 'ImageInfoSpecific' } }
-
-##
-# @ImageCheck:
-#
-# Information about a QEMU image file check
-#
-# @filename: name of the image file checked
-#
-# @format: format of the image file checked
-#
-# @check-errors: number of unexpected errors occurred during check
-#
-# @image-end-offset: #optional offset (in bytes) where the image ends, this
-# field is present if the driver for the image format
-# supports it
-#
-# @corruptions: #optional number of corruptions found during the check if any
-#
-# @leaks: #optional number of leaks found during the check if any
-#
-# @corruptions-fixed: #optional number of corruptions fixed during the check
-# if any
-#
-# @leaks-fixed: #optional number of leaks fixed during the check if any
-#
-# @total-clusters: #optional total number of clusters, this field is present
-# if the driver for the image format supports it
-#
-# @allocated-clusters: #optional total number of allocated clusters, this
-# field is present if the driver for the image format
-# supports it
-#
-# @fragmented-clusters: #optional total number of fragmented clusters, this
-# field is present if the driver for the image format
-# supports it
-#
-# @compressed-clusters: #optional total number of compressed clusters, this
-# field is present if the driver for the image format
-# supports it
-#
-# Since: 1.4
-#
-##
-
-{ 'type': 'ImageCheck',
- 'data': {'filename': 'str', 'format': 'str', 'check-errors': 'int',
- '*image-end-offset': 'int', '*corruptions': 'int', '*leaks': 'int',
- '*corruptions-fixed': 'int', '*leaks-fixed': 'int',
- '*total-clusters': 'int', '*allocated-clusters': 'int',
- '*fragmented-clusters': 'int', '*compressed-clusters': 'int' } }
-
##
# @StatusInfo:
#
#
# @filename: the filename of the character device
#
+# @frontend-open: shows whether the frontend device attached to this backend
+# (eg. with the chardev=... option) is in open or closed state
+# (since 2.1)
+#
# Notes: @filename is encoded using the QEMU command line character device
# encoding. See the QEMU man page for details.
#
# Since: 0.14.0
##
-{ 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} }
+{ 'type': 'ChardevInfo', 'data': {'label': 'str',
+ 'filename': 'str',
+ 'frontend-open': 'bool'} }
##
# @query-chardev:
'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
'returns': 'str' }
-##
-# @CommandInfo:
-#
-# Information about a QMP command
-#
-# @name: The command name
-#
-# Since: 0.14.0
-##
-{ 'type': 'CommandInfo', 'data': {'name': 'str'} }
-
-##
-# @query-commands:
-#
-# Return a list of supported QMP commands by this server
-#
-# Returns: A list of @CommandInfo for all supported commands
-#
-# Since: 0.14.0
-##
-{ 'command': 'query-commands', 'returns': ['CommandInfo'] }
-
##
# @EventInfo:
#
#
# @mbps: throughput in megabits/sec. (since 1.6)
#
+# @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)
+#
# Since: 0.14.0
##
{ 'type': 'MigrationStats',
'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
- 'mbps' : 'number' } }
+ 'mbps' : 'number', 'dirty-sync-count' : 'int' } }
##
# @XBZRLECacheStats
#
# @cache-miss: number of cache miss
#
+# @cache-miss-rate: rate of cache miss (since 2.1)
+#
# @overflow: number of overflows
#
# Since: 1.2
##
{ 'type': 'XBZRLECacheStats',
'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
- 'cache-miss': 'int', 'overflow': 'int' } }
+ 'cache-miss': 'int', 'cache-miss-rate': 'number',
+ 'overflow': 'int' } }
##
# @MigrationInfo
# Information about current migration process.
#
# @status: #optional string describing the current migration status.
-# As of 0.14.0 this can be 'active', 'completed', 'failed' or
+# As of 0.14.0 this can be 'setup', 'active', 'completed', 'failed' or
# 'cancelled'. If this field is not returned, no migration process
# has been initiated
#
{ 'command': 'query-cpus', 'returns': ['CpuInfo'] }
##
-# @BlockDeviceInfo:
-#
-# Information about the backing device for a block device.
-#
-# @file: the filename of the backing device
-#
-# @node-name: #optional the name of the block driver node (Since 2.0)
-#
-# @ro: true if the backing device was open read-only
-#
-# @drv: the name of the block format used to open the backing device. As of
-# 0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
-# 'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
-# 'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
-# 'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
-#
-# @backing_file: #optional the name of the backing file (for copy-on-write)
-#
-# @backing_file_depth: number of files in the backing file chain (since: 1.2)
-#
-# @encrypted: true if the backing device is encrypted
-#
-# @encryption_key_missing: true if the backing device is encrypted but an
-# valid encryption key is missing
-#
-# @bps: total throughput limit in bytes per second is specified
-#
-# @bps_rd: read throughput limit in bytes per second is specified
-#
-# @bps_wr: write throughput limit in bytes per second is specified
-#
-# @iops: total I/O operations per second is specified
-#
-# @iops_rd: read I/O operations per second is specified
-#
-# @iops_wr: write I/O operations per second is specified
-#
-# @image: the info of image used (since: 1.6)
-#
-# @bps_max: #optional total max in bytes (Since 1.7)
-#
-# @bps_rd_max: #optional read max in bytes (Since 1.7)
-#
-# @bps_wr_max: #optional write max in bytes (Since 1.7)
-#
-# @iops_max: #optional total I/O operations max (Since 1.7)
-#
-# @iops_rd_max: #optional read I/O operations max (Since 1.7)
-#
-# @iops_wr_max: #optional write I/O operations max (Since 1.7)
-#
-# @iops_size: #optional an I/O size in bytes (Since 1.7)
-#
-# Since: 0.14.0
-#
-##
-{ 'type': 'BlockDeviceInfo',
- 'data': { 'file': 'str', '*node-name': 'str', 'ro': 'bool', 'drv': 'str',
- '*backing_file': 'str', 'backing_file_depth': 'int',
- 'encrypted': 'bool', 'encryption_key_missing': 'bool',
- 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
- 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int',
- 'image': 'ImageInfo',
- '*bps_max': 'int', '*bps_rd_max': 'int',
- '*bps_wr_max': 'int', '*iops_max': 'int',
- '*iops_rd_max': 'int', '*iops_wr_max': 'int',
- '*iops_size': 'int' } }
-
-##
-# @BlockDeviceIoStatus:
-#
-# An enumeration of block device I/O status.
-#
-# @ok: The last I/O operation has succeeded
-#
-# @failed: The last I/O operation has failed
-#
-# @nospace: The last I/O operation has failed due to a no-space condition
-#
-# Since: 1.0
-##
-{ 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
-
-##
-# @BlockDeviceMapEntry:
-#
-# Entry in the metadata map of the device (returned by "qemu-img map")
-#
-# @start: Offset in the image of the first byte described by this entry
-# (in bytes)
-#
-# @length: Length of the range described by this entry (in bytes)
-#
-# @depth: Number of layers (0 = top image, 1 = top image's backing file, etc.)
-# before reaching one for which the range is allocated. The value is
-# in the range 0 to the depth of the image chain - 1.
-#
-# @zero: the sectors in this range read as zeros
-#
-# @data: reading the image will actually read data from a file (in particular,
-# if @offset is present this means that the sectors are not simply
-# preallocated, but contain actual data in raw format)
-#
-# @offset: if present, the image file stores the data for this range in
-# raw format at the given offset.
-#
-# Since 1.7
-##
-{ 'type': 'BlockDeviceMapEntry',
- 'data': { 'start': 'int', 'length': 'int', 'depth': 'int', 'zero': 'bool',
- 'data': 'bool', '*offset': 'int' } }
-
-##
-# @BlockDirtyInfo:
+# @IOThreadInfo:
#
-# Block dirty bitmap information.
+# Information about an iothread
#
-# @count: number of dirty bytes according to the dirty bitmap
+# @id: the identifier of the iothread
#
-# @granularity: granularity of the dirty bitmap in bytes (since 1.4)
+# @thread-id: ID of the underlying host thread
#
-# Since: 1.3
+# Since: 2.0
##
-{ 'type': 'BlockDirtyInfo',
- 'data': {'count': 'int', 'granularity': 'int'} }
+{ 'type': 'IOThreadInfo',
+ 'data': {'id': 'str', 'thread-id': 'int'} }
##
-# @BlockInfo:
-#
-# Block device information. This structure describes a virtual device and
-# the backing device associated with it.
-#
-# @device: The device name associated with the virtual device.
-#
-# @type: This field is returned only for compatibility reasons, it should
-# not be used (always returns 'unknown')
-#
-# @removable: True if the device supports removable media.
-#
-# @locked: True if the guest has locked this device from having its media
-# removed
-#
-# @tray_open: #optional True if the device has a tray and it is open
-# (only present if removable is true)
+# @query-iothreads:
#
-# @dirty-bitmaps: #optional dirty bitmaps information (only present if the
-# driver has one or more dirty bitmaps) (Since 2.0)
+# Returns a list of information about each iothread.
#
-# @io-status: #optional @BlockDeviceIoStatus. Only present if the device
-# supports it and the VM is configured to stop on errors
+# 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.
#
-# @inserted: #optional @BlockDeviceInfo describing the device if media is
-# present
+# Returns: a list of @IOThreadInfo for each iothread
#
-# Since: 0.14.0
-##
-{ 'type': 'BlockInfo',
- 'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
- 'locked': 'bool', '*inserted': 'BlockDeviceInfo',
- '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus',
- '*dirty-bitmaps': ['BlockDirtyInfo'] } }
-
-##
-# @query-block:
-#
-# Get a list of BlockInfo for all virtual block devices.
-#
-# Returns: a list of @BlockInfo describing each virtual block device
-#
-# Since: 0.14.0
+# Since: 2.0
##
-{ 'command': 'query-block', 'returns': ['BlockInfo'] }
+{ 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
##
-# @BlockDeviceStats:
-#
-# Statistics of a virtual block device or a block backing device.
-#
-# @rd_bytes: The number of bytes read by the device.
-#
-# @wr_bytes: The number of bytes written by the device.
+# @NetworkAddressFamily
#
-# @rd_operations: The number of read operations performed by the device.
+# The network address family
#
-# @wr_operations: The number of write operations performed by the device.
+# @ipv4: IPV4 family
#
-# @flush_operations: The number of cache flush operations performed by the
-# device (since 0.15.0)
+# @ipv6: IPV6 family
#
-# @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
-# (since 0.15.0).
+# @unix: unix socket
#
-# @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
+# @unknown: otherwise
#
-# @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
-#
-# @wr_highest_offset: The offset after the greatest byte written to the
-# device. The intended use of this information is for
-# growable sparse files (like qcow2) that are used on top
-# of a physical device.
-#
-# Since: 0.14.0
+# Since: 2.1
##
-{ 'type': 'BlockDeviceStats',
- 'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
- 'wr_operations': 'int', 'flush_operations': 'int',
- 'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
- 'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
+{ 'enum': 'NetworkAddressFamily',
+ 'data': [ 'ipv4', 'ipv6', 'unix', 'unknown' ] }
##
-# @BlockStats:
-#
-# Statistics of a virtual block device or a block backing device.
+# @VncBasicInfo
#
-# @device: #optional If the stats are for a virtual block device, the name
-# corresponding to the virtual block device.
+# The basic information for vnc network connection
#
-# @stats: A @BlockDeviceStats for the device.
+# @host: IP address
#
-# @parent: #optional This describes the file block device if it has one.
+# @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.
#
-# @backing: #optional This describes the backing block device if it has one.
-# (Since 2.0)
+# @family: address family
#
-# Since: 0.14.0
+# Since: 2.1
##
-{ 'type': 'BlockStats',
- 'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
- '*parent': 'BlockStats',
- '*backing': 'BlockStats'} }
+{ 'type': 'VncBasicInfo',
+ 'data': { 'host': 'str',
+ 'service': 'str',
+ 'family': 'NetworkAddressFamily' } }
##
-# @query-blockstats:
+# @VncServerInfo
#
-# Query the @BlockStats for all virtual block devices.
+# The network connection information for server
#
-# Returns: A list of @BlockStats for each virtual block devices.
+# @auth: #optional, authentication method
#
-# Since: 0.14.0
+# Since: 2.1
##
-{ 'command': 'query-blockstats', 'returns': ['BlockStats'] }
+{ 'type': 'VncServerInfo',
+ 'base': 'VncBasicInfo',
+ 'data': { '*auth': 'str' } }
##
# @VncClientInfo:
#
# Information about a connected VNC client.
#
-# @host: The host name of the client. QEMU tries to resolve this to a DNS name
-# when possible.
-#
-# @family: 'ipv6' if the client is connected via IPv6 and TCP
-# 'ipv4' if the client is connected via IPv4 and TCP
-# 'unix' if the client is connected via a unix domain socket
-# 'unknown' otherwise
-#
-# @service: The service name of the client's port. This may depends on the
-# host system's service database so symbolic names should not be
-# relied on.
-#
# @x509_dname: #optional If x509 authentication is in use, the Distinguished
# Name of the client.
#
# Since: 0.14.0
##
{ 'type': 'VncClientInfo',
- 'data': {'host': 'str', 'family': 'str', 'service': 'str',
- '*x509_dname': 'str', '*sasl_username': 'str'} }
+ 'base': 'VncBasicInfo',
+ 'data': { '*x509_dname': 'str', '*sasl_username': 'str' } }
##
# @VncInfo:
# Since: 0.14.0
##
{ 'type': 'VncInfo',
- 'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
+ 'data': {'enabled': 'bool', '*host': 'str',
+ '*family': 'NetworkAddressFamily',
'*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
##
{ 'command': 'query-vnc', 'returns': 'VncInfo' }
##
-# @SpiceChannel
+# @SpiceBasicInfo
#
-# Information about a SPICE client channel.
+# The basic information for SPICE network connection
+#
+# @host: IP address
#
-# @host: The host name of the client. QEMU tries to resolve this to a DNS name
-# when possible.
+# @port: port number
#
-# @family: 'ipv6' if the client is connected via IPv6 and TCP
-# 'ipv4' if the client is connected via IPv4 and TCP
-# 'unix' if the client is connected via a unix domain socket
-# 'unknown' otherwise
+# @family: address family
+#
+# Since: 2.1
+##
+{ 'type': 'SpiceBasicInfo',
+ 'data': { 'host': 'str',
+ 'port': 'str',
+ 'family': 'NetworkAddressFamily' } }
+
+##
+# @SpiceServerInfo
+#
+# Information about a SPICE server
+#
+# @auth: #optional, authentication method
+#
+# Since: 2.1
+##
+{ 'type': 'SpiceServerInfo',
+ 'base': 'SpiceBasicInfo',
+ 'data': { '*auth': 'str' } }
+
+##
+# @SpiceChannel
#
-# @port: The client's port number.
+# Information about a SPICE client channel.
#
# @connection-id: SPICE connection id number. All channels with the same id
# belong to the same SPICE session.
# Since: 0.14.0
##
{ 'type': 'SpiceChannel',
- 'data': {'host': 'str', 'family': 'str', 'port': 'str',
- 'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
+ 'base': 'SpiceBasicInfo',
+ 'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
'tls': 'bool'} }
##
{ 'command': 'query-pci', 'returns': ['PciInfo'] }
##
-# @BlockdevOnError:
-#
-# An enumeration of possible behaviors for errors on I/O operations.
-# The exact meaning depends on whether the I/O was initiated by a guest
-# or by a block job
-#
-# @report: for guest operations, report the error to the guest;
-# for jobs, cancel the job
-#
-# @ignore: ignore the error, only report a QMP event (BLOCK_IO_ERROR
-# or BLOCK_JOB_ERROR)
-#
-# @enospc: same as @stop on ENOSPC, same as @report otherwise.
+# @quit:
#
-# @stop: for guest operations, stop the virtual machine;
-# for jobs, pause the job
+# 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: 1.3
+# Since: 0.14.0
##
-{ 'enum': 'BlockdevOnError',
- 'data': ['report', 'ignore', 'enospc', 'stop'] }
+{ 'command': 'quit' }
##
-# @MirrorSyncMode:
-#
-# An enumeration of possible behaviors for the initial synchronization
-# phase of storage mirroring.
-#
-# @top: copies data in the topmost image to the destination
+# @stop:
#
-# @full: copies data from all images to the destination
+# Stop all guest VCPU execution.
#
-# @none: only copy data written from now on
+# Since: 0.14.0
#
-# Since: 1.3
+# 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.
##
-{ 'enum': 'MirrorSyncMode',
- 'data': ['top', 'full', 'none'] }
+{ 'command': 'stop' }
##
-# @BlockJobType:
-#
-# Type of a block job.
-#
-# @commit: block commit job type, see "block-commit"
-#
-# @stream: block stream job type, see "block-stream"
+# @system_reset:
#
-# @mirror: drive mirror job type, see "drive-mirror"
-#
-# @backup: drive backup job type, see "drive-backup"
-#
-# Since: 1.7
-##
-{ 'enum': 'BlockJobType',
- 'data': ['commit', 'stream', 'mirror', 'backup'] }
-
-##
-# @BlockJobInfo:
-#
-# Information about a long-running block device operation.
-#
-# @type: the job type ('stream' for image streaming)
-#
-# @device: the block device name
-#
-# @len: the maximum progress value
-#
-# @busy: false if the job is known to be in a quiescent state, with
-# no pending I/O. Since 1.3.
-#
-# @paused: whether the job is paused or, if @busy is true, will
-# pause itself as soon as possible. Since 1.3.
-#
-# @offset: the current progress value
-#
-# @speed: the rate limit, bytes per second
-#
-# @io-status: the status of the job (since 1.3)
-#
-# Since: 1.1
-##
-{ 'type': 'BlockJobInfo',
- 'data': {'type': 'str', 'device': 'str', 'len': 'int',
- 'offset': 'int', 'busy': 'bool', 'paused': 'bool', 'speed': 'int',
- 'io-status': 'BlockDeviceIoStatus'} }
-
-##
-# @query-block-jobs:
-#
-# Return information about long-running block device operations.
-#
-# Returns: a list of @BlockJobInfo for each active block job
-#
-# Since: 1.1
-##
-{ 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
-
-##
-# @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
-##
-{ '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.
-##
-{ 'command': 'stop' }
-
-##
-# @system_reset:
-#
-# Performs a hard reset of a guest.
+# Performs a hard reset of a guest.
#
# Since: 0.14.0
##
##
{ 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
-##
-# @block_passwd:
-#
-# This command sets the password of a block device that has not been open
-# with a password and requires one.
-#
-# The two cases where this can happen are a block device is created through
-# QEMU's initial command line or a block device is changed through the legacy
-# @change interface.
-#
-# In the event that the block device is created through the initial command
-# line, the VM will start in the stopped state regardless of whether '-S' is
-# used. The intention is for a management tool to query the block devices to
-# determine which ones are encrypted, set the passwords with this command, and
-# then start the guest with the @cont command.
-#
-# Either @device or @node-name must be set but not both.
-#
-# @device: #optional the name of the block backend device to set the password on
-#
-# @node-name: #optional graph node name to set the password on (Since 2.0)
-#
-# @password: the password to use for the device
-#
-# Returns: nothing on success
-# If @device is not a valid block device, DeviceNotFound
-# If @device is not encrypted, DeviceNotEncrypted
-#
-# Notes: Not all block formats support encryption and some that do are not
-# able to validate that a password is correct. Disk corruption may
-# occur if an invalid password is specified.
-#
-# Since: 0.14.0
-##
-{ 'command': 'block_passwd', 'data': {'*device': 'str',
- '*node-name': 'str', 'password': 'str'} }
-
##
# @balloon:
#
##
{ 'command': 'balloon', 'data': {'value': 'int'} }
-##
-# @block_resize
-#
-# Resize a block image while a guest is running.
-#
-# Either @device or @node-name must be set but not both.
-#
-# @device: #optional the name of the device to get the image resized
-#
-# @node-name: #optional graph node name to get the image resized (Since 2.0)
-#
-# @size: new image size in bytes
-#
-# Returns: nothing on success
-# If @device is not a valid block device, DeviceNotFound
-#
-# Since: 0.14.0
-##
-{ 'command': 'block_resize', 'data': { '*device': 'str',
- '*node-name': 'str',
- 'size': 'int' }}
-
-##
-# @NewImageMode
-#
-# An enumeration that tells QEMU how to set the backing file path in
-# a new image file.
-#
-# @existing: QEMU should look for an existing image file.
-#
-# @absolute-paths: QEMU should create a new image with absolute paths
-# for the backing file. If there is no backing file available, the new
-# image will not be backed either.
-#
-# Since: 1.1
-##
-{ 'enum': 'NewImageMode',
- 'data': [ 'existing', 'absolute-paths' ] }
-
-##
-# @BlockdevSnapshot
-#
-# Either @device or @node-name must be set but not both.
-#
-# @device: #optional the name of the device to generate the snapshot from.
-#
-# @node-name: #optional graph node name to generate the snapshot from (Since 2.0)
-#
-# @snapshot-file: the target of the new image. A new file will be created.
-#
-# @snapshot-node-name: #optional the graph node name of the new image (Since 2.0)
-#
-# @format: #optional the format of the snapshot image, default is 'qcow2'.
-#
-# @mode: #optional whether and how QEMU should create a new image, default is
-# 'absolute-paths'.
-##
-{ 'type': 'BlockdevSnapshot',
- 'data': { '*device': 'str', '*node-name': 'str',
- 'snapshot-file': 'str', '*snapshot-node-name': 'str',
- '*format': 'str', '*mode': 'NewImageMode' } }
-
-##
-# @BlockdevSnapshotInternal
-#
-# @device: the name of the device to generate the snapshot from
-#
-# @name: the name of the internal snapshot to be created
-#
-# Notes: In transaction, if @name is empty, or any snapshot matching @name
-# exists, the operation will fail. Only some image formats support it,
-# for example, qcow2, rbd, and sheepdog.
-#
-# Since: 1.7
-##
-{ 'type': 'BlockdevSnapshotInternal',
- 'data': { 'device': 'str', 'name': 'str' } }
-
-##
-# @DriveBackup
-#
-# @device: the name of the device which should be copied.
-#
-# @target: the target of the new image. If the file exists, or if it
-# is a device, the existing file/device will be used as the new
-# destination. If it does not exist, a new file will be created.
-#
-# @format: #optional the format of the new destination, default is to
-# probe if @mode is 'existing', else the format of the source
-#
-# @sync: what parts of the disk image should be copied to the destination
-# (all the disk, only the sectors allocated in the topmost image, or
-# only new I/O).
-#
-# @mode: #optional whether and how QEMU should create a new image, default is
-# 'absolute-paths'.
-#
-# @speed: #optional the maximum speed, in bytes per second
-#
-# @on-source-error: #optional the action to take on an error on the source,
-# default 'report'. 'stop' and 'enospc' can only be used
-# if the block device supports io-status (see BlockInfo).
-#
-# @on-target-error: #optional the action to take on an error on the target,
-# default 'report' (no limitations, since this applies to
-# a different block device than @device).
-#
-# Note that @on-source-error and @on-target-error only affect background I/O.
-# If an error occurs during a guest write request, the device's rerror/werror
-# actions will be used.
-#
-# Since: 1.6
-##
-{ 'type': 'DriveBackup',
- 'data': { 'device': 'str', 'target': 'str', '*format': 'str',
- 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
- '*speed': 'int',
- '*on-source-error': 'BlockdevOnError',
- '*on-target-error': 'BlockdevOnError' } }
-
##
# @Abort
#
{ 'command': 'transaction',
'data': { 'actions': [ 'TransactionAction' ] } }
-##
-# @blockdev-snapshot-sync
-#
-# Generates a synchronous snapshot of a block device.
-#
-# For the arguments, see the documentation of BlockdevSnapshot.
-#
-# Returns: nothing on success
-# If @device is not a valid block device, DeviceNotFound
-#
-# Since 0.14.0
-##
-{ 'command': 'blockdev-snapshot-sync',
- 'data': 'BlockdevSnapshot' }
-
-##
-# @blockdev-snapshot-internal-sync
-#
-# Synchronously take an internal snapshot of a block device, when the format
-# of the image used supports it.
-#
-# For the arguments, see the documentation of BlockdevSnapshotInternal.
-#
-# Returns: nothing on success
-# If @device is not a valid block device, DeviceNotFound
-# If any snapshot matching @name exists, or @name is empty,
-# GenericError
-# If the format of the image used does not support it,
-# BlockFormatFeatureNotSupported
-#
-# Since 1.7
-##
-{ 'command': 'blockdev-snapshot-internal-sync',
- 'data': 'BlockdevSnapshotInternal' }
-
-##
-# @blockdev-snapshot-delete-internal-sync
-#
-# Synchronously delete an internal snapshot of a block device, when the format
-# of the image used support it. The snapshot is identified by name or id or
-# both. One of the name or id is required. Return SnapshotInfo for the
-# successfully deleted snapshot.
-#
-# @device: the name of the device to delete the snapshot from
-#
-# @id: optional the snapshot's ID to be deleted
-#
-# @name: optional the snapshot's name to be deleted
-#
-# Returns: SnapshotInfo on success
-# If @device is not a valid block device, DeviceNotFound
-# If snapshot not found, GenericError
-# If the format of the image used does not support it,
-# BlockFormatFeatureNotSupported
-# If @id and @name are both not specified, GenericError
-#
-# Since 1.7
-##
-{ 'command': 'blockdev-snapshot-delete-internal-sync',
- 'data': { 'device': 'str', '*id': 'str', '*name': 'str'},
- 'returns': 'SnapshotInfo' }
-
##
# @human-monitor-command:
#
'data': {'command-line': 'str', '*cpu-index': 'int'},
'returns': 'str' }
-##
-# @block-commit
-#
-# Live commit of data from overlay image nodes into backing nodes - i.e.,
-# writes data between 'top' and 'base' into 'base'.
-#
-# @device: the name of the device
-#
-# @base: #optional The file name of the backing image to write data into.
-# If not specified, this is the deepest backing image
-#
-# @top: The file name of the backing image within the image chain,
-# which contains the topmost data to be committed down.
-#
-# If top == base, that is an error.
-# If top == active, the job will not be completed by itself,
-# user needs to complete the job with the block-job-complete
-# command after getting the ready event. (Since 2.0)
-#
-# If the base image is smaller than top, then the base image
-# will be resized to be the same size as top. If top is
-# smaller than the base image, the base will not be
-# truncated. If you want the base image size to match the
-# size of the smaller top, you can safely truncate it
-# yourself once the commit operation successfully completes.
-#
-#
-# @speed: #optional the maximum speed, in bytes per second
-#
-# Returns: Nothing on success
-# If commit or stream is already active on this device, DeviceInUse
-# If @device does not exist, DeviceNotFound
-# If image commit is not supported by this device, NotSupported
-# If @base or @top is invalid, a generic error is returned
-# If @speed is invalid, InvalidParameter
-#
-# Since: 1.3
-#
-##
-{ 'command': 'block-commit',
- 'data': { 'device': 'str', '*base': 'str', 'top': 'str',
- '*speed': 'int' } }
-
-##
-# @drive-backup
-#
-# Start a point-in-time copy of a block device to a new destination. The
-# status of ongoing drive-backup operations can be checked with
-# query-block-jobs where the BlockJobInfo.type field has the value 'backup'.
-# The operation can be stopped before it has completed using the
-# block-job-cancel command.
-#
-# For the arguments, see the documentation of DriveBackup.
-#
-# Returns: nothing on success
-# If @device is not a valid block device, DeviceNotFound
-#
-# Since 1.6
-##
-{ 'command': 'drive-backup', 'data': 'DriveBackup' }
-
-##
-# @query-named-block-nodes
-#
-# Get the named block driver list
-#
-# Returns: the list of BlockDeviceInfo
-#
-# Since 2.0
-##
-{ 'command': 'query-named-block-nodes', 'returns': [ 'BlockDeviceInfo' ] }
-
-##
-# @drive-mirror
-#
-# Start mirroring a block device's writes to a new destination.
-#
-# @device: the name of the device whose writes should be mirrored.
-#
-# @target: the target of the new image. If the file exists, or if it
-# is a device, the existing file/device will be used as the new
-# destination. If it does not exist, a new file will be created.
-#
-# @format: #optional the format of the new destination, default is to
-# probe if @mode is 'existing', else the format of the source
-#
-# @mode: #optional whether and how QEMU should create a new image, default is
-# 'absolute-paths'.
-#
-# @speed: #optional the maximum speed, in bytes per second
-#
-# @sync: what parts of the disk image should be copied to the destination
-# (all the disk, only the sectors allocated in the topmost image, or
-# only new I/O).
-#
-# @granularity: #optional granularity of the dirty bitmap, default is 64K
-# if the image format doesn't have clusters, 4K if the clusters
-# are smaller than that, else the cluster size. Must be a
-# power of 2 between 512 and 64M (since 1.4).
-#
-# @buf-size: #optional maximum amount of data in flight from source to
-# target (since 1.4).
-#
-# @on-source-error: #optional the action to take on an error on the source,
-# default 'report'. 'stop' and 'enospc' can only be used
-# if the block device supports io-status (see BlockInfo).
-#
-# @on-target-error: #optional the action to take on an error on the target,
-# default 'report' (no limitations, since this applies to
-# a different block device than @device).
-#
-# Returns: nothing on success
-# If @device is not a valid block device, DeviceNotFound
-#
-# Since 1.3
-##
-{ 'command': 'drive-mirror',
- 'data': { 'device': 'str', 'target': 'str', '*format': 'str',
- 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
- '*speed': 'int', '*granularity': 'uint32',
- '*buf-size': 'int', '*on-source-error': 'BlockdevOnError',
- '*on-target-error': 'BlockdevOnError' } }
-
##
# @migrate_cancel
#
#
# 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: #optional 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
-##
-{ '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.
-##
-{ 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
-
-##
-# @eject:
-#
-# Ejects a device from a removable drive.
-#
-# @device: The name of the device
-#
-# @force: @optional If true, eject regardless of whether the drive is locked.
-# If not specified, the default value is false.
-#
-# Returns: Nothing on success
-# If @device is not a valid block device, DeviceNotFound
-#
-# Notes: Ejecting a device will no media results in success
-#
-# Since: 0.14.0
-##
-{ 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
-
-##
-# @change-vnc-password:
-#
-# Change the VNC server password.
-#
-# @target: 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. If this argument is an empty string, then no future
-# logins will be allowed.
-#
-# Returns: Nothing on success.
-# If @device is not a valid block device, DeviceNotFound
-# If the new block device is encrypted, DeviceEncrypted. Note that
-# if this error is returned, the device has been opened successfully
-# and an additional call to @block_passwd is required to set the
-# device's password. The behavior of reads and writes to the block
-# device between when these calls are executed is undefined.
-#
-# Notes: It is strongly recommended that this interface is not used especially
-# for changing block devices.
-#
-# Since: 0.14.0
-##
-{ 'command': 'change',
- 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
-
-##
-# @block_set_io_throttle:
-#
-# Change I/O throttle limits for a block drive.
-#
-# @device: The name of the device
-#
-# @bps: total throughput limit in bytes per second
-#
-# @bps_rd: read throughput limit in bytes per second
-#
-# @bps_wr: write throughput limit in bytes per second
-#
-# @iops: total I/O operations per second
-#
-# @ops_rd: read I/O operations per second
-#
-# @iops_wr: write I/O operations per second
-#
-# @bps_max: #optional total max in bytes (Since 1.7)
-#
-# @bps_rd_max: #optional read max in bytes (Since 1.7)
-#
-# @bps_wr_max: #optional write max in bytes (Since 1.7)
-#
-# @iops_max: #optional total I/O operations max (Since 1.7)
-#
-# @iops_rd_max: #optional read I/O operations max (Since 1.7)
-#
-# @iops_wr_max: #optional write I/O operations max (Since 1.7)
-#
-# @iops_size: #optional an I/O size in bytes (Since 1.7)
-#
-# Returns: Nothing on success
-# If @device is not a valid block device, DeviceNotFound
-#
-# Since: 1.1
-##
-{ 'command': 'block_set_io_throttle',
- 'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
- 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int',
- '*bps_max': 'int', '*bps_rd_max': 'int',
- '*bps_wr_max': 'int', '*iops_max': 'int',
- '*iops_rd_max': 'int', '*iops_wr_max': 'int',
- '*iops_size': 'int' } }
-
-##
-# @block-stream:
-#
-# Copy data from a backing file into a block device.
-#
-# The block streaming operation is performed in the background until the entire
-# backing file has been copied. This command returns immediately once streaming
-# has started. The status of ongoing block streaming operations can be checked
-# with query-block-jobs. The operation can be stopped before it has completed
-# using the block-job-cancel command.
-#
-# If a base file is specified then sectors are not copied from that base file and
-# its backing chain. When streaming completes the image file will have the base
-# file as its backing file. This can be used to stream a subset of the backing
-# file chain instead of flattening the entire image.
-#
-# On successful completion the image file is updated to drop the backing file
-# and the BLOCK_JOB_COMPLETED event is emitted.
-#
-# @device: the device name
-#
-# @base: #optional the common backing file name
-#
-# @speed: #optional the maximum speed, in bytes per second
-#
-# @on-error: #optional the action to take on an error (default report).
-# 'stop' and 'enospc' can only be used if the block device
-# supports io-status (see BlockInfo). Since 1.3.
-#
-# Returns: Nothing on success
-# If @device does not exist, DeviceNotFound
-#
-# Since: 1.1
-##
-{ 'command': 'block-stream',
- 'data': { 'device': 'str', '*base': 'str', '*speed': 'int',
- '*on-error': 'BlockdevOnError' } }
-
-##
-# @block-job-set-speed:
-#
-# Set maximum speed for a background block operation.
-#
-# This command can only be issued when there is an active block job.
-#
-# Throttling can be disabled by setting the speed to 0.
-#
-# @device: the device name
-#
-# @speed: the maximum speed, in bytes per second, or 0 for unlimited.
-# Defaults to 0.
-#
-# Returns: Nothing on success
-# If no background operation is active on this device, DeviceNotActive
-#
-# Since: 1.1
-##
-{ 'command': 'block-job-set-speed',
- 'data': { 'device': 'str', 'speed': 'int' } }
-
-##
-# @block-job-cancel:
-#
-# Stop an active background block operation.
-#
-# This command returns immediately after marking the active background block
-# operation for cancellation. It is an error to call this command if no
-# operation is in progress.
-#
-# The operation will cancel as soon as possible and then emit the
-# BLOCK_JOB_CANCELLED event. Before that happens the job is still visible when
-# enumerated using query-block-jobs.
-#
-# For streaming, the image file retains its backing file unless the streaming
-# operation happens to complete just as it is being cancelled. A new streaming
-# operation can be started at a later time to finish copying all data from the
-# backing file.
+# @protocol: `vnc' to modify the VNC server password
+# `spice' to modify the Spice server password
#
-# @device: the device name
+# @password: the new password
#
-# @force: #optional whether to allow cancellation of a paused job (default
-# false). Since 1.3.
+# @connected: #optional 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 no background operation is active on this device, DeviceNotActive
+# If Spice is not enabled, DeviceNotFound
#
-# Since: 1.1
+# Since: 0.14.0
##
-{ 'command': 'block-job-cancel', 'data': { 'device': 'str', '*force': 'bool' } }
+{ 'command': 'set_password',
+ 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
##
-# @block-job-pause:
-#
-# Pause an active background block operation.
+# @expire_password:
#
-# This command returns immediately after marking the active background block
-# operation for pausing. It is an error to call this command if no
-# operation is in progress. Pausing an already paused job has no cumulative
-# effect; a single block-job-resume command will resume the job.
+# Expire the password of a remote display server.
#
-# The operation will pause as soon as possible. No event is emitted when
-# the operation is actually paused. Cancelling a paused job automatically
-# resumes it.
+# @protocol: the name of the remote display protocol `vnc' or `spice'
#
-# @device: the device name
+# @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 no background operation is active on this device, DeviceNotActive
+# If @protocol is `spice' and Spice is not active, DeviceNotFound
#
-# Since: 1.3
+# 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.
##
-{ 'command': 'block-job-pause', 'data': { 'device': 'str' } }
+{ 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
##
-# @block-job-resume:
-#
-# Resume an active background block operation.
-#
-# This command returns immediately after resuming a paused background block
-# operation. It is an error to call this command if no operation is in
-# progress. Resuming an already running job is not an error.
+# @change-vnc-password:
#
-# This command also clears the error status of the job.
+# Change the VNC server password.
#
-# @device: the device name
+# @target: the new password to use with VNC authentication
#
-# Returns: Nothing on success
-# If no background operation is active on this device, DeviceNotActive
+# Since: 1.1
#
-# Since: 1.3
+# Notes: An empty password in this command will set the password to the empty
+# string. Existing clients are unaffected by executing this command.
##
-{ 'command': 'block-job-resume', 'data': { 'device': 'str' } }
+{ 'command': 'change-vnc-password', 'data': {'password': 'str'} }
##
-# @block-job-complete:
+# @change:
#
-# Manually trigger completion of an active background block operation. This
-# is supported for drive mirroring, where it also switches the device to
-# write to the target path only. The ability to complete is signaled with
-# a BLOCK_JOB_READY event.
+# This command is multiple commands multiplexed together.
#
-# This command completes an active background block operation synchronously.
-# The ordering of this command's return with the BLOCK_JOB_COMPLETED event
-# is not defined. Note that if an I/O error occurs during the processing of
-# this command: 1) the command itself will fail; 2) the error will be processed
-# according to the rerror/werror arguments that were specified when starting
-# the operation.
+# @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
#
-# A cancelled or paused job cannot be completed.
+# @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.
#
-# @device: the device name
+# @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. If this argument is an empty string, then no future
+# logins will be allowed.
#
-# Returns: Nothing on success
-# If no background operation is active on this device, DeviceNotActive
+# Returns: Nothing on success.
+# If @device is not a valid block device, DeviceNotFound
+# If the new block device is encrypted, DeviceEncrypted. Note that
+# if this error is returned, the device has been opened successfully
+# and an additional call to @block_passwd is required to set the
+# device's password. The behavior of reads and writes to the block
+# device between when these calls are executed is undefined.
#
-# Since: 1.3
+# Notes: It is strongly recommended that this interface is not used especially
+# for changing block devices.
+#
+# Since: 0.14.0
##
-{ 'command': 'block-job-complete', 'data': { 'device': 'str' } }
+{ 'command': 'change',
+ 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
##
# @ObjectTypeInfo:
'*localaddr': 'str',
'*udp': 'str' } }
+##
+# @NetdevL2TPv3Options
+#
+# Connect the VLAN to Ethernet over L2TPv3 Static tunnel
+#
+# @src: source address
+#
+# @dst: destination address
+#
+# @srcport: #optional source port - mandatory for udp, optional for ip
+#
+# @dstport: #optional destination port - mandatory for udp, optional for ip
+#
+# @ipv6: #optional - force the use of ipv6
+#
+# @udp: #optional - use the udp version of l2tpv3 encapsulation
+#
+# @cookie64: #optional - use 64 bit coookies
+#
+# @counter: #optional have sequence counter
+#
+# @pincounter: #optional pin sequence counter to zero -
+# workaround for buggy implementations or
+# networks with packet reorder
+#
+# @txcookie: #optional 32 or 64 bit transmit cookie
+#
+# @rxcookie: #optional 32 or 64 bit receive cookie
+#
+# @txsession: 32 bit transmit session
+#
+# @rxsession: #optional 32 bit receive session - if not specified
+# set to the same value as transmit
+#
+# @offset: #optional additional offset - allows the insertion of
+# additional application-specific data before the packet payload
+#
+# Since 2.1
+##
+{ 'type': 'NetdevL2TPv3Options',
+ 'data': {
+ 'src': 'str',
+ 'dst': 'str',
+ '*srcport': 'str',
+ '*dstport': 'str',
+ '*ipv6': 'bool',
+ '*udp': 'bool',
+ '*cookie64': 'bool',
+ '*counter': 'bool',
+ '*pincounter': 'bool',
+ '*txcookie': 'uint64',
+ '*rxcookie': 'uint64',
+ 'txsession': 'uint32',
+ '*rxsession': 'uint32',
+ '*offset': 'uint32' } }
+
##
# @NetdevVdeOptions
#
'ifname': 'str',
'*devname': 'str' } }
+##
+# @NetdevVhostUserOptions
+#
+# Vhost-user network backend
+#
+# @chardev: name of a unix socket chardev
+#
+# @vhostforce: #optional vhost on for non-MSIX virtio guests (default: false).
+#
+# Since 2.1
+##
+{ 'type': 'NetdevVhostUserOptions',
+ 'data': {
+ 'chardev': 'str',
+ '*vhostforce': 'bool' } }
+
##
# @NetClientOptions
#
# A discriminated record of network device traits.
#
# Since 1.2
+#
+# 'l2tpv3' - since 2.1
+#
##
{ 'union': 'NetClientOptions',
'data': {
'nic': 'NetLegacyNicOptions',
'user': 'NetdevUserOptions',
'tap': 'NetdevTapOptions',
+ 'l2tpv3': 'NetdevL2TPv3Options',
'socket': 'NetdevSocketOptions',
'vde': 'NetdevVdeOptions',
'dump': 'NetdevDumpOptions',
'bridge': 'NetdevBridgeOptions',
'hubport': 'NetdevHubPortOptions',
- 'netmap': 'NetdevNetmapOptions' } }
+ 'netmap': 'NetdevNetmapOptions',
+ 'vhost-user': 'NetdevVhostUserOptions' } }
##
# @NetLegacy
##
{ 'command': 'screendump', 'data': {'filename': 'str'} }
-##
-# @nbd-server-start:
-#
-# Start an NBD server listening on the given host and port. Block
-# devices can then be exported using @nbd-server-add. The NBD
-# server will present them as named exports; for example, another
-# QEMU instance could refer to them as "nbd:HOST:PORT:exportname=NAME".
-#
-# @addr: Address on which to listen.
-#
-# Returns: error if the server is already running.
-#
-# Since: 1.3.0
-##
-{ 'command': 'nbd-server-start',
- 'data': { 'addr': 'SocketAddress' } }
-
-##
-# @nbd-server-add:
-#
-# Export a device to QEMU's embedded NBD server.
-#
-# @device: Block device to be exported
-#
-# @writable: Whether clients should be able to write to the device via the
-# NBD connection (default false). #optional
-#
-# Returns: error if the device is already marked for export.
-#
-# Since: 1.3.0
-##
-{ 'command': 'nbd-server-add', 'data': {'device': 'str', '*writable': 'bool'} }
-
-##
-# @nbd-server-stop:
-#
-# Stop QEMU's embedded NBD server, and unregister all devices previously
-# added via @nbd-server-add.
-#
-# Since: 1.3.0
-##
-{ 'command': 'nbd-server-stop' }
-
##
# @ChardevFile:
#
#
# Configuration info for the new chardev backend.
#
-# Since: 1.4
+# Since: 1.4 (testdev since 2.2)
##
{ 'type': 'ChardevDummy', 'data': { } }
'mux' : 'ChardevMux',
'msmouse': 'ChardevDummy',
'braille': 'ChardevDummy',
+ 'testdev': 'ChardevDummy',
'stdio' : 'ChardevStdio',
'console': 'ChardevDummy',
'spicevmc' : 'ChardevSpiceChannel',
#
# @help: #optional human readable text string, not suitable for parsing.
#
+# @default: #optional default value string (since 2.1)
+#
# Since 1.5
##
{ 'type': 'CommandLineParameterInfo',
'data': { 'name': 'str',
'type': 'CommandLineParameterType',
- '*help': 'str' } }
+ '*help': 'str',
+ '*default': 'str' } }
##
# @CommandLineOptionInfo:
#
# @unicast: unicast receive state
#
+# @vlan: vlan receive state (Since 2.0)
+#
# @broadcast-allowed: whether to receive broadcast
#
# @multicast-overflow: multicast table is overflowed or not
'promiscuous': 'bool',
'multicast': 'RxState',
'unicast': 'RxState',
+ 'vlan': 'RxState',
'broadcast-allowed': 'bool',
'multicast-overflow': 'bool',
'unicast-overflow': 'bool',
{ 'command': 'query-rx-filter', 'data': { '*name': 'str' },
'returns': ['RxFilterInfo'] }
-
##
-# @BlockdevDiscardOptions
-#
-# Determines how to handle discard requests.
+# @InputButton
#
-# @ignore: Ignore the request
-# @unmap: Forward as an unmap request
+# Button of a pointer input device (mouse, tablet).
#
-# Since: 1.7
+# Since: 2.0
##
-{ 'enum': 'BlockdevDiscardOptions',
- 'data': [ 'ignore', 'unmap' ] }
+{ 'enum' : 'InputButton',
+ 'data' : [ 'Left', 'Middle', 'Right', 'WheelUp', 'WheelDown' ] }
##
-# @BlockdevAioOptions
-#
-# Selects the AIO backend to handle I/O requests
+# @InputButton
#
-# @threads: Use qemu's thread pool
-# @native: Use native AIO backend (only Linux and Windows)
+# Position axis of a pointer input device (mouse, tablet).
#
-# Since: 1.7
+# Since: 2.0
##
-{ 'enum': 'BlockdevAioOptions',
- 'data': [ 'threads', 'native' ] }
+{ 'enum' : 'InputAxis',
+ 'data' : [ 'X', 'Y' ] }
##
-# @BlockdevCacheOptions
+# @InputKeyEvent
#
-# Includes cache-related options for block devices
+# Keyboard input event.
#
-# @writeback: #optional enables writeback mode for any caches (default: true)
-# @direct: #optional enables use of O_DIRECT (bypass the host page cache;
-# default: false)
-# @no-flush: #optional ignore any flush requests for the device (default:
-# false)
+# @key: Which key this event is for.
+# @down: True for key-down and false for key-up events.
#
-# Since: 1.7
+# Since: 2.0
##
-{ 'type': 'BlockdevCacheOptions',
- 'data': { '*writeback': 'bool',
- '*direct': 'bool',
- '*no-flush': 'bool' } }
+{ 'type' : 'InputKeyEvent',
+ 'data' : { 'key' : 'KeyValue',
+ 'down' : 'bool' } }
##
-# @BlockdevDriver
+# @InputBtnEvent
#
-# Drivers that are supported in block device operations.
+# Pointer button input event.
+#
+# @button: Which button this event is for.
+# @down: True for key-down and false for key-up events.
#
# Since: 2.0
##
-{ 'enum': 'BlockdevDriver',
- 'data': [ 'file', 'http', 'https', 'ftp', 'ftps', 'tftp', 'vvfat', 'blkdebug',
- 'blkverify', 'bochs', 'cloop', 'cow', 'dmg', 'parallels', 'qcow',
- 'qcow2', 'qed', 'raw', 'vdi', 'vhdx', 'vmdk', 'vpc', 'quorum' ] }
+{ 'type' : 'InputBtnEvent',
+ 'data' : { 'button' : 'InputButton',
+ 'down' : 'bool' } }
##
-# @BlockdevOptionsBase
+# @InputMoveEvent
#
-# Options that are available for all block devices, independent of the block
-# driver.
+# Pointer motion input event.
#
-# @driver: block driver name
-# @id: #optional id by which the new block device can be referred to.
-# This is a required option on the top level of blockdev-add, and
-# currently not allowed on any other level.
-# @node-name: #optional the name of a block driver state node (Since 2.0)
-# @discard: #optional discard-related options (default: ignore)
-# @cache: #optional cache-related options
-# @aio: #optional AIO backend (default: threads)
-# @rerror: #optional how to handle read errors on the device
-# (default: report)
-# @werror: #optional how to handle write errors on the device
-# (default: enospc)
-# @read-only: #optional whether the block device should be read-only
-# (default: false)
+# @axis: Which axis is referenced by @value.
+# @value: Pointer position. For absolute coordinates the
+# valid range is 0 -> 0x7ffff
#
-# Since: 1.7
+# Since: 2.0
##
-{ 'type': 'BlockdevOptionsBase',
- 'data': { 'driver': 'BlockdevDriver',
- '*id': 'str',
- '*node-name': 'str',
- '*discard': 'BlockdevDiscardOptions',
- '*cache': 'BlockdevCacheOptions',
- '*aio': 'BlockdevAioOptions',
- '*rerror': 'BlockdevOnError',
- '*werror': 'BlockdevOnError',
- '*read-only': 'bool' } }
+{ 'type' : 'InputMoveEvent',
+ 'data' : { 'axis' : 'InputAxis',
+ 'value' : 'int' } }
##
-# @BlockdevOptionsFile
-#
-# Driver specific block device options for the file backend and similar
-# protocols.
+# @InputEvent
#
-# @filename: path to the image file
+# Input event union.
#
-# Since: 1.7
+# Since: 2.0
##
-{ 'type': 'BlockdevOptionsFile',
- 'data': { 'filename': 'str' } }
+{ 'union' : 'InputEvent',
+ 'data' : { 'key' : 'InputKeyEvent',
+ 'btn' : 'InputBtnEvent',
+ 'rel' : 'InputMoveEvent',
+ 'abs' : 'InputMoveEvent' } }
##
-# @BlockdevOptionsVVFAT
-#
-# Driver specific block device options for the vvfat protocol.
+# @NumaOptions
#
-# @dir: directory to be exported as FAT image
-# @fat-type: #optional FAT type: 12, 16 or 32
-# @floppy: #optional whether to export a floppy image (true) or
-# partitioned hard disk (false; default)
-# @rw: #optional whether to allow write operations (default: false)
+# A discriminated record of NUMA options. (for OptsVisitor)
#
-# Since: 1.7
+# Since 2.1
##
-{ 'type': 'BlockdevOptionsVVFAT',
- 'data': { 'dir': 'str', '*fat-type': 'int', '*floppy': 'bool',
- '*rw': 'bool' } }
+{ 'union': 'NumaOptions',
+ 'data': {
+ 'node': 'NumaNodeOptions' }}
##
-# @BlockdevOptionsGenericFormat
+# @NumaNodeOptions
#
-# Driver specific block device options for image format that have no option
-# besides their data source.
+# Create a guest NUMA node. (for OptsVisitor)
#
-# @file: reference to or definition of the data source block device
+# @nodeid: #optional NUMA node ID (increase by 1 from 0 if omitted)
#
-# Since: 1.7
-##
-{ 'type': 'BlockdevOptionsGenericFormat',
- 'data': { 'file': 'BlockdevRef' } }
-
-##
-# @BlockdevOptionsGenericCOWFormat
+# @cpus: #optional VCPUs belonging to this node (assign VCPUS round-robin
+# if omitted)
#
-# Driver specific block device options for image format that have no option
-# besides their data source and an optional backing file.
+# @mem: #optional memory size of this node; mutually exclusive with @memdev.
+# Equally divide total memory among nodes if both @mem and @memdev are
+# omitted.
#
-# @backing: #optional reference to or definition of the backing file block
-# device (if missing, taken from the image file content). It is
-# allowed to pass an empty string here in order to disable the
-# default backing file.
+# @memdev: #optional memory backend object. If specified for one node,
+# it must be specified for all nodes.
#
-# Since: 1.7
+# Since: 2.1
##
-{ 'type': 'BlockdevOptionsGenericCOWFormat',
- 'base': 'BlockdevOptionsGenericFormat',
- 'data': { '*backing': 'BlockdevRef' } }
+{ 'type': 'NumaNodeOptions',
+ 'data': {
+ '*nodeid': 'uint16',
+ '*cpus': ['uint16'],
+ '*mem': 'size',
+ '*memdev': 'str' }}
##
-# @BlockdevOptionsQcow2
-#
-# Driver specific block device options for qcow2.
+# @HostMemPolicy
#
-# @lazy-refcounts: #optional whether to enable the lazy refcounts
-# feature (default is taken from the image file)
+# Host memory policy types
#
-# @pass-discard-request: #optional whether discard requests to the qcow2
-# device should be forwarded to the data source
+# @default: restore default policy, remove any nondefault policy
#
-# @pass-discard-snapshot: #optional whether discard requests for the data source
-# should be issued when a snapshot operation (e.g.
-# deleting a snapshot) frees clusters in the qcow2 file
+# @preferred: set the preferred host nodes for allocation
#
-# @pass-discard-other: #optional whether discard requests for the data source
-# should be issued on other occasions where a cluster
-# gets freed
+# @bind: a strict policy that restricts memory allocation to the
+# host nodes specified
#
-# Since: 1.7
-##
-{ 'type': 'BlockdevOptionsQcow2',
- 'base': 'BlockdevOptionsGenericCOWFormat',
- 'data': { '*lazy-refcounts': 'bool',
- '*pass-discard-request': 'bool',
- '*pass-discard-snapshot': 'bool',
- '*pass-discard-other': 'bool' } }
-
-##
-# @BlkdebugEvent
+# @interleave: memory allocations are interleaved across the set
+# of host nodes specified
#
-# Trigger events supported by blkdebug.
+# Since 2.1
##
-{ 'enum': 'BlkdebugEvent',
- 'data': [ 'l1_update', 'l1_grow.alloc_table', 'l1_grow.write_table',
- 'l1_grow.activate_table', 'l2_load', 'l2_update',
- 'l2_update_compressed', 'l2_alloc.cow_read', 'l2_alloc.write',
- 'read_aio', 'read_backing_aio', 'read_compressed', 'write_aio',
- 'write_compressed', 'vmstate_load', 'vmstate_save', 'cow_read',
- 'cow_write', 'reftable_load', 'reftable_grow', 'reftable_update',
- 'refblock_load', 'refblock_update', 'refblock_update_part',
- 'refblock_alloc', 'refblock_alloc.hookup', 'refblock_alloc.write',
- 'refblock_alloc.write_blocks', 'refblock_alloc.write_table',
- 'refblock_alloc.switch_table', 'cluster_alloc',
- 'cluster_alloc_bytes', 'cluster_free', 'flush_to_os',
- 'flush_to_disk' ] }
+{ 'enum': 'HostMemPolicy',
+ 'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
##
-# @BlkdebugInjectErrorOptions
+# @Memdev:
#
-# Describes a single error injection for blkdebug.
+# Information about memory backend
#
-# @event: trigger event
+# @size: memory backend size
#
-# @state: #optional the state identifier blkdebug needs to be in to
-# actually trigger the event; defaults to "any"
+# @merge: enables or disables memory merge support
#
-# @errno: #optional error identifier (errno) to be returned; defaults to
-# EIO
+# @dump: includes memory backend's memory in a core dump or not
#
-# @sector: #optional specifies the sector index which has to be affected
-# in order to actually trigger the event; defaults to "any
-# sector"
+# @prealloc: enables or disables memory preallocation
#
-# @once: #optional disables further events after this one has been
-# triggered; defaults to false
+# @host-nodes: host nodes for its memory policy
#
-# @immediately: #optional fail immediately; defaults to false
+# @policy: memory policy of memory backend
#
-# Since: 2.0
+# Since: 2.1
##
-{ 'type': 'BlkdebugInjectErrorOptions',
- 'data': { 'event': 'BlkdebugEvent',
- '*state': 'int',
- '*errno': 'int',
- '*sector': 'int',
- '*once': 'bool',
- '*immediately': 'bool' } }
+
+{ 'type': 'Memdev',
+ 'data': {
+ 'size': 'size',
+ 'merge': 'bool',
+ 'dump': 'bool',
+ 'prealloc': 'bool',
+ 'host-nodes': ['uint16'],
+ 'policy': 'HostMemPolicy' }}
##
-# @BlkdebugSetStateOptions
-#
-# Describes a single state-change event for blkdebug.
-#
-# @event: trigger event
+# @query-memdev:
#
-# @state: #optional the current state identifier blkdebug needs to be in;
-# defaults to "any"
+# Returns information for all memory backends.
#
-# @new_state: the state identifier blkdebug is supposed to assume if
-# this event is triggered
+# Returns: a list of @Memdev.
#
-# Since: 2.0
+# Since: 2.1
##
-{ 'type': 'BlkdebugSetStateOptions',
- 'data': { 'event': 'BlkdebugEvent',
- '*state': 'int',
- 'new_state': 'int' } }
+{ 'command': 'query-memdev', 'returns': ['Memdev'] }
##
-# @BlockdevOptionsBlkdebug
+# @PCDIMMDeviceInfo:
#
-# Driver specific block device options for blkdebug.
+# PCDIMMDevice state information
#
-# @image: underlying raw block device (or image file)
+# @id: #optional device's ID
#
-# @config: #optional filename of the configuration file
+# @addr: physical address, where device is mapped
#
-# @align: #optional required alignment for requests in bytes
+# @size: size of memory that the device provides
#
-# @inject-error: #optional array of error injection descriptions
+# @slot: slot number at which device is plugged in
#
-# @set-state: #optional array of state-change descriptions
+# @node: NUMA node number where device is plugged in
#
-# Since: 2.0
+# @memdev: memory backend linked with device
+#
+# @hotplugged: true if device was hotplugged
+#
+# @hotpluggable: true if device if could be added/removed while machine is running
+#
+# Since: 2.1
##
-{ 'type': 'BlockdevOptionsBlkdebug',
- 'data': { 'image': 'BlockdevRef',
- '*config': 'str',
- '*align': 'int',
- '*inject-error': ['BlkdebugInjectErrorOptions'],
- '*set-state': ['BlkdebugSetStateOptions'] } }
+{ 'type': 'PCDIMMDeviceInfo',
+ 'data': { '*id': 'str',
+ 'addr': 'int',
+ 'size': 'int',
+ 'slot': 'int',
+ 'node': 'int',
+ 'memdev': 'str',
+ 'hotplugged': 'bool',
+ 'hotpluggable': 'bool'
+ }
+}
##
-# @BlockdevOptionsBlkverify
+# @MemoryDeviceInfo:
#
-# Driver specific block device options for blkverify.
+# Union containing information about a memory device
#
-# @test: block device to be tested
+# Since: 2.1
+##
+{ 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} }
+
+##
+# @query-memory-devices
#
-# @raw: raw image used for verification
+# Lists available memory devices and their state
#
-# Since: 2.0
+# Since: 2.1
##
-{ 'type': 'BlockdevOptionsBlkverify',
- 'data': { 'test': 'BlockdevRef',
- 'raw': 'BlockdevRef' } }
+{ 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
-##
-# @BlockdevOptionsQuorum
+## @ACPISlotType
#
-# Driver specific block device options for Quorum
+# @DIMM: memory slot
#
-# @blkverify: #optional true if the driver must print content mismatch
-# set to false by default
+{ 'enum': 'ACPISlotType', 'data': [ 'DIMM' ] }
+
+## @ACPIOSTInfo
#
-# @children: the children block devices to use
+# OSPM Status Indication for a device
+# For description of possible values of @source and @status fields
+# see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
#
-# @vote-threshold: the vote limit under which a read will fail
+# @device: #optional device ID associated with slot
#
-# Since: 2.0
-##
-{ 'type': 'BlockdevOptionsQuorum',
- 'data': { '*blkverify': 'bool',
- 'children': [ 'BlockdevRef' ],
- 'vote-threshold': 'int' } }
-
-##
-# @BlockdevOptions
+# @slot: slot ID, unique per slot of a given @slot-type
#
-# Options for creating a block device.
+# @slot-type: type of the slot
#
-# Since: 1.7
-##
-{ 'union': 'BlockdevOptions',
- 'base': 'BlockdevOptionsBase',
- 'discriminator': 'driver',
- 'data': {
- 'file': 'BlockdevOptionsFile',
- 'http': 'BlockdevOptionsFile',
- 'https': 'BlockdevOptionsFile',
- 'ftp': 'BlockdevOptionsFile',
- 'ftps': 'BlockdevOptionsFile',
- 'tftp': 'BlockdevOptionsFile',
-# TODO gluster: Wait for structured options
-# TODO iscsi: Wait for structured options
-# TODO nbd: Should take InetSocketAddress for 'host'?
-# TODO nfs: Wait for structured options
-# TODO rbd: Wait for structured options
-# TODO sheepdog: Wait for structured options
-# TODO ssh: Should take InetSocketAddress for 'host'?
- 'vvfat': 'BlockdevOptionsVVFAT',
- 'blkdebug': 'BlockdevOptionsBlkdebug',
- 'blkverify': 'BlockdevOptionsBlkverify',
- 'bochs': 'BlockdevOptionsGenericFormat',
- 'cloop': 'BlockdevOptionsGenericFormat',
- 'cow': 'BlockdevOptionsGenericCOWFormat',
- 'dmg': 'BlockdevOptionsGenericFormat',
- 'parallels': 'BlockdevOptionsGenericFormat',
- 'qcow': 'BlockdevOptionsGenericCOWFormat',
- 'qcow2': 'BlockdevOptionsQcow2',
- 'qed': 'BlockdevOptionsGenericCOWFormat',
- 'raw': 'BlockdevOptionsGenericFormat',
- 'vdi': 'BlockdevOptionsGenericFormat',
- 'vhdx': 'BlockdevOptionsGenericFormat',
- 'vmdk': 'BlockdevOptionsGenericCOWFormat',
- 'vpc': 'BlockdevOptionsGenericFormat',
- 'quorum': 'BlockdevOptionsQuorum'
- } }
-
-##
-# @BlockdevRef
-#
-# Reference to a block device.
-#
-# @definition: defines a new block device inline
-# @reference: references the ID of an existing block device. An
-# empty string means that no block device should be
-# referenced.
-#
-# Since: 1.7
-##
-{ 'union': 'BlockdevRef',
- 'discriminator': {},
- 'data': { 'definition': 'BlockdevOptions',
- 'reference': 'str' } }
-
-##
-# @blockdev-add:
-#
-# Creates a new block device.
-#
-# @options: block device options for the new device
-#
-# Since: 1.7
-##
-{ 'command': 'blockdev-add', 'data': { 'options': 'BlockdevOptions' } }
-
-##
-# @InputButton
+# @source: an integer containing the source event
#
-# Button of a pointer input device (mouse, tablet).
+# @status: an integer containing the status code
#
-# Since: 2.0
+# Since: 2.1
##
-{ 'enum' : 'InputButton',
- 'data' : [ 'Left', 'Middle', 'Right', 'WheelUp', 'WheelDown' ] }
+{ 'type': 'ACPIOSTInfo',
+ 'data' : { '*device': 'str',
+ 'slot': 'str',
+ 'slot-type': 'ACPISlotType',
+ 'source': 'int',
+ 'status': 'int' } }
##
-# @InputButton
+# @query-acpi-ospm-status
#
-# Position axis of a pointer input device (mouse, tablet).
+# Lists ACPI OSPM status of ACPI device objects,
+# which might be reported via _OST method
#
-# Since: 2.0
+# Since: 2.1
##
-{ 'enum' : 'InputAxis',
- 'data' : [ 'X', 'Y' ] }
+{ 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
##
-# @InputKeyEvent
+# @WatchdogExpirationAction
#
-# Keyboard input event.
+# An enumeration of the actions taken when the watchdog device's timer is
+# expired
#
-# @key: Which key this event is for.
-# @down: True for key-down and false for key-up events.
+# @reset: system resets
#
-# Since: 2.0
+# @shutdown: system shutdown, note that it is similar to @powerdown, which
+# tries to set to system status and notify guest
+#
+# @poweroff: system poweroff, the emulator program exits
+#
+# @pause: system pauses, similar to @stop
+#
+# @debug: system enters debug state
+#
+# @none: nothing is done
+#
+# Since: 2.1
##
-{ 'type' : 'InputKeyEvent',
- 'data' : { 'key' : 'KeyValue',
- 'down' : 'bool' } }
+{ 'enum': 'WatchdogExpirationAction',
+ 'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none' ] }
##
-# @InputBtnEvent
+# @IoOperationType
#
-# Pointer button input event.
+# An enumeration of the I/O operation types
#
-# @button: Which button this event is for.
-# @down: True for key-down and false for key-up events.
+# @read: read operation
#
-# Since: 2.0
+# @write: write operation
+#
+# Since: 2.1
##
-{ 'type' : 'InputBtnEvent',
- 'data' : { 'button' : 'InputButton',
- 'down' : 'bool' } }
+{ 'enum': 'IoOperationType',
+ 'data': [ 'read', 'write' ] }
##
-# @InputMoveEvent
+# @GuestPanicAction
#
-# Pointer motion input event.
+# An enumeration of the actions taken when guest OS panic is detected
#
-# @axis: Which axis is referenced by @value.
-# @value: Pointer position. For absolute coordinates the
-# valid range is 0 -> 0x7ffff
+# @pause: system pauses
#
-# Since: 2.0
+# Since: 2.1
##
-{ 'type' : 'InputMoveEvent',
- 'data' : { 'axis' : 'InputAxis',
- 'value' : 'int' } }
+{ 'enum': 'GuestPanicAction',
+ 'data': [ 'pause' ] }
##
-# @InputEvent
+# @rtc-reset-reinjection
#
-# Input event union.
+# This command will reset the RTC interrupt reinjection backlog.
+# Can be used if another mechanism to synchronize guest time
+# is in effect, for example QEMU guest agent's guest-set-time
+# command.
#
-# Since: 2.0
+# Since: 2.1
##
-{ 'union' : 'InputEvent',
- 'data' : { 'key' : 'InputKeyEvent',
- 'btn' : 'InputBtnEvent',
- 'rel' : 'InputMoveEvent',
- 'abs' : 'InputMoveEvent' } }
+{ 'command': 'rtc-reset-reinjection' }