KVM: PPC: Make kvmppc_get_last_inst() produce a ppc_inst_t
authorPaul Mackerras <paulus@ozlabs.org>
Wed, 8 Mar 2023 06:34:48 +0000 (17:34 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 3 Apr 2023 05:45:41 +0000 (15:45 +1000)
commitacf17878da680a0c11c0bcb8a54b4f676ff39c80
treea3b9d8e9723adb4af45875fe37c1d9ccac809879
parent6cd5c1db9983600f1848822e86e4906377b4a899
KVM: PPC: Make kvmppc_get_last_inst() produce a ppc_inst_t

This changes kvmppc_get_last_inst() so that the instruction it fetches
is returned in a ppc_inst_t variable rather than a u32.  This will
allow us to return a 64-bit prefixed instruction on those 64-bit
machines that implement Power ISA v3.1 or later, such as POWER10.
On 32-bit platforms, ppc_inst_t is 32 bits wide, and is turned back
into a u32 by ppc_inst_val, which is an identity operation on those
platforms.

Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Tested-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/ZAgsiPlL9O7KnlZZ@cleo
arch/powerpc/include/asm/kvm_ppc.h
arch/powerpc/kvm/book3s_64_mmu_hv.c
arch/powerpc/kvm/book3s_hv.c
arch/powerpc/kvm/book3s_paired_singles.c
arch/powerpc/kvm/book3s_pr.c
arch/powerpc/kvm/booke.c
arch/powerpc/kvm/emulate.c
arch/powerpc/kvm/emulate_loadstore.c
arch/powerpc/kvm/powerpc.c