From: Konrad Rzeszutek Wilk Date: Fri, 17 Aug 2012 13:35:31 +0000 (-0400) Subject: xen/mmu: If the revector fails, don't attempt to revector anything else. X-Git-Tag: v2.6.39-400.9.0~418^2^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=dda7f430fd5e2c55d8df3a8629fbe79b5b5954ad;p=users%2Fjedix%2Flinux-maple.git xen/mmu: If the revector fails, don't attempt to revector anything else. If the P2M revectoring would fail, we would try to continue on by cleaning the PMD for L1 (PTE) page-tables. The xen_cleanhighmap is greedy and erases the PMD on both boundaries. Since the P2M array can share the PMD, we would wipe out part of the __ka that is still used in the P2M tree to point to P2M leafs. This fixes it by bypassing the revectoring and continuing on. If the revector fails, a nice WARN is printed so we can still troubleshoot this. Signed-off-by: Konrad Rzeszutek Wilk --- diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index f610c2b00f3b..af2c7e6258fc 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c @@ -1250,7 +1250,8 @@ static void __init xen_pagetable_setup_done(pgd_t *base) memblock_x86_free_range(__pa(xen_start_info->mfn_list), __pa(xen_start_info->mfn_list) + size); /* And revector! Bye bye old array */ xen_start_info->mfn_list = new_mfn_list; - } + } else + goto skip; } /* At this stage, cleanup_highmap has already cleaned __ka space * from _brk_limit way up to the max_pfn_mapped (which is the end of @@ -1271,6 +1272,7 @@ static void __init xen_pagetable_setup_done(pgd_t *base) * anything at this stage. */ xen_cleanhighmap(MODULES_VADDR, roundup(MODULES_VADDR, PUD_SIZE) - 1); #endif +skip: #endif xen_post_allocator_init(); }