KVM: PPC: Enable prefixed instructions for HV KVM and disable for PR KVM
authorPaul Mackerras <paulus@ozlabs.org>
Wed, 8 Mar 2023 06:36:11 +0000 (17:36 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 3 Apr 2023 05:45:59 +0000 (15:45 +1000)
commita3800ef9c48c4497dafe5ede1b65d91d9ef9cf1e
treeba1c7ea92cc4ca0156fb5f00fe6a8fbe946ca658
parent953e37397fb61be61f095d36972188bac5235021
KVM: PPC: Enable prefixed instructions for HV KVM and disable for PR KVM

Now that we can read prefixed instructions from a HV KVM guest and
emulate prefixed load/store instructions to emulated MMIO locations,
we can add HFSCR_PREFIXED into the set of bits that are set in the
HFSCR for a HV KVM guest on POWER10, allowing the guest to use
prefixed instructions.

PR KVM has not yet been extended to handle prefixed instructions in
all situations where we might need to emulate them, so prevent the
guest from enabling prefixed instructions in the FSCR for now.

Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Tested-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Tested-by: Sachin Sant <sachinp@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/ZAgs25dCmLrVkBdU@cleo
arch/powerpc/include/asm/reg.h
arch/powerpc/kvm/book3s_hv.c
arch/powerpc/kvm/book3s_pr.c
arch/powerpc/kvm/book3s_rmhandlers.S