qemu: add vhost-user helpers

Add qemuVhostUserFetchConfigs() to discover vhost-user helpers.

qemuVhostUserFillDomainGPU() will find the first matching GPU helper
with the required capabilities and set the associated
vhost_user_binary.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Marc-André Lureau
2019-09-23 14:44:33 +04:00
committed by Cole Robinson
parent d27abda98d
commit 13248e1688
13 changed files with 639 additions and 0 deletions

View File

@@ -0,0 +1 @@
../../../usr/share/qemu/vhost-user/50-gpu.json

View File

@@ -0,0 +1,11 @@
#!/bin/sh
cat <<EOF
{
"type": "gpu",
"features": [
"render-node",
"virgl"
]
}
EOF

View File

@@ -0,0 +1 @@
50-gpu.json

View File

@@ -0,0 +1,8 @@
{
"description": "QEMU vhost-user-gpu",
"type": "gpu",
"binary": "/usr/libexec/qemu/vhost-user/test-vhost-user-gpu",
"tags": [
"CONFIG_OPENGL_DMABUF=y"
]
}

View File

@@ -0,0 +1 @@
50-gpu.json