summaryrefslogtreecommitdiff
path: root/arch/mips/kvm/emulate.c
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2016-06-15 19:29:46 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2016-06-15 23:58:17 +0200
commitd5cd26bcfc881f5443d510e3acd40b30d7b7d0df (patch)
tree471d3e50f148156e827c267c704692e4d8255759 /arch/mips/kvm/emulate.c
parent66ffc50c480e7ab6ad5642f47276435a8873c31a (diff)
MIPS: KVM: Factor writing of translated guest instructions
The code in kvm_mips_dyntrans.c to write a translated guest instruction to guest memory depending on the segment is duplicated between each of the functions. Additionally the cache op translation functions assume the instruction is in the KSEG0/1 segment rather than KSEG2/3, which is generally true but isn't guaranteed. Factor that code into a new kvm_mips_trans_replace() which handles both KSEG0/1 and KSEG2/3. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Radim Krčmář <rkrcmar@redhat.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/mips/kvm/emulate.c')
0 files changed, 0 insertions, 0 deletions