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.
Description of problem:
boot a windows guest passthrough the USB3.0 stick to it redirected from usb-host with xHCI controller, but fail to detect it in guest, and check the speed of the usb via HMP monitor is 1.5 Mb/s.
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.boot a windows guest redirected with passthrough the USB3.0 stick from remote via usb-host with xHCI controller.
e.g:# /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 -chardev spicevmc,name=usbredir,id=usbredirchardev1 -device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,debug=3
3.connect the VM via 'remote-viewer spice://xxx:xxx'.
4.put the USB3.0 stick in the usb-host and press 'cont' in monitor.
5.check the usb info via HMP monitor.
(qemu) info usb
(qemu) info qtree
6.check the usb disk in guest.
Actual results:
after step 5, the speed of the usb is 1.5Mb/s.
(qemu) info usb
Device 0.0, Port 1, Speed 1.5 Mb/s, Product USB Redirection Device
(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-redir, id "usbredirdev1"
chardev = usbredirchardev1
debug = 3
filter = <null>
bootindex = -1
port = <null>
full-path = on
addr 0.0, port 1, speed 1.5, name USB Redirection Device
...
after step 6, it fail to detect the usb disk in guest via device manager.
Expected results:
the speed of the usb should be 5000 Mb/s, and can be detected in guest and used correctly.
Additional info:
I've just tested this with a Linux guest, and everything works fine for me:
(qemu) info usb
Device 0.1, Port 3, Speed 5000 Mb/s, Product USB Redirection Device
Sibiao Luo, the "Device 0.0" in your "info usb" output suggest that no device has been redirected at all.
Are you sure the the usb-stick was redirected ?
Maybe the remote-viewer window did not have the keyboard focus when you plugged in the stick ?
Can you please try again, and after inserting the stick, in remote-viewer go to "File -> USB device selection" and ensure that the usb3 stick is selected there ?
(In reply to Hans de Goede from comment #3)
> I've just tested this with a Linux guest, and everything works fine for me:
>
> (qemu) info usb
> Device 0.1, Port 3, Speed 5000 Mb/s, Product USB Redirection Device
>
> Sibiao Luo, the "Device 0.0" in your "info usb" output suggest that no
> device has been redirected at all.
>
> Are you sure the the usb-stick was redirected ?
>
> Maybe the remote-viewer window did not have the keyboard focus when you
> plugged in the stick ?
>
> Can you please try again, and after inserting the stick, in remote-viewer go
> to "File -> USB device selection" and ensure that the usb3 stick is selected
> there ?
Yes, I change the debug=2 and retest it again in qemu-kvm-1.5.1-2.el7.x86_64 with the same steps as comment #0. It can redirected the USB3.0 stick from usb-host with xHCI controller to win2012 guest, but fail to detect the stick in guest as there was a 'Unknow USB Device (Port Reset Failed)', but the 'Renesas USB3.0 eXtensible Host Controller - 0100(Microsoft)' display well, I will attach the creenshot later.
Host info:
# uname -r && rpm -q qemu-kvm
3.10.0-1.el7.x86_64
qemu-kvm-1.5.1-2.el7.x86_64
guest info:
win2012 64bit
# lsusb | grep CompUSA
Bus 004 Device 003: ID 1516:6221 CompUSA
# /usr/libexec/qemu-kvm -S -M pc-i440fx-rhel7.0.0...-device nec-usb-xhci,id=xhci0 -chardev spicevmc,name=usbredir,id=usbredirchardev1 -device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,debug=2
(qemu) info usb
Device 0.1, Port 1, Speed 5000 Mb/s, Product USB Redirection Device
(qemu) info usbhost
Bus 4, Addr 3, Port 2, Speed 5000 Mb/s
Class 00: USB device 1516:6221,
Bus 1, Addr 4, Port 1.3.1, Speed 1.5 Mb/s
Class 00: USB device 0557:2213, CS-1734A V4.2.414
(qemu) info qtree
bus: main-system-bus
type System
dev: kvm-ioapic, id ""
gpio-in 24
gsi_base = 0
irq 0
mmio 00000000fec00000/0000000000001000
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 0xfebd0000 [0xfebd3fff]
bus: xhci0.0
type usb-bus
dev: usb-redir, id "usbredirdev1"
chardev = usbredirchardev1
debug = 2
filter = <null>
bootindex = -1
port = <null>
full-path = on
addr 0.1, port 1, speed 5000, name USB Redirection Device, attached
...
Best Regards,
sluo
(In reply to Sibiao Luo from comment #4)
> (In reply to Hans de Goede from comment #3)
> > Can you please try again, and after inserting the stick, in remote-viewer go
> > to "File -> USB device selection" and ensure that the usb3 stick is selected
> > there ?
>
> Yes, I change the debug=2 and retest it again in qemu-kvm-1.5.1-2.el7.x86_64
> with the same steps as comment #0.
<snip>
> (qemu) info usb
> Device 0.1, Port 1, Speed 5000 Mb/s, Product USB Redirection Device
Notice how the device now does have an address, and the speed is correct, so now usbredir is working properly but there seems to be an incompatibility between qemu's xhci emulation and the win2012 guest.
Also the error in the screenshot now is exactly the same as the one with qemu's host redirection. Marking this bug as a duplicate of the qemu bug, as this seems to be a qemu issue.
*** This bug has been marked as a duplicate of bug 949514 ***
Description of problem: boot a windows guest passthrough the USB3.0 stick to it redirected from usb-host with xHCI controller, but fail to detect it in guest, and check the speed of the usb via HMP monitor is 1.5 Mb/s. 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.boot a windows guest redirected with passthrough the USB3.0 stick from remote via usb-host with xHCI controller. e.g:# /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 -chardev spicevmc,name=usbredir,id=usbredirchardev1 -device usb-redir,chardev=usbredirchardev1,id=usbredirdev1,debug=3 3.connect the VM via 'remote-viewer spice://xxx:xxx'. 4.put the USB3.0 stick in the usb-host and press 'cont' in monitor. 5.check the usb info via HMP monitor. (qemu) info usb (qemu) info qtree 6.check the usb disk in guest. Actual results: after step 5, the speed of the usb is 1.5Mb/s. (qemu) info usb Device 0.0, Port 1, Speed 1.5 Mb/s, Product USB Redirection Device (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-redir, id "usbredirdev1" chardev = usbredirchardev1 debug = 3 filter = <null> bootindex = -1 port = <null> full-path = on addr 0.0, port 1, speed 1.5, name USB Redirection Device ... after step 6, it fail to detect the usb disk in guest via device manager. Expected results: the speed of the usb should be 5000 Mb/s, and can be detected in guest and used correctly. Additional info: