From: Julien Grall Date: Wed, 25 May 2016 13:14:06 +0000 (+0100) Subject: xen/arm: Don't call setup_virtual_regions multiple time X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~1088 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1260c7fdb91dfe0033d6eef0e94b93607be020a9;p=xen.git xen/arm: Don't call setup_virtual_regions multiple time The commit 2aa925be84293b44ad587ed117184ace61b41dd6 "arm/x86: Use struct virtual_region to do bug, symbol, and (x86) exception tables lookup." has introduced virtual_region. The call to initialize those regions is made in init_traps which is called during each CPU bring up. This will result to register multiple time the same region and Xen crash when an address is looked up. This can be fixed by moving the call to setup_virtual_region directly in start_xen. Signed-off-by: Julien Grall Reported-by: Chenxia Zhao Reviewed-by: Wei Liu Reviewed-by: Konrad Rzeszutek Wilk Release-acked-by: Wei Liu --- diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c index 09ff1eae3d..9bc11c432e 100644 --- a/xen/arch/arm/setup.c +++ b/xen/arch/arm/setup.c @@ -722,6 +722,7 @@ void __init start_xen(unsigned long boot_phys_offset, set_current((struct vcpu *)0xfffff000); /* debug sanity */ idle_vcpu[0] = current; + setup_virtual_regions(NULL, NULL); /* Initialize traps early allow us to get backtrace when an error occurred */ init_traps(); diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 1828ea118e..aa3e3c2bfb 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -102,8 +102,6 @@ integer_param("debug_stack_lines", debug_stack_lines); void init_traps(void) { - setup_virtual_regions(NULL, NULL); - /* Setup Hyp vector base */ WRITE_SYSREG((vaddr_t)hyp_traps_vector, VBAR_EL2);