All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Jens Frederich <jfrederich@gmail.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] USB Passthrough not working for Windows 7 guest
Date: Wed, 06 Nov 2013 07:58:27 +0100	[thread overview]
Message-ID: <5279E893.6070805@siemens.com> (raw)
In-Reply-To: <CAF92urr6uDx_f=50QcnjtTc_5b+J79i23j1YqJ3hpmGHQkzjLw@mail.gmail.com>

On 2013-11-05 21:20, Jens Frederich wrote:
>> 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?
> 
> I'm not sure which mode it has been. I've used the virt-manager to configure
> the device. A usb controller is already configured in mode 'default'.
> My steps on virt-manager:
> 
> 1. add hardware
> 2. select usb host device
> 3. I can see my usb device, I select it
> 4. start guest and open Windows device manager

Unfortunately, I do not know what virt-manager is configuring by
default. It likely also depends on its version, so you should share this
information as well. Maybe other folks here can comment on this.

> 
> I don't know is this UHCI or EHCI? On the usb host device list are
> some controller listed e.q. xhci, ehci and so on. Should I map these
> controller to Windows 7 as well?

Pick the host controller to which the USB device you want to give to the
guest is attached to (lsusb and the bus number reported via
/sys/bus/pci/devices/<id>/usbX can tell this - or trial and error). When
doing this, you no longer need to pass through the USB device itself, it
is implicitely passed.

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux

  reply	other threads:[~2013-11-06  6:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-05 20:20 [Qemu-devel] USB Passthrough not working for Windows 7 guest Jens Frederich
2013-11-06  6:58 ` Jan Kiszka [this message]
2013-11-06 10:36   ` Frederich, Jens
2013-11-06 11:09     ` Gerd Hoffmann
2013-11-06 11:16       ` Frederich, Jens
2013-11-06 11:22         ` Gerd Hoffmann
  -- strict thread matches above, loose matches on Subject: below --
2013-11-05 16:01 Frederich, Jens
2013-11-05 17:38 ` Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5279E893.6070805@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=jfrederich@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.