Bug 807517

Summary: the windows guest fail to detect the emulated usb1.1 sticks through usb-hub adding to the UHCI controller
Product: Red Hat Enterprise Linux 6 Reporter: Sibiao Luo <sluo>
Component: qemu-kvmAssignee: Gerd Hoffmann <kraxel>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3CC: acathrow, bcao, bsarathy, chayang, dyasny, juzhang, kraxel, michen, mkenneth, qzhang, rhod, sluo, virt-maint, wdai
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-29 07:33:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sibiao Luo 2012-03-28 03:15:33 UTC
Description of problem:
boot a windows 7 geust with emulated usb1.1 sticks through the usb-hub adding to the UHCI controller, the guest will fail to detect the emulated usb1.1 sticks.

Version-Release number of selected component (if applicable):
host info:
# uname -r && rpm -q qemu-kvm
2.6.32-251.el6.x86_64
qemu-kvm-0.12.1.2-2.265.el6.x86_64
# rpm -q seabios
seabios-0.6.1.2-12.el6.x86_64 
guest info:
guest_name: win7sp1-64
virtio-win: virtio-win-prewhql-0.1-24 

How reproducible:
100%

Steps to Reproduce:
1.create two qcow2 usb-storages.
# qemu-img create -f qcow2 usb-storage1.qcow2 100M
# qemu-img create -f qcow2 usb-storage2.qcow2 200M
2.boot windows 7 guest with emulated usb1.1 and usb2.0 sticks, the usb1.1 stick through the usb-hub add to the UHCI controller and the usb2.0 stick add to the EHCI controller directly.
eg:...-monitor stdio -usb -device usb-tablet,id=input1,bus=usb.0,port=1 -device usb-hub,bus=usb.0,port=2,id=hub -device usb-storage,bus=usb.0,port=2.4,drive=drive-usb-2-0,id=usb-2-0,removable=on -drive file=/home/usb-storage1.qcow2,if=none,id=drive-usb-2-0,media=disk,format=qcow2,cache=none,werror=stop,rerror=stop,aio=threads -device usb-ehci,id=ehci -device usb-storage,drive=drive-usb-0-0,id=usb-0-0,removable=on,bus=ehci.0,port=1 -drive file=/home/usb-storage2.qcow2,if=none,id=drive-usb-0-0,media=disk,format=qcow2,cache=none,werror=stop,rerror=stop,aio=native
3.check usb info war monitor.
(qemu) info usb
  Device 0.1, Port 1, Speed 12 Mb/s, Product QEMU USB Tablet
  Device 0.2, Port 2, Speed 12 Mb/s, Product QEMU USB Hub
  Device 0.3, Port 2.4, Speed 12 Mb/s, Product QEMU USB MSD
  Device 1.1, Port 1, Speed 480 Mb/s, Product QEMU USB MSD
4.initialize and format all the emulated usb sticks in the guest var
"Computer---->Manage---->Disk Management".
  
Actual results:
after the step 4, only find the emulated usb2.0 stick(200 MB), and it can be initialized and formatted successfully, but the emulated usb1.1 stick(100 MB) cann't be detected.

Expected results:
all of the emulated usb1.1 and usb2.0 sticks can be detected and can be initialized and formatted successfully.

Additional info:
If the usb1.1 stick add to the UHCI controller and the usb2.0 stick add to the EHCI controller directly in the step 2, the two sticks work well and all of them can be initialized and formatted successfully.
eg:...-usb -device usb-tablet,id=input-0-1,bus=usb.0,port=1 -device usb-storage,drive=drive-usb-0-1,id=usb-0-1,removable=on,bus=usb.0,port=2 -drive file=/home/usb-storage1.qcow2,if=none,id=drive-usb-0-1,media=disk,format=qcow2,cache=none,werror=stop,rerror=stop,aio=native -device usb-ehci,id=ehci -device usb-storage,drive=drive-usb-0-2,id=usb-0-2,removable=on,bus=ehci.0,port=1 -drive file=/home/usb-storage2.qcow2,if=none,id=drive-usb-0-2,media=disk,format=qcow2,cache=none,werror=stop,rerror=stop,aio=native

Comment 2 juzhang 2012-03-28 05:53:29 UTC
FYI
Bug 807313 - qemu-kvm core dumped while booting guest with usb-storage running on usb-hub(linux guest)

Seems these two bugs share the same trigger method just using different guests(one is windos,the other is linux)

Comment 3 Gerd Hoffmann 2012-03-28 15:46:46 UTC
Might be a dup of bug 796118.
Please retest with 2.6.32-253.el6.x86_64 or newer.

Comment 4 Sibiao Luo 2012-03-29 03:35:50 UTC
(In reply to comment #3)
> Might be a dup of bug 796118.
> Please retest with 2.6.32-253.el6.x86_64 or newer.

Hi Gred,
 
   I have retested this issue on the 2.6.32-253.el6.x86_64 with the same steps, all of the emulated usb1.1 and usb2.0 sticks can be detected and can be
initialized and formatted successfully. 
   
   so, this issue have been fixed on the latest qemu-kvm version.

Thx. & Best wish

Comment 5 Gerd Hoffmann 2012-03-29 07:33:48 UTC

*** This bug has been marked as a duplicate of bug 796118 ***