ia64/xen-unstable

changeset 17913:7eab6475c60a

shadow: Re-initialise page_info's lock field when freeing shadow pages.

Fixes boot failure of xenU after destroying a HVM guest.

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jun 27 14:38:41 2008 +0100 (2008-06-27)
parents cebedb30a964
children 73b798732e77
files xen/arch/x86/mm/shadow/common.c
line diff
     1.1 --- a/xen/arch/x86/mm/shadow/common.c	Fri Jun 27 14:16:53 2008 +0100
     1.2 +++ b/xen/arch/x86/mm/shadow/common.c	Fri Jun 27 14:38:41 2008 +0100
     1.3 @@ -1830,6 +1830,14 @@ static unsigned int sh_set_allocation(st
     1.4              sp = list_entry(d->arch.paging.shadow.freelists[order].next,
     1.5                              struct shadow_page_info, list);
     1.6              list_del(&sp->list);
     1.7 +#if defined(__x86_64__)
     1.8 +            /*
     1.9 +             * Re-instate lock field which we overwrite with shadow_page_info.
    1.10 +             * This was safe, since the lock is only used on guest pages.
    1.11 +             */
    1.12 +            for ( j = 0; j < 1U << order; j++ )
    1.13 +                spin_lock_init(&((struct page_info *)sp)[j].lock);
    1.14 +#endif
    1.15              d->arch.paging.shadow.free_pages -= 1 << order;
    1.16              d->arch.paging.shadow.total_pages -= 1 << order;
    1.17              free_domheap_pages((struct page_info *)sp, order);