powerpc/64s: Fix HV NMI vs HV interrupt recoverability test
authorNicholas Piggin <npiggin@gmail.com>
Tue, 26 Feb 2019 08:51:07 +0000 (18:51 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 26 Feb 2019 12:28:24 +0000 (23:28 +1100)
commitccd477028a202993b9ddca5d2404fdaca3b7a55c
tree075f65a46de61f8f45856cd0bf8fa71e85b9262c
parent3b4d07d2674f6b4a9281031f99d1f7efd325b16d
powerpc/64s: Fix HV NMI vs HV interrupt recoverability test

HV interrupts that use HSRR registers do not enter with MSR[RI] clear,
but their entry code is not recoverable vs NMI, due to shared use of
HSPRG1 as a scratch register to save r13.

This means that a system reset or machine check that hits in HSRR
interrupt entry can cause r13 to be silently corrupted.

Fix this by marking NMIs non-recoverable if they land in HV interrupt
ranges.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/asm-prototypes.h
arch/powerpc/include/asm/nmi.h
arch/powerpc/kernel/exceptions-64s.S
arch/powerpc/kernel/mce.c
arch/powerpc/kernel/traps.c