[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Fix a bug which occurs when Xen is compiled with debug=y. Destroying a
# HG changeset patch # User kaf24@xxxxxxxxxxxxxxxxxxxx # Node ID 1f739672ca00d23dd10f110d05a9103918b4ea19 # Parent 1c24ee05f8f3e0180d28ac3922ed984b8e0d0735 Fix a bug which occurs when Xen is compiled with debug=y. Destroying a 32-bit HVM guest on x86/64 will cause a Xen hang. Signed-off-by: Xiaohui Xin <xiaohui.xin@xxxxxxxxx> diff -r 1c24ee05f8f3 -r 1f739672ca00 xen/arch/x86/shadow.c --- a/xen/arch/x86/shadow.c Tue Mar 14 14:40:44 2006 +++ b/xen/arch/x86/shadow.c Tue Mar 14 14:43:10 2006 @@ -202,6 +202,16 @@ * tlbflush_timestamp holds a min & max index of valid page table entries * within the shadow page. */ +static inline void +shadow_page_info_init(struct page_info *page, + unsigned long gmfn, + u32 psh_type) +{ + ASSERT( (gmfn & ~PGT_mfn_mask) == 0 ); + page->u.inuse.type_info = psh_type | gmfn; + page->count_info = 0; + page->tlbflush_timestamp = 0; +} static inline unsigned long alloc_shadow_page(struct domain *d, @@ -249,6 +259,11 @@ l1 = map_domain_page(page_to_mfn(page + 1)); memset(l1, 0, PAGE_SIZE); unmap_domain_page(l1); + + /* we'd like to initialize the second continuous page here + * and leave the first page initialization later */ + + shadow_page_info_init(page+1, gmfn, psh_type); #else page = alloc_domheap_page(NULL); if (!page) @@ -294,10 +309,7 @@ smfn = page_to_mfn(page); - ASSERT( (gmfn & ~PGT_mfn_mask) == 0 ); - page->u.inuse.type_info = psh_type | gmfn; - page->count_info = 0; - page->tlbflush_timestamp = 0; + shadow_page_info_init(page, gmfn, psh_type); switch ( psh_type ) { _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |