Bug 1055093

Summary: RFE: usb-host redir: make usb superspeed devices work when redirected to a non superspeed capable vm
Product: Red Hat Enterprise Linux 7 Reporter: Hans de Goede <hdegoede>
Component: qemu-kvm-rhevAssignee: Gerd Hoffmann <kraxel>
Status: CLOSED ERRATA QA Contact: Xujun Ma <xuma>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: chayang, coli, hachen, hdegoede, hhuang, huding, jen, juzhang, knoel, kraxel, mrezanin, qzhang, rbalakri, sherold, virt-bugs, virt-maint, yiwei
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-rhev-2.8.0 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 23:27:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 1046612, 1103193, 1146483, 1146486    

Description Hans de Goede 2014-01-18 19:10:44 UTC
Sibiao from QE noticed during testing that he can redirect an usb-3 mass storage device plugged into a usb-3 host-port when using Spice's usbredir, but not when using usb-host redirection.

Spice's usbredir has some code to make this work, it would be nice to add the same feature to usb-host redir too. This would be useful when using IE an usb-3 usb-stick in an usb-3 port and redirecting that to a vm which does not use xhci (ie because the guest os does not support xhci).

The usbredir code has 2 bits of code for this, one is that it keeps a compatible_speedmask which is used to indicate that a highspeed device may also be used in a full-speed emulated port, or a superspeed device in a highspeed or fullspeed port. See the use of "compatible_speedmask" and "usbredir_mark_speed_incompatible" in hw/usb/redirect.c .

The second bit of code modifies the device descriptor when it is requested by the guest since the maxpacketsize bits for ep0 have a different interpretation between usb-3 and usb-2/1 devices, see
the special casing of this at the top of the usbredir_control_packet() function in hw/usb/redirect.c .

Comment 1 Gerd Hoffmann 2014-07-02 13:39:55 UTC
upstream commit b88a3e01f5718d5da538bfe072cc8452107badca

Comment 2 Gerd Hoffmann 2014-07-04 11:26:52 UTC
Test builds: http://people.redhat.com/ghoffman/bz1103193/

