WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] The mfn of the frame, that holds a mlock-ed PV domU user

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: Re: [Xen-devel] The mfn of the frame, that holds a mlock-ed PV domU usermode page, can change
From: Joanna Rutkowska <joanna@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 12 Apr 2010 23:19:30 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Rafal Wojtczuk <rafal@xxxxxxxxxxxxxxxxxxxxxx>, qubes-devel@xxxxxxxxxxxxxxxx
Delivery-date: Mon, 12 Apr 2010 14:18:52 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=message-id:date:from:mime-version:to:cc:subject:references:in-reply-to:content-type; s=smtpout; bh=KLtYtYpCuNEmkGs1gA68bVa/CBI=; b=umCEccEBIHfzkqJZCdTMG6eCy4fRGjsEGzaFiP6HqH3X8UdJBH4DlL4Si5rip6+wFmAYbjBEQA0XoD3J+T8lW7vez/YRqDltuAmYWbkAUPDKREfZjmkN5oZw9phs8437gkd2Sdms9oWUMtGNVW8f3BP/yMUtXN33uzZbqLC2u74=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4BC3850F.7070108@xxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20100412185454.GC3671@xxxxxxxxxxxxxxxxxxx> <4BC37C32.1060805@xxxxxxxx> <4BC380E2.8060605@xxxxxxxxxxxxxxxxxxxxxx> <4BC3850F.7070108@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc12 Lightning/1.0b2pre Thunderbird/3.0.3
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: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel