Bug 947724
| Summary: | fail to passthrough USB stick via '-usbdevice host:$vendorid:$productid' under pc-i440fx-1.4 machine type | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Sibiao Luo <sluo> | ||||||||
| Component: | qemu-kvm | Assignee: | Yvugenfi <yvugenfi> | ||||||||
| Status: | CLOSED WONTFIX | QA Contact: | Virtualization Bugs <virt-bugs> | ||||||||
| Severity: | medium | Docs Contact: | |||||||||
| Priority: | high | ||||||||||
| Version: | 7.0 | CC: | acathrow, chayang, hhuang, juzhang, kraxel, martin.wilck, mazhang, michen, mmishael, qzhang, rhod, shuang, sluo, virt-maint, xfu | ||||||||
| Target Milestone: | rc | ||||||||||
| Target Release: | --- | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Whiteboard: | |||||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||||
| Doc Text: | Story Points: | --- | |||||||||
| Clone Of: | Environment: | ||||||||||
| Last Closed: | 2013-12-15 16:05:41 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-03 06:27:54 UTC
Created attachment 731049 [details]
device manager screenshoot.
I test it with other method with the usb stick passthrough under both Q35 and pc-i440fx-1.4 machine type, test results were listed as following. Test Matrix: +----------+---------------+---------------+ | Method | Q35 | pc-i440fx-1.4 | +----------+---------------+---------------+ | Method 1 | PASS | PASS | +----------+---------------+---------------+ | Method 2 | PASS | PASS | +----------+---------------+---------------+ | Method 3 | PASS | FAIL | +----------+---------------+---------------+ - Method 1: e.g:...-device usb-ehci,id=ehci,bus=pcie.0,addr=0x8 -device usb-host,hostbus=2,hostaddr=7,id=usb-stick,bus=ehci.0 - Method 2: e.g:...-device usb-ehci,id=ehci,bus=pcie.0,addr=0x8 -device usb-host,bus=ehci.0,vendorid=0x1516,productid=0x6221 - Method 3: e.g:...-device usb-ehci,id=ehci,bus=pcie.0,addr=0x8 -usbdevice host:1516:6221 Best Regards. sluo I tried the win7 64bit guest with '-usbdevice host:$vendorid:$productid' under the pc-i440fx-1.4, it hit the same issue as win2012 64bit, the device driver 'USB Mass Strage Device' was not loaded correctly. Also tried the rhel7.0 guest with '-usbdevice host:$vendorid:$productid' under the pc-i440fx-1.4, it has no such issue. Created attachment 802942 [details]
screen shot from Win7
I see the same problem with F19 and a Win7 guest. The windows device manager tells me "This Device cannot start (Code 10)".
Created attachment 836928 [details]
Qemu assigns the USB device 2.0 to UHCI (USB 1.0) .
host info: Linux Snarl.daynix 3.10.9-200.fc19.x86_64 #1 SMP Wed Aug 21 19:27:58 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux QEMU emulator version 1.6.1, Copyright (c) 2003-2008 Fabrice Bellard guest info: windows: win2012 64bit 2.boot a win2012 64bit guest with passthrough USB stick via '-usbdevice host:$vendorid:$productid' under pc-i440fx-1.4 machine type. # /usr/libexec/qemu-kvm -S -M pc-i440fx-1.4 -cpu SandyBridge...-readconfig /home/ich9-ehci-uhci.cfg -usbdevice host:1516:6221 This command line dosen't work for me either, You can use this line and it will work on pc-i440fx-1.4 and q35 or other method. -usb \ -usbdevice tablet \ -readconfig /home/mikim/general/ich9-ehci-uhci.cfg \ -device usb-host,hostbus=1,hostaddr=4 \ When using : Bus 001 Device 004: ID 1e3d:2096 Chipsbank Microelectronics Co., Ltd The problem is that Qemu assigns the USB device 2.0 to UHCI (Universal Host Controller Interface), Which is 1.0 and the host USB controller is USB 2.0 and also the device itself. So there is problem to operate USB 2.0 device with USB 1.0 controller assigned to it. Regarding : I test it with other method with the usb stick pass through under both Q35 and pc-i440fx-1.4 machine type, test results were listed as following. Test Matrix: +----------+---------------+---------------+ | Method | Q35 | pc-i440fx-1.4 | +----------+---------------+---------------+ | Method 1 | PASS | PASS | +----------+---------------+---------------+ | Method 2 | PASS | PASS | +----------+---------------+---------------+ | Method 3 | PASS | FAIL | +----------+---------------+---------------+ This is correct. Conclusions: Don't use the directive "-usbdevice host:1516:6221" with USB pass through on pc-i440fx-1.4. Usb pass through works. Hi Sluo, Can you please have a look which method is used by libvirt? If libvirt using method3, we might need to reopen this bug. Thanks. Best Regards, Junyi (In reply to juzhang from comment #7) > Hi Sluo, > > Can you please have a look which method is used by libvirt? If libvirt using > method3, we might need to reopen this bug. Thanks. > the libvirt use the method *1* specified hostbus and hostaddr. # lsusb | grep CompUSA Bus 002 Device 003: ID 1516:6221 CompUSA Configure my sluo_win2012-64.xml: ... <hostdev mode='subsystem' type='usb' managed='yes'> <source> <vendor id='0x1516'/> <product id='0x6221'/> </source> </hostdev> ... # virsh define sluo_win2012-64.xml Domain sluo_win2012-64 defined from sluo_win2012-64.xml # virsh start sluo_win2012-64 Domain sluo_win2012-64 started After VM boot up, i check the qmeu-kvm command line which was "-device usb-host,hostbus=2,hostaddr=3,id=hostdev0". # ps axu | grep qemu-kvm qemu 9272 70.2 1.3 2163544 106440 ? Sl 14:23 0:12 /usr/libexec/qemu-kvm -name sluo_win2012-64 -S -machine pc-i440fx-rhel7.0.0,accel=tcg,usb=off -m 1024 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid b192ddaf-e73f-4812-bb8f-007b2e2a34d7 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/sluo_win2012-64.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot order=c,menu=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5 -drive file=/home/win2012-64.qcow2,if=none,id=drive-ide0-0-0,format=qcow2,cache=none,aio=native -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -device usb-tablet,id=input0 -spice port=5900,addr=127.0.0.1,disable-ticketing,seamless-migration=on -vga qxl -global qxl-vga.ram_size=67108864 -global qxl-vga.vram_size=67108864 -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device usb-host,hostbus=2,hostaddr=3,id=hostdev0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6 Best Regards, sluo Thanks sluo. If so, from QE POV, it's ok closed as wontfix. Best Regards, Junyi |