#
# 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' }
+
+# Tracing commands
+{ 'include': 'qapi/trace.json' }
##
-# LostTickPolicy:
+# @LostTickPolicy:
#
# Policy for handling lost ticks in timer devices.
#
{ '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
#
# Since 0.14.0
##
-{ 'type': 'NameInfo', 'data': {'*name': 'str'} }
+{ 'struct': 'NameInfo', 'data': {'*name': 'str'} }
##
# @query-name:
##
{ '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:
#
#
# Since: 0.14.0
##
-{ 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
+{ 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
##
# @query-kvm:
'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:
#
#
# Notes: @singlestep is enabled through the GDB stub
##
-{ 'type': 'StatusInfo',
+{ 'struct': 'StatusInfo',
'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
##
#
# Notes: If no UUID was specified for the guest, a null UUID is returned.
##
-{ 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
+{ 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
##
# @query-uuid:
#
# @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'} }
+{ 'struct': 'ChardevInfo', 'data': {'label': 'str',
+ 'filename': 'str',
+ 'frontend-open': 'bool'} }
##
# @query-chardev:
#
# Since: 2.0
##
-{ 'type': 'ChardevBackendInfo', 'data': {'name': 'str'} }
+{ 'struct': 'ChardevBackendInfo', 'data': {'name': 'str'} }
##
# @query-chardev-backends:
'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:
#
#
# Since: 1.2.0
##
-{ 'type': 'EventInfo', 'data': {'name': 'str'} }
+{ 'struct': 'EventInfo', 'data': {'name': 'str'} }
##
# @query-events:
#
# Since: 0.14.0
##
-{ 'type': 'MigrationStats',
+{ 'struct': 'MigrationStats',
'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
#
# Since: 1.2
##
-{ 'type': 'XBZRLECacheStats',
+{ 'struct': 'XBZRLECacheStats',
'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
'cache-miss': 'int', 'cache-miss-rate': 'number',
'overflow': 'int' } }
+# @MigrationStatus:
+#
+# An enumeration of migration status.
+#
+# @none: no migration has ever happened.
+#
+# @setup: migration process has been initiated.
+#
+# @cancelling: in the process of cancelling migration.
+#
+# @cancelled: cancelling migration is finished.
+#
+# @active: in the process of doing migration.
+#
+# @completed: migration is finished.
+#
+# @failed: some error occurred during migration process.
+#
+# Since: 2.3
+#
+##
+{ 'enum': 'MigrationStatus',
+ 'data': [ 'none', 'setup', 'cancelling', 'cancelled',
+ 'active', 'completed', 'failed' ] }
+
##
# @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
-# 'cancelled'. If this field is not returned, no migration process
+# @status: #optional @MigrationStatus describing the current migration status.
+# If this field is not returned, no migration process
# has been initiated
#
# @ram: #optional @MigrationStats containing detailed migration
# status, only returned if status is 'active' or
-# 'completed'. 'comppleted' (since 1.2)
+# 'completed'(since 1.2)
#
# @disk: #optional @MigrationStats containing detailed disk migration
# status, only returned if status is 'active' and it is a block
#
# Since: 0.14.0
##
-{ 'type': 'MigrationInfo',
- 'data': {'*status': 'str', '*ram': 'MigrationStats',
+{ 'struct': 'MigrationInfo',
+ 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
'*disk': 'MigrationStats',
'*xbzrle-cache': 'XBZRLECacheStats',
'*total-time': 'int',
# to enable the capability on the source VM. The feature is disabled by
# default. (since 1.6)
#
+# @compress: Use multiple compression threads to accelerate live migration.
+# This feature can help to reduce the migration traffic, by sending
+# compressed pages. Please note that if compress and xbzrle are both
+# on, compress only takes effect in the ram bulk stage, after that,
+# it will be disabled and only xbzrle takes effect, this can help to
+# minimize migration traffic. The feature is disabled by default.
+# (since 2.4 )
+#
+# @events: generate events for each migration state change
+# (since 2.4 )
+#
# @auto-converge: If enabled, QEMU will automatically throttle down the guest
# to speed up convergence of RAM migration. (since 1.6)
#
# Since: 1.2
##
{ 'enum': 'MigrationCapability',
- 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks'] }
+ 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
+ 'compress', 'events'] }
##
# @MigrationCapabilityStatus
#
# Since: 1.2
##
-{ 'type': 'MigrationCapabilityStatus',
+{ 'struct': 'MigrationCapabilityStatus',
'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
##
##
{ 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
+# @MigrationParameter
+#
+# Migration parameters enumeration
+#
+# @compress-level: Set the compression level to be used in live migration,
+# the compression level is an integer between 0 and 9, where 0 means
+# no compression, 1 means the best compression speed, and 9 means best
+# compression ratio which will consume more CPU.
+#
+# @compress-threads: Set compression thread count to be used in live migration,
+# the compression thread count is an integer between 1 and 255.
+#
+# @decompress-threads: Set decompression thread count to be used in live
+# migration, the decompression thread count is an integer between 1
+# and 255. Usually, decompression is at least 4 times as fast as
+# compression, so set the decompress-threads to the number about 1/4
+# of compress-threads is adequate.
+#
+# Since: 2.4
+##
+{ 'enum': 'MigrationParameter',
+ 'data': ['compress-level', 'compress-threads', 'decompress-threads'] }
+
+#
+# @migrate-set-parameters
+#
+# Set the following migration parameters
+#
+# @compress-level: compression level
+#
+# @compress-threads: compression thread count
+#
+# @decompress-threads: decompression thread count
+#
+# Since: 2.4
+##
+{ 'command': 'migrate-set-parameters',
+ 'data': { '*compress-level': 'int',
+ '*compress-threads': 'int',
+ '*decompress-threads': 'int'} }
+
+#
+# @MigrationParameters
+#
+# @compress-level: compression level
+#
+# @compress-threads: compression thread count
+#
+# @decompress-threads: decompression thread count
+#
+# Since: 2.4
+##
+{ 'struct': 'MigrationParameters',
+ 'data': { 'compress-level': 'int',
+ 'compress-threads': 'int',
+ 'decompress-threads': 'int'} }
+##
+# @query-migrate-parameters
+#
+# Returns information about the current migration parameters
+#
+# Returns: @MigrationParameters
+#
+# Since: 2.4
+##
+{ 'command': 'query-migrate-parameters',
+ 'returns': 'MigrationParameters' }
+
+##
+# @client_migrate_info
+#
+# Set migration information for remote display. This makes the server
+# ask the client to automatically reconnect using the new parameters
+# once migration finished successfully. Only implemented for SPICE.
+#
+# @protocol: must be "spice"
+# @hostname: migration target hostname
+# @port: #optional spice tcp port for plaintext channels
+# @tls-port: #optional spice tcp port for tls-secured channels
+# @cert-subject: #optional server certificate subject
+#
+# Since: 0.14.0
+##
+{ 'command': 'client_migrate_info',
+ 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
+ '*tls-port': 'int', '*cert-subject': 'str' } }
+
##
# @MouseInfo:
#
#
# Since: 0.14.0
##
-{ 'type': 'MouseInfo',
+{ 'struct': 'MouseInfo',
'data': {'name': 'str', 'index': 'int', 'current': 'bool',
'absolute': 'bool'} }
# @halted: true if the virtual CPU is in the halt state. Halt usually refers
# to a processor specific low power mode.
#
+# @qom_path: path to the CPU object in the QOM tree (since 2.4)
+#
# @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
# pointer.
# If the target is Sparc, this is the PC component of the
# Notes: @halted is a transient state that changes frequently. By the time the
# data is sent to the client, the guest may no longer be halted.
##
-{ 'type': 'CpuInfo',
- 'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
- '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
+{ 'struct': 'CpuInfo',
+ 'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool',
+ 'qom_path': 'str',
+ '*pc': 'int', '*nip': 'int', '*npc': 'int', '*PC': 'int',
+ 'thread_id': 'int'} }
##
# @query-cpus:
#
# Since: 2.0
##
-{ 'type': 'IOThreadInfo',
+{ 'struct': 'IOThreadInfo',
'data': {'id': 'str', 'thread-id': 'int'} }
##
{ 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
##
-# @BlockDeviceInfo:
+# @NetworkAddressFamily
#
-# Information about the backing device for a block device.
+# The network address family
#
-# @file: the filename of the backing device
+# @ipv4: IPV4 family
#
-# @node-name: #optional the name of the block driver node (Since 2.0)
+# @ipv6: IPV6 family
#
-# @ro: true if the backing device was open read-only
+# @unix: unix socket
#
-# @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'
+# @unknown: otherwise
#
-# @backing_file: #optional the name of the backing file (for copy-on-write)
+# Since: 2.1
+##
+{ 'enum': 'NetworkAddressFamily',
+ 'data': [ 'ipv4', 'ipv6', 'unix', 'unknown' ] }
+
+##
+# @VncBasicInfo
#
-# @backing_file_depth: number of files in the backing file chain (since: 1.2)
+# The basic information for vnc network connection
#
-# @encrypted: true if the backing device is encrypted
+# @host: IP address
#
-# @encryption_key_missing: true if the backing device is encrypted but an
-# valid encryption key is missing
+# @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.
#
-# @detect_zeroes: detect and optimize zero writes (Since 2.1)
+# @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
#
-# @bps: total throughput limit in bytes per second is specified
+# The network connection information for server
#
-# @bps_rd: read throughput limit in bytes per second is specified
+# @auth: #optional, authentication method
#
-# @bps_wr: write throughput limit in bytes per second is specified
+# Since: 2.1
+##
+{ 'struct': 'VncServerInfo',
+ 'base': 'VncBasicInfo',
+ 'data': { '*auth': 'str' } }
+
+##
+# @VncClientInfo:
#
-# @iops: total I/O operations per second is specified
+# Information about a connected VNC client.
#
-# @iops_rd: read I/O operations per second is specified
+# @x509_dname: #optional If x509 authentication is in use, the Distinguished
+# Name of the client.
#
-# @iops_wr: write I/O operations per second is specified
+# @sasl_username: #optional If SASL authentication is in use, the SASL username
+# used for authentication.
#
-# @image: the info of image used (since: 1.6)
+# Since: 0.14.0
+##
+{ 'struct': 'VncClientInfo',
+ 'base': 'VncBasicInfo',
+ 'data': { '*x509_dname': 'str', '*sasl_username': 'str' } }
+
+##
+# @VncInfo:
#
-# @bps_max: #optional total max in bytes (Since 1.7)
+# Information about the VNC session.
#
-# @bps_rd_max: #optional read max in bytes (Since 1.7)
+# @enabled: true if the VNC server is enabled, false otherwise
#
-# @bps_wr_max: #optional write max in bytes (Since 1.7)
+# @host: #optional The hostname the VNC server is bound to. This depends on
+# the name resolution on the host and may be an IP address.
#
-# @iops_max: #optional total I/O operations max (Since 1.7)
+# @family: #optional '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
#
-# @iops_rd_max: #optional read I/O operations max (Since 1.7)
+# @service: #optional 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.
#
-# @iops_wr_max: #optional write I/O operations max (Since 1.7)
+# @auth: #optional 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
#
-# @iops_size: #optional an I/O size in bytes (Since 1.7)
+# @clients: a list of @VncClientInfo of all currently connected clients
#
# 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',
- 'detect_zeroes': 'BlockdevDetectZeroesOptions',
- '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' } }
+{ 'struct': 'VncInfo',
+ 'data': {'enabled': 'bool', '*host': 'str',
+ '*family': 'NetworkAddressFamily',
+ '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
##
-# @BlockDeviceIoStatus:
-#
-# An enumeration of block device I/O status.
+# @VncPriAuth:
#
-# @ok: The last I/O operation has succeeded
+# vnc primary authentication method.
#
-# @failed: The last I/O operation has failed
+# Since: 2.3
+##
+{ 'enum': 'VncPrimaryAuth',
+ 'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
+ 'tls', 'vencrypt', 'sasl' ] }
+
+##
+# @VncVencryptSubAuth:
#
-# @nospace: The last I/O operation has failed due to a no-space condition
+# vnc sub authentication method with vencrypt.
#
-# Since: 1.0
+# Since: 2.3
##
-{ 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
+{ 'enum': 'VncVencryptSubAuth',
+ 'data': [ 'plain',
+ 'tls-none', 'x509-none',
+ 'tls-vnc', 'x509-vnc',
+ 'tls-plain', 'x509-plain',
+ 'tls-sasl', 'x509-sasl' ] }
##
-# @BlockDeviceMapEntry:
+# @VncInfo2:
#
-# Entry in the metadata map of the device (returned by "qemu-img map")
+# Information about a vnc server
#
-# @start: Offset in the image of the first byte described by this entry
-# (in bytes)
+# @id: vnc server name.
#
-# @length: Length of the range described by this entry (in bytes)
+# @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.
#
-# @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.
+# @clients: A list of @VncClientInfo of all currently connected clients.
+# The list can be empty, for obvious reasons.
#
-# @zero: the sectors in this range read as zeros
+# @auth: The current authentication type used by the server
#
-# @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)
+# @vencrypt: #optional The vencrypt sub authentication type used by the server,
+# only specified in case auth == vencrypt.
#
-# @offset: if present, the image file stores the data for this range in
-# raw format at the given offset.
+# @display: #optional The display device the vnc server is linked to.
#
-# Since 1.7
+# Since: 2.3
##
-{ 'type': 'BlockDeviceMapEntry',
- 'data': { 'start': 'int', 'length': 'int', 'depth': 'int', 'zero': 'bool',
- 'data': 'bool', '*offset': 'int' } }
+{ 'struct': 'VncInfo2',
+ 'data': { 'id' : 'str',
+ 'server' : ['VncBasicInfo'],
+ 'clients' : ['VncClientInfo'],
+ 'auth' : 'VncPrimaryAuth',
+ '*vencrypt' : 'VncVencryptSubAuth',
+ '*display' : 'str' } }
##
-# @BlockDirtyInfo:
-#
-# Block dirty bitmap information.
+# @query-vnc:
#
-# @count: number of dirty bytes according to the dirty bitmap
+# Returns information about the current VNC server
#
-# @granularity: granularity of the dirty bitmap in bytes (since 1.4)
+# Returns: @VncInfo
#
-# Since: 1.3
+# Since: 0.14.0
##
-{ 'type': 'BlockDirtyInfo',
- 'data': {'count': 'int', 'granularity': 'int'} }
+{ 'command': 'query-vnc', 'returns': 'VncInfo' }
##
-# @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.
+# @query-vnc-servers:
#
-# @type: This field is returned only for compatibility reasons, it should
-# not be used (always returns 'unknown')
+# Returns a list of vnc servers. The list can be empty.
#
-# @removable: True if the device supports removable media.
+# Returns: a list of @VncInfo2
#
-# @locked: True if the guest has locked this device from having its media
-# removed
+# Since: 2.3
+##
+{ 'command': 'query-vnc-servers', 'returns': ['VncInfo2'] }
+
+##
+# @SpiceBasicInfo
#
-# @tray_open: #optional True if the device has a tray and it is open
-# (only present if removable is true)
+# The basic information for SPICE network connection
#
-# @dirty-bitmaps: #optional dirty bitmaps information (only present if the
-# driver has one or more dirty bitmaps) (Since 2.0)
+# @host: IP address
#
-# @io-status: #optional @BlockDeviceIoStatus. Only present if the device
-# supports it and the VM is configured to stop on errors
+# @port: port number
#
-# @inserted: #optional @BlockDeviceInfo describing the device if media is
-# present
+# @family: address family
#
-# Since: 0.14.0
+# Since: 2.1
##
-{ 'type': 'BlockInfo',
- 'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
- 'locked': 'bool', '*inserted': 'BlockDeviceInfo',
- '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus',
- '*dirty-bitmaps': ['BlockDirtyInfo'] } }
+{ 'struct': 'SpiceBasicInfo',
+ 'data': { 'host': 'str',
+ 'port': 'str',
+ 'family': 'NetworkAddressFamily' } }
##
-# @query-block:
+# @SpiceServerInfo
#
-# Get a list of BlockInfo for all virtual block devices.
+# Information about a SPICE server
#
-# Returns: a list of @BlockInfo describing each virtual block device
+# @auth: #optional, authentication method
#
-# Since: 0.14.0
+# Since: 2.1
##
-{ 'command': 'query-block', 'returns': ['BlockInfo'] }
+{ 'struct': 'SpiceServerInfo',
+ 'base': 'SpiceBasicInfo',
+ 'data': { '*auth': 'str' } }
##
-# @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.
-#
-# @rd_operations: The number of read operations performed by the device.
-#
-# @wr_operations: The number of write operations performed by the device.
-#
-# @flush_operations: The number of cache flush operations performed by the
-# device (since 0.15.0)
-#
-# @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
-# (since 0.15.0).
-#
-# @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
-#
-# @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
-##
-{ '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' } }
-
-##
-# @BlockStats:
-#
-# Statistics of a virtual block device or a block backing device.
-#
-# @device: #optional If the stats are for a virtual block device, the name
-# corresponding to the virtual block device.
-#
-# @stats: A @BlockDeviceStats for the device.
-#
-# @parent: #optional This describes the file block device if it has one.
-#
-# @backing: #optional This describes the backing block device if it has one.
-# (Since 2.0)
-#
-# Since: 0.14.0
-##
-{ 'type': 'BlockStats',
- 'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
- '*parent': 'BlockStats',
- '*backing': 'BlockStats'} }
-
-##
-# @query-blockstats:
-#
-# Query the @BlockStats for all virtual block devices.
-#
-# Returns: A list of @BlockStats for each virtual block devices.
-#
-# Since: 0.14.0
-##
-{ 'command': 'query-blockstats', 'returns': ['BlockStats'] }
-
-##
-# @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.
-#
-# @sasl_username: #optional If SASL authentication is in use, the SASL username
-# used for authentication.
-#
-# Since: 0.14.0
-##
-{ 'type': 'VncClientInfo',
- 'data': {'host': 'str', 'family': 'str', 'service': 'str',
- '*x509_dname': 'str', '*sasl_username': 'str'} }
-
-##
-# @VncInfo:
-#
-# Information about the VNC session.
-#
-# @enabled: true if the VNC server is enabled, false otherwise
-#
-# @host: #optional The hostname the VNC server is bound to. This depends on
-# the name resolution on the host and may be an IP address.
-#
-# @family: #optional '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: #optional 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: #optional 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
-##
-{ 'type': 'VncInfo',
- 'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
- '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
-
-##
-# @query-vnc:
-#
-# Returns information about the current VNC server
-#
-# Returns: @VncInfo
-#
-# Since: 0.14.0
-##
-{ 'command': 'query-vnc', 'returns': 'VncInfo' }
-
-##
-# @SpiceChannel
+# @SpiceChannel
#
# Information about a SPICE client channel.
#
-# @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
-#
-# @port: The client's port number.
-#
# @connection-id: SPICE connection id number. All channels with the same id
# belong to the same SPICE session.
#
-# @connection-type: SPICE channel type number. "1" is the main control
-# channel, filter for this one if you want to track spice
-# sessions only
+# @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
#
# Since: 0.14.0
##
-{ 'type': 'SpiceChannel',
- 'data': {'host': 'str', 'family': 'str', 'port': 'str',
- 'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
+{ 'struct': 'SpiceChannel',
+ 'base': 'SpiceBasicInfo',
+ 'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
'tls': 'bool'} }
##
#
# Since: 0.14.0
##
-{ 'type': 'SpiceInfo',
+{ 'struct': 'SpiceInfo',
'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
'*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
# Since: 0.14.0
#
##
-{ 'type': 'BalloonInfo', 'data': {'actual': 'int' } }
+{ 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
##
# @query-balloon:
#
# Since: 0.14.0
##
-{ 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
+{ 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
##
# @PciMemoryRegion
#
# Since: 0.14.0
##
-{ 'type': 'PciMemoryRegion',
+{ 'struct': 'PciMemoryRegion',
'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
'*prefetch': 'bool', '*mem_type_64': 'bool' } }
##
-# @PciBridgeInfo:
+# @PciBusInfo:
#
-# Information about a PCI Bridge device
+# Information about a bus of a PCI Bridge device
#
-# @bus.number: primary bus interface number. This should be the number of the
-# bus the device resides on.
+# @number: primary bus interface number. This should be the number of the
+# bus the device resides on.
#
-# @bus.secondary: secondary bus interface number. This is the number of the
-# main bus for the bridge
+# @secondary: secondary bus interface number. This is the number of the
+# main bus for the bridge
#
-# @bus.subordinate: This is the highest number bus that resides below the
-# bridge.
+# @subordinate: This is the highest number bus that resides below the
+# bridge.
#
-# @bus.io_range: The PIO range for all devices on this bridge
+# @io_range: The PIO range for all devices on this bridge
#
-# @bus.memory_range: The MMIO range for all devices on this bridge
+# @memory_range: The MMIO range for all devices on this bridge
#
-# @bus.prefetchable_range: The range of prefetchable MMIO 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
##
-{ 'type': 'PciBridgeInfo',
- 'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
- 'io_range': 'PciMemoryRange',
- 'memory_range': 'PciMemoryRange',
- 'prefetchable_range': 'PciMemoryRange' },
- '*devices': ['PciDeviceInfo']} }
+{ 'struct': 'PciBridgeInfo',
+ 'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
+
+##
+# @PciDeviceClass:
+#
+# Information about the Class of a PCI device
+#
+# @desc: #optional 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:
#
# @function: the function of the slot used by the device
#
-# @class_info.desc: #optional a string description of the device's class
+# @class_info: the class of the device
#
-# @class_info.class: the class code of the device
-#
-# @id.device: the PCI device id
-#
-# @id.vendor: the PCI vendor id
+# @id: the PCI device id
#
# @irq: #optional if an IRQ is assigned to the device, the IRQ number
#
#
# Since: 0.14.0
##
-{ 'type': 'PciDeviceInfo',
+{ 'struct': 'PciDeviceInfo',
'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
- 'class_info': {'*desc': 'str', 'class': 'int'},
- 'id': {'device': 'int', 'vendor': 'int'},
+ 'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
'*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
'regions': ['PciMemoryRegion']} }
#
# Since: 0.14.0
##
-{ 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
+{ 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
##
# @query-pci:
##
{ '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.
-#
-# @stop: for guest operations, stop the virtual machine;
-# for jobs, pause the job
-#
-# Since: 1.3
-##
-{ 'enum': 'BlockdevOnError',
- 'data': ['report', 'ignore', 'enospc', 'stop'] }
-
-##
-# @MirrorSyncMode:
-#
-# An enumeration of possible behaviors for the initial synchronization
-# phase of storage mirroring.
-#
-# @top: copies data in the topmost image to the destination
-#
-# @full: copies data from all images to the destination
-#
-# @none: only copy data written from now on
-#
-# Since: 1.3
-##
-{ 'enum': 'MirrorSyncMode',
- 'data': ['top', 'full', 'none'] }
-
-##
-# @BlockJobType:
-#
-# Type of a block job.
-#
-# @commit: block commit job type, see "block-commit"
-#
-# @stream: block stream job type, see "block-stream"
-#
-# @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:
#
##
# @inject-nmi:
#
-# Injects an Non-Maskable Interrupt into all guest's VCPUs.
+# Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
#
# Returns: If successful, nothing
#
# Since: 0.14.0
#
-# Notes: Only x86 Virtual Machines support this command.
+# Note: prior to 2.1, this command was only supported for x86 and s390 VMs
##
{ 'command': 'inject-nmi' }
##
{ '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
#
#
# Since: 1.6
###
-{ 'type': 'Abort',
+{ 'struct': 'Abort',
'data': { } }
##
#
# A discriminated record of operations that can be performed with
# @transaction.
+#
+# Since 1.1
+#
+# drive-backup since 1.6
+# abort since 1.6
+# blockdev-snapshot-internal-sync since 1.7
+# blockdev-backup since 2.3
##
{ 'union': 'TransactionAction',
'data': {
'blockdev-snapshot-sync': 'BlockdevSnapshot',
'drive-backup': 'DriveBackup',
+ 'blockdev-backup': 'BlockdevBackup',
'abort': 'Abort',
'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal'
} }
{ '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
#
#
# Since: 1.2
##
-{ 'type': 'ObjectPropertyInfo',
+{ 'struct': 'ObjectPropertyInfo',
'data': { 'name': 'str', 'type': 'str' } }
##
##
{ 'command': 'qom-get',
'data': { 'path': 'str', 'property': 'str' },
- 'returns': 'visitor',
- 'gen': 'no' }
+ 'returns': '**',
+ 'gen': false }
##
# @qom-set:
# Since: 1.2
##
{ 'command': 'qom-set',
- 'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
- 'gen': 'no' }
+ 'data': { 'path': 'str', 'property': 'str', 'value': '**' },
+ 'gen': false }
##
# @set_password:
# @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.
-#
-# @device: the device name
-#
-# @force: #optional whether to allow cancellation of a paused job (default
-# false). Since 1.3.
-#
-# Returns: Nothing on success
-# If no background operation is active on this device, DeviceNotActive
-#
-# Since: 1.1
-##
-{ 'command': 'block-job-cancel', 'data': { 'device': 'str', '*force': 'bool' } }
-
-##
-# @block-job-pause:
-#
-# Pause an active background block operation.
-#
-# 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.
-#
-# 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.
-#
-# @device: the device name
+# `+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
+# @password: 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:
+#
+# This command is multiple commands multiplexed together.
#
-# 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.
+# @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
#
-# 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.
+# @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.
#
-# A cancelled or paused job cannot be completed.
+# @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.
#
-# @device: the device name
+# 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.
#
-# Returns: Nothing on success
-# If no background operation is active on this device, DeviceNotActive
+# Notes: It is strongly recommended that this interface is not used especially
+# for changing block devices.
#
-# Since: 1.3
+# Since: 0.14.0
##
-{ 'command': 'block-job-complete', 'data': { 'device': 'str' } }
+{ 'command': 'change',
+ 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
##
# @ObjectTypeInfo:
#
# Notes: This command is experimental and may change syntax in future releases.
##
-{ 'type': 'ObjectTypeInfo',
+{ 'struct': 'ObjectTypeInfo',
'data': { 'name': 'str' } }
##
#
# @name: the name of the property
# @type: the typename of the property
+# @description: #optional if specified, the description of the property.
+# (since 2.2)
#
# Since: 1.2
##
-{ 'type': 'DevicePropertyInfo',
- 'data': { 'name': 'str', 'type': 'str' } }
+{ 'struct': 'DevicePropertyInfo',
+ 'data': { 'name': 'str', 'type': 'str', '*description': 'str' } }
##
# @device-list-properties:
{ '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
+# Note: 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
+##
+{ 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
+
# @xen-save-devices-state:
#
# Save the state of all devices to file. The RAM and the block devices
#
# Since: 2.0
##
-{ 'type': 'DumpGuestMemoryCapability',
+{ 'struct': 'DumpGuestMemoryCapability',
'data': {
'formats': ['DumpGuestMemoryFormat'] } }
##
{ 'command': 'netdev_add',
'data': {'type': 'str', 'id': 'str', '*props': '**'},
- 'gen': 'no' }
+ 'gen': false }
##
# @netdev_del:
# Since: 2.0
##
{ 'command': 'object-add',
- 'data': {'qom-type': 'str', 'id': 'str', '*props': 'dict'},
- 'gen': 'no' }
+ 'data': {'qom-type': 'str', 'id': 'str', '*props': '**'},
+ 'gen': false }
##
# @object-del:
#
# Since 1.2
##
-{ 'type': 'NetdevNoneOptions',
+{ 'struct': 'NetdevNoneOptions',
'data': { } }
##
#
# Since 1.2
##
-{ 'type': 'NetLegacyNicOptions',
+{ 'struct': 'NetLegacyNicOptions',
'data': {
'*netdev': 'str',
'*macaddr': 'str',
#
# Since 1.2
##
-{ 'type': 'String',
+{ 'struct': 'String',
'data': {
'str': 'str' } }
#
# Since 1.2
##
-{ 'type': 'NetdevUserOptions',
+{ 'struct': 'NetdevUserOptions',
'data': {
'*hostname': 'str',
'*restrict': 'bool',
#
# Since 1.2
##
-{ 'type': 'NetdevTapOptions',
+{ 'struct': 'NetdevTapOptions',
'data': {
'*ifname': 'str',
'*fd': 'str',
#
# Since 1.2
##
-{ 'type': 'NetdevSocketOptions',
+{ 'struct': 'NetdevSocketOptions',
'data': {
'*fd': 'str',
'*listen': 'str',
'*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
+##
+{ 'struct': '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
#
#
# Since 1.2
##
-{ 'type': 'NetdevVdeOptions',
+{ 'struct': 'NetdevVdeOptions',
'data': {
'*sock': 'str',
'*port': 'uint16',
#
# Since 1.2
##
-{ 'type': 'NetdevDumpOptions',
+{ 'struct': 'NetdevDumpOptions',
'data': {
'*len': 'size',
'*file': 'str' } }
#
# Since 1.2
##
-{ 'type': 'NetdevBridgeOptions',
+{ 'struct': 'NetdevBridgeOptions',
'data': {
'*br': 'str',
'*helper': 'str' } }
#
# Since 1.2
##
-{ 'type': 'NetdevHubPortOptions',
+{ 'struct': 'NetdevHubPortOptions',
'data': {
'hubid': 'int32' } }
#
# Since 2.0
##
-{ 'type': 'NetdevNetmapOptions',
+{ 'struct': 'NetdevNetmapOptions',
'data': {
'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
+##
+{ 'struct': '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
#
# Since 1.2
##
-{ 'type': 'NetLegacy',
+{ 'struct': 'NetLegacy',
'data': {
'*vlan': 'int32',
'*id': 'str',
#
# Since 1.2
##
-{ 'type': 'Netdev',
+{ 'struct': 'Netdev',
'data': {
'id': 'str',
'opts': 'NetClientOptions' } }
#
# Since 1.3
##
-{ 'type': 'InetSocketAddress',
+{ 'struct': 'InetSocketAddress',
'data': {
'host': 'str',
'port': 'str',
#
# Since 1.3
##
-{ 'type': 'UnixSocketAddress',
+{ 'struct': 'UnixSocketAddress',
'data': {
'path': 'str' } }
#
# Since: 1.2.0
##
-{ 'type': 'MachineInfo',
+{ 'struct': 'MachineInfo',
'data': { 'name': 'str', '*alias': 'str',
'*is-default': 'bool', 'cpu-max': 'int' } }
#
# Since: 1.2.0
##
-{ 'type': 'CpuDefinitionInfo',
+{ 'struct': 'CpuDefinitionInfo',
'data': { 'name': 'str' } }
##
#
# Since: 1.2.0
##
-{ 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
+{ 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
##
# @add-fd:
#
# Since: 1.2.0
##
-{ 'type': 'FdsetFdInfo',
+{ 'struct': 'FdsetFdInfo',
'data': {'fd': 'int', '*opaque': 'str'} }
##
#
# Since: 1.2.0
##
-{ 'type': 'FdsetInfo',
+{ 'struct': 'FdsetInfo',
'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
##
#
# Since: 1.2.0
##
-{ 'type': 'TargetInfo',
+{ 'struct': 'TargetInfo',
'data': { 'arch': 'str' } }
##
# Since: 1.3.0
#
# 'unmapped' and 'pause' since 2.0
+# 'ro' and 'kp_comma' since 2.4
##
{ 'enum': 'QKeyCode',
'data': [ 'unmapped',
'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
- 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause' ] }
+ 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause', 'ro',
+ 'kp_comma' ] }
##
# @KeyValue
##
{ '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:
#
#
# Since: 1.4
##
-{ 'type': 'ChardevFile', 'data': { '*in' : 'str',
+{ 'struct': 'ChardevFile', 'data': { '*in' : 'str',
'out' : 'str' } }
##
#
# Since: 1.4
##
-{ 'type': 'ChardevHostdev', 'data': { 'device' : 'str' } }
+{ 'struct': 'ChardevHostdev', 'data': { 'device' : 'str' } }
##
# @ChardevSocket:
# @nodelay: #optional set TCP_NODELAY socket option (default: false)
# @telnet: #optional enable telnet protocol on server
# sockets (default: false)
+# @reconnect: #optional For a client socket, if a socket is disconnected,
+# then attempt a reconnect after the given number of seconds.
+# Setting this to zero disables this function. (default: 0)
+# (Since: 2.2)
#
# Since: 1.4
##
-{ 'type': 'ChardevSocket', 'data': { 'addr' : 'SocketAddress',
- '*server' : 'bool',
- '*wait' : 'bool',
- '*nodelay' : 'bool',
- '*telnet' : 'bool' } }
+{ 'struct': 'ChardevSocket', 'data': { 'addr' : 'SocketAddress',
+ '*server' : 'bool',
+ '*wait' : 'bool',
+ '*nodelay' : 'bool',
+ '*telnet' : 'bool',
+ '*reconnect' : 'int' } }
##
# @ChardevUdp:
#
# Since: 1.5
##
-{ 'type': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
+{ 'struct': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
'*local' : 'SocketAddress' } }
##
#
# Since: 1.5
##
-{ 'type': 'ChardevMux', 'data': { 'chardev' : 'str' } }
+{ 'struct': 'ChardevMux', 'data': { 'chardev' : 'str' } }
##
# @ChardevStdio:
#
# Since: 1.5
##
-{ 'type': 'ChardevStdio', 'data': { '*signal' : 'bool' } }
+{ 'struct': 'ChardevStdio', 'data': { '*signal' : 'bool' } }
##
# @ChardevSpiceChannel:
#
# Since: 1.5
##
-{ 'type': 'ChardevSpiceChannel', 'data': { 'type' : 'str' } }
+{ 'struct': 'ChardevSpiceChannel', 'data': { 'type' : 'str' } }
##
# @ChardevSpicePort:
#
# Since: 1.5
##
-{ 'type': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' } }
+{ 'struct': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' } }
##
# @ChardevVC:
#
# Since: 1.5
##
-{ 'type': 'ChardevVC', 'data': { '*width' : 'int',
+{ 'struct': 'ChardevVC', 'data': { '*width' : 'int',
'*height' : 'int',
'*cols' : 'int',
'*rows' : 'int' } }
#
# Since: 1.5
##
-{ 'type': 'ChardevRingbuf', 'data': { '*size' : 'int' } }
+{ 'struct': 'ChardevRingbuf', 'data': { '*size' : 'int' } }
##
# @ChardevBackend:
#
# Configuration info for the new chardev backend.
#
-# Since: 1.4
+# Since: 1.4 (testdev since 2.2)
##
-{ 'type': 'ChardevDummy', 'data': { } }
+{ 'struct': 'ChardevDummy', 'data': { } }
{ 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
'serial' : 'ChardevHostdev',
'mux' : 'ChardevMux',
'msmouse': 'ChardevDummy',
'braille': 'ChardevDummy',
+ 'testdev': 'ChardevDummy',
'stdio' : 'ChardevStdio',
'console': 'ChardevDummy',
'spicevmc' : 'ChardevSpiceChannel',
#
# Since: 1.4
##
-{ 'type' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
+{ 'struct' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
##
# @chardev-add:
#
# Since: 1.5
##
-{ 'type': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
+{ 'struct': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
'*cancel-path' : 'str'} }
##
#
# Since: 1.5
##
-{ 'type': 'TPMInfo',
+{ 'struct': 'TPMInfo',
'data': {'id': 'str',
'model': 'TpmModel',
'options': 'TpmTypeOptions' } }
#
# Since 1.5
##
-{ 'type': 'AcpiTableOptions',
+{ 'struct': 'AcpiTableOptions',
'data': {
'*sig': 'str',
'*rev': 'uint8',
#
# @help: #optional human readable text string, not suitable for parsing.
#
+# @default: #optional default value string (since 2.1)
+#
# Since 1.5
##
-{ 'type': 'CommandLineParameterInfo',
+{ 'struct': 'CommandLineParameterInfo',
'data': { 'name': 'str',
'type': 'CommandLineParameterType',
- '*help': 'str' } }
+ '*help': 'str',
+ '*default': 'str' } }
##
# @CommandLineOptionInfo:
#
# Since 1.5
##
-{ 'type': 'CommandLineOptionInfo',
+{ 'struct': 'CommandLineOptionInfo',
'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
##
#
# Since: 1.5
##
-{ 'type': 'X86CPUFeatureWordInfo',
+{ 'struct': 'X86CPUFeatureWordInfo',
'data': { 'cpuid-input-eax': 'int',
'*cpuid-input-ecx': 'int',
'cpuid-register': 'X86CPURegister32',
# Since 1.6
##
-{ 'type': 'RxFilterInfo',
+{ 'struct': 'RxFilterInfo',
'data': {
'name': 'str',
'promiscuous': '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' ] }
##
-# @BlockdevDetectZeroesOptions
-#
-# Describes the operation mode for the automatic conversion of plain
-# zero writes by the OS to driver specific optimized zero write commands.
+# @InputButton
#
-# @off: Disabled (default)
-# @on: Enabled
-# @unmap: Enabled and even try to unmap blocks if possible. This requires
-# also that @BlockdevDiscardOptions is set to unmap for this device.
+# Position axis of a pointer input device (mouse, tablet).
#
-# Since: 2.1
+# Since: 2.0
##
-{ 'enum': 'BlockdevDetectZeroesOptions',
- 'data': [ 'off', 'on', 'unmap' ] }
+{ 'enum' : 'InputAxis',
+ 'data' : [ 'X', 'Y' ] }
##
-# @BlockdevAioOptions
+# @InputKeyEvent
#
-# Selects the AIO backend to handle I/O requests
+# Keyboard input event.
#
-# @threads: Use qemu's thread pool
-# @native: Use native AIO backend (only Linux and Windows)
+# @key: Which key this event is for.
+# @down: True for key-down and false for key-up events.
#
-# Since: 1.7
+# Since: 2.0
##
-{ 'enum': 'BlockdevAioOptions',
- 'data': [ 'threads', 'native' ] }
+{ 'struct' : 'InputKeyEvent',
+ 'data' : { 'key' : 'KeyValue',
+ 'down' : 'bool' } }
##
-# @BlockdevCacheOptions
+# @InputBtnEvent
#
-# Includes cache-related options for block devices
+# Pointer button 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)
+# @button: Which button 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' } }
+{ 'struct' : 'InputBtnEvent',
+ 'data' : { 'button' : 'InputButton',
+ 'down' : 'bool' } }
##
-# @BlockdevDriver
+# @InputMoveEvent
#
-# Drivers that are supported in block device operations.
+# Pointer motion input event.
#
-# @host_device, @host_cdrom, @host_floppy: Since 2.1
+# @axis: Which axis is referenced by @value.
+# @value: Pointer position. For absolute coordinates the
+# valid range is 0 -> 0x7ffff
#
# Since: 2.0
##
-{ 'enum': 'BlockdevDriver',
- 'data': [ 'file', 'host_device', 'host_cdrom', 'host_floppy',
- 'http', 'https', 'ftp', 'ftps', 'tftp', 'vvfat', 'blkdebug',
- 'blkverify', 'bochs', 'cloop', 'cow', 'dmg', 'parallels', 'qcow',
- 'qcow2', 'qed', 'raw', 'vdi', 'vhdx', 'vmdk', 'vpc', 'quorum' ] }
+{ 'struct' : 'InputMoveEvent',
+ 'data' : { 'axis' : 'InputAxis',
+ 'value' : 'int' } }
##
-# @BlockdevOptionsBase
+# @InputEvent
#
-# Options that are available for all block devices, independent of the block
-# driver.
+# Input event union.
#
-# @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)
-# @detect-zeroes: #optional detect and optimize zero writes (Since 2.1)
-# (default: off)
+# @key: Input event of Keyboard
+# @btn: Input event of pointer buttons
+# @rel: Input event of relative pointer motion
+# @abs: Input event of absolute pointer motion
#
-# 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',
- '*detect-zeroes': 'BlockdevDetectZeroesOptions' } }
+{ 'union' : 'InputEvent',
+ 'data' : { 'key' : 'InputKeyEvent',
+ 'btn' : 'InputBtnEvent',
+ 'rel' : 'InputMoveEvent',
+ 'abs' : 'InputMoveEvent' } }
##
-# @BlockdevOptionsFile
+# @x-input-send-event
#
-# Driver specific block device options for the file backend and similar
-# protocols.
+# Send input event(s) to guest.
#
-# @filename: path to the image file
-#
-# Since: 1.7
-##
-{ 'type': 'BlockdevOptionsFile',
- 'data': { 'filename': 'str' } }
+# @console: #optional console to send event(s) to.
+# This parameter can be used to send the input event to
+# specific input devices in case (a) multiple input devices
+# of the same kind are added to the virtual machine and (b)
+# you have configured input routing (see docs/multiseat.txt)
+# for those input devices. If input routing is not
+# configured this parameter has no effect.
+# If @console is missing, only devices that aren't associated
+# with a console are admissible.
+# If @console is specified, it must exist, and both devices
+# associated with that console and devices not associated with a
+# console are admissible, but the former take precedence.
-##
-# @BlockdevOptionsVVFAT
-#
-# Driver specific block device options for the vvfat protocol.
#
-# @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)
+# @events: List of InputEvent union.
#
-# Since: 1.7
-##
-{ 'type': 'BlockdevOptionsVVFAT',
- 'data': { 'dir': 'str', '*fat-type': 'int', '*floppy': 'bool',
- '*rw': 'bool' } }
-
-##
-# @BlockdevOptionsGenericFormat
+# Returns: Nothing on success.
#
-# Driver specific block device options for image format that have no option
-# besides their data source.
+# Since: 2.2
#
-# @file: reference to or definition of the data source block device
+# Note: this command is experimental, and not a stable API.
#
-# Since: 1.7
##
-{ 'type': 'BlockdevOptionsGenericFormat',
- 'data': { 'file': 'BlockdevRef' } }
+{ 'command': 'x-input-send-event',
+ 'data': { '*console':'int', 'events': [ 'InputEvent' ] } }
##
-# @BlockdevOptionsGenericCOWFormat
+# @NumaOptions
#
-# Driver specific block device options for image format that have no option
-# besides their data source and an optional backing file.
+# A discriminated record of NUMA options. (for OptsVisitor)
#
-# @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.
-#
-# Since: 1.7
+# Since 2.1
##
-{ 'type': 'BlockdevOptionsGenericCOWFormat',
- 'base': 'BlockdevOptionsGenericFormat',
- 'data': { '*backing': 'BlockdevRef' } }
+{ 'union': 'NumaOptions',
+ 'data': {
+ 'node': 'NumaNodeOptions' }}
##
-# @BlockdevOptionsQcow2
+# @NumaNodeOptions
#
-# Driver specific block device options for qcow2.
+# Create a guest NUMA node. (for OptsVisitor)
#
-# @lazy-refcounts: #optional whether to enable the lazy refcounts
-# feature (default is taken from the image file)
+# @nodeid: #optional NUMA node ID (increase by 1 from 0 if omitted)
#
-# @pass-discard-request: #optional whether discard requests to the qcow2
-# device should be forwarded to the data source
+# @cpus: #optional VCPUs belonging to this node (assign VCPUS round-robin
+# if omitted)
#
-# @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
+# @mem: #optional memory size of this node; mutually exclusive with @memdev.
+# Equally divide total memory among nodes if both @mem and @memdev are
+# omitted.
#
-# @pass-discard-other: #optional whether discard requests for the data source
-# should be issued on other occasions where a cluster
-# gets freed
+# @memdev: #optional memory backend object. If specified for one node,
+# it must be specified for all nodes.
#
-# Since: 1.7
+# Since: 2.1
##
-{ 'type': 'BlockdevOptionsQcow2',
- 'base': 'BlockdevOptionsGenericCOWFormat',
- 'data': { '*lazy-refcounts': 'bool',
- '*pass-discard-request': 'bool',
- '*pass-discard-snapshot': 'bool',
- '*pass-discard-other': 'bool' } }
+{ 'struct': 'NumaNodeOptions',
+ 'data': {
+ '*nodeid': 'uint16',
+ '*cpus': ['uint16'],
+ '*mem': 'size',
+ '*memdev': 'str' }}
##
-# @BlkdebugEvent
+# @HostMemPolicy
#
-# Trigger events supported by blkdebug.
+# Host memory policy types
+#
+# @default: restore default policy, remove any nondefault policy
+#
+# @preferred: set the preferred host nodes for allocation
+#
+# @bind: a strict policy that restricts memory allocation to the
+# host nodes specified
+#
+# @interleave: memory allocations are interleaved across the set
+# of host nodes specified
+#
+# 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' } }
+
+{ 'struct': 'Memdev',
+ 'data': {
+ 'size': 'size',
+ 'merge': 'bool',
+ 'dump': 'bool',
+ 'prealloc': 'bool',
+ 'host-nodes': ['uint16'],
+ 'policy': 'HostMemPolicy' }}
##
-# @BlkdebugSetStateOptions
-#
-# Describes a single state-change event for blkdebug.
+# @query-memdev:
#
-# @event: trigger event
+# Returns information for all memory backends.
#
-# @state: #optional the current state identifier blkdebug needs to be in;
-# defaults to "any"
+# Returns: a list of @Memdev.
#
-# @new_state: the state identifier blkdebug is supposed to assume if
-# this event is triggered
-#
-# 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'] } }
+{ 'struct': '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',
- 'host_device':'BlockdevOptionsFile',
- 'host_cdrom': 'BlockdevOptionsFile',
- 'host_floppy':'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' ] }
+{ 'struct': '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
+#
+# @inject-nmi: a non-maskable interrupt is injected into the first VCPU (all
+# VCPUS on x86) (since 2.4)
+#
+# Since: 2.1
##
-{ 'type' : 'InputKeyEvent',
- 'data' : { 'key' : 'KeyValue',
- 'down' : 'bool' } }
+{ 'enum': 'WatchdogExpirationAction',
+ 'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
+ 'inject-nmi' ] }
##
-# @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' }
+
+# Rocker ethernet network switch
+{ 'include': 'qapi/rocker.json' }