Received: from eggs.gnu.org ([2001:4830:134:3::10]:49863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlglR-00066R-31 for qemu-devel@nongnu.org; Mon, 12 Oct 2015 13:19:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZlglN-00074J-2q for qemu-devel@nongnu.org; Mon, 12 Oct 2015 13:19:57 -0400 Received: from mail-wi0-x243.google.com ([2a00:1450:400c:c05::243]:33813) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlglM-00072h-RW for qemu-devel@nongnu.org; Mon, 12 Oct 2015 13:19:53 -0400 Received: by wibgw2 with SMTP id gw2so3334994wib.1 for ; Mon, 12 Oct 2015 10:19:51 -0700 (PDT) Received: from koalita.localnet (83-145-213-35.localloop.fi. [83.145.213.35]) by smtp.gmail.com with ESMTPSA id gd10sm20951555wjb.47.2015.10.12.10.19.49 for (version=TLSv1/SSLv3 cipher=OTHER); Mon, 12 Oct 2015 10:19:50 -0700 (PDT) From: =?ISO-8859-1?Q?Jos=E9_Ram=F3n_Mu=F1oz?= Pekkarinen Date: Mon, 12 Oct 2015 20:20:29 +0300 Message-ID: <1663063.uuWXa72Siy@koalita> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Subject: [Qemu-devel] Usb passthrough on q35. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org =09Hi, =09I've been trying to set up a windows 7 virtual machine to do vga=20 passthrough, using the q35 machine as a base. The setup seems to be wor= king=20 nice except than, when removing the emulated vga, libusb drops the usb = devices=20 with an error close to this: qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE] libusb: error [_open_sysfs_attr} open=20 /sys/bus/usb/devices/3-5/bConfigurationValue failed ret=3D-1 errno=3D2 qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE] libusb: error [_open_sysfs_attr} open=20 /sys/bus/usb/devices/4-1/bConfigurationValue failed ret=3D-1 errno=3D2 Disabling IRQ #18 Disabling IRQ #17 =09I'm using qemu-2.2.1, and if I try to use any version higher, this e= rror=20 happens even in 440fx machines. Kernel is 4.1.8. =09The script I use to launch is the following: qemu-system-x86_64 -enable-kvm -M q35 -vga none -cpu host -smp=20 3,cores=3D3,threads=3D1 -m 6144 \ -L /usr/x86_64-pc-linux-gnu/usr/share/qemu \ -device ioh3420,multifunction=3Don,id=3Dpcie \ -device vfio-pci,host=3D01:00.0,x-vga=3Don,multifunction=3Don,b= us=3Dpcie \ -device vfio-pci,host=3D01:00.1,bus=3Dpcie \ -netdev user,id=3Duser.0 -device virtio-net-pci,netdev=3Duser.0= \ -usb -usbdevice host:03f0:134a -usbdevice host:03f0:0024 -usbde= vice=20 host:0079:0006 \ -drive file=3Dq35_win7.img,format=3Draw,cache=3Dnone,aio=3Dnati= ve,if=3Dvirtio =09From the system log I can get the following: Oct 12 19:45:36 koalita kernel: usb 3-5: reset low-speed USB device num= ber 2=20 using ohci-pci Oct 12 19:45:36 koalita kernel: usb 4-1: reset low-speed USB device num= ber 2=20 using ohci-pci Oct 12 19:45:37 koalita kernel: usb 10-2: reset low-speed USB device nu= mber 2=20 using xhci_hcd Oct 12 19:45:37 koalita kernel: usb 10-2: ep 0x81 - rounding interval t= o 64=20 microframes, ep desc says 80 microframes Oct 12 19:45:37 koalita kernel: usb 10-2: ep 0x1 - rounding interval to= 64=20 microframes, ep desc says 80 microframes Oct 12 19:45:37 koalita kernel: usb 4-1: reset low-speed USB device num= ber 2=20 using ohci-pci Oct 12 19:45:38 koalita kernel: usb 3-5: reset low-speed USB device num= ber 2=20 using ohci-pci Oct 12 19:45:38 koalita kernel: usb 10-2: reset low-speed USB device nu= mber 2=20 using xhci_hcd Oct 12 19:45:39 koalita kernel: usb 10-2: ep 0x81 - rounding interval t= o 64=20 microframes, ep desc says 80 microframes Oct 12 19:45:39 koalita kernel: usb 10-2: ep 0x1 - rounding interval to= 64=20 microframes, ep desc says 80 microframes Oct 12 19:45:39 koalita kernel: usb 3-5: reset low-speed USB device num= ber 2=20 using ohci-pci Oct 12 19:45:40 koalita kernel: usb 4-1: reset low-speed USB device num= ber 2=20 using ohci-pci Oct 12 19:45:40 koalita kernel: usb 3-5: reset low-speed USB device num= ber 2=20 using ohci-pci Oct 12 19:45:41 koalita kernel: usb 10-2: reset low-speed USB device nu= mber 2=20 using xhci_hcd Oct 12 19:45:41 koalita kernel: usb 10-2: ep 0x81 - rounding interval t= o 64=20 microframes, ep desc says 80 microframes Oct 12 19:45:41 koalita kernel: usb 10-2: ep 0x1 - rounding interval to= 64=20 microframes, ep desc says 80 microframes Oct 12 19:45:41 koalita kernel: usb 10-2: reset low-speed USB device nu= mber 2=20 using xhci_hcd Oct 12 19:45:42 koalita kernel: usb 10-2: ep 0x81 - rounding interval t= o 64=20 microframes, ep desc says 80 microframes Oct 12 19:45:42 koalita kernel: usb 10-2: ep 0x1 - rounding interval to= 64=20 microframes, ep desc says 80 microframes Oct 12 19:45:42 koalita kernel: usb 4-1: reset low-speed USB device num= ber 2=20 using ohci-pci Oct 12 19:45:44 koalita kernel: kvm: zapping shadow pages for mmio gene= ration=20 wraparound Oct 12 19:45:47 koalita kernel: ata2: illegal qc_active transition (000= 00020- >ffffffff) Oct 12 19:45:47 koalita kernel: ohci-pci 0000:00:13.0: HC died; cleanin= g up Oct 12 19:45:47 koalita kernel: usb 4-1: USB disconnect, device number = 2 Oct 12 19:45:47 koalita kernel: ohci-pci 0000:00:14.5: HC died; cleanin= g up Oct 12 19:45:47 koalita kernel: ohci-pci 0000:00:12.0: HC died; cleanin= g up Oct 12 19:45:47 koalita kernel: usb 3-5: USB disconnect, device number = 2 Oct 12 19:45:47 koalita kernel: ata2.00: exception Emask 0x2 SAct 0x20 = SErr=20 0x0 action 0x6 frozen Oct 12 19:45:47 koalita kernel: ata2.00: failed command: READ FPDMA QUE= UED Oct 12 19:45:47 koalita kernel: ata2.00: cmd=20 60/08:28:c8:6a:04/00:00:1f:00:00/40 tag 5 ncq 4096 in\x0a res=20= 40/00:2c:c8:6a:04/00:00:1f:00:00/40 Emask 0x2 (HSM violation) Oct 12 19:45:47 koalita kernel: ata2.00: status: { DRDY } Oct 12 19:45:47 koalita kernel: ata2: hard resetting link Oct 12 19:45:47 koalita kernel: usb 10-2: reset low-speed USB device nu= mber 2=20 using xhci_hcd Oct 12 19:45:47 koalita kernel: ata2: SATA link up 3.0 Gbps (SStatus 12= 3=20 SControl 300) Oct 12 19:45:47 koalita kernel: ata2.00: configured for UDMA/133 Oct 12 19:45:47 koalita kernel: ata2: EH complete Oct 12 19:45:47 koalita kernel: usb 10-2: ep 0x81 - rounding interval t= o 64=20 microframes, ep desc says 80 microframes Oct 12 19:45:47 koalita kernel: usb 10-2: ep 0x1 - rounding interval to= 64=20 microframes, ep desc says 80 microframes Oct 12 19:45:47 koalita kernel: input: Microntek USB Joyst= ick =20 as=20 /devices/pci0000:00/0000:00:03.2/0000:03:00.0/usb10/10-2/10-2:1.0/0003:= 0079:0006.0004/input/input19 Oct 12 19:45:47 koalita kernel: dragonrise 0003:0079:0006.0004: input,h= idraw0:=20 USB HID v1.10 Joystick [Microntek USB Joystick ] = on=20 usb-0000:03:00.0-2/input0 Oct 12 19:45:47 koalita kernel: dragonrise 0003:0079:0006.0004: Force F= eedback=20 for DragonRise Inc. game controllers by Richard Walmsley Oct 12 19:45:47 koalita kernel: ata2.00: exception Emask 0x33 SAct 0x28= 400=20 SErr 0x0 action 0xe frozen Oct 12 19:45:47 koalita kernel: ata2.00: irq_stat 0xffffffff, unknown F= IS 00000000=20 00000000 00000000 00000000, host bus=20 Oct 12 19:45:47 koalita kernel: ata2.00: failed command: READ FPDMA QUE= UED Oct 12 19:45:47 koalita kernel: ata2.00: cmd=20 60/08:50:c8:6a:04/00:00:1f:00:00/40 tag 10 ncq 4096 in\x0a res=20= 40/00:8c:a8:52:c3/00:00:03:00:00/40 Emask 0x32 (host bus error) Oct 12 19:45:47 koalita kernel: ata2.00: status: { DRDY } Oct 12 19:45:47 koalita kernel: ata2.00: failed command: READ FPDMA QUE= UED Oct 12 19:45:47 koalita kernel: ata2.00: cmd=20 60/20:78:60:73:c3/00:00:03:00:00/40 tag 15 ncq 16384 in\x0a res= =20 40/00:8c:a8:52:c3/00:00:03:00:00/40 Emask 0x32 (host bus error) Oct 12 19:45:47 koalita kernel: ata2.00: status: { DRDY } Oct 12 19:45:47 koalita kernel: ata2.00: failed command: READ FPDMA QUE= UED Oct 12 19:45:47 koalita kernel: ata2.00: cmd=20 60/08:88:a8:52:c3/00:00:03:00:00/40 tag 17 ncq 4096 in\x0a res=20= 40/00:8c:a8:52:c3/00:00:03:00:00/40 Emask 0x32 (host bus error) Oct 12 19:45:47 koalita kernel: ata2.00: status: { DRDY } Oct 12 19:45:47 koalita kernel: ata2: hard resetting link Oct 12 19:45:47 koalita kernel: irq 18: nobody cared (try booting with = the=20 "irqpoll" option) Oct 12 19:45:47 koalita kernel: CPU: 3 PID: 0 Comm: swapper/3 Tainted: = G =20 O 4.1.8 #1 Oct 12 19:45:47 koalita kernel: Hardware name: MSI MS-7721/A88XM-E45=20= (MS-7721), BIOS V25.6 12/15/2014 Oct 12 19:45:47 koalita kernel: ffff880245efce8c ffff88024ed83df8 ffff= ffff814c840e=20 0000000000040400 Oct 12 19:45:47 koalita kernel: ffff880245efce00 ffff88024ed83e28 ffff= ffff81093b98=20 ffff88024ed83e28 Oct 12 19:45:47 koalita kernel: ffff880245efce00 0000000000000000=20 0000000000000012 ffff88024ed83e68 Oct 12 19:45:47 koalita kernel: Call Trace: Oct 12 19:45:47 koalita kernel: [] dump_stack= +0x45/0x57 Oct 12 19:45:47 koalita kernel: [] __report_bad_irq+= 0x38/0xe0 Oct 12 19:45:47 koalita kernel: [] note_interrupt+0x= 246/0x290 Oct 12 19:45:47 koalita kernel: []=20 handle_irq_event_percpu+0x123/0x190 Oct 12 19:45:47 koalita kernel: [] ?=20 native_sched_clock+0x32/0x90 Oct 12 19:45:47 koalita kernel: [] handle_irq_event+= 0x43/0x70 Oct 12 19:45:47 koalita kernel: [] ? hrtimer_start+0= x13/0x20 Oct 12 19:45:47 koalita kernel: []=20 handle_fasteoi_irq+0x88/0x140 Oct 12 19:45:47 koalita kernel: [] handle_irq+0x74/0= x130 Oct 12 19:45:47 koalita kernel: [] ?=20 atomic_notifier_call_chain+0x15/0x20 Oct 12 19:45:47 koalita kernel: [] do_IRQ+0x55/0x100= Oct 12 19:45:47 koalita kernel: [] common_interrupt+= 0x6e/0x6e Oct 12 19:45:47 koalita kernel: [] ?=20 clockevents_program_event+0x78/0x110 Oct 12 19:45:47 koalita kernel: [] ? native_safe_hal= t+0x6/0x10 Oct 12 19:45:47 koalita kernel: [] ?=20 __hrtimer_start_range_ns+0x2bc/0x400 Oct 12 19:45:47 koalita kernel: [] arch_safe_halt+0x= 9/0xd=20 [processor] Oct 12 19:45:47 koalita kernel: [] acpi_safe_halt+0x= 1d/0x26=20 [processor] Oct 12 19:45:47 koalita kernel: [] acpi_idle_do_entr= y+0x1b/0x2b=20 [processor] Oct 12 19:45:47 koalita kernel: [] acpi_idle_enter+0= x19c/0x1be=20 [processor] Oct 12 19:45:47 koalita kernel: []=20 cpuidle_enter_state+0x80/0x200 Oct 12 19:45:47 koalita kernel: [] cpuidle_enter+0x1= 2/0x20 Oct 12 19:45:47 koalita kernel: []=20 cpu_startup_entry+0x371/0x3f0 Oct 12 19:45:47 koalita kernel: [] start_secondary+0= x16d/0x180 Oct 12 19:45:47 koalita kernel: handlers: Oct 12 19:45:47 koalita kernel: [] usb_hcd_irq Oct 12 19:45:47 koalita kernel: [] usb_hcd_irq Oct 12 19:45:47 koalita kernel: [] usb_hcd_irq Oct 12 19:45:47 koalita kernel: Disabling IRQ #18 =09Any insight? =09Thanks! =09Jos=E9.