]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: PPC: Book3S: 64-bit CONFIG_RELOCATABLE support for interrupts
authorNicholas Piggin <npiggin@gmail.com>
Fri, 27 Jan 2017 04:00:34 +0000 (14:00 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 31 Jan 2017 08:07:39 +0000 (19:07 +1100)
commit056b94b997a6a0e31d73121a189a3a967d03d9ea
tree08dcf2d0b98a978d80bf09dc5f6829e9831c7bb5
parent996e85b246750814e8028cf900e93a51c243638b
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>
arch/powerpc/include/asm/exception-64s.h
arch/powerpc/kernel/exceptions-64s.S
arch/powerpc/kvm/book3s_hv_rmhandlers.S
arch/powerpc/kvm/book3s_segment.S