]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Adapt to virtio-vga-gl device
authorHan Han <hhan@redhat.com>
Wed, 9 Jun 2021 08:32:26 +0000 (16:32 +0800)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 11 Jun 2021 11:06:56 +0000 (13:06 +0200)
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@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_command.c

index e595efe97a49e5fe0598e757b3de7026e246aae9..4b676fe8fca48837515d99ffd365b3f201ea196b 100644 (file)
@@ -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);