mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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 <ian.campbell@citrix.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Committed-by: Ian Campbell <Ian.Campbell@citrix.com>
This commit is contained in:
1 parent
5d22304c12
commit
c52f64c8dc
1 file changed
+4
@@ -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
|
||||
|
||||