From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57153) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScZMS-0006jW-HG for qemu-devel@nongnu.org; Thu, 07 Jun 2012 05:50:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ScZMQ-0007jM-5j for qemu-devel@nongnu.org; Thu, 07 Jun 2012 05:50:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:65393) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScZMP-0007j0-Rg for qemu-devel@nongnu.org; Thu, 07 Jun 2012 05:50:34 -0400 Message-ID: <4FD07971.1020205@redhat.com> Date: Thu, 07 Jun 2012 11:50:41 +0200 From: Hans de Goede MIME-Version: 1.0 References: <1338953515.7150.150.camel@pasglop> <4FCEEDC5.7090807@us.ibm.com> <1339017219.7150.170.camel@pasglop> <4FD06725.70905@redhat.com> <1339058438.24838.15.camel@pasglop> <4FD06BE3.3070506@redhat.com> <1339060579.24838.19.camel@pasglop> In-Reply-To: <1339060579.24838.19.camel@pasglop> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [qemu-devel][RFC] Enable usb with default options List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Benjamin Herrenschmidt Cc: Anthony Liguori , li zhang , qemu-devel@nongnu.org, zhlcindy@linux.vnet.ibm.com Hi, 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 > machines. > > 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 ? Regards, Hans