---
src/qemu/qemu_capabilities.c | 31 +++++++++++++++++++++++++++++++
src/qemu/qemu_capabilities.h | 10 ++++++++++
tests/qemuhelptest.c | 13 ++++++++++---
3 files changed, 51 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index f665de4..a33ad4e 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -125,6 +125,17 @@ VIR_ENUM_IMPL(qemuCaps, QEMU_CAPS_LAST,
"sga",
"virtio-blk-pci.event_idx",
"virtio-net-pci.event_idx",
+
+ "piix3-usb-uhci", /* 65 */
+ "piix4-usb-uhci",
+ "usb-ehci",
+ "ich9-usb-ehci1",
+ "ich9-usb-uhci1",
+
+ "ich9-usb-uhci2", /* 70 */
+ "ich9-usb-uhci3",
+ "vt82c686b-usb-uhci",
+ "usb-redir",
);
struct qemu_feature_flags {
@@ -1196,6 +1207,26 @@ qemuCapsParseDeviceStr(const char *str, virBitmapPtr flags)
qemuCapsSet(flags, QEMU_CAPS_CCID_EMULATED);
if (strstr(str, "name \"ccid-card-passthru\""))
qemuCapsSet(flags, QEMU_CAPS_CCID_PASSTHRU);
+
+ if (strstr(str, "name \"piix3-usb-uhci\""))
+ qemuCapsSet(flags, QEMU_CAPS_PIIX3_USB_UHCI);
+ if (strstr(str, "name \"piix4-usb-uhci\""))
+ qemuCapsSet(flags, QEMU_CAPS_PIIX4_USB_UHCI);
+ if (strstr(str, "name \"usb-ehci\""))
+ qemuCapsSet(flags, QEMU_CAPS_USB_EHCI);
+ if (strstr(str, "name \"ich9-usb-ehci1\""))
+ qemuCapsSet(flags, QEMU_CAPS_ICH9_USB_EHCI1);
+ if (strstr(str, "name \"ich9-usb-uhci1\""))
+ qemuCapsSet(flags, QEMU_CAPS_ICH9_USB_UHCI1);
+ if (strstr(str, "name \"ich9-usb-uhci2\""))
+ qemuCapsSet(flags, QEMU_CAPS_ICH9_USB_UHCI2);
+ if (strstr(str, "name \"ich9-usb-uhci3\""))
+ qemuCapsSet(flags, QEMU_CAPS_ICH9_USB_UHCI3);
+ if (strstr(str, "name \"vt82c686b-usb-uhci\""))
+ qemuCapsSet(flags, QEMU_CAPS_VT82C686B_USB_UHCI);
+ if (strstr(str, "name \"usb-redir\""))
+ qemuCapsSet(flags, QEMU_CAPS_USB_REDIR);
+
/* Prefer -chardev spicevmc (detected earlier) over -device spicevmc */
if (!qemuCapsGet(flags, QEMU_CAPS_CHARDEV_SPICEVMC) &&
strstr(str, "name \"spicevmc\""))
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 13af0b9..7f94392 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -101,6 +101,16 @@ enum qemuCapsFlags {
QEMU_CAPS_VIRTIO_BLK_EVENT_IDX = 63, /* virtio-blk-pci.event_idx */
QEMU_CAPS_VIRTIO_NET_EVENT_IDX = 64, /* virtio-net-pci.event_idx */
+ QEMU_CAPS_PIIX3_USB_UHCI = 65, /* -device piix3-usb-uhci */
+ QEMU_CAPS_PIIX4_USB_UHCI = 66, /* -device piix4-usb-uhci */
+ QEMU_CAPS_USB_EHCI = 67, /* -device usb-ehci */
+ QEMU_CAPS_ICH9_USB_EHCI1 = 68, /* -device ich9-usb-ehci1 */
+ QEMU_CAPS_ICH9_USB_UHCI1 = 69, /* -device ich9-usb-uhci1 */
+ QEMU_CAPS_ICH9_USB_UHCI2 = 70, /* -device ich9-usb-uhci2 */
+ QEMU_CAPS_ICH9_USB_UHCI3 = 71, /* -device ich9-usb-uhci3 */
+ QEMU_CAPS_VT82C686B_USB_UHCI = 72, /* -device vt82c686b-usb-uhci */
+ QEMU_CAPS_USB_REDIR = 73, /* -device usb-redir */
+
QEMU_CAPS_LAST, /* this must always be the last item */
};
diff --git a/tests/qemuhelptest.c b/tests/qemuhelptest.c
index 102dd22..7002cdb 100644
--- a/tests/qemuhelptest.c
+++ b/tests/qemuhelptest.c
@@ -347,7 +347,9 @@ mymain(void)
QEMU_CAPS_VGA_NONE,
QEMU_CAPS_MIGRATE_QEMU_FD,
QEMU_CAPS_DRIVE_AIO,
- QEMU_CAPS_DEVICE_SPICEVMC);
+ QEMU_CAPS_DEVICE_SPICEVMC,
+ QEMU_CAPS_PIIX3_USB_UHCI,
+ QEMU_CAPS_PIIX4_USB_UHCI);
DO_TEST("qemu-kvm-0.12.3", 12003, 1, 0,
QEMU_CAPS_VNC_COLON,
QEMU_CAPS_NO_REBOOT,
@@ -431,7 +433,10 @@ mymain(void)
QEMU_CAPS_MIGRATE_QEMU_FD,
QEMU_CAPS_DRIVE_AIO,
QEMU_CAPS_DEVICE_SPICEVMC,
- QEMU_CAPS_PCI_MULTIFUNCTION);
+ QEMU_CAPS_PCI_MULTIFUNCTION,
+ QEMU_CAPS_PIIX3_USB_UHCI,
+ QEMU_CAPS_PIIX4_USB_UHCI,
+ QEMU_CAPS_VT82C686B_USB_UHCI);
DO_TEST("qemu-kvm-0.12.1.2-rhel61", 12001, 1, 0,
QEMU_CAPS_VNC_COLON,
QEMU_CAPS_NO_REBOOT,
@@ -476,7 +481,9 @@ mymain(void)
QEMU_CAPS_CHARDEV_SPICEVMC,
QEMU_CAPS_DEVICE_QXL_VGA,
QEMU_CAPS_VIRTIO_TX_ALG,
- QEMU_CAPS_VIRTIO_IOEVENTFD);
+ QEMU_CAPS_VIRTIO_IOEVENTFD,
+ QEMU_CAPS_PIIX3_USB_UHCI,
+ QEMU_CAPS_PIIX4_USB_UHCI);
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
}
--
1.7.6