diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2013-06-21 08:08:48 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-20 11:43:03 -0400 |
commit | b45835a8365e91c9166e466b92d91675a0d8d1ac (patch) | |
tree | 01c846d06421b2d520aa939be4982f784dfb3df1 /arch | |
parent | 285695e4211008e0f06648c3ae7af8ba09a88399 (diff) |
ARM: KVM: clear exclusive monitor on all exception returns
commit 22cfbb6d730ca2fda236b507d9fba17bf002736c upstream.
Make sure we clear the exclusive monitor on all exception returns,
which otherwise could lead to lock corruptions.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/kvm/interrupts.S | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/kvm/interrupts.S b/arch/arm/kvm/interrupts.S index 20e03d969558..16cd4ba5d7fd 100644 --- a/arch/arm/kvm/interrupts.S +++ b/arch/arm/kvm/interrupts.S | |||
@@ -292,6 +292,7 @@ THUMB( orr r2, r2, #PSR_T_BIT ) | |||
292 | ldr r2, =BSYM(panic) | 292 | ldr r2, =BSYM(panic) |
293 | msr ELR_hyp, r2 | 293 | msr ELR_hyp, r2 |
294 | ldr r0, =\panic_str | 294 | ldr r0, =\panic_str |
295 | clrex @ Clear exclusive monitor | ||
295 | eret | 296 | eret |
296 | .endm | 297 | .endm |
297 | 298 | ||
@@ -441,6 +442,7 @@ guest_trap: | |||
441 | 442 | ||
442 | 4: pop {r0, r1} @ Failed translation, return to guest | 443 | 4: pop {r0, r1} @ Failed translation, return to guest |
443 | mcrr p15, 0, r0, r1, c7 @ PAR | 444 | mcrr p15, 0, r0, r1, c7 @ PAR |
445 | clrex | ||
444 | pop {r0, r1, r2} | 446 | pop {r0, r1, r2} |
445 | eret | 447 | eret |
446 | 448 | ||
@@ -467,6 +469,7 @@ switch_to_guest_vfp: | |||
467 | 469 | ||
468 | pop {r3-r7} | 470 | pop {r3-r7} |
469 | pop {r0-r2} | 471 | pop {r0-r2} |
472 | clrex | ||
470 | eret | 473 | eret |
471 | #endif | 474 | #endif |
472 | 475 | ||