Bug 949514
| Summary: | fail to passthrough the USB3.0 stick to windows guest with xHCI controller under pc-i440fx-1.4 | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Sibiao Luo <sluo> | ||||||||
| Component: | qemu-kvm | Assignee: | Gerd Hoffmann <kraxel> | ||||||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> | ||||||||
| Severity: | medium | Docs Contact: | |||||||||
| Priority: | medium | ||||||||||
| Version: | 7.0 | CC: | acathrow, chayang, hhuang, juzhang, kraxel, michen, mrezanin, qzhang, rhod, virt-maint, xfu, xuhan | ||||||||
| Target Milestone: | rc | ||||||||||
| Target Release: | --- | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Whiteboard: | |||||||||||
| Fixed In Version: | qemu-kvm-1.5.3-7.el7 | Doc Type: | Bug Fix | ||||||||
| Doc Text: | Story Points: | --- | |||||||||
| Clone Of: | Environment: | ||||||||||
| Last Closed: | 2014-06-13 11:56:26 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
Sibiao Luo
2013-04-08 10:49:05 UTC
Created attachment 732639 [details]
the screejnshot of device manager for USB3.0 stick.
Please reassign if this problem turns out to be on the Windows guest. High change to be fixed in 1.5, please retest. Build in qemu-kvm-1.5.0-1.el7 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 *** Bug 949511 has been marked as a duplicate of this bug. *** 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. Port reset is fixed upstream: http://git.qemu.org/?p=qemu.git;a=commitdiff;h=dad5b9ea0895c227bc9d48b7f0a6fa51eaaa8661 Patches posted. Fix included in qemu-kvm-1.5.3-7.el7 *** Bug 1004278 has been marked as a duplicate of this bug. *** 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.
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.
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)
>
> 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
> 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.
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. |