summaryrefslogtreecommitdiff
path: root/arch/arm64/kvm/hyp/hyp-entry.S
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2015-10-25 15:21:52 +0000
committerMarc Zyngier <marc.zyngier@arm.com>2015-12-14 11:30:42 +0000
commit53fd5b6487e4438049a5da5e36dfb8edcf1fd789 (patch)
treef76af58124936d36e22a7e69b992b5cf414e0c2e /arch/arm64/kvm/hyp/hyp-entry.S
parent2b28162cf65a6fe1c93d172675e4f2792792f17e (diff)
arm64: KVM: Add panic handling
Add the panic handler, together with the small bits of assembly code to call the kernel's panic implementation. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'arch/arm64/kvm/hyp/hyp-entry.S')
-rw-r--r--arch/arm64/kvm/hyp/hyp-entry.S11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm64/kvm/hyp/hyp-entry.S b/arch/arm64/kvm/hyp/hyp-entry.S
index 818731a5f61c..8e58a3ba6139 100644
--- a/arch/arm64/kvm/hyp/hyp-entry.S
+++ b/arch/arm64/kvm/hyp/hyp-entry.S
@@ -155,7 +155,16 @@ el1_irq:
mov x1, #ARM_EXCEPTION_IRQ
b __guest_exit
-.macro invalid_vector label, target = __kvm_hyp_panic
+ENTRY(__hyp_do_panic)
+ mov lr, #(PSR_F_BIT | PSR_I_BIT | PSR_A_BIT | PSR_D_BIT |\
+ PSR_MODE_EL1h)
+ msr spsr_el2, lr
+ ldr lr, =panic
+ msr elr_el2, lr
+ eret
+ENDPROC(__hyp_do_panic)
+
+.macro invalid_vector label, target = __hyp_panic
.align 2
\label:
b \target