[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH v2 1/4] qemu: add qemu various VGA devices Caps flag



QEMU_CAPS_DEVICE_QXL          -device qxl
QEMU_CAPS_DEVICE_VGA          -device VGA
QEMU_CAPS_DEVICE_CIRRUS_VGA   -device cirrus-vga
QEMU_CAPS_DEVICE_VMWARE_SVGA  -device vmware-svga

Fix a typo in qemuCapsObjectTypes, the string 'qxl' here
should be -device qxl rather than -vga [...|qxl|..]
---
 src/qemu/qemu_capabilities.c | 10 ++++++++-
 src/qemu/qemu_capabilities.h |  4 ++++
 tests/qemuhelptest.c         | 48 +++++++++++++++++++++++++++++++++++---------
 3 files changed, 52 insertions(+), 10 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 01a1b98..97bc968 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -194,6 +194,11 @@ VIR_ENUM_IMPL(qemuCaps, QEMU_CAPS_LAST,
               "usb-redir.bootindex",
               "usb-host.bootindex",
               "blockdev-snapshot-sync",
+              "qxl",
+
+              "VGA", /* 200 */
+              "cirrus-vga",
+              "vmware-svga",
     );
 
 struct _qemuCaps {
@@ -1322,11 +1327,14 @@ struct qemuCapsStringFlags qemuCapsObjectTypes[] = {
     { "virtio-scsi-pci", QEMU_CAPS_VIRTIO_SCSI_PCI },
     { "spicevmc", QEMU_CAPS_DEVICE_SPICEVMC },
     { "qxl-vga", QEMU_CAPS_DEVICE_QXL_VGA },
-    { "qxl", QEMU_CAPS_VGA_QXL },
+    { "qxl", QEMU_CAPS_DEVICE_QXL },
     { "sga", QEMU_CAPS_SGA },
     { "scsi-block", QEMU_CAPS_SCSI_BLOCK },
     { "scsi-cd", QEMU_CAPS_SCSI_CD },
     { "ide-cd", QEMU_CAPS_IDE_CD },
+    { "VGA", QEMU_CAPS_DEVICE_VGA },
+    { "cirrus-vga", QEMU_CAPS_DEVICE_CIRRUS_VGA },
+    { "vmware-svga", QEMU_CAPS_DEVICE_VMWARE_SVGA },
 };
 
 
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 3da8672..28604ce 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -156,6 +156,10 @@ enum qemuCapsFlags {
     QEMU_CAPS_USB_REDIR_BOOTINDEX = 116, /* usb-redir.bootindex */
     QEMU_CAPS_USB_HOST_BOOTINDEX = 117, /* usb-host.bootindex */
     QEMU_CAPS_DISK_SNAPSHOT      = 118, /* blockdev-snapshot-sync command */
+    QEMU_CAPS_DEVICE_QXL         = 119, /* -device qxl */
+    QEMU_CAPS_DEVICE_VGA         = 120, /* -device VGA */
+    QEMU_CAPS_DEVICE_CIRRUS_VGA  = 121, /* -device cirrus-vga */
+    QEMU_CAPS_DEVICE_VMWARE_SVGA = 122, /* -device vmware-svga */
 
     QEMU_CAPS_LAST,                   /* this must always be the last item */
 };
diff --git a/tests/qemuhelptest.c b/tests/qemuhelptest.c
index 021b3dc..2280f2d 100644
--- a/tests/qemuhelptest.c
+++ b/tests/qemuhelptest.c
@@ -391,7 +391,11 @@ mymain(void)
             QEMU_CAPS_NO_ACPI,
             QEMU_CAPS_VIRTIO_BLK_SG_IO,
             QEMU_CAPS_CPU_HOST,
-            QEMU_CAPS_VNC);
+            QEMU_CAPS_VNC,
+            QEMU_CAPS_DEVICE_QXL,
+            QEMU_CAPS_DEVICE_VGA,
+            QEMU_CAPS_DEVICE_CIRRUS_VGA,
+            QEMU_CAPS_DEVICE_VMWARE_SVGA);
     DO_TEST("qemu-kvm-0.12.3", 12003, 1, 0,
             QEMU_CAPS_VNC_COLON,
             QEMU_CAPS_NO_REBOOT,
@@ -477,7 +481,6 @@ mymain(void)
             QEMU_CAPS_NESTING,
             QEMU_CAPS_NAME_PROCESS,
             QEMU_CAPS_SMBIOS_TYPE,
-            QEMU_CAPS_VGA_QXL,
             QEMU_CAPS_SPICE,
             QEMU_CAPS_VGA_NONE,
             QEMU_CAPS_MIGRATE_QEMU_FD,
@@ -495,7 +498,11 @@ mymain(void)
             QEMU_CAPS_VIRTIO_BLK_SG_IO,
             QEMU_CAPS_CPU_HOST,
             QEMU_CAPS_SCSI_LSI,
-            QEMU_CAPS_VNC);
+            QEMU_CAPS_VNC,
+            QEMU_CAPS_DEVICE_QXL,
+            QEMU_CAPS_DEVICE_VGA,
+            QEMU_CAPS_DEVICE_CIRRUS_VGA,
+            QEMU_CAPS_DEVICE_VMWARE_SVGA);
     DO_TEST("qemu-kvm-0.12.1.2-rhel61", 12001, 1, 0,
             QEMU_CAPS_VNC_COLON,
             QEMU_CAPS_NO_REBOOT,
@@ -554,7 +561,11 @@ mymain(void)
             QEMU_CAPS_VIRTIO_BLK_SG_IO,
             QEMU_CAPS_CPU_HOST,
             QEMU_CAPS_BLOCKIO,
-            QEMU_CAPS_VNC);
+            QEMU_CAPS_VNC,
+            QEMU_CAPS_DEVICE_QXL,
+            QEMU_CAPS_DEVICE_VGA,
+            QEMU_CAPS_DEVICE_CIRRUS_VGA,
+            QEMU_CAPS_DEVICE_VMWARE_SVGA);
     DO_TEST("qemu-kvm-0.12.1.2-rhel62-beta", 12001, 1, 0,
             QEMU_CAPS_VNC_COLON,
             QEMU_CAPS_NO_REBOOT,
@@ -623,7 +634,10 @@ mymain(void)
             QEMU_CAPS_CPU_HOST,
             QEMU_CAPS_SCSI_CD,
             QEMU_CAPS_BLOCKIO,
-            QEMU_CAPS_VNC);
+            QEMU_CAPS_VNC,
+            QEMU_CAPS_DEVICE_QXL,
+            QEMU_CAPS_DEVICE_VGA,
+            QEMU_CAPS_DEVICE_CIRRUS_VGA);
     DO_TEST("qemu-1.0", 1000000, 0, 0,
             QEMU_CAPS_VNC_COLON,
             QEMU_CAPS_NO_REBOOT,
@@ -697,7 +711,11 @@ mymain(void)
             QEMU_CAPS_IDE_CD,
             QEMU_CAPS_SCSI_LSI,
             QEMU_CAPS_BLOCKIO,
-            QEMU_CAPS_VNC);
+            QEMU_CAPS_VNC,
+            QEMU_CAPS_DEVICE_QXL,
+            QEMU_CAPS_DEVICE_VGA,
+            QEMU_CAPS_DEVICE_CIRRUS_VGA,
+            QEMU_CAPS_DEVICE_VMWARE_SVGA);
     DO_TEST("qemu-1.1.0", 1001000, 0, 0,
             QEMU_CAPS_VNC_COLON,
             QEMU_CAPS_NO_REBOOT,
@@ -779,7 +797,11 @@ mymain(void)
             QEMU_CAPS_SCSI_LSI,
             QEMU_CAPS_VIRTIO_SCSI_PCI,
             QEMU_CAPS_BLOCKIO,
-            QEMU_CAPS_VNC);
+            QEMU_CAPS_VNC,
+            QEMU_CAPS_DEVICE_QXL,
+            QEMU_CAPS_DEVICE_VGA,
+            QEMU_CAPS_DEVICE_CIRRUS_VGA,
+            QEMU_CAPS_DEVICE_VMWARE_SVGA);
     DO_TEST("qemu-1.2.0", 1002000, 0, 0,
             QEMU_CAPS_VNC_COLON,
             QEMU_CAPS_NO_REBOOT,
@@ -871,7 +893,11 @@ mymain(void)
             QEMU_CAPS_DUMP_GUEST_CORE,
             QEMU_CAPS_VNC,
             QEMU_CAPS_USB_REDIR_BOOTINDEX,
-            QEMU_CAPS_USB_HOST_BOOTINDEX);
+            QEMU_CAPS_USB_HOST_BOOTINDEX,
+            QEMU_CAPS_DEVICE_QXL,
+            QEMU_CAPS_DEVICE_VGA,
+            QEMU_CAPS_DEVICE_CIRRUS_VGA,
+            QEMU_CAPS_DEVICE_VMWARE_SVGA);
     DO_TEST("qemu-kvm-1.2.0", 1002000, 1, 0,
             QEMU_CAPS_VNC_COLON,
             QEMU_CAPS_NO_REBOOT,
@@ -968,7 +994,11 @@ mymain(void)
             QEMU_CAPS_DUMP_GUEST_CORE,
             QEMU_CAPS_VNC,
             QEMU_CAPS_USB_REDIR_BOOTINDEX,
-            QEMU_CAPS_USB_HOST_BOOTINDEX);
+            QEMU_CAPS_USB_HOST_BOOTINDEX,
+            QEMU_CAPS_DEVICE_QXL,
+            QEMU_CAPS_DEVICE_VGA,
+            QEMU_CAPS_DEVICE_CIRRUS_VGA,
+            QEMU_CAPS_DEVICE_VMWARE_SVGA);
 
     return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
-- 
1.7.11.2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]