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

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

 



From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>

Check qemu capability, and accept 3d acceleration.

Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>
---
 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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux