qemu_capabilities: check for existence of virtio-vga

Commit 21373feb added support for primary virtio-vga device but it was
checking for virtio-gpu.  Let's check for existence of virtio-vga if we
want to use it.

Virtio video device is currently represented by three different models
*virtio-gpu-device*, *virtio-gpu-pci* and *virtio-vga*.  The first two
models are tied together and if virtio video devices is compiled in they
both exist.  However, the *virtio-vga* model doesn't have to exist on
some architectures even if the first two models exist.  So we cannot
group all three together.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Pavel Hrdina 2016-10-11 14:07:58 +02:00
parent 9562fb55bf
commit 6869428c12
7 changed files with 9 additions and 1 deletions

View File

@ -345,6 +345,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
"virtio-net.rx_queue_size", /* 235 */
"machine-iommu",
"virtio-vga",
);
@ -1571,6 +1572,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = {
{ "virtio-net-device", QEMU_CAPS_DEVICE_VIRTIO_NET },
{ "virtio-gpu-pci", QEMU_CAPS_DEVICE_VIRTIO_GPU },
{ "virtio-gpu-device", QEMU_CAPS_DEVICE_VIRTIO_GPU },
{ "virtio-vga", QEMU_CAPS_DEVICE_VIRTIO_VGA },
{ "virtio-keyboard-device", QEMU_CAPS_VIRTIO_KEYBOARD },
{ "virtio-keyboard-pci", QEMU_CAPS_VIRTIO_KEYBOARD },
{ "virtio-mouse-device", QEMU_CAPS_VIRTIO_MOUSE },

View File

@ -328,7 +328,7 @@ typedef enum {
/* 200 */
QEMU_CAPS_INCOMING_DEFER, /* -incoming defer and migrate_incoming */
QEMU_CAPS_DEVICE_VIRTIO_GPU, /* -device virtio-gpu-* & virtio-vga */
QEMU_CAPS_DEVICE_VIRTIO_GPU, /* -device virtio-gpu-* */
QEMU_CAPS_VIRTIO_GPU_VIRGL, /* -device virtio-gpu-*.virgl */
QEMU_CAPS_VIRTIO_KEYBOARD, /* -device virtio-keyboard-{device,pci} */
QEMU_CAPS_VIRTIO_MOUSE, /* -device virtio-mouse-{device,pci} */
@ -379,6 +379,7 @@ typedef enum {
/* 235 */
QEMU_CAPS_VIRTIO_NET_RX_QUEUE_SIZE, /* virtio-net-*.rx_queue_size */
QEMU_CAPS_MACHINE_IOMMU, /* -machine iommu=on */
QEMU_CAPS_DEVICE_VIRTIO_VGA, /* -device virtio-vga */
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;

View File

@ -180,6 +180,7 @@
<flag name='smm'/>
<flag name='virtio-pci-disable-legacy'/>
<flag name='machine-iommu'/>
<flag name='virtio-vga'/>
<version>2004000</version>
<kvmVersion>0</kvmVersion>
<package></package>

View File

@ -185,6 +185,7 @@
<flag name='smm'/>
<flag name='virtio-pci-disable-legacy'/>
<flag name='machine-iommu'/>
<flag name='virtio-vga'/>
<version>2005000</version>
<kvmVersion>0</kvmVersion>
<package></package>

View File

@ -152,6 +152,7 @@
<flag name='display'/>
<flag name='smm'/>
<flag name='virtio-pci-disable-legacy'/>
<flag name='virtio-vga'/>
<version>2005094</version>
<kvmVersion>0</kvmVersion>
<package></package>

View File

@ -191,6 +191,7 @@
<flag name='smm'/>
<flag name='virtio-pci-disable-legacy'/>
<flag name='machine-iommu'/>
<flag name='virtio-vga'/>
<version>2006000</version>
<kvmVersion>0</kvmVersion>
<package></package>

View File

@ -192,6 +192,7 @@
<flag name='smm'/>
<flag name='virtio-pci-disable-legacy'/>
<flag name='query-hotpluggable-cpus'/>
<flag name='virtio-vga'/>
<version>2007000</version>
<kvmVersion>0</kvmVersion>
<package> (v2.7.0)</package>