Comment 3 Jun Li 2014-09-28 02:14:51 UTC
(In reply to Gerd Hoffmann from comment #2)
> Test builds: http://people.redhat.com/ghoffman/bz1103193/

Hi Gerd,
 
  The test builds(http://people.redhat.com/ghoffman/bz1103193/) can not be visited for QE now. Could you help to check this? And QE will add corresponding scenario in rhel 7.1 test plan. Thanks.


Best Regards,
Jun Li

Comment 4 Gerd Hoffmann 2014-09-29 09:14:56 UTC
>   The test builds(http://people.redhat.com/ghoffman/bz1103193/) can not be
> visited for QE now. Could you help to check this? And QE will add
> corresponding scenario in rhel 7.1 test plan. Thanks.

Deleted the builds due to running out of quota space.
Re-uploaded fresh builds to the same location now.

Comment 8 Jun Li 2015-01-20 06:54:37 UTC
Hi Hans,

QE do following testing:
+-----------+----------+----------------------+----------------------+
| Scenario  |USB stick |  Host usb controller |  qemu usb controller |
+-----------+----------+----------------------+----------------------+
|     1     |  usb 3.0 | usb 3.0 controller   |  ich9-usb-uhci1      |
+-----------+----------+----------------------+----------------------+
|     2     |  usb 3.0 | usb 3.0 controller   |  ich9-usb-ehci1      |
+-----------+----------+----------------------+----------------------+
|     3     |  usb 3.0 | usb 3.0 controller   |  nec-usb-xhci        |
+-----------+----------+----------------------+----------------------+

On host:
# lsusb -v -s 006:003

Bus 006 Device 003: 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)


For scenario 1:
#  /usr/libexec/qemu-kvm -m 2G -smp 2 -drive file=/mnt/linux_img/RHEL-Server-7.1-64-virtio.qcow2,if=none,id=img,snapshot=on -device virtio-blk-pci,drive=img,id=sys-img -monitor stdio -device ich9-usb-uhci1,id=ehci0 -device usb-host,hostbus=006,hostaddr=003,id=test-3,bus=ehci0.0 -vnc :1
QEMU 1.5.3 monitor - type 'help' for more information
(qemu) qemu-kvm: Warning: speed mismatch trying to attach usb device "" (super speed) to bus "ehci0.0", port "1" (full speed)

(qemu) qemu-kvm: Warning: speed mismatch trying to attach usb device "" (super speed) to bus "ehci0.0", port "1" (full speed)

(qemu) qemu-kvm: Warning: speed mismatch trying to attach usb device "" (super speed) to bus "ehci0.0", port "1" (full speed)

(qemu) info usb
usb       usbhost   
(qemu) info usb
  Device 0.0, Port 1, Speed 5000 Mb/s, Product

Results:
can not find this usb stick inside guest.

For scenario 2:
# /usr/libexec/qemu-kvm -m 2G -smp 2 -drive file=/mnt/linux_img/RHEL-Server-7.1-64-virtio.qcow2,if=none,id=img,snapshot=on -device virtio-blk-pci,drive=img,id=sys-img -monitor stdio -device ich9-usb-ehci1,id=ehci0 -device usb-host,hostbus=006,hostaddr=003,id=test-3,bus=ehci0.0 -vnc :1
QEMU 1.5.3 monitor - type 'help' for more information
(qemu) qemu-kvm: Warning: speed mismatch trying to attach usb device "" (super speed) to bus "ehci0.0", port "1" (high speed)

(qemu) qemu-kvm: Warning: speed mismatch trying to attach usb device "" (super speed) to bus "ehci0.0", port "1" (high speed)

(qemu) qemu-kvm: Warning: speed mismatch trying to attach usb device "" (super speed) to bus "ehci0.0", port "1" (high speed)

(qemu) info usb
  Device 0.0, Port 1, Speed 5000 Mb/s, Product 

Results:
can not find this usb stick inside guest.

For scenario 3:
#  /usr/libexec/qemu-kvm -m 2G -smp 2 -drive file=/mnt/linux_img/RHEL-Server-7.1-64-virtio.qcow2,if=none,id=img,snapshot=on -device virtio-blk-pci,drive=img,id=sys-img -monitor stdio -device nec-usb-xhci,id=ehci0 -device usb-host,hostbus=006,hostaddr=003,id=test-3,bus=ehci0.0 -vnc :1
QEMU 1.5.3 monitor - type 'help' for more information
(qemu)

Results:
can find and use this usb stick correctly.
==========================================
As above show, qe test qemu-kvm-1.5.3-85.el7.x86_64 and qemu-kvm-1.5.3-70.el7.x86_64, got the same testing results. So QE just have a query, how to verify this bz? QE can not so clearly understand comment 0's "usb-host redirection".

As above show, seems QE mis-understand your original meaning.

***
Sibiao from QE noticed during testing that he can redirect an usb-3 mass storage device plugged into a usb-3 host-port when using Spice's usbredir, but not when using usb-host redirection.
***

QE can not understand the meaning of above "usb-host redirection" ? Could you give some suggestions on how to verify this bz? Thanks.

Best Regards,
Jun Li

Comment 9 Jun Li 2015-01-20 08:38:54 UTC
QE also test with qemu-kvm-1.5.3-60.el7.x86_64, get the same results as comment 8's description.

Comment 13 Gerd Hoffmann 2015-10-22 08:44:16 UTC
Checked commit logs, I think the 2.3 rebase picked up the changes,
please retest.

Comment 14 juzhang 2015-10-22 08:57:01 UTC
(In reply to Gerd Hoffmann from comment #13)
> Checked commit logs, I think the 2.3 rebase picked up the changes,
> please retest.

Seems we need to update this to qemu-kvm-rhev since you mentioned 2.3 rebase fixed this.

Hi Xwei,

Could you have a try with latest qemu-kvm-rhev build?

Best Regards,
Junyi

Comment 15 Xiaoqing Wei 2015-10-22 09:31:55 UTC
(In reply to juzhang from comment #14)
> (In reply to Gerd Hoffmann from comment #13)
> > Checked commit logs, I think the 2.3 rebase picked up the changes,
> > please retest.
> 
> Seems we need to update this to qemu-kvm-rhev since you mentioned 2.3 rebase
> fixed this.
> 
> Hi Xwei,
> 
> Could you have a try with latest qemu-kvm-rhev build?
> 
> Best Regards,
> Junyi

Sure, looking for a USB 3.0 Mass Storage device.
Will update result then.

Comment 16 Xiaoqing Wei 2015-10-23 03:30:39 UTC
/usr/libexec/qemu-kvm -m 2G -smp 2 -drive file=/home/RHEL-Server-7.2-64-virtio.qcow2,if=none,id=img,snapshot=on -device virtio-blk-pci,drive=img,id=sys-img -monitor stdio -device ich9-usb-uhci1,id=ehci0 -vnc :10 -device usb-host,hostbus=003,hostaddr=003,id=test-3,bus=ehci0.0
QEMU 2.3.0 monitor - type 'help' for more information
(qemu) info usb
  Device 0.0, Port 1, Speed 1.5 Mb/s, Product USB Host Device
(qemu) info usbhost 
  Bus 3, Addr 6, Port 1, Speed 480 Mb/s
    Class 00: USB device 4971:1020, Touro Mobile 3.0
  Bus 7, Addr 3, Port 1.1, Speed 1.5 Mb/s
    Class 00: USB device 0557:2213, CS-1734A V4.2.418
(qemu) info version 
2.3.0 (qemu-kvm-rhev-2.3.0-31.el7)

in guest could only see one line:
usb 1.1 root hub in 'lsusb'


===================

/usr/libexec/qemu-kvm -m 2G -smp 2 -drive file=/home/RHEL-Server-7.2-64-virtio.qcow2,if=none,id=img,snapshot=on -device virtio-blk-pci,drive=img,id=sys-img -monitor stdio -device ich9-usb-ehci1,id=ehci0 -vnc :10 -device usb-host,hostbus=003,hostaddr=003,id=test-3,bus=ehci0.0
QEMU 2.3.0 monitor - type 'help' for more information
(qemu) info usb
  Device 0.0, Port 1, Speed 1.5 Mb/s, Product USB Host Device
(qemu) info usbhost 
  Bus 3, Addr 6, Port 1, Speed 480 Mb/s
    Class 00: USB device 4971:1020, Touro Mobile 3.0
  Bus 7, Addr 3, Port 1.1, Speed 1.5 Mb/s
    Class 00: USB device 0557:2213, CS-1734A V4.2.418
(qemu) info version 
2.3.0 (qemu-kvm-rhev-2.3.0-31.el7)

in guest could only see one line:
usb 2.0 root hub in 'lsusb'

====================


/usr/libexec/qemu-kvm -m 2G -smp 2 -drive file=/home/RHEL-Server-7.2-64-virtio.qcow2,if=none,id=img,snapshot=on -device virtio-blk-pci,drive=img,id=sys-img -monitor stdio -device nec-usb-xhci,id=ehci0 -vnc :10 -device usb-host,hostbus=003,hostaddr=003,id=test-3,bus=ehci0.0
QEMU 2.3.0 monitor - type 'help' for more information
(qemu) info usb
  Device 0.0, Port 1, Speed 1.5 Mb/s, Product USB Host Device
(qemu) info usbhost 
  Bus 3, Addr 6, Port 1, Speed 480 Mb/s
    Class 00: USB device 4971:1020, Touro Mobile 3.0
  Bus 7, Addr 3, Port 1.1, Speed 1.5 Mb/s
    Class 00: USB device 0557:2213, CS-1734A V4.2.418
(qemu) info version 
2.3.0 (qemu-kvm-rhev-2.3.0-31.el7)


in guest could see two lines in 'lsusb':
usb 2.0 root hub
usb 3.0 root hub

Comment 17 Gerd Hoffmann 2015-10-23 05:30:35 UTC
> usb-host,hostbus=003,hostaddr=003,id=test-3,bus=ehci0.0
                   ^^^          ^^^

> (qemu) info usbhost 
>   Bus 3, Addr 6, Port 1, Speed 480 Mb/s
>     Class 00: USB device 4971:1020, Touro Mobile 3.0

This is the usb stick I assume?  It's on address 6, not 3, thats why it doesn't show up.

The address changes each time you plug the device in and out.  I'd suggest to use either hostbus=3,hostport=1 (port is the physical plug), which will match every device you plug into that specific usb port.  Or use vendorid=0x4971,productid=0x1020, that'll match the specific device no matter where it is plugged in.

Also: usb stick is not plugged into a usb3 port on the host, it runs only on highspeed not superspeed.

Comment 18 Xiaoqing Wei 2015-10-23 08:51:56 UTC
Gerd, thanks for point out :)

re-tested, pls check results below

/usr/libexec/qemu-kvm -m 2G -smp 2 -drive file=/home/RHEL-Server-7.2-64-virtio.qcow2,if=none,id=img,snapshot=on -device virtio-blk-pci,drive=img,id=sys-img -monitor stdio -device ich9-usb-uhci1,id=ehci0 -vnc :10 -device usb-host,vendorid=0x4971,productid=0x1020,id=test-3,bus=ehci0.0
QEMU 2.3.0 monitor - type 'help' for more information
(qemu) info usb
  Device 0.1, Port 1, Speed 12 Mb/s, Product Touro Mobile 3.0
(qemu) info usbhost 
  Bus 4, Addr 12, Port 1, Speed 5000 Mb/s
    Class 00: USB device 4971:1020, Touro Mobile 3.0
  Bus 7, Addr 3, Port 1.1, Speed 1.5 Mb/s
    Class 00: USB device 0557:2213, CS-1734A V4.2.418

guest# lsusb
usb 1.1 hub

*no sign of /dev/sda *

=======================

 /usr/libexec/qemu-kvm -m 2G -smp 2 -drive file=/home/RHEL-Server-7.2-64-virtio.qcow2,if=none,id=img,snapshot=on -device virtio-blk-pci,drive=img,id=sys-img -monitor stdio -device ich9-usb-ehci1,id=ehci0 -vnc :10 -device usb-host,vendorid=0x4971,productid=0x1020,id=test-3,bus=ehci0.0
QEMU 2.3.0 monitor - type 'help' for more information
(qemu) info usb
  Device 0.1, Port 1, Speed 480 Mb/s, Product Touro Mobile 3.0
(qemu) info usbhost 
  Bus 4, Addr 12, Port 1, Speed 5000 Mb/s
    Class 00: USB device 4971:1020, Touro Mobile 3.0
  Bus 7, Addr 3, Port 1.1, Speed 1.5 Mb/s
    Class 00: USB device 0557:2213, CS-1734A V4.2.418

guest# lsusb
usb 2.0 hub

*no sign of /dev/sda *


======================

/usr/libexec/qemu-kvm -m 2G -smp 2 -drive file=/home/RHEL-Server-7.2-64-virtio.qcow2,if=none,id=img,snapshot=on -device virtio-blk-pci,drive=img,id=sys-img -monitor stdio -device nec-usb-xhci,id=ehci0 -vnc :10 -device usb-host,vendorid=0x4971,productid=0x1020,id=test-3,bus=ehci0.0
QEMU 2.3.0 monitor - type 'help' for more information
(qemu) info usb
  Device 0.1, Port 1, Speed 5000 Mb/s, Product Touro Mobile 3.0
(qemu) info usbhost 
  Bus 4, Addr 12, Port 1, Speed 5000 Mb/s
    Class 00: USB device 4971:1020, Touro Mobile 3.0
  Bus 7, Addr 3, Port 1.1, Speed 1.5 Mb/s
    Class 00: USB device 0557:2213, CS-1734A V4.2.418


guest# lsusb
Bus 002 Device 002: ID 4971:1020 SimpleTech
Bus 001 Device 001: ID 1d6b:0002 usb 2.0 hub
Bus 002 Device 001: ID 1d6b:0003 usb 3.0 hub

guest# parted /dev/sda print    // could see the device

Comment 19 Gerd Hoffmann 2015-10-23 12:28:23 UTC
https://patchwork.ozlabs.org/patch/534957/

Comment 20 Gerd Hoffmann 2016-04-15 11:47:54 UTC
upstream commit a9be4e7c48c4892c836bda1be4d550bb1a6732bd,
present in 2.5.0 and newer.

Comment 23 Yiqian Wei 2016-09-09 03:26:45 UTC
1.Reproduce version:
      host:kernel-3.10.0-327.8.1.el7.x86_64
           qemu-img-rhev-2.3.0-31.el7_2.21.x86_64
      guest:rhel7.3
2.Retest version-----failed
   host: kernel-3.10.0-505.el7.x86_64
         qemu-kvm-rhev-2.6.0-23.el7.x86_64
   guest:rhel7.3

QE do following testing:
+-----------+----------+----------------------+----------------------+
| Scenario  |USB stick |  Host usb controller |  qemu usb controller |
+-----------+----------+----------------------+----------------------+
|     1     |  usb 3.0 | usb 3.0 controller   |  ich9-usb-uhci1      |
+-----------+----------+----------------------+----------------------+
|     2     |  usb 3.0 | usb 3.0 controller   |  ich9-usb-ehci1      |
+-----------+----------+----------------------+----------------------+
|     3     |  usb 3.0 | usb 3.0 controller   |  nec-usb-xhci        |
+-----------+----------+----------------------+----------------------+
1.Reproduce
  1)Boot guest with device usb-host,vendorid=0x1516,productid=0x6221
  2)hmp:info usb
   Scenario1-----Device 1.1, Port 1, Speed 12 Mb/s, Product
    Scenario2-----Device 1.1, Port 1, Speed 480 Mb/s, Product
     Scenario3-----Device 1.1, Port 1, Speed 5000 Mb/s, Product
 3)guest:lsusb
  Scenario1-----Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
   Scenario2-----Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Scenario3-----Bus 003 Device 002: ID 1516:6221 CompUSA
   for Scenario1 and Scenario2,no sign of /dev/sda 
   for Scenario3,could see /dev/sda 

2.Retest
  1)Boot guest with device usb-host,vendorid=0x1516,productid=0x6221
  2)hmp:info usb
   Scenario1-----Device 1.0, Port 1, Speed 5000 Mb/s, Product,ID: test-3
    Scenario2-----Device 1.0, Port 1, Speed 5000 Mb/s, Product , ID: test-3
     Scenario3-----Device 1.1, Port 1, Speed 5000 Mb/s, Product , ID: test-3
  3)guest:lsusb
  Scenario1-----Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
   Scenario2-----Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Scenario3-----Bus 003 Device 002: ID 1516:6221 CompUSA
    for Scenario1 and Scenario2,no sign of /dev/sda 
    for Scenario3,could see /dev/sda

