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] page counts & type counts

To: Mike Sun <msun@xxxxxxxxxx>
Subject: Re: [Xen-devel] page counts & type counts
From: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Date: Mon, 5 Jan 2009 11:03:53 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 05 Jan 2009 03:04:18 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <e4e579070901041918u2a860f6fv1dbce8e26860fcf@xxxxxxxxxxxxxx>
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: <e4e579070901041918u2a860f6fv1dbce8e26860fcf@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.17 (2007-11-01)
Hi, 

At 22:18 -0500 on 04 Jan (1231107492), Mike Sun wrote:
> Does this mean that every time a page goes from read-only to writable,
> the shadow PTE mapping that page is destroyed and recreated?  

No - I mentioned this in another thread, but just for the archives: this
means that every time a page goes from read-only to writable, all
shadows of that page must be destroyed (since it's not safe to let the
guest write directly to a shadowed page). 

> >From what I understand, shadow_remove_all_shadows() will remove all
> shadows of the gmfn, which should be a guest PT.  Basically, it'll
> remove all shadows inserted in the shadow_hash table for that gmfn.
> It IS NOT removing shadow PTEs mapping that gmfn.  Is this a correct
> understanding?

Yes.

> I don't understand how get_page_type() would know in
> the code that is there how the given page is actually a guest PT?

It doesn't, but shadow_remove_all_shadows() does.  As Kevin points out,
in later Xens, this test is modified to check both that the page is
shadowed and also that it's not out of sync before calling out (since
being out of sync is now the one exception to the rule that writeable
pages must not be shadowed).

Cheers,

Tim.

-- 
Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Principal Software Engineer, Citrix Systems (R&D) Ltd.
[Company #02300071, SL9 0DZ, UK.]

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

<Prev in Thread] Current Thread [Next in Thread>