qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

qapi-schema: Collect sockets stuff in qapi/sockets.json

Cc: "Daniel P. Berrange" <berrange@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1503602048-12268-5-git-send-email-armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

+164 -153
+1
MAINTAINERS
··· 1535 1535 S: Maintained 1536 1536 F: include/qemu/sockets.h 1537 1537 F: util/qemu-sockets.c 1538 + F: qapi/sockets.json 1538 1539 1539 1540 Throttling infrastructure 1540 1541 M: Alberto Garcia <berto@igalia.com>
+3 -1
Makefile
··· 410 410 411 411 qapi-modules = $(SRC_PATH)/qapi-schema.json $(SRC_PATH)/qapi/common.json \ 412 412 $(SRC_PATH)/qapi/block.json $(SRC_PATH)/qapi/block-core.json \ 413 + $(SRC_PATH)/qapi/crypto.json \ 413 414 $(SRC_PATH)/qapi/event.json $(SRC_PATH)/qapi/introspect.json \ 414 - $(SRC_PATH)/qapi/crypto.json $(SRC_PATH)/qapi/rocker.json \ 415 + $(SRC_PATH)/qapi/rocker.json \ 416 + $(SRC_PATH)/qapi/sockets.json \ 415 417 $(SRC_PATH)/qapi/trace.json 416 418 417 419 qapi-types.c qapi-types.h :\
+1 -151
qapi-schema.json
··· 79 79 # include it first in qapi-schema.json. 80 80 81 81 { 'include': 'qapi/common.json' } 82 + { 'include': 'qapi/sockets.json' } 82 83 { 'include': 'qapi/crypto.json' } 83 84 { 'include': 'qapi/block.json' } 84 85 { 'include': 'qapi/rocker.json' } ··· 1614 1615 # 1615 1616 ## 1616 1617 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] } 1617 - 1618 - ## 1619 - # @NetworkAddressFamily: 1620 - # 1621 - # The network address family 1622 - # 1623 - # @ipv4: IPV4 family 1624 - # 1625 - # @ipv6: IPV6 family 1626 - # 1627 - # @unix: unix socket 1628 - # 1629 - # @vsock: vsock family (since 2.8) 1630 - # 1631 - # @unknown: otherwise 1632 - # 1633 - # Since: 2.1 1634 - ## 1635 - { 'enum': 'NetworkAddressFamily', 1636 - 'data': [ 'ipv4', 'ipv6', 'unix', 'vsock', 'unknown' ] } 1637 1618 1638 1619 ## 1639 1620 # @VncBasicInfo: ··· 3696 3677 '*vectors': 'uint32' } } 3697 3678 3698 3679 ## 3699 - # @String: 3700 - # 3701 - # A fat type wrapping 'str', to be embedded in lists. 3702 - # 3703 - # Since: 1.2 3704 - ## 3705 - { 'struct': 'String', 3706 - 'data': { 3707 - 'str': 'str' } } 3708 - 3709 - ## 3710 3680 # @NetdevUserOptions: 3711 3681 # 3712 3682 # Use the user mode network stack which requires no administrator privilege to ··· 4155 4125 ## 4156 4126 { 'enum': 'NetFilterDirection', 4157 4127 'data': [ 'all', 'rx', 'tx' ] } 4158 - 4159 - ## 4160 - # @InetSocketAddressBase: 4161 - # 4162 - # @host: host part of the address 4163 - # @port: port part of the address 4164 - ## 4165 - { 'struct': 'InetSocketAddressBase', 4166 - 'data': { 4167 - 'host': 'str', 4168 - 'port': 'str' } } 4169 - 4170 - ## 4171 - # @InetSocketAddress: 4172 - # 4173 - # Captures a socket address or address range in the Internet namespace. 4174 - # 4175 - # @numeric: true if the host/port are guaranteed to be numeric, 4176 - # false if name resolution should be attempted. Defaults to false. 4177 - # (Since 2.9) 4178 - # 4179 - # @to: If present, this is range of possible addresses, with port 4180 - # between @port and @to. 4181 - # 4182 - # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6 4183 - # 4184 - # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6 4185 - # 4186 - # Since: 1.3 4187 - ## 4188 - { 'struct': 'InetSocketAddress', 4189 - 'base': 'InetSocketAddressBase', 4190 - 'data': { 4191 - '*numeric': 'bool', 4192 - '*to': 'uint16', 4193 - '*ipv4': 'bool', 4194 - '*ipv6': 'bool' } } 4195 - 4196 - ## 4197 - # @UnixSocketAddress: 4198 - # 4199 - # Captures a socket address in the local ("Unix socket") namespace. 4200 - # 4201 - # @path: filesystem path to use 4202 - # 4203 - # Since: 1.3 4204 - ## 4205 - { 'struct': 'UnixSocketAddress', 4206 - 'data': { 4207 - 'path': 'str' } } 4208 - 4209 - ## 4210 - # @VsockSocketAddress: 4211 - # 4212 - # Captures a socket address in the vsock namespace. 4213 - # 4214 - # @cid: unique host identifier 4215 - # @port: port 4216 - # 4217 - # Note: string types are used to allow for possible future hostname or 4218 - # service resolution support. 4219 - # 4220 - # Since: 2.8 4221 - ## 4222 - { 'struct': 'VsockSocketAddress', 4223 - 'data': { 4224 - 'cid': 'str', 4225 - 'port': 'str' } } 4226 - 4227 - ## 4228 - # @SocketAddressLegacy: 4229 - # 4230 - # Captures the address of a socket, which could also be a named file descriptor 4231 - # 4232 - # Note: This type is deprecated in favor of SocketAddress. The 4233 - # difference between SocketAddressLegacy and SocketAddress is that the 4234 - # latter is a flat union rather than a simple union. Flat is nicer 4235 - # because it avoids nesting on the wire, i.e. that form has fewer {}. 4236 - 4237 - # 4238 - # Since: 1.3 4239 - ## 4240 - { 'union': 'SocketAddressLegacy', 4241 - 'data': { 4242 - 'inet': 'InetSocketAddress', 4243 - 'unix': 'UnixSocketAddress', 4244 - 'vsock': 'VsockSocketAddress', 4245 - 'fd': 'String' } } 4246 - 4247 - ## 4248 - # @SocketAddressType: 4249 - # 4250 - # Available SocketAddress types 4251 - # 4252 - # @inet: Internet address 4253 - # 4254 - # @unix: Unix domain socket 4255 - # 4256 - # Since: 2.9 4257 - ## 4258 - { 'enum': 'SocketAddressType', 4259 - 'data': [ 'inet', 'unix', 'vsock', 'fd' ] } 4260 - 4261 - ## 4262 - # @SocketAddress: 4263 - # 4264 - # Captures the address of a socket, which could also be a named file 4265 - # descriptor 4266 - # 4267 - # @type: Transport type 4268 - # 4269 - # Since: 2.9 4270 - ## 4271 - { 'union': 'SocketAddress', 4272 - 'base': { 'type': 'SocketAddressType' }, 4273 - 'discriminator': 'type', 4274 - 'data': { 'inet': 'InetSocketAddress', 4275 - 'unix': 'UnixSocketAddress', 4276 - 'vsock': 'VsockSocketAddress', 4277 - 'fd': 'String' } } 4278 4128 4279 4129 ## 4280 4130 # @getfd:
+1 -1
qapi/block-core.json
··· 4 4 # == QAPI block core definitions (vm unrelated) 5 5 ## 6 6 7 - # QAPI common definitions 8 7 { 'include': 'common.json' } 8 + { 'include': 'sockets.json' } 9 9 10 10 ## 11 11 # @SnapshotInfo:
+11
qapi/common.json
··· 162 162 ## 163 163 { 'enum': 'OnOffSplit', 164 164 'data': [ 'on', 'off', 'split' ] } 165 + 166 + ## 167 + # @String: 168 + # 169 + # A fat type wrapping 'str', to be embedded in lists. 170 + # 171 + # Since: 1.2 172 + ## 173 + { 'struct': 'String', 174 + 'data': { 175 + 'str': 'str' } }
+147
qapi/sockets.json
··· 1 + # -*- Mode: Python -*- 2 + 3 + ## 4 + # = Socket data types 5 + ## 6 + 7 + { 'include': 'common.json' } 8 + 9 + ## 10 + # @NetworkAddressFamily: 11 + # 12 + # The network address family 13 + # 14 + # @ipv4: IPV4 family 15 + # 16 + # @ipv6: IPV6 family 17 + # 18 + # @unix: unix socket 19 + # 20 + # @vsock: vsock family (since 2.8) 21 + # 22 + # @unknown: otherwise 23 + # 24 + # Since: 2.1 25 + ## 26 + { 'enum': 'NetworkAddressFamily', 27 + 'data': [ 'ipv4', 'ipv6', 'unix', 'vsock', 'unknown' ] } 28 + 29 + ## 30 + # @InetSocketAddressBase: 31 + # 32 + # @host: host part of the address 33 + # @port: port part of the address 34 + ## 35 + { 'struct': 'InetSocketAddressBase', 36 + 'data': { 37 + 'host': 'str', 38 + 'port': 'str' } } 39 + 40 + ## 41 + # @InetSocketAddress: 42 + # 43 + # Captures a socket address or address range in the Internet namespace. 44 + # 45 + # @numeric: true if the host/port are guaranteed to be numeric, 46 + # false if name resolution should be attempted. Defaults to false. 47 + # (Since 2.9) 48 + # 49 + # @to: If present, this is range of possible addresses, with port 50 + # between @port and @to. 51 + # 52 + # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6 53 + # 54 + # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6 55 + # 56 + # Since: 1.3 57 + ## 58 + { 'struct': 'InetSocketAddress', 59 + 'base': 'InetSocketAddressBase', 60 + 'data': { 61 + '*numeric': 'bool', 62 + '*to': 'uint16', 63 + '*ipv4': 'bool', 64 + '*ipv6': 'bool' } } 65 + 66 + ## 67 + # @UnixSocketAddress: 68 + # 69 + # Captures a socket address in the local ("Unix socket") namespace. 70 + # 71 + # @path: filesystem path to use 72 + # 73 + # Since: 1.3 74 + ## 75 + { 'struct': 'UnixSocketAddress', 76 + 'data': { 77 + 'path': 'str' } } 78 + 79 + ## 80 + # @VsockSocketAddress: 81 + # 82 + # Captures a socket address in the vsock namespace. 83 + # 84 + # @cid: unique host identifier 85 + # @port: port 86 + # 87 + # Note: string types are used to allow for possible future hostname or 88 + # service resolution support. 89 + # 90 + # Since: 2.8 91 + ## 92 + { 'struct': 'VsockSocketAddress', 93 + 'data': { 94 + 'cid': 'str', 95 + 'port': 'str' } } 96 + 97 + ## 98 + # @SocketAddressLegacy: 99 + # 100 + # Captures the address of a socket, which could also be a named file descriptor 101 + # 102 + # Note: This type is deprecated in favor of SocketAddress. The 103 + # difference between SocketAddressLegacy and SocketAddress is that the 104 + # latter is a flat union rather than a simple union. Flat is nicer 105 + # because it avoids nesting on the wire, i.e. that form has fewer {}. 106 + 107 + # 108 + # Since: 1.3 109 + ## 110 + { 'union': 'SocketAddressLegacy', 111 + 'data': { 112 + 'inet': 'InetSocketAddress', 113 + 'unix': 'UnixSocketAddress', 114 + 'vsock': 'VsockSocketAddress', 115 + 'fd': 'String' } } 116 + 117 + ## 118 + # @SocketAddressType: 119 + # 120 + # Available SocketAddress types 121 + # 122 + # @inet: Internet address 123 + # 124 + # @unix: Unix domain socket 125 + # 126 + # Since: 2.9 127 + ## 128 + { 'enum': 'SocketAddressType', 129 + 'data': [ 'inet', 'unix', 'vsock', 'fd' ] } 130 + 131 + ## 132 + # @SocketAddress: 133 + # 134 + # Captures the address of a socket, which could also be a named file 135 + # descriptor 136 + # 137 + # @type: Transport type 138 + # 139 + # Since: 2.9 140 + ## 141 + { 'union': 'SocketAddress', 142 + 'base': { 'type': 'SocketAddressType' }, 143 + 'discriminator': 'type', 144 + 'data': { 'inet': 'InetSocketAddress', 145 + 'unix': 'UnixSocketAddress', 146 + 'vsock': 'VsockSocketAddress', 147 + 'fd': 'String' } }