From: Han Han Date: Wed, 9 Jun 2021 08:32:26 +0000 (+0800) Subject: qemu: Adapt to virtio-vga-gl device X-Git-Tag: v7.5.0-rc1~160 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c673246483cc4dbf0e6ecd6ea67ec0e2a5576af;p=thirdparty%2Flibvirt.git qemu: Adapt to virtio-vga-gl device 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 Signed-off-by: Michal Privoznik Reviewed-by: Michal Privoznik --- diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index e595efe97a..4b676fe8fc 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -4243,6 +4243,10 @@ qemuBuildDeviceVideoStr(const virDomainDef *def, } } else { virBufferAsprintf(&buf, "%s", model); + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_VGA_GL) && + accel3d == VIR_TRISTATE_SWITCH_ON && + STREQ(model, "virtio-vga")) + virBufferAddLit(&buf, "-gl"); } virBufferAsprintf(&buf, ",id=%s", video->info.alias);