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 949514 - fail to passthrough the USB3.0 stick to windows guest with xHCI controller under pc-i440fx-1.4
Summary: fail to passthrough the USB3.0 stick to windows guest with xHCI controller un...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Gerd Hoffmann
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 949511 1004278 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-08 10:49 UTC by Sibiao Luo
Modified: 2014-06-18 03:26 UTC (History)
12 users (show)

Fixed In Version: qemu-kvm-1.5.3-7.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 11:56:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
the screejnshot of device manager for USB3.0 stick. (83.60 KB, image/png)
2013-04-08 10:50 UTC, Sibiao Luo
no flags Details
'invalid serial number string descriptor' screen shot (53.67 KB, image/png)
2013-11-05 06:53 UTC, Xu Han
no flags Details
host USB device info (17.00 KB, image/png)
2013-11-05 07:05 UTC, Xu Han
no flags Details

Description Sibiao Luo 2013-04-08 10:49:05 UTC
Description of problem:
passthrough the USB3.0 stick to windows guest with xHCI controller under pc-i440fx-1.4, it can regonize the xhci controller, but have 'Unknown USB Device(Port Reset Failed)' in device manager and fail to detect in guest. 

There is a different Bug 947042 - fail to regonize the xhci controller in win2012 and win8 guest undere Q35, Bug 947042 comment #4 passthrough the USB3.0 using the xHCI controller to windows guest under Q35 also hit this issue, it fail to regonize the xhci controller.

Version-Release number of selected component (if applicable):
host info:
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:
windows: win2012/win8 64bit

How reproducible:
100%

Steps to Reproduce:
1.get the usb3.0 info from host.
# lsusb | grep CompUSA
Bus 010 Device 005: ID 1516:6221 CompUSA
# lsusb -v
...
Bus 010 Device 005: ID 1516:6221 CompUSA 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         9
  idVendor           0x1516 CompUSA
  idProduct          0x6221
...
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength           22
  bNumDeviceCaps          2
  USB 2.0 Extension Device Capability:
    bLength                 7
    bDescriptorType        16
    bDevCapabilityType      2
    bmAttributes   0x00000002
      Link Power Management (LPM) Supported
  SuperSpeed USB Device Capability:
    bLength                10
    bDescriptorType        16
    bDevCapabilityType      3
    bmAttributes         0x00
    wSpeedsSupported   0x000e
      Device can operate at Full Speed (12Mbps)
      Device can operate at High Speed (480Mbps)
      Device can operate at SuperSpeed (5Gbps)
    bFunctionalitySupport   1
      Lowest fully-functional device speed is Full Speed (12Mbps)
    bU1DevExitLat          10 micro seconds
    bU2DevExitLat        2047 micro seconds
Device Status:     0x0000
  (Bus Powered)
...
2.passthrough the USB3.0 stick to windows guest with xHCI 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/sluo/windows_server_2012_x64_bak.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 -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 -device nec-usb-xhci,id=xhci0 -device usb-host,hostbus=10,hostaddr=5,id=usb-stick
3.check the usb info via HMP monitor.
(qemu) info usb
(qemu) info qtree
4.check the device manager in guest.
  
Actual results:
after step 3,
(qemu) info usb
  Device 0.2, Port 1, Speed 5000 Mb/s, Product host:10.5
(qemu) info qtree
...
  dev: i440FX-pcihost, id ""
    irq 0
    bus: pci.0
      type PCI
      dev: nec-usb-xhci, id "xhci0"
        msi = on
        msix = on
        intrs = 16
        slots = 64
        p2 = 4
        p3 = 4
        addr = 07.0
        romfile = <null>
        rombar = 1
        multifunction = off
        command_serr_enable = on
        class USB controller, addr 00:07.0, pci id 1033:0194 (sub 1af4:1100)
        bar 0: mem at 0xfebf0000 [0xfebf3fff]
        bus: xhci0.0
          type usb-bus
          dev: usb-host, id "usb-stick"
            hostbus = 10
            hostaddr = 5
            hostport = <null>
            vendorid = 0x0
            productid = 0x0
            isobufs = 4
            bootindex = -1
            pipeline = on
            port = <null>
            full-path = on
            addr 0.2, port 1, speed 5000, name host:10.5, attached
...
after step 4, it can regonize the xhci controller, but have 'Unknown USB Device(Port Reset Failed)' in device manager, and fail to detect the usb disk in guest. I will attach the screenshot of device manager later.

Expected results:
it can be detected the passthrough the USB3.0 stick in windows guest successfully without any problem.

Additional info:

Comment 1 Sibiao Luo 2013-04-08 10:50:33 UTC
Created attachment 732639 [details]
the screejnshot of device manager for USB3.0 stick.

Comment 2 Hai Huang 2013-04-11 17:19:09 UTC
Please reassign if this problem turns out to be on the Windows guest.

