diff options
| author | Christian Krinitsin <mail@krinitsin.com> | 2025-06-16 16:59:00 +0000 |
|---|---|---|
| committer | Christian Krinitsin <mail@krinitsin.com> | 2025-06-16 16:59:33 +0000 |
| commit | 9aba81d8eb048db908c94a3c40c25a5fde0caee6 (patch) | |
| tree | b765e7fb5e9a3c2143c68b0414e0055adb70e785 /results/classifier/118/unknown/1385934 | |
| parent | b89a938452613061c0f1f23e710281cf5c83cb29 (diff) | |
| download | emulator-bug-study-9aba81d8eb048db908c94a3c40c25a5fde0caee6.tar.gz emulator-bug-study-9aba81d8eb048db908c94a3c40c25a5fde0caee6.zip | |
add 18th iteration of classifier
Diffstat (limited to 'results/classifier/118/unknown/1385934')
| -rw-r--r-- | results/classifier/118/unknown/1385934 | 183 |
1 files changed, 183 insertions, 0 deletions
diff --git a/results/classifier/118/unknown/1385934 b/results/classifier/118/unknown/1385934 new file mode 100644 index 00000000..c554fcc9 --- /dev/null +++ b/results/classifier/118/unknown/1385934 @@ -0,0 +1,183 @@ +user-level: 0.928 +device: 0.904 +risc-v: 0.901 +KVM: 0.899 +hypervisor: 0.891 +graphic: 0.890 +x86: 0.884 +permissions: 0.880 +assembly: 0.875 +virtual: 0.873 +mistranslation: 0.858 +VMM: 0.857 +semantic: 0.856 +architecture: 0.852 +peripherals: 0.841 +TCG: 0.839 +ppc: 0.836 +debug: 0.834 +boot: 0.829 +files: 0.828 +PID: 0.827 +kernel: 0.818 +vnc: 0.814 +register: 0.809 +network: 0.806 +performance: 0.790 +socket: 0.778 +arm: 0.777 +i386: 0.765 + +USB with passthrougth guest cannot enumerate USB host + +Following the guide at http://www.linux-kvm.org/page/USB_Host_Device_Assigned_to_Guest +Qemu is launched with qemu-system-x86_64 /dev/vgstripe/kvm_wifi -enable-kvm -m 512 -k fr -net nic -net tap,ifname=tap1,script=/bin/ifup.script -kernel /usr/src/linux_git/arch/x86_64/boot/bzImage -append root=/dev/sda -usb -device usb-host,hostbus=1,hostaddr=6 +The USB device does not show and USB stack seems not working +On the guest: +dmesg |grep -i usb +[ 1.416966] hub 1-0:1.0: USB hub found +[ 1.420431] usbcore: registered new interface driver usb-storage +[ 1.445374] usbcore: registered new interface driver usbhid +[ 1.446839] usbhid: USB HID core driver +[ 1.863226] usb 1-1: new low-speed USB device number 2 using uhci_hcd +[ 2.126173] usb 1-1: Invalid ep0 maxpacket: 64 +[ 2.373161] usb 1-1: new low-speed USB device number 3 using uhci_hcd +[ 2.648112] usb 1-1: Invalid ep0 maxpacket: 64 +[ 2.892404] usb 1-1: new low-speed USB device number 4 using uhci_hcd +[ 2.913001] usb 1-1: Invalid ep0 maxpacket: 64 +[ 3.161367] usb 1-1: new low-speed USB device number 5 using uhci_hcd +[ 3.180070] usb 1-1: Invalid ep0 maxpacket: 64 +[ 3.181633] usb usb1-port1: unable to enumerate USB device +lsusb +Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub + +On the host: +lsusb +Bus 001 Device 006: ID 0457:0163 Silicon Integrated Systems Corp. SiS163U 802.11 Wireless LAN Adapter +qemu-system-x86_64 --version +QEMU emulator version 2.1.2, Copyright (c) 2003-2008 Fabrice Bellard + +You might try connecting the device to a ehci/xhci bus (instead of the default uhci bus... i.e. USB 1.1). See docs/usb2.txt in the qemu source for more info. + +the problem is this commit: +http://git.qemu.org/?p=qemu.git;a=commit;h=b791c3b38c7969cb9f4acda8229e19fd865a1c08 + +it's easy to reproduce -- plug in a USB flash drive and try to pass it through + +on the host: +$ lsusb +Bus 003 Device 004: ID 1307:0163 Transcend Information, Inc. 256MB/512MB/1GB Flash Drive + +so launch qemu with that: + -usbdevice host:1307:0163 + +and then in the VM, if it fails, you get those errors in dmesg, and the device doesn't show up in `lsusb`. if it passes, `lsusb` reports it fine. + +On 2014/11/9 2:47, MikeFrysinger wrote: + +> the problem is this commit: +> http://git.qemu.org/?p=qemu.git;a=commit;h=b791c3b38c7969cb9f4acda8229e19fd865a1c08 +> +> it's easy to reproduce -- plug in a USB flash drive and try to pass it +> through +> + +What's your USB flash drive's version? USB1.1 or USB2.0 or 3.0? +Please post the value: + +1.cat /sys/bus/usb/device/xx-xx/speed [xx-xx: hostbus-hostport] +2.And your exact command line launched Qemu . + +Best regards, +-Gonglei + +> on the host: +> $ lsusb +> Bus 003 Device 004: ID 1307:0163 Transcend Information, Inc. 256MB/512MB/1GB Flash Drive +> +> so launch qemu with that: +> -usbdevice host:1307:0163 +> +> and then in the VM, if it fails, you get those errors in dmesg, and the +> device doesn't show up in `lsusb`. if it passes, `lsusb` reports it +> fine. +> + + + + + +i've attached the `lsusb -v` output for the device. it is USB 2.0. the sysfs speed file shows 480. + +the qemu cmdline: +qemu-system-x86_64 \ + -hda images/root \ + -hdb images/var \ + -hdc images/usr \ + -append "root=/dev/hda console=ttyS0 panic=3 init=/ginit" \ + -kernel images/bzImage \ + -nographic \ + -no-reboot \ + -m 512 \ + -enable-kvm \ + -usbdevice host:1307:0163 + +On 2014/11/11 1:52, MikeFrysinger wrote: + +> i've attached the `lsusb -v` output for the device. it is USB 2.0. the +> sysfs speed file shows 480. +> + +You should add an ehci controller or xhci for USB2.0 device. +Please use such below cmdline: +-device usb-ehci,id=ehci \ +-device usb-host,bus=ehci.0,vendorid=1307,productid=0163 + +BTW, This is a really bug, and Gerd had posted a patch: + [PATCH] usb-host: fix usb_host_speed_compat tyops +http://lists.gnu.org/archive/html/qemu-devel/2014-11/msg01441.html + +After applying this patch, you will get a warning: + "Warning: speed mismatch trying to attach..." if you use the cmdline as your showing. + +Thanks, +-Gonglei + +> the qemu cmdline: +> qemu-system-x86_64 \ +> -hda images/root \ +> -hdb images/var \ +> -hdc images/usr \ +> -append "root=/dev/hda console=ttyS0 panic=3 init=/ginit" \ +> -kernel images/bzImage \ +> -nographic \ +> -no-reboot \ +> -m 512 \ +> -enable-kvm \ +> -usbdevice host:1307:0163 +> +> ** Attachment added: "lsusb.txt" +> https://bugs.launchpad.net/qemu/+bug/1385934/+attachment/4257409/+files/lsusb.txt +> + + + + + +Can you check if the same error messages appear in /var/log/syslog and /var/log/libvirt/qemu/<machine>.log as I described in bug #1392504? Because I think it is apparmor related. + +looks like 79ae25af1569a50a0ec799901a1bb280c088f121 (which is in qemu-2.2.0) makes it work again for my test case. not sure if the OP wants to verify as well or just close this out now. + +With qemu 2.2.0 I see now the usb dongle but using it give me some problem seen on the host: +libusb: error [submit_control_transfer] submiturb failed error -1 errno=22 +Disabling caps and seccomp change nothing. +I strace the process and I see: +26170 ioctl(20, USBDEVFS_SUBMITURB, 0x7f00c0539eb0) = -1 EINVAL (Invalid argument) +26170 write(2, "libusb: error [submit_control_transfer] submiturb failed error -1 errno=22\n", 75) = 75 + + +Triaging old bug tickets... can you still reproduce this issue with the latest version of QEMU? Or could we close this ticket nowadays? + + +[Expired for QEMU because there has been no activity for 60 days.] + |