[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [RFC v2 08/16] qemu: validate vhost-user video model



From: Marc-André Lureau <marcandre lureau redhat com>

Check qemu capability, and accept 3d acceleration.

Signed-off-by: Marc-André Lureau <marcandre lureau redhat com>
---
 src/qemu/qemu_process.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 960c3ed011..027a608367 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -5025,6 +5025,8 @@ qemuProcessStartValidateVideo(virDomainObjPtr vm,
              !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_QXL)) ||
             (video->type == VIR_DOMAIN_VIDEO_TYPE_VIRTIO &&
              !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_GPU)) ||
+            (video->type == VIR_DOMAIN_VIDEO_TYPE_VHOST_USER &&
+             !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VHOST_USER_GPU)) ||
             (video->type == VIR_DOMAIN_VIDEO_TYPE_VIRTIO &&
              video->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW &&
              !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_GPU_CCW))) {
@@ -5035,7 +5037,9 @@ qemuProcessStartValidateVideo(virDomainObjPtr vm,
         }
 
         if (video->accel) {
-            if (video->accel->accel3d == VIR_TRISTATE_SWITCH_ON &&
+            if (video->type == VIR_DOMAIN_VIDEO_TYPE_VHOST_USER) {
+                continue;
+            } else if (video->accel->accel3d == VIR_TRISTATE_SWITCH_ON &&
                 (video->type != VIR_DOMAIN_VIDEO_TYPE_VIRTIO ||
                  !virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_GPU_VIRGL))) {
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-- 
2.19.0.rc0.48.gb9dfa238d5


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]