]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
caps: use -device for primary video when qemu >=1.6
authorGuannan Ren <gren@redhat.com>
Fri, 26 Jul 2013 12:53:47 +0000 (20:53 +0800)
committerEric Blake <eblake@redhat.com>
Mon, 29 Jul 2013 22:43:05 +0000 (16:43 -0600)
libvirt: https://bugzilla.redhat.com/show_bug.cgi?id=986384

qemu: https://bugzilla.redhat.com/show_bug.cgi?id=981094
The commit 0ad9025ef introduce qemu flag QEMU_CAPS_DEVICE_VIDEO_PRIMARY
for using -device VGA, -device cirrus-vga, -device vmware-svga and
-device qxl-vga. In use, for -device qxl-vga, mouse doesn't display
in guest window like the desciption in above bug.
This patch try to use -device for primary video when qemu >=1.6 which
contains the bug fix patch

(cherry picked from commit e3f2686bdf6c94f658d8645c32a6039692753411)

Conflicts:
src/qemu/qemu_capabilities.c - context with other new capabilities not backported

src/qemu/qemu_capabilities.c
tests/qemuhelptest.c

index 2acf535e2c50ac2956e5ed2a73dda22a32ec92d4..4357bf73800db339579181a858e1294d37e13daa 100644 (file)
@@ -1185,8 +1185,6 @@ virQEMUCapsComputeCmdFlags(const char *help,
     if (version >= 1001000)
         virQEMUCapsSet(qemuCaps, QEMU_CAPS_IPV6_MIGRATION);
 
-    if (version >= 1002000)
-        virQEMUCapsSet(qemuCaps, QEMU_CAPS_DEVICE_VIDEO_PRIMARY);
     return 0;
 }
 
@@ -2538,6 +2536,9 @@ virQEMUCapsInitQMP(virQEMUCapsPtr qemuCaps,
         virQEMUCapsSet(qemuCaps, QEMU_CAPS_NO_ACPI);
     }
 
+    if (qemuCaps->version >= 1006000)
+        virQEMUCapsSet(qemuCaps, QEMU_CAPS_DEVICE_VIDEO_PRIMARY);
+
     if (virQEMUCapsProbeQMPCommands(qemuCaps, mon) < 0)
         goto cleanup;
     if (virQEMUCapsProbeQMPEvents(qemuCaps, mon) < 0)
index eeba4d42011a03e3d33e0df44c23d49dd0832a39..9752f36dcffcb71fd7986d7e7fbb8fe4b39a0b2d 100644 (file)
@@ -919,7 +919,6 @@ mymain(void)
             QEMU_CAPS_DEVICE_VGA,
             QEMU_CAPS_DEVICE_CIRRUS_VGA,
             QEMU_CAPS_DEVICE_VMWARE_SVGA,
-            QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
             QEMU_CAPS_DEVICE_USB_SERIAL,
             QEMU_CAPS_DEVICE_USB_NET,
             QEMU_CAPS_DTB,
@@ -1028,7 +1027,6 @@ mymain(void)
             QEMU_CAPS_DEVICE_VGA,
             QEMU_CAPS_DEVICE_CIRRUS_VGA,
             QEMU_CAPS_DEVICE_VMWARE_SVGA,
-            QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
             QEMU_CAPS_DEVICE_USB_SERIAL,
             QEMU_CAPS_DEVICE_USB_NET,
             QEMU_CAPS_DTB,