Commit 22cfbb6d authored by Marc Zyngier's avatar Marc Zyngier Committed by Christoffer Dall

ARM: KVM: clear exclusive monitor on all exception returns

Make sure we clear the exclusive monitor on all exception returns,
which otherwise could lead to lock corruptions.
Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
Signed-off-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
parent 479c5ae2
...@@ -292,6 +292,7 @@ THUMB( orr r2, r2, #PSR_T_BIT ) ...@@ -292,6 +292,7 @@ THUMB( orr r2, r2, #PSR_T_BIT )
ldr r2, =BSYM(panic) ldr r2, =BSYM(panic)
msr ELR_hyp, r2 msr ELR_hyp, r2
ldr r0, =\panic_str ldr r0, =\panic_str
clrex @ Clear exclusive monitor
eret eret
.endm .endm
...@@ -441,6 +442,7 @@ guest_trap: ...@@ -441,6 +442,7 @@ guest_trap:
4: pop {r0, r1} @ Failed translation, return to guest 4: pop {r0, r1} @ Failed translation, return to guest
mcrr p15, 0, r0, r1, c7 @ PAR mcrr p15, 0, r0, r1, c7 @ PAR
clrex
pop {r0, r1, r2} pop {r0, r1, r2}
eret eret
...@@ -467,6 +469,7 @@ switch_to_guest_vfp: ...@@ -467,6 +469,7 @@ switch_to_guest_vfp:
pop {r3-r7} pop {r3-r7}
pop {r0-r2} pop {r0-r2}
clrex
eret eret
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment