From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34379) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScYPx-00045B-QC for qemu-devel@nongnu.org; Thu, 07 Jun 2012 04:50:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ScYPr-0002Ze-G3 for qemu-devel@nongnu.org; Thu, 07 Jun 2012 04:50:09 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:43804) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScYPr-0002Xi-89 for qemu-devel@nongnu.org; Thu, 07 Jun 2012 04:50:03 -0400 Received: by pbbro12 with SMTP id ro12so834972pbb.4 for ; Thu, 07 Jun 2012 01:50:01 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4FD06B34.6060600@redhat.com> Date: Thu, 07 Jun 2012 10:49:56 +0200 From: Paolo Bonzini 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> In-Reply-To: <1339058438.24838.15.camel@pasglop> Content-Type: text/plain; charset=UTF-8 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: Hans de Goede , Anthony Liguori , li zhang , qemu-devel@nongnu.org, zhlcindy@linux.vnet.ibm.com Il 07/06/2012 10:40, Benjamin Herrenschmidt ha scritto: > 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 in Fedora they are; from /usr/lib/udev/rules.d/42-usb-hid-pm.rules: ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="QEMU USB Mouse", ATTR{serial}=="42", TEST=="power/control", ATTR{power/control}="auto" ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="QEMU USB Tablet", ATTR{serial}=="42", TEST=="power/control", ATTR{power/control}="auto" ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="QEMU USB Keyboard", ATTR{serial}=="42", TEST=="power/control", ATTR{power/control}="auto" Paolo