KVM: MIPS/Emulate: Fix CACHE emulation for EVA hosts
authorJames Hogan <james.hogan@imgtec.com>
Mon, 17 Oct 2016 15:37:45 +0000 (16:37 +0100)
committerJames Hogan <james.hogan@imgtec.com>
Fri, 3 Feb 2017 15:21:01 +0000 (15:21 +0000)
commit8af0e3c2e89e56dc5b064e5854b87a19e70e2710
tree47a0684736ec776f4d280f92400f0caaf721da7c
parentdacc3ed1dd608ff9553dcede6cd05369030ed099
KVM: MIPS/Emulate: Fix CACHE emulation for EVA hosts

Use protected_writeback_dcache_line() instead of flush_dcache_line(),
and protected_flush_icache_line() instead of flush_icache_line(), so
that CACHEE (the EVA variant) is used on EVA host kernels.

Without this, guest floating point branch delay slot emulation via a
trampoline on the user stack fails on EVA host kernels due to failure of
the icache sync, resulting in the break instruction getting skipped and
execution from the stack.

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
arch/mips/kvm/emulate.c