提交 329f907b 编写于 作者: M Marc-André Lureau 提交者: Daniel Veillard

Add various USB devices QEMU_CAPS

上级 c554f6e1
......@@ -125,7 +125,16 @@ VIR_ENUM_IMPL(qemuCaps, QEMU_CAPS_LAST,
"sga",
"virtio-blk-pci.event_idx",
"virtio-net-pci.event_idx",
"cache-directsync",
"cache-directsync", /* 65 */
"piix3-usb-uhci",
"piix4-usb-uhci",
"usb-ehci",
"ich9-usb-ehci1",
"vt82c686b-usb-uhci", /* 70 */
"pci-ohci",
"usb-redir",
);
struct qemu_feature_flags {
......@@ -1200,6 +1209,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\""))
......
......@@ -102,6 +102,14 @@ enum qemuCapsFlags {
QEMU_CAPS_VIRTIO_NET_EVENT_IDX = 64, /* virtio-net-pci.event_idx */
QEMU_CAPS_DRIVE_CACHE_DIRECTSYNC = 65, /* Is cache=directsync supported? */
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 */
};
......
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册