KVM: PPC: Reimplement LOAD_VMX/STORE_VMX instruction mmio emulation with analyse_inst...
authorSimon Guo <wei.guo.simon@gmail.com>
Mon, 21 May 2018 05:24:26 +0000 (13:24 +0800)
committerPaul Mackerras <paulus@ozlabs.org>
Tue, 22 May 2018 09:53:00 +0000 (19:53 +1000)
commitacc9eb9305fecd958e2877c4e6cd3284d01c2e82
tree679cf4c57c1860592d92047eb38d83e2b458a95d
parentda2a32b876e979d74f84746ae8d066e1d54b568f
KVM: PPC: Reimplement LOAD_VMX/STORE_VMX instruction mmio emulation with analyse_instr() input

This patch reimplements LOAD_VMX/STORE_VMX MMIO emulation with
analyse_instr() input. When emulating the store, the VMX reg will need to
be flushed so that the right reg val can be retrieved before writing to
IO MEM.

This patch also adds support for lvebx/lvehx/lvewx/stvebx/stvehx/stvewx
MMIO emulation. To meet the requirement of handling different element
sizes, kvmppc_handle_load128_by2x64()/kvmppc_handle_store128_by2x64()
were replaced with kvmppc_handle_vmx_load()/kvmppc_handle_vmx_store().

The framework used is similar to VSX instruction MMIO emulation.

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/include/asm/kvm_host.h
arch/powerpc/include/asm/kvm_ppc.h
arch/powerpc/kvm/emulate_loadstore.c
arch/powerpc/kvm/powerpc.c