[PATCH v2 5/6] qemu: Adapt to virtio-vga-gl device

Han Han hhan at redhat.com
Wed Jun 9 08:32:26 UTC 2021


QEMU 6.1 will replace the virgl property of virtio-vga device to
virtio-vga-gl device. Adapt to that update.

Resolves: https://gitlab.com/libvirt/libvirt/-/issues/167

Signed-off-by: Han Han <hhan at redhat.com>
---
 src/qemu/qemu_command.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 6b9f13b219..56bc4b87eb 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -4239,6 +4239,9 @@ qemuBuildDeviceVideoStr(const virDomainDef *def,
         }
     } else {
         virBufferAsprintf(&buf, "%s", model);
+        if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_VGA_GL) &&
+            STREQ(model, "virtio-vga"))
+            virBufferAddLit(&buf, "-gl");
     }
 
     virBufferAsprintf(&buf, ",id=%s", video->info.alias);
-- 
2.31.1




More information about the libvir-list mailing list