Bug 1001604 - usb hub doesn't work properly (win7 sees downstream port #1 only).
usb hub doesn't work properly (win7 sees downstream port #1 only).
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
7.0
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Gerd Hoffmann
Virtualization Bugs
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-27 07:40 EDT by Xu Han
Modified: 2014-06-17 23:35 EDT (History)
10 users (show)

See Also:
Fixed In Version: qemu-kvm-1.5.3-10.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-13 06:42:26 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
usb device info screenshot in rhel7 host (123.33 KB, image/png)
2013-08-27 07:44 EDT, Xu Han
no flags Details
usb device info screenshot in rhel6 host (116.79 KB, image/png)
2013-08-27 07:44 EDT, Xu Han
no flags Details
verify this bug with qemu-kvm-1.5.3-10.el7.x86_64, attach the screenshot (103.64 KB, image/jpeg)
2013-10-25 03:16 EDT, Qian Guo
no flags Details

  None (edit)
Description Xu Han 2013-08-27 07:40:11 EDT
Description of problem:
boot windows guest(win7-64, win2k8-64) with attach 16 usb device to ehci adapter with companion uhci would recognized only 6.

Version-Release number of selected component (if applicable):
kernel: 3.10.0-8.el7.x86_64
qemu: qemu-kvm-1.5.2-4.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.boot guest
#/usr/libexec/qemu-kvm -M pc-i440fx-rhel7.0.0 -cpu SandyBridge -enable-kvm -m 2G -smp 4,sockets=2,cores=2,threads=1 -name usb-test -rtc base=localtime,clock=host,driftfix=slew -drive file=/home/guest-img/win7-64-virtio.bak.qcow2,if=none,id=drive-system-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop -device ide-hd,bus=ide.0,unit=0,drive=drive-system-disk,id=system-disk,bootindex=1 -qmp tcp:0:4444,server,nowait -k en-us -boot menu=on -vnc :1 -spice disable-ticketing,port=5931 -vga qxl -monitor stdio \

-readconfig /home/ich9-ehci-uhci.cfg \

-drive file=/home/disk/disk1.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 \
-drive file=/home/disk/disk2.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 \
-drive file=/home/disk/disk3.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 \
-drive file=/home/disk/disk4.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 \
-drive file=/home/disk/disk5.qcow2,if=none,id=drive-usb-0-5,media=disk,format=qcow2,cache=none,aio=native -device usb-storage,drive=drive-usb-0-5,id=usb-0-5,removable=on \
-drive file=/home/disk/disk6.qcow2,if=none,id=drive-usb-0-6,media=disk,format=qcow2,cache=none,aio=native -device usb-storage,drive=drive-usb-0-6,id=usb-0-6,removable=on \
-drive file=/home/disk/disk7.qcow2,if=none,id=drive-usb-0-7,media=disk,format=qcow2,cache=none,aio=native -device usb-storage,drive=drive-usb-0-7,id=usb-0-7,removable=on \
-drive file=/home/disk/disk8.qcow2,if=none,id=drive-usb-0-8,media=disk,format=qcow2,cache=none,aio=native -device usb-storage,drive=drive-usb-0-8,id=usb-0-8,removable=on \
-drive file=/home/disk/disk9.qcow2,if=none,id=drive-usb-0-9,media=disk,format=qcow2,cache=none,aio=native -device usb-storage,drive=drive-usb-0-9,id=usb-0-9,removable=on \
-drive file=/home/disk/disk10.qcow2,if=none,id=drive-usb-0-10,media=disk,format=qcow2,cache=none,aio=native -device usb-storage,drive=drive-usb-0-10,id=usb-0-10,removable=on \
-drive file=/home/disk/disk11.qcow2,if=none,id=drive-usb-0-11,media=disk,format=qcow2,cache=none,aio=native -device usb-storage,drive=drive-usb-0-11,id=usb-0-11,removable=on \
-drive file=/home/disk/disk12.qcow2,if=none,id=drive-usb-0-12,media=disk,format=qcow2,cache=none,aio=native -device usb-storage,drive=drive-usb-0-12,id=usb-0-12,removable=on \
-drive file=/home/disk/disk13.qcow2,if=none,id=drive-usb-0-13,media=disk,format=qcow2,cache=none,aio=native -device usb-storage,drive=drive-usb-0-13,id=usb-0-13,removable=on \
-drive file=/home/disk/disk14.qcow2,if=none,id=drive-usb-0-14,media=disk,format=qcow2,cache=none,aio=native -device usb-storage,drive=drive-usb-0-14,id=usb-0-14,removable=on \
-drive file=/home/disk/disk15.qcow2,if=none,id=drive-usb-0-15,media=disk,format=qcow2,cache=none,aio=native -device usb-storage,drive=drive-usb-0-15,id=usb-0-15,removable=on \
-drive file=/home/disk/disk16.qcow2,if=none,id=drive-usb-0-16,media=disk,format=qcow2,cache=none,aio=native -device usb-storage,drive=drive-usb-0-16,id=usb-0-16,removable=on

