OSDN Git Service

powerpc/64s/exception: Only test KVM in SRR interrupts when PR KVM is supported
authorNicholas Piggin <npiggin@gmail.com>
Tue, 25 Feb 2020 17:35:29 +0000 (03:35 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 1 Apr 2020 02:42:12 +0000 (13:42 +1100)
commit2284ffea8f0c7849a80e76ec698d38506b51a4e8
treedee0eff1bc80fabd0a44114bdddf9325f3198984
parent94325357e8c064e28930a9f571395ca9782a6e6d
powerpc/64s/exception: Only test KVM in SRR interrupts when PR KVM is supported

Apart from SRESET, MCE, and syscall (hcall variant), the SRR type
interrupts are not escalated to hypervisor mode, so are delivered to
the OS.

When running PR KVM, the OS is the hypervisor, and the guest runs with
MSR[PR]=1 (ie. usermode), so these interrupts must test if a guest was
running when interrupted. These tests are required at the real-mode
entry points because the PR KVM host runs with LPCR[AIL]=0.

In HV KVM and nested HV KVM, the guest always receives these
interrupts, so there is no need for the host to make this test. So
remove the tests if PR KVM is not configured.

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