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: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
Subject: RE: [Xen-devel] Re: [PATCH]Add a flag for shadow pages
From: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Date: Thu, 5 Mar 2009 00:01:30 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 04 Mar 2009 08:06:20 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C5D440F2.3CB8%keir.fraser@xxxxxxxxxxxxx>
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: <C5D41D1B.3BD5%keir.fraser@xxxxxxxxxxxxx> <C5D440F2.3CB8%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcmcpbnsO+Hd65wBRsq7KCOjKnHUNQAAtTT+AAANk1AAAH+w/wAABzXgAAEnI6UABDe9jwAFVy8OAAKJUsA=
Thread-topic: [Xen-devel] Re: [PATCH]Add a flag for shadow pages
Keir Fraser <mailto:keir.fraser@xxxxxxxxxxxxx> wrote:
> On 04/03/2009 11:57, "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx> wrote:
> 
>> On 04/03/2009 09:56, "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx> wrote:
>> 
>>> Another would be to create a new function page_get_reference_and_owner()
>>> which obtains a reference on a guest page and *returns* the (now known
>>> valid) domain pointer. Probably this is nicer actually. Then all existing
>>> users of page_get_owner() need checking to ensure they don't need to use
>>> the new more expensive function -- I think some are probably actually
>>> unsafe now that shadow pages clobber the domain field.
>> 
>> I'm working on this by the way. I'll clean up everything except shadow uses
>> of page_get_owner().
> 
> Changeset 19268. See get_page_from_l1e() for an example safe
> usage of new
> page_get_owner_and_reference() function.

Thanks for your really quick-hand implementation. I will update my another 
patch accordingly tomorrow.

So still one question to the two assertion (or to Tim??) in 
sh_rm_write_access_from_sl1p()/sh_put_ref(). What's the potential error to be 
protected by this checking? If page is a shadow, it's count_info will always be 
0, right? Or it is just a sanity checking?

I need change this is because, if we mark a page offline, then the count_info 
is not 0, even for shadow page. Can I just checking the count_mask here?

Thanks
Yunhong Jiang

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