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/
Home Products Support Community News


RE: [Xen-devel] [PATCH] Do not set page's count_info directly

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, Gianluca Guida <glguida@xxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH] Do not set page's count_info directly
From: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Date: Thu, 5 Mar 2009 22:33:14 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>, Gianluca Guida <Gianluca.Guida@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 05 Mar 2009 06:33:44 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C5D57A06.439E%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: <f8877f640903050432w4d326bd8r601d350ca20e6fc4@xxxxxxxxxxxxxx> <C5D57A06.439E%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcmdjnijQ+a4CfH7TNCGDr9FnixRZQAAdwneAAOW7FA=
Thread-topic: [Xen-devel] [PATCH] Do not set page's count_info directly
Keir Fraser <mailto:keir.fraser@xxxxxxxxxxxxx> wrote:
> On 05/03/2009 12:32, "Gianluca Guida" <glguida@xxxxxxxxx> wrote:
>>> Also currently shadow code assume count_info is 0 for shadow page,
>>> however, this is invalid after the new flags. Change some assert in
>>> shadow code. 
>> Yes, that's correct. I find, though, (count_info & PGC_count_mask !=
>> 0) as a check if the page is a shadow *very* confusing. Could you
>> define a macro with something like page_is_a_shadow_page() and hide
>> this mm.c dirty secret?
> This would be a shadow-code-specific macro. In general count_mask==0 can
> also mean the page is free, for example.

Maybe I'm wrong, but anonymous page will have count_mask==0 while they are 

Currently the only way that we can make sure the guest is free is through the 
boot allocator bitmap. When the bit is clear, the page is free.
When the bit is set, and the count_mask!=0, then it is owned by someone like 
guest ram, p2m table etc. if the count_mask==0, then it is either a shadow page 
or a anoynymous page.

Or do I missed anything?

Yunhong Jiang

> -- Keir
Xen-devel mailing list