Bug 1397253 - USB 3.0 Mass Storage redirection not functional
Summary: USB 3.0 Mass Storage redirection not functional
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: qemu
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Fedora Virtualization Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-22 04:11 UTC by SJM
Modified: 2017-01-16 13:59 UTC (History)
11 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-01-16 13:59:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
libvirt VM configuration (6.39 KB, text/html)
2016-11-22 04:11 UTC, SJM
no flags Details
lsbusb output for affected device (1.94 KB, text/plain)
2016-11-22 04:13 UTC, SJM
no flags Details

Description SJM 2016-11-22 04:11:27 UTC
Created attachment 1222566 [details]
libvirt VM configuration

Description of problem:

VM Host: Lenovo Carbon X1 Gen 4 laptop; Fedora 24; USB3 ports

Hypervisor: KVM managed by libvirt

VM Guest 'Hardware' - refer to attached XML file, in summary
 - Q35 Chipset (issue also present on pc-i440fx-2.6 chipset); 
 - Emulated USB Controller (ich9-ehci1; ich9-ehci1; ich9-ehci1; ich9-ehci1) refer to additional information section regarding issue with nec-xhci controller.

VM OS:
 - Windows 10
 - vdagent in use

Problem:
When redirecting a USB 3.0 flash drive ("Verbatim STORE N GO") plugged into a USB3 port on the Fedora 24 host through the gnome-boxes client (also on the same host), then the Windows 10 virtual machine reports that the USB drive has an "Invalid Device Descriptor" and the device is not usable inside the VM.

Other USB drives (presumably USB2) redirect fine; the inbuilt camera also redirects fine. Note the USB 3 drive works fine physical Windows 10 machines.

Issue is the same regardless of Q35 or pc-i440fx-2.6.

Version-Release number of selected component (if applicable):
- QEMU emulator version 2.6.2 (qemu-2.6.2-5.fc24)
- Q35 Chipset and pc-i440fx-2.6 chipset
- libvirtd (libvirt) 1.3.3.2
- Gnome-Boxes 3.20.3
- Kernel 4.8.8-200.fc24.x86_64

How reproducible: Every-time


Steps to Reproduce:
1. Assume VM configured as per above (refer to XML attachment)
2. Insert Verbatim Store N Go USB 3.0 (assuming all USB 3.0 devices) - other USB2 drives are ok.
3. Redirect device in gnome-boxes

Actual results:
Windows VM states the device malfunctioned; Device manager reports "Invalid Device Descriptor"

Expected results:
USB drive works in guest

Additional info:
Refer to lsusb output filtered to show USB3 drive in question

Also tested the nec-xhci emulated controller (ich9 controllers removed during the test), however in this case Windows sees the controller but all USB storage that previously worked and the camera no longer work (same error in Windows - "Invalid Device Descriptor"). This might be another bug post or configuration issue.

Comment 1 SJM 2016-11-22 04:13:04 UTC
Created attachment 1222567 [details]
lsbusb output for affected device

Comment 2 SJM 2016-12-12 04:02:35 UTC
Since Windows 10 Guest shows an error when this device is redirected, is it possible that redirection is working, however some invalid/corrupted device descriptor is being passed through?

Comment 3 Victor Toso 2016-12-12 22:11:08 UTC
Does this work on Linux guest?
Which version of usbredir are you using?
Can you try with remote-viewer (just to be sure this is not gnome-boxes bug)?

Comment 4 SJM 2016-12-13 05:09:53 UTC
Victor,

It doesn't work on a Fedora 25 Guest using remote-viewer this is what I get from dmesg when the USB drive in question is redirected
[   76.157252] usb 2-1.3: new full-speed USB device number 4 using uhci_hcd
[   76.238386] usb 2-1.3: device descriptor read/64, error 18
[   76.429430] usb 2-1.3: device descriptor read/64, error 18
[   76.604311] usb 2-1.3: new full-speed USB device number 5 using uhci_hcd
[   76.689348] usb 2-1.3: device descriptor read/64, error 18
[   76.871333] usb 2-1.3: device descriptor read/64, error 18
[   77.044355] usb 2-1.3: new full-speed USB device number 6 using uhci_hcd
[   77.061261] usb 2-1.3: Invalid ep0 maxpacket: 9
[   77.129195] usb 2-1.3: new full-speed USB device number 7 using uhci_hcd
[   77.187401] usb 2-1.3: Invalid ep0 maxpacket: 9
[   77.188606] usb 2-1-port3: unable to enumerate USB device

however, other USB drives (assuming these are USB2) do work. All I know for sure is the USB3 that doesn't work in VMs work fine in the host machine.

As to what version of usbredir I'm using on Windows...not sure. I don't believe I have it installed. I do have vdagent 0.8.0 and then Qemu-guest tools installed through.

Any ideas for debugging?

Comment 5 Victor Toso 2016-12-13 06:42:11 UTC
Very similar to https://bugzilla.redhat.com/show_bug.cgi?id=976685#c11

It seems that the device you are using is wrong, it should be xhci controller instead of uhci one. Se also https://bugzilla.redhat.com/show_bug.cgi?id=976685#c20

(In reply to SJM from comment #4)
> As to what version of usbredir I'm using on Windows...not sure. I don't
> believe I have it installed. I do have vdagent 0.8.0 and then Qemu-guest
> tools installed through.

Not in windows, but in the client-side.
Both QEMU and usbredir must be built against libusbx >= 1.0.20 to have the usb 3.0 support. I saw in koji that qemu-2.6.2-5.fc24 has it but usbredir is also important (gnome-boxes/remote-viewer -> spice-gtk -> usbredir -> libusb)

> 
> Any ideas for debugging?

For now it seems configuration. The issue is that redirection can appear to be okay from client perspective so, for now, checking the packages and dmesg message in the guest is enough.

Please, let me know if updating the F25 devices helped you or has showed something different in dmesg.

Comment 6 Victor Toso 2016-12-19 13:15:14 UTC
Forgot to set needinfo on comment #5

Comment 7 Cole Robinson 2017-01-16 13:59:07 UTC
No response for a month, so closing. SJM if you can still reproduce, please reopen and reply to comment #5


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