From: Ian Campbell Date: Wed, 22 Feb 2012 14:33:23 +0000 (+0000) Subject: arm: restore ELR_hyp and SPSR_hyp on return from hypervisor to hypervisor. X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c52f64c8dc5c5b65cd5b1b8fdcde9f260ae75753;p=xen.git arm: restore ELR_hyp and SPSR_hyp on return from hypervisor to hypervisor. This is necessary to handle nested traps to the hypervisor more than one deep. I've not seen an actually failure relating to this but I'm not quite sure how we've managed to get away with not doing it (I suppose multiply nested traps are uncommon). Signed-off-by: Ian Campbell Acked-by: Stefano Stabellini Committed-by: Ian Campbell --- diff --git a/xen/arch/arm/entry.S b/xen/arch/arm/entry.S index d78115d536..b2986289c5 100644 --- a/xen/arch/arm/entry.S +++ b/xen/arch/arm/entry.S @@ -102,6 +102,10 @@ ENTRY(return_to_guest) ENTRY(return_to_hypervisor) ldr lr, [sp, #UREGS_lr] + ldr r11, [sp, #UREGS_pc] + msr ELR_hyp, r11 + ldr r11, [sp, #UREGS_cpsr] + msr SPSR_hyp, r11 pop {r0-r12} add sp, #(UREGS_R8_fiq - UREGS_sp); /* SP, LR, SPSR, PC */ eret