From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33590) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TW2Eu-00012I-2a for qemu-devel@nongnu.org; Wed, 07 Nov 2012 04:48:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TW2Es-0005yN-QV for qemu-devel@nongnu.org; Wed, 07 Nov 2012 04:48:03 -0500 Received: from mail-da0-f45.google.com ([209.85.210.45]:38678) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TW2Es-0005yG-Ip for qemu-devel@nongnu.org; Wed, 07 Nov 2012 04:48:02 -0500 Received: by mail-da0-f45.google.com with SMTP id n15so604621dad.4 for ; Wed, 07 Nov 2012 01:48:01 -0800 (PST) Sender: Paolo Bonzini Message-ID: <509A2E49.8060101@redhat.com> Date: Wed, 07 Nov 2012 10:47:53 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1352210901-1923-1-git-send-email-hdegoede@redhat.com> <1352210901-1923-9-git-send-email-hdegoede@redhat.com> In-Reply-To: <1352210901-1923-9-git-send-email-hdegoede@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 8/8] usb-hid: Allow connecting to a USB-2 device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hans de Goede Cc: Gerd Hoffmann , qemu-devel@nongnu.org Il 06/11/2012 15:08, Hans de Goede ha scritto: > Our ehci code has is capable of significantly lowering the wakeup rate > for the hcd emulation while the device is idle. It is possible to add > similar code ot the uhci emulation, but that simply is not there atm, > and there is no reason why a (virtual) usb device can not be a USB-2 device. > > Making usb-hid devices connect to the emulated ehci controller instead > of the emulated uhci controller on vms which have both lowers the cpuload > for a fully idle vm from 20% to 2-3% (on my laptop). You need this to be dependent on the machine version. Otherwise the USB paths may change and migration will break. Paolo > Signed-off-by: Hans de Goede > --- > hw/usb/dev-hid.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/hw/usb/dev-hid.c b/hw/usb/dev-hid.c > index 69f89ff..96ba0c0 100644 > --- a/hw/usb/dev-hid.c > +++ b/hw/usb/dev-hid.c > @@ -97,7 +97,7 @@ static const USBDescIface desc_iface_mouse = { > .bEndpointAddress = USB_DIR_IN | 0x01, > .bmAttributes = USB_ENDPOINT_XFER_INT, > .wMaxPacketSize = 4, > - .bInterval = 0x0a, > + .bInterval = 8, > }, > }, > }; > @@ -127,7 +127,7 @@ static const USBDescIface desc_iface_tablet = { > .bEndpointAddress = USB_DIR_IN | 0x01, > .bmAttributes = USB_ENDPOINT_XFER_INT, > .wMaxPacketSize = 8, > - .bInterval = 0x0a, > + .bInterval = 8, > }, > }, > }; > @@ -158,7 +158,7 @@ static const USBDescIface desc_iface_keyboard = { > .bEndpointAddress = USB_DIR_IN | 0x01, > .bmAttributes = USB_ENDPOINT_XFER_INT, > .wMaxPacketSize = 8, > - .bInterval = 0x0a, > + .bInterval = 8, > }, > }, > }; > @@ -224,6 +224,7 @@ static const USBDesc desc_mouse = { > .iSerialNumber = STR_SERIALNUMBER, > }, > .full = &desc_device_mouse, > + .high = &desc_device_mouse, > .str = desc_strings, > }; > > @@ -237,6 +238,7 @@ static const USBDesc desc_tablet = { > .iSerialNumber = STR_SERIALNUMBER, > }, > .full = &desc_device_tablet, > + .high = &desc_device_tablet, > .str = desc_strings, > }; > > @@ -250,6 +252,7 @@ static const USBDesc desc_keyboard = { > .iSerialNumber = STR_SERIALNUMBER, > }, > .full = &desc_device_keyboard, > + .high = &desc_device_keyboard, > .str = desc_strings, > }; > >