powerpc/64s/exception: machine check fix KVM guest test
authorNicholas Piggin <npiggin@gmail.com>
Fri, 2 Aug 2019 10:56:28 +0000 (20:56 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 30 Aug 2019 00:32:34 +0000 (10:32 +1000)
commit19dbe673e62b076f00ae2841fcf5898b4728d5ab
tree490eabac13302ffffab8ca09eb5228a07f869d82
parent1039f62431e2aa16487cd6d64bc841d71f6465b8
powerpc/64s/exception: machine check fix KVM guest test

The machine_check_handle_early hypervisor guest test is skipped if
!HVMODE or MSR[HV]=0, which is wrong for PR or nested hypervisors
that could be running a guest in this state.

Test HSTATE_IN_GUEST up front and use that to branch out to the KVM
handler, then MSR[PR] alone can test for this kernel's userspace.
This matches all other interrupt handling.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190802105709.27696-4-npiggin@gmail.com
arch/powerpc/kernel/exceptions-64s.S