diff options
author | Paul Mackerras <paulus@ozlabs.org> | 2017-03-23 11:55:16 +1100 |
---|---|---|
committer | Paul Mackerras <paulus@ozlabs.org> | 2017-04-20 11:37:44 +1000 |
commit | 9b5ab0051306033b0b1e83dd72e1f84a0c8dd4bf (patch) | |
tree | 25c1372aceaf78913fc506cc064e8bf33020710a /arch/powerpc/kvm/emulate_loadstore.c | |
parent | ceba57df43a25ede55a96a795703c46022b1d1d0 (diff) | |
download | linux-9b5ab0051306033b0b1e83dd72e1f84a0c8dd4bf.tar.bz2 |
KVM: PPC: Add MMIO emulation for remaining floating-point instructions
For completeness, this adds emulation of the lfiwax and lfiwzx
instructions. With this, all floating-point load and store instructions
as of Power ISA V2.07 are emulated.
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Diffstat (limited to 'arch/powerpc/kvm/emulate_loadstore.c')
-rw-r--r-- | arch/powerpc/kvm/emulate_loadstore.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/emulate_loadstore.c b/arch/powerpc/kvm/emulate_loadstore.c index f10ba0c2c202..af833531af31 100644 --- a/arch/powerpc/kvm/emulate_loadstore.c +++ b/arch/powerpc/kvm/emulate_loadstore.c @@ -270,6 +270,20 @@ int kvmppc_emulate_loadstore(struct kvm_vcpu *vcpu) kvmppc_set_gpr(vcpu, ra, vcpu->arch.vaddr_accessed); break; + case OP_31_XOP_LFIWAX: + if (kvmppc_check_fp_disabled(vcpu)) + return EMULATE_DONE; + emulated = kvmppc_handle_loads(run, vcpu, + KVM_MMIO_REG_FPR|rt, 4, 1); + break; + + case OP_31_XOP_LFIWZX: + if (kvmppc_check_fp_disabled(vcpu)) + return EMULATE_DONE; + emulated = kvmppc_handle_load(run, vcpu, + KVM_MMIO_REG_FPR|rt, 4, 1); + break; + case OP_31_XOP_STFSX: if (kvmppc_check_fp_disabled(vcpu)) return EMULATE_DONE; |