From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37209) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScYH8-0004wB-8k for qemu-devel@nongnu.org; Thu, 07 Jun 2012 04:41:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ScYH2-0000uB-0N for qemu-devel@nongnu.org; Thu, 07 Jun 2012 04:41:01 -0400 Received: from e23smtp09.au.ibm.com ([202.81.31.142]:60151) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScYH1-0000tJ-ES for qemu-devel@nongnu.org; Thu, 07 Jun 2012 04:40:55 -0400 Received: from /spool/local by e23smtp09.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 7 Jun 2012 09:28:21 +1000 Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q578edWA53084160 for ; Thu, 7 Jun 2012 18:40:40 +1000 Received: from d23av03.au.ibm.com (loopback [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q578edpJ028873 for ; Thu, 7 Jun 2012 18:40:39 +1000 Message-ID: <1339058438.24838.15.camel@pasglop> From: Benjamin Herrenschmidt Date: Thu, 07 Jun 2012 18:40:38 +1000 In-Reply-To: <4FD06725.70905@redhat.com> References: <1338953515.7150.150.camel@pasglop> <4FCEEDC5.7090807@us.ibm.com> <1339017219.7150.170.camel@pasglop> <4FD06725.70905@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:32 +0200, Hans de Goede wrote: > Hi, > > Sorry for jumping in the middle of the thread, I missed the beginning > of this. Enabling USB by default, esp. emulating a USB mouse by default > is a *bad* idea. They way the periodic schedule of the various USB > controllers works means that emulating a USB device means a 1000 vm exits > per second extra, even when the vm is completely idle! USB powermanagement > can be used to negate this, but this is off in both Linux and Windows for > HID devices by default because there are too many broken HID devices. On the other hand it is the only choice of input device on some platforms such as pseries (and MacG5 when I get to make it work :-) Would it be possible to "whitelist" the QEMU emulated HID devices in the kernel to enable dynamic PM for them (at least when they sit alone on the bus) ? Or is our emulation busted too ? 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. Cheers, Ben.