[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [qemu-devel][RFC] Enable usb with default options

From: Hans de Goede
Subject: Re: [Qemu-devel] [qemu-devel][RFC] Enable usb with default options
Date: Thu, 07 Jun 2012 11:50:41 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1


On 06/07/2012 11:16 AM, Benjamin Herrenschmidt wrote:
On Thu, 2012-06-07 at 10:52 +0200, Hans de Goede wrote:
At least that would improve the situation in the long run...

Side note: It might be able to add an option at least to OHCI and EHCI
to relax a bit the correctness of the emulation and dramatically reduce
the number of exits.

One way to do that is to simply reduce the timer by a factor of 10 or
100 (and increment frame numbers in bulk). This could be reasonably
safely done when SOF interrupts aren't enabled, especially when only HID
devices are on the bus. We could alternatively schedule additional
arbitrary frames in between whenever a HID event is actually present.

We (me and Gerd Hoffmann) have investigated that, and experimented with it.
It will work for simply devices, but isochronous devices break. The real
solution at least for x86 vms is to get the XHCI emulation finished, as
the XHCI controller has a much nicer hw interface from an emulation pov,
and it can handle usb 1-3 devices.

I absolutely agree, but it will take some time for xhci to trickle
(especially since most powerpc distros today don't have it guest side,
we only recently endian-fixed the driver).

In the meantime, this approach you experimented with would be very
useful for us  in the common case where there is no isochronous device.
It shouldn't be too hard for the emulator to switch back to "normal"
frames if an ISO EP is present, no ?

That should be possible yes. Note though that although slowing down the
timer will only break isoc. stuff, it will for example also slow down
usb mass storage devices.

That would solve the 99% case of just keyboard and mouse on all those

Do you have some patches around from those earlier experiments that we
could try to revive, at least for OHCI ?

No, I only did this for EHCI, which may still have an option to enable
this today. Gerd may have done this for UHCI too, Gerd ?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]