All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: Gerd Knorr <kraxel@suse.de>
Cc: xen-devel <xen-devel@lists.xensource.com>
Subject: Re: [RFC] Xen Virtual Framebuffer
Date: Fri, 16 Dec 2005 11:23:07 -0600	[thread overview]
Message-ID: <43A2F7FB.6050507@us.ibm.com> (raw)
In-Reply-To: <43A2A2E9.1060308@suse.de>

Gerd Knorr wrote:

> Anthony Liguori wrote:
>
>> Now that's 3.0.0's out, I thought it would be a good time to bring up 
>> the topic of framebuffer virtualization.
>>
>> I threw together a proof-of-concept over the weekend of a simple 
>> virtual framebuffer/keyboard/mouse.  The basic design is have a 
>> vmalloc()'d buffer in the guest exposed as /dev/fb0 and mmap()'d in 
>> dom0.  There's also a simple message system for keyboard/mouse events.
>
>
> Browsed through the code, looked at the wiki page now ...

Excellent, I actually have made some major updates but not posted the 
bundle yet.

> First, I've hacked up something very simliar for user-mode-linux, 
> patches are at http://www.suse.de/~kraxel/uml/patches/2.6.15-rc5/, you 
> might want to have a look and steel some ideas (unless you already did).

Excellent, I'll check it out.

> Note that the input system got some sysfs-related changes recently, so 
> the patches really work on very latest kernels only.
>
> Some more comments:
>
>  * why do you put the mfn and evtchn into the start page?  IMHO that
>    should be handled by xenstore, like it is done for virtual network
>    and disk.

xenstore is not available at start-of-day.  This is why the console 
doesn't use it.  I'm not tied to using the start_info_t though--just 
figured the same arguement could be made for the framebuffer as the console.

>  * I would create two different input devices for mouse/keyboard
>    (although strictly seen it isn't really needed) to avoid confusing
>    userspace apps.

That's what I'm doing right now.  The first drop of the code was a bit 
of a mess wrt how the ring queue was used.

>  * I would simply reuse the input event struct from
>    include/linux/input.h for dom0 -> domU input event delivery
>    instead of creating something new.

Is this too Linux specific though?  I could just copy the structure.

>  * i18n keyboard is really tricky (that is a huge mess in vmx btw).
>    I think the only sane approach is to let the guest (domU) do
>    all the i18n handling and try to avoid doing any key mapping
>    in the host (dom0).  If you have *two* instances (both host
>    and guest) doing keyboard mapping and both not even knowing
>    what the other one is doing you have absolutely no chance to
>    get it right ...

How would you imagine this working?  I'll be getting X11 events in dom0 
so would you just pass them to domU and let it do the mapping?  I know 
QEmu has to use keyboard maps depending on locality.  We wouldn't push 
that into the domU kernel right?

i18n is hard and the thing I really don't know how to do right :-)  Help 
here is greatly appreciated.

> Keeping track of the in-kernel screen changes (fbcon) is easy, 
> tracking userspace is more difficuilt but doable, the uml framebuffer 
> driver does that by watching page faults: The no_page handler maps the 
> page and marks it "dirty", the update function does zap_pte_range to 
> kill the mappings so the no_page handler is called on the next update 
> again.

Yes, the latest code just implements all the 2d ops and passes a message 
through the framebuffer ring queue for updates.  VNC in console mode is 
quite snappy.

I'll take a look at the uml framebuffer to see how it handles page 
faults.  I was thinking of something similiar but didn't know how to 
approach it.

The latest Xen-code is at 
http://www.cs.utexas.edu/users/aliguori/vfb-20051216.bundle

Thanks Gerd!

Regards,

Anthony Liguori

> cheers,
>   Gerd
>

  parent reply	other threads:[~2005-12-16 17:23 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-05 23:00 [RFC] Xen Virtual Framebuffer Anthony Liguori
2005-12-06  0:17 ` Anthony Liguori
2005-12-06  0:35   ` Jon Smirl
2005-12-06  1:09     ` Anthony Liguori
2005-12-06  1:19       ` Jon Smirl
2005-12-06  1:25         ` Anthony Liguori
2005-12-06  1:31           ` Jon Smirl
2005-12-06  2:13             ` Anthony Liguori
2005-12-06  2:35           ` Jon Smirl
2005-12-06  2:55             ` Anthony Liguori
2005-12-06  3:13               ` Jon Smirl
2005-12-06  4:45                 ` 答复: [Xen-devel] " 苗枫
2005-12-06  5:08                   ` Anthony Liguori
2005-12-09 21:54     ` Tracy R Reed
2005-12-11  2:27       ` Jon Smirl
2005-12-16 12:14         ` Jacob Gorm Hansen
2005-12-16 15:48           ` Jon Smirl
2005-12-19 10:32             ` Jacob Gorm Hansen
2005-12-19 15:01               ` Jon Smirl
2005-12-06  0:50 ` M.A. Williamson
2005-12-06  1:19   ` Anthony Liguori
2005-12-06 10:50 ` Gerd Knorr
2005-12-06 11:06 ` Jacob Gorm Hansen
2005-12-06 14:54   ` Jon Smirl
2005-12-11  2:38 ` Jon Smirl
2005-12-16 11:20 ` Gerd Knorr
2005-12-16 16:16   ` Jon Smirl
2005-12-16 17:01     ` Gerd Knorr
2005-12-16 17:28       ` Anthony Liguori
2005-12-16 17:23   ` Anthony Liguori [this message]
2005-12-19 10:57     ` Gerd Knorr
  -- strict thread matches above, loose matches on Subject: below --
2005-12-06  0:48 James Harper
2005-12-06  0:53 ` M.A. Williamson
2005-12-06  1:13   ` Jon Smirl
2005-12-06  2:51     ` M.A. Williamson
2005-12-06  1:15 ` Jon Smirl
2005-12-06 14:18   ` Charles Duffy
2005-12-06 10:59 Petersson, Mats
2005-12-06 20:41 John Byrne
2005-12-06 20:52 ` Anthony Liguori

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=43A2F7FB.6050507@us.ibm.com \
    --to=aliguori@us.ibm.com \
    --cc=kraxel@suse.de \
    --cc=xen-devel@lists.xensource.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.