summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorNicholas Piggin2017-01-27 05:00:34 +0100
committerMichael Ellerman2017-01-31 09:07:39 +0100
commita97a65d53d9f53b6897dc1b2aed381bc1707136b (patch)
tree08dcf2d0b98a978d80bf09dc5f6829e9831c7bb5 /arch/powerpc/kernel
parentKVM: PPC: Book3S: Move 64-bit KVM interrupt handler out from alt section (diff)
downloadkernel-qcow2-linux-a97a65d53d9f53b6897dc1b2aed381bc1707136b.tar.gz
kernel-qcow2-linux-a97a65d53d9f53b6897dc1b2aed381bc1707136b.tar.xz
kernel-qcow2-linux-a97a65d53d9f53b6897dc1b2aed381bc1707136b.zip
KVM: PPC: Book3S: 64-bit CONFIG_RELOCATABLE support for interrupts
64-bit Book3S exception handlers must find the dynamic kernel base to add to the target address when branching beyond __end_interrupts, in order to support kernel running at non-0 physical address. Support this in KVM by branching with CTR, similarly to regular interrupt handlers. The guest CTR saved in HSTATE_SCRATCH1 and restored after the branch. Without this, the host kernel hangs and crashes randomly when it is running at a non-0 address and a KVM guest is started. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Acked-by: Paul Mackerras <paulus@ozlabs.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/exceptions-64s.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index 89b4f122aec6..65a2559eeb7f 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -142,7 +142,7 @@ END_FTR_SECTION_IFCLR(CPU_FTR_ARCH_300)
lbz r0,HSTATE_HWTHREAD_REQ(r13)
cmpwi r0,0
beq 1f
- b kvm_start_guest
+ BRANCH_TO_KVM(r10, kvm_start_guest)
1:
#endif