Changes since v1: - added pci-ohci - removed extra ich9 companions that came with ich9-ehci --- src/qemu/qemu_capabilities.c | 25 +++++++++++++++++++++++++ src/qemu/qemu_capabilities.h | 8 ++++++++ tests/qemuhelptest.c | 14 +++++++++++--- 3 files changed, 44 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index f665de4..a776a0c 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -125,6 +125,15 @@ 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", + "vt82c686b-usb-uhci", + + "pci-ohci", /* 70 */ + "usb-redir", ); struct qemu_feature_flags { @@ -1196,6 +1205,22 @@ 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 \"vt82c686b-usb-uhci\"")) + qemuCapsSet(flags, QEMU_CAPS_VT82C686B_USB_UHCI); + if (strstr(str, "name \"pci-ohci\"")) + qemuCapsSet(flags, QEMU_CAPS_PCI_OHCI); + 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..f4bb368 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -101,6 +101,14 @@ 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 and companions */ + QEMU_CAPS_VT82C686B_USB_UHCI = 69, /* -device vt82c686b-usb-uhci */ + QEMU_CAPS_PCI_OHCI = 70, /* -device pci-ohci */ + QEMU_CAPS_USB_REDIR = 71, /* -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..d57e499 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,11 @@ 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, + QEMU_CAPS_PCI_OHCI); DO_TEST("qemu-kvm-0.12.1.2-rhel61", 12001, 1, 0, QEMU_CAPS_VNC_COLON, QEMU_CAPS_NO_REBOOT, @@ -476,7 +482,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 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list