1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

qemu: add qemu vga devices caps and one cap to mark them usable

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

QEMU_CAPS_DEVICE_VIDEO_PRIMARY  /* safe to use -device XXX
                                 for primary video device */

Fix a typo in qemuCapsObjectTypes, the string 'qxl' here
should be -device qxl rather than -vga [...|qxl|..]
This commit is contained in:
Guannan Ren 2012-12-14 15:06:31 +08:00
parent 34ca568497
commit 4c993d8ab5
3 changed files with 60 additions and 10 deletions

View File

@ -194,6 +194,12 @@ VIR_ENUM_IMPL(qemuCaps, QEMU_CAPS_LAST,
"usb-redir.bootindex",
"usb-host.bootindex",
"blockdev-snapshot-sync",
"qxl",
"VGA", /* 120 */
"cirrus-vga",
"vmware-svga",
"device-video-primary",
);
struct _qemuCaps {
@ -1177,6 +1183,9 @@ qemuCapsComputeCmdFlags(const char *help,
if (version >= 11000)
qemuCapsSet(caps, QEMU_CAPS_CPU_HOST);
if (version >= 1002000)
qemuCapsSet(caps, QEMU_CAPS_DEVICE_VIDEO_PRIMARY);
return 0;
}
@ -1322,11 +1331,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 },
};

View File

@ -156,6 +156,12 @@ 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_DEVICE_VIDEO_PRIMARY = 123, /* safe to use -device XXX
for primary video device */
QEMU_CAPS_LAST, /* this must always be the last item */
};

View File

@ -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,12 @@ 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,
QEMU_CAPS_DEVICE_VIDEO_PRIMARY);
DO_TEST("qemu-kvm-1.2.0", 1002000, 1, 0,
QEMU_CAPS_VNC_COLON,
QEMU_CAPS_NO_REBOOT,
@ -968,7 +995,12 @@ 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,
QEMU_CAPS_DEVICE_VIDEO_PRIMARY);
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
}