]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Detect VGA_QXL capability correctly
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 4 Jan 2013 08:47:55 +0000 (09:47 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 4 Jan 2013 14:37:09 +0000 (15:37 +0100)
Since 4c993d8a we failed to set this important capability, which
allows starting a domain with QXL video card. We set DEVICE_QXL
capability bit instead, which is not necessary wrong. Anyway, if
qemu supports the new '-device qxl' it supports older '-vga qxl'
as well. The latter is used for the primary (the first) qxl video
card, the former for other video cards.

src/qemu/qemu_capabilities.c

index f49a31c8e7d60d26f46c2691e8d140046fb8c5fd..e16bc707615d36384a702334bb0437d676f54041 100644 (file)
@@ -2018,6 +2018,9 @@ qemuCapsProbeQMPObjects(qemuCapsPtr caps,
     /* Prefer -chardev spicevmc (detected earlier) over -device spicevmc */
     if (qemuCapsGet(caps, QEMU_CAPS_CHARDEV_SPICEVMC))
         qemuCapsClear(caps, QEMU_CAPS_DEVICE_SPICEVMC);
+    /* If qemu supports newer -device qxl it supports -vga qxl as well */
+    if (qemuCapsGet(caps, QEMU_CAPS_DEVICE_QXL))
+        qemuCapsSet(caps, QEMU_CAPS_VGA_QXL);
 
     return 0;
 }