From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35169) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdkaC-0004tn-S4 for qemu-devel@nongnu.org; Tue, 05 Nov 2013 12:38:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vdka4-000369-I5 for qemu-devel@nongnu.org; Tue, 05 Nov 2013 12:38:28 -0500 Received: from goliath.siemens.de ([192.35.17.28]:23106) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vdka4-00035L-6a for qemu-devel@nongnu.org; Tue, 05 Nov 2013 12:38:20 -0500 Message-ID: <52792D07.7070401@siemens.com> Date: Tue, 05 Nov 2013 18:38:15 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <9B7F15AA4177464A8FAB5BE79B14288B88960BFF@vistrex3.vi.vector.int> In-Reply-To: <9B7F15AA4177464A8FAB5BE79B14288B88960BFF@vistrex3.vi.vector.int> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] USB Passthrough not working for Windows 7 guest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Frederich, Jens" , "qemu-devel@nongnu.org" On 2013-11-05 17:01, Frederich, Jens wrote: > Hi all, > > we're currently evaluating different RTOS systems (Windows CE, Intime, RTX, etc.). > One system is Linux RT + KVM/QEMU with a Windows 7 guest. Up to now all > works fine, Linux RT has good latency and KVM/Qemu setup was easy. But one QEMU bug > breaks my measurement setup and evaluation. > > I've some usb devices for the Windows 7 guest. I configure them as USB passthrough. > The devices appears in the device manager of Windows 7, but with > "Error code 10": device cannot start". The Windows driver fails on USB set configuration. > The driver creates a IRP and send it via IOCTRL to lower layer. The IOCTRL fails with > invalid parameter. > > driver log: > 00000009 0.65470564 vnCDrvUsbControlRequestSetConfiguration, WdfUsbTargetDeviceSelectConfig single interface failed 0xc000000d > 00000010 0.65472370 vnCDrvUsbIFPrepareHardwareState, vnCDrvUsbControlRequestSetConfiguration failed: 0xc000000d > 00000011 0.65473646 vnCDrvDevConPrepareHardware, vnCDrvUsbIFPrepareHardwareState failed 0xc000000d > 00000012 0.65474838 vnCDrvEvtDevicePrepareHardware, vnCDrvDevConPrepareHardware failed 0xc0000001 > 00000013 0.6547 > > This bug breaks my latency measurement setup and Linux RT is out of the evaluationg > race. Windows CE should not win :-), it there anyway workaround or hack to fix the issue? Workaround: Pass-through one of the (typically) many USB host controllers to the Windows guest (vfio or classic pci-assign). I did this back then when *HCI emulation was still pretty immature. But USB device pass-through should also work. Do you happen to pass a USB 2.0 device via an emulated UHCI? Or are you already using the EHCI emulation? In the latter case, activating USB tracing (see also qemu/docs/tracing.txt) and posting the results here may help analysing the issue. Jan -- Siemens AG, Corporate Technology, CT RTC ITP SES-DE Corporate Competence Center Embedded Linux