From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57484) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScYpd-00036j-Br for qemu-devel@nongnu.org; Thu, 07 Jun 2012 05:16:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ScYpX-00017f-5z for qemu-devel@nongnu.org; Thu, 07 Jun 2012 05:16:40 -0400 Received: from e23smtp07.au.ibm.com ([202.81.31.140]:48160) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScYpW-00016m-Kl for qemu-devel@nongnu.org; Thu, 07 Jun 2012 05:16:35 -0400 Received: from /spool/local by e23smtp07.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 7 Jun 2012 09:07:52 +1000 Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q5798x1T63897718 for ; Thu, 7 Jun 2012 19:09:00 +1000 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q579GKTA032676 for ; Thu, 7 Jun 2012 19:16:20 +1000 Message-ID: <1339060579.24838.19.camel@pasglop> From: Benjamin Herrenschmidt Date: Thu, 07 Jun 2012 19:16:19 +1000 In-Reply-To: <4FD06BE3.3070506@redhat.com> 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> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Mime-Version: 1.0 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: Hans de Goede Cc: Anthony Liguori , li zhang , qemu-devel@nongnu.org, zhlcindy@linux.vnet.ibm.com 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 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 ? Cheers, Ben.