3 # Copyright (C) 2018 Red Hat, Inc.
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
24 # @console: virtio console
25 # @crypto: virtio crypto
27 # @input: virtio input
30 # @rpmsg: virtio remote processor messaging
31 # @rproc-serial: virtio remoteproc serial link
33 # @vsock: virtio vsock transport
38 'enum': 'VHostUserBackendType',
58 # @VHostUserBackendBlockFeature:
60 # List of vhost user "block" features.
62 # @read-only: The --read-only command line option is supported.
63 # @blk-file: The --blk-file command line option is supported.
68 'enum': 'VHostUserBackendBlockFeature',
69 'data': [ 'read-only', 'blk-file' ]
73 # @VHostUserBackendCapabilitiesBlock:
75 # Capabilities reported by vhost user "block" backends
77 # @features: list of supported features.
82 'struct': 'VHostUserBackendCapabilitiesBlock',
84 'features': [ 'VHostUserBackendBlockFeature' ]
89 # @VHostUserBackendInputFeature:
91 # List of vhost user "input" features.
93 # @evdev-path: The --evdev-path command line option is supported.
94 # @no-grab: The --no-grab command line option is supported.
99 'enum': 'VHostUserBackendInputFeature',
100 'data': [ 'evdev-path', 'no-grab' ]
104 # @VHostUserBackendCapabilitiesInput:
106 # Capabilities reported by vhost user "input" backends
108 # @features: list of supported features.
113 'struct': 'VHostUserBackendCapabilitiesInput',
115 'features': [ 'VHostUserBackendInputFeature' ]
120 # @VHostUserBackendGPUFeature:
122 # List of vhost user "gpu" features.
124 # @render-node: The --render-node command line option is supported.
125 # @virgl: The --virgl command line option is supported.
130 'enum': 'VHostUserBackendGPUFeature',
131 'data': [ 'render-node', 'virgl' ]
135 # @VHostUserBackendCapabilitiesGPU:
137 # Capabilities reported by vhost user "gpu" backends.
139 # @features: list of supported features.
144 'struct': 'VHostUserBackendCapabilitiesGPU',
146 'features': [ 'VHostUserBackendGPUFeature' ]
151 # @VHostUserBackendCapabilities:
153 # Capabilities reported by vhost user backends.
155 # @type: The vhost user backend type.
160 'union': 'VHostUserBackendCapabilities',
161 'base': { 'type': 'VHostUserBackendType' },
162 'discriminator': 'type',
164 'input': 'VHostUserBackendCapabilitiesInput',
165 'gpu': 'VHostUserBackendCapabilitiesGPU'
172 # Describes a vhost user backend to management software.
174 # It is possible for multiple @VhostUserBackend elements to match the
175 # search criteria of management software. Applications thus need rules
176 # to pick one of the many matches, and users need the ability to
177 # override distro defaults.
179 # It is recommended to create vhost user backend JSON files (each
180 # containing a single @VhostUserBackend root element) with a
181 # double-digit prefix, for example "50-qemu-gpu.json",
182 # "50-crosvm-gpu.json", etc, so they can be sorted in predictable
183 # order. The backend JSON files should be searched for in three
186 # - /usr/share/qemu/vhost-user -- populated by distro-provided
187 # packages (XDG_DATA_DIRS covers
188 # /usr/share by default),
190 # - /etc/qemu/vhost-user -- exclusively for sysadmins' local additions,
192 # - $XDG_CONFIG_HOME/qemu/vhost-user -- exclusively for per-user local
193 # additions (XDG_CONFIG_HOME
194 # defaults to $HOME/.config).
196 # Top-down, the list of directories goes from general to specific.
198 # Management software should build a list of files from all three
199 # locations, then sort the list by filename (i.e., basename
200 # component). Management software should choose the first JSON file on
201 # the sorted list that matches the search criteria. If a more specific
202 # directory has a file with same name as a less specific directory,
203 # then the file in the more specific directory takes effect. If the
204 # more specific file is zero length, it hides the less specific one.
206 # For example, if a distro ships
208 # - /usr/share/qemu/vhost-user/50-qemu-gpu.json
210 # - /usr/share/qemu/vhost-user/50-crosvm-gpu.json
212 # then the sysadmin can prevent the default QEMU GPU being used at all with
214 # $ touch /etc/qemu/vhost-user/50-qemu-gpu.json
216 # The sysadmin can replace/alter the distro default QEMU GPU with
218 # $ vim /etc/qemu/vhost-user/50-qemu-gpu.json
220 # or they can provide a parallel QEMU GPU with higher priority
222 # $ vim /etc/qemu/vhost-user/10-qemu-gpu.json
224 # or they can provide a parallel QEMU GPU with lower priority
226 # $ vim /etc/qemu/vhost-user/99-qemu-gpu.json
228 # @type: The vhost user backend type.
230 # @description: Provides a human-readable description of the backend.
231 # Management software may or may not display @description.
233 # @binary: Absolute path to the backend binary.
235 # @tags: An optional list of auxiliary strings associated with the
236 # backend for which @description is not appropriate, due to the
237 # latter's possible exposure to the end-user. @tags serves
238 # development and debugging purposes only, and management
239 # software shall explicitly ignore it.
246 # "description": "QEMU vhost-user-gpu",
248 # "binary": "/usr/libexec/qemu/vhost-user-gpu",
250 # "CONFIG_OPENGL_DMABUF=y"
256 'struct' : 'VhostUserBackend',
258 'description': 'str',
259 'type': 'VHostUserBackendType',