diff options
author | Radim Krčmář <rkrcmar@redhat.com> | 2016-07-22 20:27:26 +0200 |
---|---|---|
committer | Radim Krčmář <rkrcmar@redhat.com> | 2016-07-22 20:27:26 +0200 |
commit | 912902ce78b0d48f717f9128e61fb9bffbd65f86 (patch) | |
tree | 5a97dd19149ba1e0386df9bb467f8c5fb7ba2393 /arch/arm64/kvm/hyp/switch.c | |
parent | 61f5dea179653558562ba9a5dd71eb29d91a383e (diff) | |
parent | 3a88bded203591d4683aacdbb65cd0f549bc58cb (diff) |
Merge tag 'kvm-arm-for-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into next
KVM/ARM changes for Linux 4.8
- GICv3 ITS emulation
- Simpler idmap management that fixes potential TLB conflicts
- Honor the kernel protection in HYP mode
- Removal of the old vgic implementation
Diffstat (limited to 'arch/arm64/kvm/hyp/switch.c')
-rw-r--r-- | arch/arm64/kvm/hyp/switch.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/arm64/kvm/hyp/switch.c b/arch/arm64/kvm/hyp/switch.c index 437cfad5e3d8..81f21a2ab968 100644 --- a/arch/arm64/kvm/hyp/switch.c +++ b/arch/arm64/kvm/hyp/switch.c @@ -299,9 +299,16 @@ static const char __hyp_panic_string[] = "HYP panic:\nPS:%08llx PC:%016llx ESR:% static void __hyp_text __hyp_call_panic_nvhe(u64 spsr, u64 elr, u64 par) { - unsigned long str_va = (unsigned long)__hyp_panic_string; + unsigned long str_va; - __hyp_do_panic(hyp_kern_va(str_va), + /* + * Force the panic string to be loaded from the literal pool, + * making sure it is a kernel address and not a PC-relative + * reference. + */ + asm volatile("ldr %0, =__hyp_panic_string" : "=r" (str_va)); + + __hyp_do_panic(str_va, spsr, elr, read_sysreg(esr_el2), read_sysreg_el2(far), read_sysreg(hpfar_el2), par, |