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] transferring ownership of domheap pages

To: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>, "Xen-Devel (E-mail)" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] transferring ownership of domheap pages
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Fri, 13 Feb 2009 08:50:54 +0000
Cc:
Delivery-date: Fri, 13 Feb 2009 00:51:19 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <74298c36-20e2-47e1-8eb1-428f004a8ab3@default>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcmNdn0ARpJ3KmrtRc297gmWlJzUugAQbDjb
Thread-topic: [Xen-devel] transferring ownership of domheap pages
User-agent: Microsoft-Entourage/12.15.0.081119
On 13/02/2009 00:59, "Dan Magenheimer" <dan.magenheimer@xxxxxxxxxx> wrote:

> I'd like to have routines to transfer ownership
> of a page both from domain D1 to anonymous and
> from anonymous to domain D2, without the necessity
> of doing a free_domheap_pages followed by an
> alloc_domheap_pages (primarily because I don't
> want to scrub the page as I know it will be
> immediately overwritten by the new owner).
> The anon-to-D2 would fail (return NULL) if
> D2 is fully allocated.
> 
> Any problems to watch out for?

See (and use) mm.c:steal_page(). Only works of course if D1 has no mappings
of the page.

 -- Keir



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