qemu: add capabilities for virtio input devices

Add capabilities for virtio-keyboard, virtio-mouse
and virtio-tablet devices:

name "virtio-keyboard-device", bus virtio-bus
name "virtio-keyboard-pci", bus PCI
name "virtio-mouse-device", bus virtio-bus
name "virtio-mouse-pci", bus PCI
name "virtio-tablet-device", bus virtio-bus
name "virtio-tablet-pci", bus PCI

Map both -device and -pci versions of the device to one capability.

https://bugzilla.redhat.com/show_bug.cgi?id=1231114
This commit is contained in:
Ján Tomko 2015-11-13 11:26:37 +01:00
parent cb97426208
commit 5c62d6c456
4 changed files with 21 additions and 0 deletions

View File

@ -303,6 +303,10 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
"incoming-defer", /* 200 */
"virtio-gpu",
"virtio-gpu.virgl",
"virtio-keyboard",
"virtio-mouse",
"virtio-tablet", /* 205 */
);
@ -1547,6 +1551,12 @@ 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-keyboard-device", QEMU_CAPS_VIRTIO_KEYBOARD },
{ "virtio-keyboard-pci", QEMU_CAPS_VIRTIO_KEYBOARD },
{ "virtio-mouse-device", QEMU_CAPS_VIRTIO_MOUSE },
{ "virtio-mouse-pci", QEMU_CAPS_VIRTIO_MOUSE },
{ "virtio-tablet-device", QEMU_CAPS_VIRTIO_TABLET },
{ "virtio-tablet-pci", QEMU_CAPS_VIRTIO_TABLET },
};
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsVirtioBlk[] = {

View File

@ -329,6 +329,11 @@ typedef enum {
QEMU_CAPS_INCOMING_DEFER, /* -incoming defer and migrate_incoming */
QEMU_CAPS_DEVICE_VIRTIO_GPU, /* -device virtio-gpu-* & virtio-vga */
QEMU_CAPS_DEVICE_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} */
/* 205 */
QEMU_CAPS_VIRTIO_TABLET, /* -device virtio-tablet-{device,pci} */
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;

View File

@ -163,4 +163,7 @@
<flag name='virtio-net'/>
<flag name='incoming-defer'/>
<flag name='virtio-gpu'/>
<flag name='virtio-keyboard'/>
<flag name='virtio-mouse'/>
<flag name='virtio-tablet'/>
</qemuCaps>

View File

@ -164,4 +164,7 @@
<flag name='incoming-defer'/>
<flag name='virtio-gpu'/>
<flag name='virtio-gpu.virgl'/>
<flag name='virtio-keyboard'/>
<flag name='virtio-mouse'/>
<flag name='virtio-tablet'/>
</qemuCaps>