Comment 3 Gerd Hoffmann 2013-05-14 14:42:02 UTC
High change to be fixed in 1.5, please retest.

Comment 4 Miroslav Rezanina 2013-05-23 12:09:10 UTC
Build in qemu-kvm-1.5.0-1.el7

Comment 5 Sibiao Luo 2013-07-02 07:47:55 UTC
still hit this issue with win8 guest on kernel-3.10.0-0.rc7.64.el7.x86_64 & qemu-kvm-1.5.1-1.el7.x86_64. it can regonize the xhci controller, but have 'Unknown USB Device(Port Reset Failed)' in device manager, and fail to detect the usb disk in guest. So, re-assigned it.

host info:
# uname -r && rpm -q qemu-kvm
3.10.0-0.rc7.64.el7.x86_64
qemu-kvm-1.5.1-1.el7.x86_64
guest info:
win8 64bit

Best Regards,
sluo

Comment 6 Hans de Goede 2013-07-11 08:20:16 UTC
*** Bug 949511 has been marked as a duplicate of this bug. ***

Comment 7 Gerd Hoffmann 2013-08-01 12:46:53 UTC
At least partly related to bug 980415: Same failure mode (first data transfer fails).  Thats why windows wants reset the port in the first place.

There is more though:  Of course the port reset should not have failed.

Comment 8 Gerd Hoffmann 2013-08-30 08:32:02 UTC
Port reset is fixed upstream:
http://git.qemu.org/?p=qemu.git;a=commitdiff;h=dad5b9ea0895c227bc9d48b7f0a6fa51eaaa8661

Comment 9 Gerd Hoffmann 2013-08-30 09:41:44 UTC
Patches posted.

Comment 10 Miroslav Rezanina 2013-09-26 09:33:27 UTC
Fix included in qemu-kvm-1.5.3-7.el7

Comment 12 Gerd Hoffmann 2013-10-30 08:08:09 UTC
*** Bug 1004278 has been marked as a duplicate of this bug. ***

Comment 13 Xu Han 2013-11-05 06:51:13 UTC
Reproduce this bug with components:
qemu-kvm-1.4.0-1.el7.x86_64

Steps:
1.get the usb3.0 info from host.
# lsusb | grep Com
Bus 004 Device 002: ID 1516:6221 CompUSA

2.passthrough the USB3.0 stick to windows guest with xHCI controller under pc-i440fx-1.4
/usr/libexec/qemu-kvm -nodefaults -M pc-i440fx-1.4 -m 2G -cpu SandyBridge -enable-kvm -smp 4,cores=2,threads=2,sockets=1 -rtc base=localtime,clock=host,driftfix=slew -name vm1 -boot menu=on -monitor stdio -vga qxl -spice disable-ticketing,port=5931 -drive file=/home/win2012-64-virtio.qcow2,id=guest-img,if=none -device ide-hd,drive=guest-img,id=os-disk,bootindex=1 -device virtio-balloon-pci,id=balloon -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -qmp tcp:0:5555,server,nowait -serial unix:/tmp/guest-sock,server,nowait \
-device nec-usb-xhci,id=xhci0 \
-device usb-host,hostbus=4,hostaddr=2,id=usb-stick

3.check the usb info via HMP.
(qemu) info usb
(qemu) info qtree

4.check the device manager in guest.

Result: 
after step 3,
(qemu) info usb
  Device 0.2, Port 1, Speed 5000 Mb/s, Product host:4.2
(qemu) info qtree
... 
  dev: i440FX-pcihost, id ""
    irq 0
    bus: pci.0
      type PCI
      dev: nec-usb-xhci, id "xhci0"
        msi = on
        msix = on
        intrs = 16
        slots = 64
        p2 = 4
        p3 = 4
        addr = 04.0
        romfile = <null>
        rombar = 1
        multifunction = off
        command_serr_enable = on
        class USB controller, addr 00:04.0, pci id 1033:0194 (sub 1af4:1100)
        bar 0: mem at 0xfc010000 [0xfc013fff]
        bus: xhci0.0
          type usb-bus
          dev: usb-host, id "usb-stick"
            hostbus = 4
            hostaddr = 2
            hostport = <null>
            vendorid = 0x0
            productid = 0x0
            isobufs = 4
            bootindex = -1
            pipeline = on
            port = <null>
            full-path = on
            addr 0.2, port 1, speed 5000, name host:4.2, attached

after step 4, it can regonize the xhci controller, but have 'Unknown USB Device(Port Reset Failed)' in device manager, and fail to detect the usb disk in guest.

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

Same steps as above.

Result:
after step 1,
# lsusb | grep Com
Bus 006 Device 002: ID 1516:6221 CompUSA

after step 3,
(qemu) info usb
  Device 0.1, Port 1, Speed 5000 Mb/s, Product 
