Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 949225

Summary: Passthrough USB 2.0 stick can't be detected inside windows guest using uhci controller under pc-i440fx-xx machine type
Product: Red Hat Enterprise Linux 7 Reporter: Sibiao Luo <sluo>
Component: qemu-kvmAssignee: Gerd Hoffmann <kraxel>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: acathrow, chayang, hhuang, juzhang, kraxel, michen, qzhang, qzhou, rhod, virt-maint, xfu
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: 2013-08-01 12:28:29 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:
Attachments:
Description Flags
device manager of screenshot for passthrough USB2.0 stick to guest under pc-i440fx-1.4. none

Description Sibiao Luo 2013-04-07 05:52:40 UTC
Description of problem:
Passthrough USB 2.0 stick to windows guest using uhci controller under pc-i440fx-1.4, but can't be detected it inside guest. btw, if i test it under the Q35 using uhci controller, it have no such issue. we have a existing bug 757936 in rhel6. 

Version-Release number of selected component (if applicable):
hostinfo:
kernel-3.9.0-0.rc4.45.el7.x86_64
qemu-kvm-1.4.0-1.el7.x86_64
seabios-1.7.2-0.2.gita810e4e7.el7.x86_64
guest info:
win2012 64bit

How reproducible:
100%

Steps to Reproduce:
1.get the usb info.
# lsusb | grep Kingston
Bus 002 Device 022: ID 0951:1642 Kingston Technology DT101 G2
# lsusb -v
Bus 002 Device 022: ID 0951:1642 Kingston Technology DT101 G2
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0951 Kingston Technology
  idProduct          0x1642 DT101 G2
...
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)
2.passthrough USB stick to windows guest using uhci controller under pc-i440fx-1.4
# /usr/libexec/qemu-kvm -S -M pc-i440fx-1.4 -cpu SandyBridge -enable-kvm -m 4096 -smp 2,sockets=2,cores=1,threads=1 -no-kvm-pit-reinjection -name sluo-test -uuid ed09fa10-6ffe-4811-a42f-0294afcb5a42 -rtc base=localtime,clock=host,driftfix=slew -device virtio-serial-pci,id=virtio-serial0,max_ports=16,vectors=0,bus=pci.0,addr=0x3 -chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait -device virtserialport,chardev=channel1,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port1 -chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait -device virtserialport,chardev=channel2,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port2 -drive file=/home/windows_server_2012_x64.qcow2,if=none,id=drive-system-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop,serial=QEMU-DISK1 -device virtio-scsi-pci,bus=pci.0,addr=0x4,id=scsi0 -device scsi-hd,bus=scsi0.0,drive=drive-system-disk,id=system-disk,bootindex=1 -netdev tap,id=hostnet0,vhost=off,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=08:2e:5f:0a:0d:b1,bus=pci.0,addr=0x5,bootindex=2 -device virtio-balloon-pci,id=ballooning,bus=pci.0,addr=0x6 -drive file=/home/my-data-disk.raw,if=none,id=drive-data-disk,format=raw,cache=none,aio=native,werror=stop,rerror=stop,serial=QEMU-DISK2 -device virtio-scsi-pci,bus=pci.0,addr=0x7,id=scsi1 -device scsi-hd,bus=scsi1.0,drive=drive-data-disk,id=data-disk -usb -device usb-host,hostbus=2,hostaddr=22,id=hostdev1 -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -serial unix:/tmp/ttyS0,server,nowait -qmp tcp:0:4444,server,nowait -k en-us -boot menu=on -vnc :1 -spice disable-ticketing,port=5931 -monitor stdio
3.check the device manager in guest.
  
Actual results:
after step 3, fail to detect the usb disk inside windows guest via device manager. I will attach the screenshot later.

Expected results:
we can passthrough the USB2.0 stick to guest using uhci controller(1.1) successfully.

Additional info:

Comment 1 Sibiao Luo 2013-04-07 05:53:28 UTC
Created attachment 732276 [details]
device manager of screenshot for passthrough USB2.0 stick to guest under pc-i440fx-1.4.

Comment 2 Sibiao Luo 2013-04-07 05:54:21 UTC
My USB detail info:
Bus 002 Device 022: ID 0951:1642 Kingston Technology DT101 G2
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0951 Kingston Technology
  idProduct          0x1642 DT101 G2
  bcdDevice            1.00
  iManufacturer           1 Kingston
  iProduct                2 DT 101 G2
  iSerial                 3 001CC0EC32C7BB4107110077
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              200mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)

Comment 3 Sibiao Luo 2013-04-07 05:57:47 UTC
I also tried the USB3.0 stick with uhci, it fail to be detected in guest, but according to the bug 921483 comment #5 that USB 3.0 stick must be passedthrough using ehci (or xhci) and USB 2.0 stick which support 1.1 controller.

Comment 4 Sibiao Luo 2013-04-07 06:02:20 UTC
# lspci -v
...
00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 04) (prog-if 20 [EHCI])
	Subsystem: Hewlett-Packard Company Device 1495
	Flags: bus master, medium devsel, latency 0, IRQ 23
	Memory at fe726000 (32-bit, non-prefetchable) [size=1K]
	Capabilities: [50] Power Management version 2
	Capabilities: [58] Debug port: BAR=1 offset=00a0
	Capabilities: [98] PCI Advanced Features
	Kernel driver in use: ehci-pci

...

Comment 5 Gerd Hoffmann 2013-05-14 14:33:17 UTC
please retest with qemu 1.5, switch to libvirt-based usb-host implementation might have fixed this.

Comment 6 juzhang 2013-05-16 02:32:36 UTC
Hi Sluo,

Please retest once our internal build which is based on qemu.15.

Comment 7 Sibiao Luo 2013-05-30 02:22:42 UTC
(In reply to Gerd Hoffmann from comment #5)
> please retest with qemu 1.5, switch to libvirt-based usb-host implementation
> might have fixed this.
(In reply to juzhang from comment #6)
> Hi Sluo,
> 
> Please retest once our internal build which is based on qemu.15.

Still hit this issue on qemu-kvm-1.5.0-2.el7.x86_64.
Passthrough USB 2.0 stick to windows guest using uhci controller under pc-i440fx-1.5, but can't be detected it inside guest, it has problem.
Btw, if i test it under the Q35 using uhci controller, it have no such issue.

host info:
kernel-3.10.0-0.rc2.57.el7.x86_64
qemu-kvm-1.5.0-2.el7.x86_64
guest info:
win-2012 64bit

Best Regards,
sluo

Comment 8 Gerd Hoffmann 2013-08-01 12:28:29 UTC
Seems to be a guest issue.  Windows complains about invalid parameters in the device manager.  Which -- strictly speaking -- is correct.  The device runs in usb2 mode on the host, and the usb descriptors may violate the usb1 specs.  With luck it may work nevertheless, and often it does.  Linux guests for example don't care, likewise older Windows versions.  But here is no guarantee that it will work.

Please attach the usb2 stick to a ehci or xhci controller.