Re: [PATCH 3/3] powerpc/kvm: Enable prefixed instructions for HV KVM and disable for PR KVM

Sachin Sant <[email protected]> Thu, 09 Mar 2023 13:12:17 +0000
Newsgroups org.kernel.vger.kvm-ppc,org.kernel.vger.kvm,org.ozlabs.lists.linuxppc-dev
Message-ID <[email protected]>

> On 08-Mar-2023, at 12:06 PM, Paul Mackerras <[email protected]> wrote:
> 
> 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 <[email protected]>
> Tested-by: Nicholas Piggin <[email protected]>
> Signed-off-by: Paul Mackerras <[email protected]>
> ---

Tested on a Power10 system. Prefixed instructions work correctly.

Tested-by: Sachin Sant <[email protected]>

> arch/powerpc/include/asm/reg.h       | 1 +
> arch/powerpc/kvm/book3s_hv.c         | 9 +++++++--
> arch/powerpc/kvm/book3s_pr.c         | 2 ++
> arch/powerpc/kvm/book3s_rmhandlers.S | 1 +
> 4 files changed, 11 insertions(+), 2 deletions(-)
>