KVM: PPC: Reimplement LOAD_FP/STORE_FP instruction mmio emulation with analyse_instr...
authorSimon Guo <wei.guo.simon@gmail.com>
Mon, 21 May 2018 05:24:23 +0000 (13:24 +0800)
committerPaul Mackerras <paulus@ozlabs.org>
Tue, 22 May 2018 09:51:18 +0000 (19:51 +1000)
commit2b33cb585f940180b4c527f0de46ff226a9d25ab
tree5edb6b3f693b7ded8920be3e556dea922f6f432c
parent2e6baa46b4ae785e3e954aaf9d2e8a0bb06ad33a
KVM: PPC: Reimplement LOAD_FP/STORE_FP instruction mmio emulation with analyse_instr() input

This patch reimplements LOAD_FP/STORE_FP instruction MMIO emulation with
analyse_instr() input. It utilizes the FPCONV/UPDATE properties exported by
analyse_instr() and invokes kvmppc_handle_load(s)/kvmppc_handle_store()
accordingly.

For FP store MMIO emulation, the FP regs need to be flushed firstly so
that the right FP reg vals can be read from vcpu->arch.fpr, which will
be stored into MMIO data.

Suggested-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Simon Guo <wei.guo.simon@gmail.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
arch/powerpc/kvm/emulate_loadstore.c