All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
	maxk@kernel.org, qemu-devel <qemu-devel@nongnu.org>,
	David Ahern <dsahern@gmail.com>
Subject: [Qemu-devel] Re: UHCI idle detection
Date: Tue, 04 Jan 2011 07:49:04 -0600	[thread overview]
Message-ID: <4D232550.7030701@codemonkey.ws> (raw)
In-Reply-To: <4D2323EF.4020900@redhat.com>

On 01/04/2011 07:43 AM, Gerd Hoffmann wrote:
>   Hi,
>
>>> Windows guests needs some registry hackery and Linux guests some 
>>> udev rules
>>> to enable remote wakeup permanently.
>>
>> That commit inspired me to look at UHCI.  If the solution requires
>> modifying the guest then it is not widely useful.
>
> Well, long-term this shouldn't be a big issue.  I expect guest agents 
> become commonplace soonish as some features require guest cooperation, 
> so the guest agents can also care about this kind of tweaks.  Also for 
> linux we can try to send the changes to upstream udev to have it 
> spread into linux distros.

I think we're long overdue for a paravirtual mouse.  Basically, a virtio 
version of xenkbd-front.c.  In fact, it's probably possible to reuse the 
protocol.

Regards,

Anthony Liguori

>
>>>> When the guest writes to those memory pages again in order to issue a
>>>> new USB transaction, we catch the write.  UHCI unprotects the guest
>>>> memory pages and turns the frame timer back on.
>>>
>>> It isn't that simple.  "idle" state depends on the usb devices too. 
>>> With a
>>> usb tablet connected (and no remote-wakeup being used) uhci will 
>>> poll the
>>> tablet in regular intervals and the usb tablet will either send the 
>>> next
>>> event in the queue or NACK the transfer in case there is no event 
>>> available.
>>
>> Is there something preventing USB tablet emulation from using a
>> non-polling approach?  Devices need to be able to kick UHCI when data
>> becomes available.
>
> remote wakeup is exactly that.  Except that it doesn't kick the uhci 
> directly but the port it is connected to, which isn't the same in case 
> the device is connected using a usb hub.  Which probably makes it 
> tricky to re-use the remote wakeup callback for the idle detection.
>
> cheers,
>   Gerd

  reply	other threads:[~2011-01-04 13:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-04 11:48 [Qemu-devel] UHCI idle detection Stefan Hajnoczi
2011-01-04 12:13 ` [Qemu-devel] " Gerd Hoffmann
2011-01-04 12:47   ` Stefan Hajnoczi
2011-01-04 13:43     ` Gerd Hoffmann
2011-01-04 13:49       ` Anthony Liguori [this message]
2011-01-04 14:16         ` Gerd Hoffmann
2011-01-04 14:22           ` Anthony Liguori
2011-01-04 15:51             ` Alexander Graf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D232550.7030701@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=dsahern@gmail.com \
    --cc=kraxel@redhat.com \
    --cc=maxk@kernel.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.