From: Joanna Rutkowska <joanna@invisiblethingslab.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: xen-devel@lists.xensource.com,
Rafal Wojtczuk <rafal@invisiblethingslab.com>,
qubes-devel@googlegroups.com
Subject: Re: The mfn of the frame, that holds a mlock-ed PV domU usermode page, can change
Date: Mon, 12 Apr 2010 23:19:30 +0200 [thread overview]
Message-ID: <4BC38E62.2080703@invisiblethingslab.com> (raw)
In-Reply-To: <4BC3850F.7070108@goop.org>
[-- Attachment #1.1: Type: text/plain, Size: 1464 bytes --]
On 04/12/2010 10:39 PM, Jeremy Fitzhardinge wrote:
> On 04/12/2010 01:21 PM, Joanna Rutkowska wrote:
>> On 04/12/2010 10:01 PM, Jeremy Fitzhardinge wrote:
>>
>>> Why is it necessary to map usermode pages? It just seems like asking
>>> for trouble. Why not make it so that the domU X server gets the memory
>>> from the kernel (via some kind of driver), and then map that through to
>>> dom0?
>>>
>> Because we want to avoid modifying Xorg sources -- it normally allocates
>> its composition buffers using malloc, and if we wanted to make it using
>> some kernel allocated memory (by our custom driver) we would need to
>> patch the Xorg, which we obviously wanted to avoid...
>>
>
> The referenced code doesn't do that; it allocates some memory with with
> mmap, mlocks it, uses /proc/u2mfn to get the mfn then pokes it into xenbus.
>
Right, that's for the "ring" page, which we use to implement a ring
buffer, and we then pass mfns of the actual Xorg's composition buffers
over this ring buffer to Dom0.
Interestingly, I have never seen a garbage in any of the composition
buffers (which are directly displayed by our appviewers, so it would be
immediately visible), just like if only the mfn for the "ring" page
could be modified, but the composition buffer's mfn were somehow pinned...
This might suggest that the memory used by the composition buffers
(which are in usermode) is somehow locked?
Thanks,
j.
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 226 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2010-04-12 21:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-12 18:54 The mfn of the frame, that holds a mlock-ed PV domU usermode page, can change Rafal Wojtczuk
2010-04-12 20:01 ` Jeremy Fitzhardinge
2010-04-12 20:21 ` Joanna Rutkowska
2010-04-12 20:39 ` Jeremy Fitzhardinge
2010-04-12 21:19 ` Joanna Rutkowska [this message]
2010-04-12 21:26 ` Jeremy Fitzhardinge
2010-04-12 21:36 ` Joanna Rutkowska
2010-04-19 11:25 ` Rafal Wojtczuk
2010-04-19 16:48 ` Jeremy Fitzhardinge
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=4BC38E62.2080703@invisiblethingslab.com \
--to=joanna@invisiblethingslab.com \
--cc=jeremy@goop.org \
--cc=qubes-devel@googlegroups.com \
--cc=rafal@invisiblethingslab.com \
--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.