Bug 920108
| Summary: | Rhel7.0 guest Max can recognize 38 usb storage devices when booting guest with 53 usb storage devices in one xhci controller | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | FuXiangChun <xfu> | ||||||||
| Component: | qemu-kvm | Assignee: | Gerd Hoffmann <kraxel> | ||||||||
| Status: | CLOSED DUPLICATE | QA Contact: | Virtualization Bugs <virt-bugs> | ||||||||
| Severity: | medium | Docs Contact: | |||||||||
| Priority: | medium | ||||||||||
| Version: | 7.0 | CC: | acathrow, hhuang, juzhang, lnovich, michen, qzhou, rhod, virt-maint | ||||||||
| Target Milestone: | rc | Flags: | xfu:
needinfo-
|
||||||||
| Target Release: | --- | ||||||||||
| Hardware: | x86_64 | ||||||||||
| OS: | Linux | ||||||||||
| Whiteboard: | |||||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||||
| Doc Text: | Story Points: | --- | |||||||||
| Clone Of: | Environment: | ||||||||||
| Last Closed: | 2013-05-14 14:27:26 UTC | Type: | Bug | ||||||||
| Regression: | --- | Mount Type: | --- | ||||||||
| Documentation: | --- | CRM: | |||||||||
| Verified Versions: | Category: | --- | |||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||
| Embargoed: | |||||||||||
| Bug Depends On: | 924149 | ||||||||||
| Bug Blocks: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
FuXiangChun
2013-03-11 11:14:05 UTC
Created attachment 708311 [details]
boot guest command line
qemu will automagically plug in a new usb hub into the last free port if it runs out of ports. That creates a chain of hubs (nicely visible with lsusb -t inside the guest). Nesting deeper than 5 hubs isn't allowed though, thats why the devices are not visible to the guest. So for creating *lots* of devices you have to create a hub hierarchy which isn't nested that deep: qemu -device usb-hub,port=1 -device usb-hub,port=1.1 -device usb-hub,port=1.2 -device usb-hub,port=1.3 -device usb-hub,port=1.4 -device usb-hub,port=1.5 -device usb-hub,port=1.6 -device usb-hub,port=1.7 and then add the storage devices. (In reply to comment #4) > qemu will automagically plug in a new usb hub into the last free port if it > runs out of ports. That creates a chain of hubs (nicely visible with lsusb > -t inside the guest). Nesting deeper than 5 hubs isn't allowed though, > thats why the devices are not visible to the guest. > > So for creating *lots* of devices you have to create a hub hierarchy which > isn't nested that deep: > > qemu -device usb-hub,port=1 > -device usb-hub,port=1.1 > -device usb-hub,port=1.2 > -device usb-hub,port=1.3 > -device usb-hub,port=1.4 > -device usb-hub,port=1.5 > -device usb-hub,port=1.6 > -device usb-hub,port=1.7 > > and then add the storage devices. Re-tested this issue with command line in attachment(the following is only part). -device nec-usb-xhci,id=xhci0 \ -drive file=storage/usb-storage1.qcow2,if=none,id=drive-usb-0-1,media=disk,format=qcow2,cache=none,aio=native -device usb-storage,drive=drive-usb-0-1,id=usb-0-1,removable=on,port=1 \ -drive file=storage/usb-storage2.qcow2,if=none,id=drive-usb-0-2,media=disk,format=qcow2,cache=none,aio=native -device usb-storage,drive=drive-usb-0-2,id=usb-0-2,removable=on,port=2 \ -drive file=storage/usb-storage3.qcow2,if=none,id=drive-usb-0-3,media=disk,format=qcow2,cache=none,aio=native -device usb-storage,drive=drive-usb-0-3,id=usb-0-3,removable=on,port=3 \ -device usb-hub,port=1,port=4 \ -device usb-hub,port=4.1 -device usb-hub,port=4.2 -device usb-hub,port=4.3 -device usb-hub,port=4.4 -device usb-hub,port=4.5 -device usb-hub,port=4.6 -device usb-hub,port=4.7 -drive file=storage/usb-storage4.qcow2,if=none,id=drive-usb-0-4,media=disk,format=qcow2,cache=none,aio=native -device usb-storage,drive=drive-usb-0-4,id=usb-0-4,removable=on,port=4.1.1 \ ................ Test result: qemu and rhel7.0 guest only can recognize 3 usb storage devices. 1.qemu: (qemu) info block drive-system-disk: removable=0 io-status=ok file=/home//rhel7-new-bak.qcow2 ro=0 drv=qcow2 encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0 drive-usb-0-1: removable=1 locked=0 tray-open=0 io-status=ok file=storage/usb-storage1.qcow2 ro=0 drv=qcow2 encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0 drive-usb-0-2: removable=1 locked=0 tray-open=0 io-status=ok file=storage/usb-storage2.qcow2 ro=0 drv=qcow2 encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0 drive-usb-0-3: removable=1 locked=0 tray-open=0 io-status=ok file=storage/usb-storage3.qcow2 ro=0 drv=qcow2 encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0 floppy0: removable=1 locked=0 tray-open=0 [not inserted] sd0: removable=1 locked=0 tray-open=0 [not inserted] 2.inside guest: # lsusb -t lsusb -t /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M |__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M |__ Port 2: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 5000M |__ Port 3: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 5000M /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M |__ Port 4: Dev 2, If 0, Class=Hub, Driver=hub/8p, 12M |__ Port 1: Dev 3, If 0, Class=Hub, Driver=hub/8p, 12M qemu version: qemu-kvm-1.4.0-1.el7.x86_64 guest and hostkernel:3.8.0-0.40.el7.x86_64 Created attachment 713687 [details]
full command line
The hubs should come first.
Slashes ('\') at the end of line are missing, you've added it to the first hub but not the second and all following ones, so the command line simply ends after the second hub ...
(In reply to comment #7) > The hubs should come first. > > Slashes ('\') at the end of line are missing, you've added it to the first > hub but not the second and all following ones, so the command line simply > ends after the second hub ... according to your request, I changed command line(in attachment). but guest boot fail. and guest repeatedly print as "soft lockup-CPU#0 stuck for 23s!......". Created attachment 730678 [details]
changed command line
The soft lockup is bug 924149, adding dependency. *** This bug has been marked as a duplicate of bug 956608 *** |