#cat /home/ich9-ehci-uhci.cfg
[device "ehci"]
  driver = "ich9-usb-ehci1"
  addr = "1d.7"
  multifunction = "on"

[device "uhci-1"]
  driver = "ich9-usb-uhci1"
  addr = "1d.0"
  multifunction = "on"
  masterbus = "ehci.0"
  firstport = "0"

[device "uhci-2"]
  driver = "ich9-usb-uhci2"
  addr = "1d.1"
  multifunction = "on"
  masterbus = "ehci.0"
  firstport = "2"

[device "uhci-3"]
  driver = "ich9-usb-uhci3"
  addr = "1d.2"
  multifunction = "on"
  masterbus = "ehci.0"
  firstport = "4"


2.check usb device in qemu monitor
(qemu) info usb
  Device 0.1, Port 1, Speed 480 Mb/s, Product QEMU USB MSD
  Device 0.2, Port 2, Speed 480 Mb/s, Product QEMU USB MSD
  Device 0.3, Port 3, Speed 480 Mb/s, Product QEMU USB MSD
  Device 0.4, Port 4, Speed 480 Mb/s, Product QEMU USB MSD
  Device 0.5, Port 5, Speed 480 Mb/s, Product QEMU USB MSD
  Device 0.1, Port 6, Speed 12 Mb/s, Product QEMU USB Hub
  Device 0.2, Port 6.1, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.3, Port 6.2, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.4, Port 6.3, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.5, Port 6.4, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.6, Port 6.5, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.7, Port 6.6, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.8, Port 6.7, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.9, Port 6.8, Speed 12 Mb/s, Product QEMU USB Hub
  Device 0.10, Port 6.8.1, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.11, Port 6.8.2, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.12, Port 6.8.3, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.13, Port 6.8.4, Speed 12 Mb/s, Product QEMU USB MSD

3.check usb device info in guest
please look screenshot in attachments

Actual results:
only 6 usb device would be recognized(5 ehci device, 1 uhci device).

Expected results:
all 16 usb device will be recognized.

Additional info:
linux guest won't hit this issue.
rhel6 host won't hit this issue.
Comment 1 Xu Han 2013-08-27 07:44:04 EDT
Created attachment 790922 [details]
usb device info screenshot in rhel7 host
Comment 2 Xu Han 2013-08-27 07:44:49 EDT
Created attachment 790923 [details]
usb device info screenshot in rhel6 host
Comment 4 Gerd Hoffmann 2013-08-27 11:36:57 EDT
root cause: upstream commit a309ee6e0a256f690760abfba44fceaa52a7c2f3
that one fixes a serious issue with xhci though, so simply reverting
doesn't cut it.  need to dig into xhci, guess we don't do intr endpoint intervals correctly.
Comment 5 FuXiangChun 2013-08-28 04:21:21 EDT
Re-tested this bug. Start with this version qemu-kvm-1.5.0-1.el7.x86_64 QE found this problem. Before this version, qemu-kvm don't hit this issue. so I added regression to Keywords
Comment 8 Gerd Hoffmann 2013-08-30 04:40:14 EDT
Bad patch has been backported to rhel-6.  As there is no xhci in rhel6 we can simply revert it there.

rhel-7 needs xhci being fixed first.  patches posted upstream meanwhile, backport to be done once they are in.
Comment 9 Gerd Hoffmann 2013-09-12 05:40:30 EDT
patches merged upstream, backport done, patches posted.
Comment 10 Miroslav Rezanina 2013-10-17 06:00:08 EDT
Fix included in qemu-kvm-1.5.3-10.el7
Comment 12 Qian Guo 2013-10-25 03:09:26 EDT
Reproduce this bug with components:
qemu-kvm-1.5.3-4.el7.x86_64

