@@ -231,6 +231,9 @@ void dump_pageframe_info(struct domain *d)
unsigned int index = MASK_EXTR(page->u.inuse.type_info,
PGT_type_mask);
+ if ( page->count_info & PGC_extra )
+ continue;
+
if ( ++total[index] > 16 )
{
switch ( page->u.inuse.type_info & PGT_type_mask )
@@ -1044,7 +1047,8 @@ int arch_set_info_guest(
{
struct page_info *page = page_list_remove_head(&d->page_list);
- if ( page_lock(page) )
+ if ( !(page->count_info & PGC_extra) &&
+ page_lock(page) )
{
if ( (page->u.inuse.type_info & PGT_type_mask) ==
PGT_l4_page_table )
@@ -2843,6 +2843,9 @@ void audit_p2m(struct domain *d,
spin_lock(&d->page_alloc_lock);
page_list_for_each ( page, &d->page_list )
{
+ if ( page->count_info & PGC_extra )
+ continue;
+
mfn = mfn_x(page_to_mfn(page));
P2M_PRINTK("auditing guest page, mfn=%#lx\n", mfn);
@@ -428,6 +428,9 @@ static void dump_numa(unsigned char key)
spin_lock(&d->page_alloc_lock);
page_list_for_each(page, &d->page_list)
{
+ if ( page->count_info & PGC_extra )
+ break;
+
i = phys_to_nid(page_to_maddr(page));
page_num_node[i]++;
}
@@ -792,6 +792,10 @@ int __init dom0_construct_pv(struct domain *d,
{
mfn = mfn_x(page_to_mfn(page));
BUG_ON(SHARED_M2P(get_gpfn_from_mfn(mfn)));
+
+ if ( page->count_info & PGC_extra )
+ continue;
+
if ( get_gpfn_from_mfn(mfn) >= count )
{
BUG_ON(is_pv_32bit_domain(d));
@@ -220,7 +220,12 @@ static void tboot_gen_domain_integrity(const uint8_t key[TB_KEY_SIZE],
spin_lock(&d->page_alloc_lock);
page_list_for_each(page, &d->page_list)
{
- void *pg = __map_domain_page(page);
+ void *pg;
+
+ if ( page->count_info & PGC_extra )
+ continue;
+
+ pg = __map_domain_page(page);
vmac_update(pg, PAGE_SIZE, &ctx);
unmap_domain_page(pg);
}