X-Git-Url: https://repo.jachan.dev/qemu.git/blobdiff_plain/0042109a6ab629aebfb287ff7aee295f24fad40d..c8e829b7bf6e1c84af8b4b13ee7fce2959c63e0e:/qapi-schema.json diff --git a/qapi-schema.json b/qapi-schema.json index e65b7b1489..563b4ad98a 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -8,6 +8,12 @@ # QAPI block definitions { 'include': 'qapi/block.json' } +# QAPI event definitions +{ 'include': 'qapi/event.json' } + +# Tracing commands +{ 'include': 'qapi/trace.json' } + ## # LostTickPolicy: # @@ -211,12 +217,18 @@ # # @filename: the filename of the character device # +# @frontend-open: shows whether the frontend device attached to this backend +# (eg. with the chardev=... option) is in open or closed state +# (since 2.1) +# # Notes: @filename is encoded using the QEMU command line character device # encoding. See the QEMU man page for details. # # Since: 0.14.0 ## -{ 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} } +{ 'type': 'ChardevInfo', 'data': {'label': 'str', + 'filename': 'str', + 'frontend-open': 'bool'} } ## # @query-chardev: @@ -630,21 +642,60 @@ { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] } ## -# @VncClientInfo: +# @NetworkAddressFamily # -# Information about a connected VNC client. +# The network address family +# +# @ipv4: IPV4 family +# +# @ipv6: IPV6 family # -# @host: The host name of the client. QEMU tries to resolve this to a DNS name -# when possible. +# @unix: unix socket +# +# @unknown: otherwise +# +# Since: 2.1 +## +{ 'enum': 'NetworkAddressFamily', + 'data': [ 'ipv4', 'ipv6', 'unix', 'unknown' ] } + +## +# @VncBasicInfo # -# @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 +# The basic information for vnc network connection # -# @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. +# @host: IP address +# +# @service: The service name of the vnc port. This may depend on the host +# system's service database so symbolic names should not be relied +# on. +# +# @family: address family +# +# Since: 2.1 +## +{ 'type': 'VncBasicInfo', + 'data': { 'host': 'str', + 'service': 'str', + 'family': 'NetworkAddressFamily' } } + +## +# @VncServerInfo +# +# The network connection information for server +# +# @auth: #optional, authentication method +# +# Since: 2.1 +## +{ 'type': 'VncServerInfo', + 'base': 'VncBasicInfo', + 'data': { '*auth': 'str' } } + +## +# @VncClientInfo: +# +# Information about a connected VNC client. # # @x509_dname: #optional If x509 authentication is in use, the Distinguished # Name of the client. @@ -655,8 +706,8 @@ # Since: 0.14.0 ## { 'type': 'VncClientInfo', - 'data': {'host': 'str', 'family': 'str', 'service': 'str', - '*x509_dname': 'str', '*sasl_username': 'str'} } + 'base': 'VncBasicInfo', + 'data': { '*x509_dname': 'str', '*sasl_username': 'str' } } ## # @VncInfo: @@ -695,7 +746,8 @@ # Since: 0.14.0 ## { 'type': 'VncInfo', - 'data': {'enabled': 'bool', '*host': 'str', '*family': 'str', + 'data': {'enabled': 'bool', '*host': 'str', + '*family': 'NetworkAddressFamily', '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} } ## @@ -710,19 +762,40 @@ { 'command': 'query-vnc', 'returns': 'VncInfo' } ## -# @SpiceChannel +# @SpiceBasicInfo # -# Information about a SPICE client channel. +# The basic information for SPICE network connection +# +# @host: IP address +# +# @port: port number +# +# @family: address family +# +# Since: 2.1 +## +{ 'type': 'SpiceBasicInfo', + 'data': { 'host': 'str', + 'port': 'str', + 'family': 'NetworkAddressFamily' } } + +## +# @SpiceServerInfo # -# @host: The host name of the client. QEMU tries to resolve this to a DNS name -# when possible. +# Information about a SPICE server # -# @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 +# @auth: #optional, authentication method +# +# Since: 2.1 +## +{ 'type': 'SpiceServerInfo', + 'base': 'SpiceBasicInfo', + 'data': { '*auth': 'str' } } + +## +# @SpiceChannel # -# @port: The client's port number. +# Information about a SPICE client channel. # # @connection-id: SPICE connection id number. All channels with the same id # belong to the same SPICE session. @@ -740,8 +813,8 @@ # Since: 0.14.0 ## { 'type': 'SpiceChannel', - 'data': {'host': 'str', 'family': 'str', 'port': 'str', - 'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int', + 'base': 'SpiceBasicInfo', + 'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int', 'tls': 'bool'} } ## @@ -1116,13 +1189,13 @@ ## # @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' } @@ -1460,7 +1533,7 @@ # # Change the VNC server password. # -# @target: the new password to use with VNC authentication +# @password: the new password to use with VNC authentication # # Since: 1.1 # @@ -1542,11 +1615,13 @@ # # @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' } } + 'data': { 'name': 'str', 'type': 'str', '*description': 'str' } } ## # @device-list-properties: @@ -1979,6 +2054,62 @@ '*localaddr': 'str', '*udp': 'str' } } +## +# @NetdevL2TPv3Options +# +# Connect the VLAN to Ethernet over L2TPv3 Static tunnel +# +# @src: source address +# +# @dst: destination address +# +# @srcport: #optional source port - mandatory for udp, optional for ip +# +# @dstport: #optional destination port - mandatory for udp, optional for ip +# +# @ipv6: #optional - force the use of ipv6 +# +# @udp: #optional - use the udp version of l2tpv3 encapsulation +# +# @cookie64: #optional - use 64 bit coookies +# +# @counter: #optional have sequence counter +# +# @pincounter: #optional pin sequence counter to zero - +# workaround for buggy implementations or +# networks with packet reorder +# +# @txcookie: #optional 32 or 64 bit transmit cookie +# +# @rxcookie: #optional 32 or 64 bit receive cookie +# +# @txsession: 32 bit transmit session +# +# @rxsession: #optional 32 bit receive session - if not specified +# set to the same value as transmit +# +# @offset: #optional additional offset - allows the insertion of +# additional application-specific data before the packet payload +# +# Since 2.1 +## +{ 'type': 'NetdevL2TPv3Options', + 'data': { + 'src': 'str', + 'dst': 'str', + '*srcport': 'str', + '*dstport': 'str', + '*ipv6': 'bool', + '*udp': 'bool', + '*cookie64': 'bool', + '*counter': 'bool', + '*pincounter': 'bool', + '*txcookie': 'uint64', + '*rxcookie': 'uint64', + 'txsession': 'uint32', + '*rxsession': 'uint32', + '*offset': 'uint32' } } + ## # @NetdevVdeOptions # @@ -2090,6 +2221,9 @@ # A discriminated record of network device traits. # # Since 1.2 +# +# 'l2tpv3' - since 2.1 +# ## { 'union': 'NetClientOptions', 'data': { @@ -2097,6 +2231,7 @@ 'nic': 'NetLegacyNicOptions', 'user': 'NetdevUserOptions', 'tap': 'NetdevTapOptions', + 'l2tpv3': 'NetdevL2TPv3Options', 'socket': 'NetdevSocketOptions', 'vde': 'NetdevVdeOptions', 'dump': 'NetdevDumpOptions', @@ -2518,14 +2653,19 @@ # @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' } } +{ 'type': 'ChardevSocket', 'data': { 'addr' : 'SocketAddress', + '*server' : 'bool', + '*wait' : 'bool', + '*nodelay' : 'bool', + '*telnet' : 'bool', + '*reconnect' : 'int' } } ## # @ChardevUdp: @@ -2619,7 +2759,7 @@ # # Configuration info for the new chardev backend. # -# Since: 1.4 +# Since: 1.4 (testdev since 2.2) ## { 'type': 'ChardevDummy', 'data': { } } @@ -2634,6 +2774,7 @@ 'mux' : 'ChardevMux', 'msmouse': 'ChardevDummy', 'braille': 'ChardevDummy', + 'testdev': 'ChardevDummy', 'stdio' : 'ChardevStdio', 'console': 'ChardevDummy', 'spicevmc' : 'ChardevSpiceChannel', @@ -3090,6 +3231,11 @@ # # Input event union. # +# @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: 2.0 ## { 'union' : 'InputEvent', @@ -3098,6 +3244,25 @@ 'rel' : 'InputMoveEvent', 'abs' : 'InputMoveEvent' } } +## +# @x-input-send-event +# +# Send input event(s) to guest. +# +# @console: #optional console to send event(s) to. +# +# @events: List of InputEvent union. +# +# Returns: Nothing on success. +# +# Since: 2.2 +# +# Note: this command is experimental, and not a stable API. +# +## +{ 'command': 'x-input-send-event', + 'data': { '*console':'int', 'events': [ 'InputEvent' ] } } + ## # @NumaOptions # @@ -3119,8 +3284,12 @@ # @cpus: #optional VCPUs belonging to this node (assign VCPUS round-robin # if omitted) # -# @mem: #optional memory size of this node (equally divide total memory among -# nodes if omitted) +# @mem: #optional memory size of this node; mutually exclusive with @memdev. +# Equally divide total memory among nodes if both @mem and @memdev are +# omitted. +# +# @memdev: #optional memory backend object. If specified for one node, +# it must be specified for all nodes. # # Since: 2.1 ## @@ -3128,4 +3297,221 @@ 'data': { '*nodeid': 'uint16', '*cpus': ['uint16'], - '*mem': 'size' }} + '*mem': 'size', + '*memdev': 'str' }} + +## +# @HostMemPolicy +# +# 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': 'HostMemPolicy', + 'data': [ 'default', 'preferred', 'bind', 'interleave' ] } + +## +# @Memdev: +# +# Information about memory backend +# +# @size: memory backend size +# +# @merge: enables or disables memory merge support +# +# @dump: includes memory backend's memory in a core dump or not +# +# @prealloc: enables or disables memory preallocation +# +# @host-nodes: host nodes for its memory policy +# +# @policy: memory policy of memory backend +# +# Since: 2.1 +## + +{ 'type': 'Memdev', + 'data': { + 'size': 'size', + 'merge': 'bool', + 'dump': 'bool', + 'prealloc': 'bool', + 'host-nodes': ['uint16'], + 'policy': 'HostMemPolicy' }} + +## +# @query-memdev: +# +# Returns information for all memory backends. +# +# Returns: a list of @Memdev. +# +# Since: 2.1 +## +{ 'command': 'query-memdev', 'returns': ['Memdev'] } + +## +# @PCDIMMDeviceInfo: +# +# PCDIMMDevice state information +# +# @id: #optional device's ID +# +# @addr: physical address, where device is mapped +# +# @size: size of memory that the device provides +# +# @slot: slot number at which device is plugged in +# +# @node: NUMA node number where device is plugged in +# +# @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': 'PCDIMMDeviceInfo', + 'data': { '*id': 'str', + 'addr': 'int', + 'size': 'int', + 'slot': 'int', + 'node': 'int', + 'memdev': 'str', + 'hotplugged': 'bool', + 'hotpluggable': 'bool' + } +} + +## +# @MemoryDeviceInfo: +# +# Union containing information about a memory device +# +# Since: 2.1 +## +{ 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} } + +## +# @query-memory-devices +# +# Lists available memory devices and their state +# +# Since: 2.1 +## +{ 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] } + +## @ACPISlotType +# +# @DIMM: memory slot +# +{ 'enum': 'ACPISlotType', 'data': [ 'DIMM' ] } + +## @ACPIOSTInfo +# +# 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. +# +# @device: #optional device ID associated with slot +# +# @slot: slot ID, unique per slot of a given @slot-type +# +# @slot-type: type of the slot +# +# @source: an integer containing the source event +# +# @status: an integer containing the status code +# +# Since: 2.1 +## +{ 'type': 'ACPIOSTInfo', + 'data' : { '*device': 'str', + 'slot': 'str', + 'slot-type': 'ACPISlotType', + 'source': 'int', + 'status': 'int' } } + +## +# @query-acpi-ospm-status +# +# Lists ACPI OSPM status of ACPI device objects, +# which might be reported via _OST method +# +# Since: 2.1 +## +{ 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] } + +## +# @WatchdogExpirationAction +# +# An enumeration of the actions taken when the watchdog device's timer is +# expired +# +# @reset: system resets +# +# @shutdown: system shutdown, note that it is similar to @powerdown, which +# tries to set to system status and notify guest +# +# @poweroff: system poweroff, the emulator program exits +# +# @pause: system pauses, similar to @stop +# +# @debug: system enters debug state +# +# @none: nothing is done +# +# Since: 2.1 +## +{ 'enum': 'WatchdogExpirationAction', + 'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none' ] } + +## +# @IoOperationType +# +# An enumeration of the I/O operation types +# +# @read: read operation +# +# @write: write operation +# +# Since: 2.1 +## +{ 'enum': 'IoOperationType', + 'data': [ 'read', 'write' ] } + +## +# @GuestPanicAction +# +# An enumeration of the actions taken when guest OS panic is detected +# +# @pause: system pauses +# +# Since: 2.1 +## +{ 'enum': 'GuestPanicAction', + 'data': [ 'pause' ] } + +## +# @rtc-reset-reinjection +# +# 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.1 +## +{ 'command': 'rtc-reset-reinjection' }