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
---
src/qemu/qemu_capabilities.c | 9 +++++++++
src/qemu/qemu_capabilities.h | 3 +++
tests/qemucapabilitiesdata/caps_2.4.0-1.caps | 3 +++
3 files changed, 15 insertions(+)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 2813212..4c58a66 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -301,6 +301,9 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
"gic-version",
"incoming-defer", /* 200 */
+ "virtio-keyboard",
+ "virtio-mouse",
+ "virtio-tablet",
);
@@ -1543,6 +1546,12 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = {
{ "virtio-net-ccw", QEMU_CAPS_DEVICE_VIRTIO_NET },
{ "virtio-net-s390", QEMU_CAPS_DEVICE_VIRTIO_NET },
{ "virtio-net-device", QEMU_CAPS_DEVICE_VIRTIO_NET },
+ { "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[] = {
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index e3e40e5..d5421d8 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -327,6 +327,9 @@ typedef enum {
/* 200 */
QEMU_CAPS_INCOMING_DEFER, /* -incoming defer and migrate_incoming */
+ QEMU_CAPS_VIRTIO_KEYBOARD, /* -device virtio-keyboard-{device,pci} */
+ QEMU_CAPS_VIRTIO_MOUSE, /* -device virtio-mouse-{device,pci} */
+ QEMU_CAPS_VIRTIO_TABLET, /* -device virtio-tablet-{device,pci} */
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;
diff --git a/tests/qemucapabilitiesdata/caps_2.4.0-1.caps
b/tests/qemucapabilitiesdata/caps_2.4.0-1.caps
index 6694b7d..8cdf10d 100644
--- a/tests/qemucapabilitiesdata/caps_2.4.0-1.caps
+++ b/tests/qemucapabilitiesdata/caps_2.4.0-1.caps
@@ -162,4 +162,7 @@
<flag name='e1000'/>
<flag name='virtio-net'/>
<flag name='incoming-defer'/>
+ <flag name='virtio-keyboard'/>
+ <flag name='virtio-mouse'/>
+ <flag name='virtio-tablet'/>
</qemuCaps>
--
2.4.6