Steps:
1.Boot windows7 64bit guest with 16 usb disks like this:
# /usr/libexec/qemu-kvm -M pc-i440fx-rhel7.0.0 -cpu Opteron_G3 -enable-kvm -m 2G -smp 4,sockets=2,cores=2,threads=1 -name usb-test -rtc base=localtime,clock=host,driftfix=slew -drive file=/home/win7-64-virtio.qcow2,if=none,id=drive-system-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop -device ide-hd,bus=ide.0,unit=0,drive=drive-system-disk,id=system-disk,bootindex=1 -qmp tcp:0:4444,server,nowait -k en-us -boot menu=on -vnc :1 -vga std -monitor stdio \
-readconfig /home/ich9.cfg \
-drive file=/home/disk1.qcow2,if=none,id=drive-usb-0-1,media=disk,format=qcow2,aio=native -device usb-storage,drive=drive-usb-0-1,id=usb-0-1,removable=on \
-drive file=/home/disk2.qcow2,if=none,id=drive-usb-0-2,media=disk,format=qcow2,aio=native -device usb-storage,drive=drive-usb-0-2,id=usb-0-2,removable=on \
-drive file=/home/disk3.qcow2,if=none,id=drive-usb-0-3,media=disk,format=qcow2,aio=native -device usb-storage,drive=drive-usb-0-3,id=usb-0-3,removable=on \
-drive file=/home/disk4.qcow2,if=none,id=drive-usb-0-4,media=disk,format=qcow2,aio=native -device usb-storage,drive=drive-usb-0-4,id=usb-0-4,removable=on \
-drive file=/home/disk5.qcow2,if=none,id=drive-usb-0-5,media=disk,format=qcow2,aio=native -device usb-storage,drive=drive-usb-0-5,id=usb-0-5,removable=on \
-drive file=/home/disk6.qcow2,if=none,id=drive-usb-0-6,media=disk,format=qcow2,aio=native -device usb-storage,drive=drive-usb-0-6,id=usb-0-6,removable=on \
-drive file=/home/disk7.qcow2,if=none,id=drive-usb-0-7,media=disk,format=qcow2,aio=native -device usb-storage,drive=drive-usb-0-7,id=usb-0-7,removable=on \
-drive file=/home/disk8.qcow2,if=none,id=drive-usb-0-8,media=disk,format=qcow2,aio=native -device usb-storage,drive=drive-usb-0-8,id=usb-0-8,removable=on \
-drive file=/home/disk9.qcow2,if=none,id=drive-usb-0-9,media=disk,format=qcow2,aio=native -device usb-storage,drive=drive-usb-0-9,id=usb-0-9,removable=on \
-drive file=/home/disk10.qcow2,if=none,id=drive-usb-0-10,media=disk,format=qcow2,aio=native -device usb-storage,drive=drive-usb-0-10,id=usb-0-10,removable=on \
-drive file=/home/disk11.qcow2,if=none,id=drive-usb-0-11,media=disk,format=qcow2,aio=native -device usb-storage,drive=drive-usb-0-11,id=usb-0-11,removable=on \
-drive file=/home/disk12.qcow2,if=none,id=drive-usb-0-12,media=disk,format=qcow2,aio=native -device usb-storage,drive=drive-usb-0-12,id=usb-0-12,removable=on \
-drive file=/home/disk13.qcow2,if=none,id=drive-usb-0-13,media=disk,format=qcow2,aio=native -device usb-storage,drive=drive-usb-0-13,id=usb-0-13,removable=on \
-drive file=/home/disk14.qcow2,if=none,id=drive-usb-0-14,media=disk,format=qcow2,aio=native -device usb-storage,drive=drive-usb-0-14,id=usb-0-14,removable=on \
-drive file=/home/disk15.qcow2,if=none,id=drive-usb-0-15,media=disk,format=qcow2,aio=native -device usb-storage,drive=drive-usb-0-15,id=usb-0-15,removable=on \
-drive file=/home/disk16.qcow2,if=none,id=drive-usb-0-16,media=disk,format=qcow2,aio=native -device usb-storage,drive=drive-usb-0-16,id=usb-0-16,removable=on \

2.Check via hmp:
(qemu) info usb
  Device 0.1, Port 1, Speed 480 Mb/s, Product QEMU USB MSD
  Device 0.2, Port 2, Speed 480 Mb/s, Product QEMU USB MSD
  Device 0.3, Port 3, Speed 480 Mb/s, Product QEMU USB MSD
  Device 0.4, Port 4, Speed 480 Mb/s, Product QEMU USB MSD
  Device 0.5, Port 5, Speed 480 Mb/s, Product QEMU USB MSD
  Device 0.1, Port 6, Speed 12 Mb/s, Product QEMU USB Hub
  Device 0.2, Port 6.1, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.3, Port 6.2, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.4, Port 6.3, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.5, Port 6.4, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.6, Port 6.5, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.7, Port 6.6, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.8, Port 6.7, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.9, Port 6.8, Speed 12 Mb/s, Product QEMU USB Hub
  Device 0.10, Port 6.8.1, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.11, Port 6.8.2, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.12, Port 6.8.3, Speed 12 Mb/s, Product QEMU USB MSD
  Device 0.13, Port 6.8.4, Speed 12 Mb/s, Product QEMU USB MSD

3.Check the usb disks in windows guest:
result: there're only 6 usb disks

Verify this bug with component:
qemu-kvm-1.5.3-10.el7.x86_64

same steps as above

Result: from the guest inside, there're 16 usb disks.

So, according to above all, the bug is fixed by qemu-kvm-1.5.3-10.el7.x86_64.
Comment 13 Qian Guo 2013-10-25 03:16:01 EDT
Created attachment 816027 [details]
verify this bug with qemu-kvm-1.5.3-10.el7.x86_64, attach the screenshot
Comment 15 Ludek Smid 2014-06-13 06:42:26 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

Note You need to log in before you can comment on or make changes to this bug.