(qemu) info qtree 
  dev: i440FX-pcihost, id ""
    irq 0
    bus: pci.0
      type PCI
      dev: nec-usb-xhci, id "xhci0"
        msi = on
        msix = on
        intrs = 16
        slots = 64
        p2 = 4
        p3 = 4
        addr = 04.0
        romfile = <null>
        rombar = 1
        multifunction = off
        command_serr_enable = on
        class USB controller, addr 00:04.0, pci id 1033:0194 (sub 1af4:1100)
        bar 0: mem at 0xfc010000 [0xfc013fff]
        bus: xhci0.0
          type usb-bus
          dev: usb-host, id "usb-stick"
            hostbus = 6
            hostaddr = 2
            hostport = <null>
            vendorid = 0x0
            productid = 0x0
            isobufs = 4
            isobsize = 32
            bootindex = -1
            loglevel = 2
            pipeline = on
            port = <null>
            serial = <null>              <-- notice
            full-path = on
            addr 0.1, port 1, speed 5000, name , attached

after step 4, can regonize 'USB Mass Storage Device', but also has some issue - 'invalid serial number string descriptor'.

Please have a look at this issue.

Comment 14 Xu Han 2013-11-05 06:53:56 UTC
Created attachment 819540 [details]
'invalid serial number string descriptor' screen shot

Guest USB device screen shot with qemu-kvm-rhev-1.5.3-11.el7.x86_64.

Comment 15 Xu Han 2013-11-05 07:05:09 UTC
Created attachment 819544 [details]
host USB device info

Attach screen shot about host USB 3.0 device information.

# lsusb -v
...
Bus 006 Device 002: ID 1516:6221 CompUSA 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         9
  idVendor           0x1516 CompUSA
  idProduct          0x6221 
  bcdDevice            1.00
  iManufacturer           1 
  iProduct                2 
  iSerial                 3 ā
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           44
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower                0mA
    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     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst               3
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst               3
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength           22
  bNumDeviceCaps          2
  USB 2.0 Extension Device Capability:
    bLength                 7
    bDescriptorType        16
    bDevCapabilityType      2
    bmAttributes   0x00000002
      Link Power Management (LPM) Supported
  SuperSpeed USB Device Capability:
    bLength                10
    bDescriptorType        16
    bDevCapabilityType      3
    bmAttributes         0x00
    wSpeedsSupported   0x000e
      Device can operate at Full Speed (12Mbps)
      Device can operate at High Speed (480Mbps)
      Device can operate at SuperSpeed (5Gbps)
    bFunctionalitySupport   1
      Lowest fully-functional device speed is Full Speed (12Mbps)
    bU1DevExitLat          10 micro seconds
    bU2DevExitLat        2047 micro seconds
Device Status:     0x0000
  (Bus Powered)

Comment 16 juzhang 2013-11-12 03:19:06 UTC
> 
> Verify this bug with component:
> qemu-kvm-rhev-1.5.3-11.el7.x86_64
> 
> Same steps as above.
> 
> Result:
> after step 1,
> # lsusb | grep Com
> Bus 006 Device 002: ID 1516:6221 CompUSA
> 
> after step 3,
> (qemu) info usb
>   Device 0.1, Port 1, Speed 5000 Mb/s, Product 
> (qemu) info qtree 
>   dev: i440FX-pcihost, id ""
>     irq 0
>     bus: pci.0
>       type PCI
>       dev: nec-usb-xhci, id "xhci0"
>         msi = on
>         msix = on
>         intrs = 16
>         slots = 64
>         p2 = 4
>         p3 = 4
>         addr = 04.0
>         romfile = <null>
>         rombar = 1
>         multifunction = off
>         command_serr_enable = on
>         class USB controller, addr 00:04.0, pci id 1033:0194 (sub 1af4:1100)
>         bar 0: mem at 0xfc010000 [0xfc013fff]
>         bus: xhci0.0
>           type usb-bus
>           dev: usb-host, id "usb-stick"
>             hostbus = 6
>             hostaddr = 2
>             hostport = <null>
>             vendorid = 0x0
>             productid = 0x0
>             isobufs = 4
>             isobsize = 32
>             bootindex = -1
>             loglevel = 2
>             pipeline = on
>             port = <null>
>             serial = <null>              <-- notice
>             full-path = on
>             addr 0.1, port 1, speed 5000, name , attached
> 
> after step 4, can regonize 'USB Mass Storage Device', but also has some
> issue - 'invalid serial number string descriptor'.
> 
> Please have a look at this issue.

Hi Gerd,

Could you have a look?

Best Regards,
Junyi

Comment 17 Gerd Hoffmann 2013-11-12 08:04:30 UTC
>             serial = <null>              <-- notice

Normal.  serial properry is not used for usb-host (and usbredir) devices.
They pass through the serial number of the physical usb device instead.

Comment 20 Ludek Smid 2014-06-13 11:56:26 UTC
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.