target/s390x: Fix SQXBR
[qemu/ar7.git] / docs / interop / vhost-user.json
blobef8ac5941f5c8d14402566a984a0a0876d768c19
1 # -*- Mode: Python -*-
3 # Copyright (C) 2018 Red Hat, Inc.
5 # Authors:
6 #  Marc-AndrĂ© Lureau <marcandre.lureau@redhat.com>
8 # This work is licensed under the terms of the GNU GPL, version 2 or
9 # later. See the COPYING file in the top-level directory.
12 # = vhost user backend discovery & capabilities
16 # @VHostUserBackendType:
18 # List the various vhost user backend types.
20 # @9p: 9p virtio console
21 # @balloon: virtio balloon
22 # @block: virtio block
23 # @caif: virtio caif
24 # @console: virtio console
25 # @crypto: virtio crypto
26 # @gpu: virtio gpu
27 # @input: virtio input
28 # @net: virtio net
29 # @rng: virtio rng
30 # @rpmsg: virtio remote processor messaging
31 # @rproc-serial: virtio remoteproc serial link
32 # @scsi: virtio scsi
33 # @vsock: virtio vsock transport
34 # @fs: virtio fs (since 4.2)
36 # Since: 4.0
39   'enum': 'VHostUserBackendType',
40   'data': [
41       '9p',
42       'balloon',
43       'block',
44       'caif',
45       'console',
46       'crypto',
47       'gpu',
48       'input',
49       'net',
50       'rng',
51       'rpmsg',
52       'rproc-serial',
53       'scsi',
54       'vsock',
55       'fs'
56   ]
60 # @VHostUserBackendBlockFeature:
62 # List of vhost user "block" features.
64 # @read-only: The --read-only command line option is supported.
65 # @blk-file: The --blk-file command line option is supported.
67 # Since: 5.0
70   'enum': 'VHostUserBackendBlockFeature',
71   'data': [ 'read-only', 'blk-file' ]
75 # @VHostUserBackendCapabilitiesBlock:
77 # Capabilities reported by vhost user "block" backends
79 # @features: list of supported features.
81 # Since: 5.0
84   'struct': 'VHostUserBackendCapabilitiesBlock',
85   'data': {
86     'features': [ 'VHostUserBackendBlockFeature' ]
87   }
91 # @VHostUserBackendInputFeature:
93 # List of vhost user "input" features.
95 # @evdev-path: The --evdev-path command line option is supported.
96 # @no-grab: The --no-grab command line option is supported.
98 # Since: 4.0
101   'enum': 'VHostUserBackendInputFeature',
102   'data': [ 'evdev-path', 'no-grab' ]
106 # @VHostUserBackendCapabilitiesInput:
108 # Capabilities reported by vhost user "input" backends
110 # @features: list of supported features.
112 # Since: 4.0
115   'struct': 'VHostUserBackendCapabilitiesInput',
116   'data': {
117     'features': [ 'VHostUserBackendInputFeature' ]
118   }
122 # @VHostUserBackendGPUFeature:
124 # List of vhost user "gpu" features.
126 # @render-node: The --render-node command line option is supported.
127 # @virgl: The --virgl command line option is supported.
129 # Since: 4.0
132   'enum': 'VHostUserBackendGPUFeature',
133   'data': [ 'render-node', 'virgl' ]
137 # @VHostUserBackendCapabilitiesGPU:
139 # Capabilities reported by vhost user "gpu" backends.
141 # @features: list of supported features.
143 # Since: 4.0
146   'struct': 'VHostUserBackendCapabilitiesGPU',
147   'data': {
148     'features': [ 'VHostUserBackendGPUFeature' ]
149   }
153 # @VHostUserBackendCapabilities:
155 # Capabilities reported by vhost user backends.
157 # @type: The vhost user backend type.
159 # Since: 4.0
162   'union': 'VHostUserBackendCapabilities',
163   'base': { 'type': 'VHostUserBackendType' },
164   'discriminator': 'type',
165   'data': {
166     'input': 'VHostUserBackendCapabilitiesInput',
167     'gpu': 'VHostUserBackendCapabilitiesGPU'
168   }
172 # @VhostUserBackend:
174 # Describes a vhost user backend to management software.
176 # It is possible for multiple @VhostUserBackend elements to match the
177 # search criteria of management software. Applications thus need rules
178 # to pick one of the many matches, and users need the ability to
179 # override distro defaults.
181 # It is recommended to create vhost user backend JSON files (each
182 # containing a single @VhostUserBackend root element) with a
183 # double-digit prefix, for example "50-qemu-gpu.json",
184 # "50-crosvm-gpu.json", etc, so they can be sorted in predictable
185 # order. The backend JSON files should be searched for in three
186 # directories:
188 #   - /usr/share/qemu/vhost-user -- populated by distro-provided
189 #                                   packages (XDG_DATA_DIRS covers
190 #                                   /usr/share by default),
192 #   - /etc/qemu/vhost-user -- exclusively for sysadmins' local additions,
194 #   - $XDG_CONFIG_HOME/qemu/vhost-user -- exclusively for per-user local
195 #                                         additions (XDG_CONFIG_HOME
196 #                                         defaults to $HOME/.config).
198 # Top-down, the list of directories goes from general to specific.
200 # Management software should build a list of files from all three
201 # locations, then sort the list by filename (i.e., basename
202 # component). Management software should choose the first JSON file on
203 # the sorted list that matches the search criteria. If a more specific
204 # directory has a file with same name as a less specific directory,
205 # then the file in the more specific directory takes effect. If the
206 # more specific file is zero length, it hides the less specific one.
208 # For example, if a distro ships
210 #   - /usr/share/qemu/vhost-user/50-qemu-gpu.json
212 #   - /usr/share/qemu/vhost-user/50-crosvm-gpu.json
214 # then the sysadmin can prevent the default QEMU GPU being used at all with
216 #   $ touch /etc/qemu/vhost-user/50-qemu-gpu.json
218 # The sysadmin can replace/alter the distro default QEMU GPU with
220 #   $ vim /etc/qemu/vhost-user/50-qemu-gpu.json
222 # or they can provide a parallel QEMU GPU with higher priority
224 #   $ vim /etc/qemu/vhost-user/10-qemu-gpu.json
226 # or they can provide a parallel QEMU GPU with lower priority
228 #   $ vim /etc/qemu/vhost-user/99-qemu-gpu.json
230 # @type: The vhost user backend type.
232 # @description: Provides a human-readable description of the backend.
233 #               Management software may or may not display @description.
235 # @binary: Absolute path to the backend binary.
237 # @tags: An optional list of auxiliary strings associated with the
238 #        backend for which @description is not appropriate, due to the
239 #        latter's possible exposure to the end-user. @tags serves
240 #        development and debugging purposes only, and management
241 #        software shall explicitly ignore it.
243 # Since: 4.0
245 # Example:
247 # {
248 #   "description": "QEMU vhost-user-gpu",
249 #   "type": "gpu",
250 #   "binary": "/usr/libexec/qemu/vhost-user-gpu",
251 #   "tags": [
252 #     "CONFIG_OPENGL_DMABUF=y"
253 #   ]
254 # }
258   'struct' : 'VhostUserBackend',
259   'data'   : {
260     'description': 'str',
261     'type': 'VHostUserBackendType',
262     'binary': 'str',
263     '*tags': [ 'str' ]
264   }