Additional info:boot a guest with command
For scenario1:
/usr/libexec/qemu-kvm \
-m 2G \
-smp 2 \
-drive file=/root/yiwe/test.qcow2,if=none,id=img,snapshot=on \
-device virtio-blk-pci,drive=img,id=sys-img \
-monitor stdio \
-usbdevice tablet \
-spice port=5930,disable-ticketing \
-netdev tap,id=hostnet0,vhost=on \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:21:24:8d,bus=pci.0 \
-device ich9-usb-uhci1,id=ehci0 \
-device usb-host,vendorid=0x1516,productid=0x6221,id=test-3,bus=ehci0.0 \

For scenario2:
/usr/libexec/qemu-kvm \
-m 2G \
-smp 2 \
-drive file=/root/yiwe/test.qcow2,if=none,id=img,snapshot=on \
-device virtio-blk-pci,drive=img,id=sys-img \
-monitor stdio \
-usbdevice tablet \
-spice port=5930,disable-ticketing \
-netdev tap,id=hostnet0,vhost=on \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:21:24:8d,bus=pci.0 \
-device ich9-usb-ehci1,id=ehci0 \
-device usb-host,vendorid=0x1516,productid=0x6221,id=test-3,bus=ehci0.0 \

For scenario3:
/usr/libexec/qemu-kvm \
-m 2G \
-smp 2 \
-drive file=/root/yiwe/test.qcow2,if=none,id=img,snapshot=on \
-device virtio-blk-pci,drive=img,id=sys-img \
-monitor stdio \
-usbdevice tablet \
-spice port=5930,disable-ticketing \
-netdev tap,id=hostnet0,vhost=on \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:21:24:8d,bus=pci.0 \
-device nec-usb-xhci,id=ehci0 \
-device usb-host,vendorid=0x1516,productid=0x6221,id=test-3,bus=ehci0.0 \

