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] Re: [PATCH]Add a flag for shadow pages

To: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH]Add a flag for shadow pages
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Wed, 04 Mar 2009 13:19:17 +0000
Cc: Gianluca Guida <Gianluca.Guida@xxxxxxxxxxxxx>, "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 04 Mar 2009 05:19:52 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20090304121317.GB6322@xxxxxxxxxxxxxxxxxxxxx>
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: AcmcwpyNSkBvvf8mR+C+YDgG5cXY3QACTVRG
Thread-topic: [Xen-devel] Re: [PATCH]Add a flag for shadow pages
User-agent: Microsoft-Entourage/12.15.0.081119
On 04/03/2009 12:13, "Tim Deegan" <Tim.Deegan@xxxxxxxxxxxxx> wrote:

> shadow_get_page_from_l1e() should never be handling a pointer to a
> shadow -- if it does that then we've let the guest see the shadows and
> all invariants go out the window.
> 
> sh_mfn_is_a_pagetable() looks OK too; it only gets called based on the
> contents of shadow PTEs or the MFNs that guests are writing to, both of
> which should be safe.
> 
> It all feels a bit fragile to me though, compared to the old layout
> where we always knew the owner field would be NULL.

This is the tradeoff for the new get_page() implementation and wider
reference counts. We just need to be careful and use
page_get_owner_and_reference() in the few cases it seems to be needed.

 -- Keir



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