ia64/xen-unstable

changeset 14310:f78b4aad353e

[XEN] Shadow: tidy up page_info before handing back to the allocator
which expects count_info fields to be zero.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
author Tim Deegan <Tim.Deegan@xensource.com>
date Thu Mar 08 16:18:50 2007 +0000 (2007-03-08)
parents 345effaf2258
children 0e08d98dfd57
files xen/arch/x86/mm/shadow/common.c
line diff
     1.1 --- a/xen/arch/x86/mm/shadow/common.c	Thu Mar 08 15:51:32 2007 +0000
     1.2 +++ b/xen/arch/x86/mm/shadow/common.c	Thu Mar 08 16:18:50 2007 +0000
     1.3 @@ -1129,6 +1129,7 @@ shadow_free_p2m_page(struct domain *d, s
     1.4          SHADOW_ERROR("Odd p2m page count c=%#x t=%"PRtype_info"\n",
     1.5                       pg->count_info, pg->u.inuse.type_info);
     1.6      }
     1.7 +    pg->count_info = 0;
     1.8      /* Free should not decrement domain's total allocation, since 
     1.9       * these pages were allocated without an owner. */
    1.10      page_set_owner(pg, NULL); 
    1.11 @@ -1243,6 +1244,9 @@ static unsigned int sh_set_allocation(st
    1.12              list_del(&sp->list);
    1.13              d->arch.paging.shadow.free_pages -= 1<<SHADOW_MAX_ORDER;
    1.14              d->arch.paging.shadow.total_pages -= 1<<SHADOW_MAX_ORDER;
    1.15 +            for ( j = 0; j < 1<<SHADOW_MAX_ORDER; j++ ) 
    1.16 +                /* Keep the page allocator happy */
    1.17 +                ((struct page_info *)sp)[j].count_info = 0;
    1.18              free_domheap_pages((struct page_info *)sp, SHADOW_MAX_ORDER);
    1.19          }
    1.20