Comment 24 Gerd Hoffmann 2016-09-09 07:46:33 UTC
Bugfix: https://patchwork.ozlabs.org/patch/667916/
(compiling qemu without streams support masks the issue)

Comment 27 Gerd Hoffmann 2017-01-10 11:04:44 UTC
(In reply to Gerd Hoffmann from comment #24)
> Bugfix: https://patchwork.ozlabs.org/patch/667916/
> (compiling qemu without streams support masks the issue)

Merged upstream, qemu-2.8 has it.

Comment 29 Xujun Ma 2017-05-12 08:35:41 UTC
Test version:
qemu-kvm-rhev-2.8.0-6.el7.x86_64
host:3.10.0-588.el7.x86_64
guest:3.10.0-648.el7.x86_64

results:

with: 
ich9-usb-uhci1 failed (can't find usb3.0 stick in guest)

QEMU 2.8.0 monitor - type 'help' for more information
(qemu) qemu-kvm: libusb_release_interface: -4 [NO_DEVICE]
libusb: error [_open_sysfs_attr] open /sys/bus/usb/devices/4-5/bConfigurationValue failed ret=-1 errno=2
libusb: error [_get_usbfs_fd] File doesn't exist, wait 10 ms and try again
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/004/007: No such file or directory

host dmesg:
[10934.713847] usb 4-5: reset SuperSpeed USB device number 7 using xhci_hcd
[10935.409824] usb 4-5: reset SuperSpeed USB device number 7 using xhci_hcd
[10935.730798] usb 4-5: reset SuperSpeed USB device number 7 using xhci_hcd
[10935.950776] usb 4-5: reset SuperSpeed USB device number 7 using xhci_hcd
[10939.184569] usb 4-5: reset SuperSpeed USB device number 7 using xhci_hcd
[10939.526748] usb 4-5: reset SuperSpeed USB device number 7 using xhci_hcd
[10939.789553] usb 4-5: reset SuperSpeed USB device number 7 using xhci_hcd
[10940.009543] usb 4-5: reset SuperSpeed USB device number 7 using xhci_hcd
[10940.273526] usb 4-5: reset SuperSpeed USB device number 7 using xhci_hcd
[10940.492515] usb 4-5: reset SuperSpeed USB device number 7 using xhci_hcd
[10940.756508] usb 4-5: reset SuperSpeed USB device number 7 using xhci_hcd
[10940.975513] usb 4-5: reset SuperSpeed USB device number 7 using xhci_hcd
[10941.239466] usb 4-5: reset SuperSpeed USB device number 7 using xhci_hcd
[10941.460489] usb 4-5: reset SuperSpeed USB device number 7 using xhci_hcd
[10941.724433] usb 4-5: reset SuperSpeed USB device number 7 using xhci_hcd
[10941.893626] usb 4-5: reset SuperSpeed USB device number 7 using xhci_hcd
[10947.171173] xhci_hcd 0000:00:14.0: Command completion event does not match command
[10947.179306] xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command
[10952.386729] xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command
[10952.587613] usb 4-5: device not accepting address 7, error -62
[10952.645263] usb 4-5: USB disconnect, device number 7

guest dmesg:
[    5.269973] usb 1-1: reset full-speed USB device number 2 using uhci_hcd
[    5.752954] usb 1-1: reset full-speed USB device number 2 using uhci_hcd
[    6.236974] usb 1-1: reset full-speed USB device number 2 using uhci_hcd
[    6.719895] usb 1-1: reset full-speed USB device number 2 using uhci_hcd
[    7.203974] usb 1-1: reset full-speed USB device number 2 using uhci_hcd
[    7.637896] usb 1-1: reset full-speed USB device number 2 using uhci_hcd
[   19.211079] usb 1-1: USB disconnect, device number 2
[   19.217958] sd 2:0:0:0: [sda] FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
[   19.219224] sd 2:0:0:0: [sda] CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[   19.220253] blk_update_request: I/O error, dev sda, sector 0
[   19.221210] Buffer I/O error on dev sda, logical block 0, async page read
[   19.222265] Dev sda: unable to read RDB block 0
[   19.223164]  sda: unable to read partition table
[   19.224148] sd 2:0:0:0: [sda] Read Capacity(10) failed: Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
[   19.225446] sd 2:0:0:0: [sda] Sense not available.
[   19.226395] sd 2:0:0:0: [sda] Attached SCSI removable disk


ich9-usb-ehci1  pass(can find usb3.0 stick in guest)

    
nec-usb-xhci   pass(can find usb3.0 stick in guest)

Comment 30 Qunfang Zhang 2017-05-16 04:34:23 UTC
Hi, Gerd

Could you give a help to check the comment 29 test result?  QE tested this feature and it failed for ich9-usb-uhci1 controller.

Thanks,
Qunfang

Comment 31 Gerd Hoffmann 2017-05-16 06:53:26 UTC
(In reply to Qunfang Zhang from comment #30)
> Hi, Gerd
> 
> Could you give a help to check the comment 29 test result?  QE tested this
> feature and it failed for ich9-usb-uhci1 controller.

Non-matching speed support is "best effort", it isn't guaranteed to work.
If the device actually uses features of the newer usb specs (other than the higher speed, larger packet sizes for example) it may not work.  Also note that some newer usb devices stopped supporting usb 1.1, they work on usb2+3 ports only.

So, ehci working now is good.
And uhci not working isn't a blocker.

Comment 32 Qunfang Zhang 2017-05-16 06:59:47 UTC
(In reply to Gerd Hoffmann from comment #31)
> (In reply to Qunfang Zhang from comment #30)
> > Hi, Gerd
> > 
> > Could you give a help to check the comment 29 test result?  QE tested this
> > feature and it failed for ich9-usb-uhci1 controller.
> 
> Non-matching speed support is "best effort", it isn't guaranteed to work.
> If the device actually uses features of the newer usb specs (other than the
> higher speed, larger packet sizes for example) it may not work.  Also note
> that some newer usb devices stopped supporting usb 1.1, they work on usb2+3
> ports only.
> 
> So, ehci working now is good.
> And uhci not working isn't a blocker.

Thanks Gerd. Does that mean we could file a separate low priority bug to track uchi issue and verify this bug?

Comment 33 Gerd Hoffmann 2017-05-16 07:08:51 UTC
> Thanks Gerd. Does that mean we could file a separate low priority bug to
> track uchi issue and verify this bug?

No need to track that.

Comment 34 Qunfang Zhang 2017-05-16 08:33:57 UTC
(In reply to Gerd Hoffmann from comment #33)
> > Thanks Gerd. Does that mean we could file a separate low priority bug to
> > track uchi issue and verify this bug?
> 
> No need to track that.

Thanks for confirmation.

Comment 36 errata-xmlrpc 2017-08-01 23:27:12 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:2392

Comment 37 errata-xmlrpc 2017-08-02 01:04:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:2392

Comment 38 errata-xmlrpc 2017-08-02 01:56:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:2392

Comment 39 errata-xmlrpc 2017-08-02 02:37:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:2392

Comment 40 errata-xmlrpc 2017-08-02 03:02:18 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:2392

Comment 41 errata-xmlrpc 2017-08-02 03:22:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:2392