aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kvm/kvm_mips_emul.c
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2014-05-29 05:16:25 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2014-05-30 06:59:54 -0400
commitfacaaec1a72db90127b71d22e788596cf1991ae1 (patch)
treead02ed426464fafa7b56eadd7514eb3f9c9d7d4b /arch/mips/kvm/kvm_mips_emul.c
parent90f91356c7d67ddd98d817838df69335cb831eaa (diff)
MIPS: KVM: Use local_flush_icache_range to fix RI on XBurst
MIPS KVM uses mips32_SyncICache to synchronise the icache with the dcache after dynamically modifying guest instructions or writing guest exception vector. However this uses rdhwr to get the SYNCI step, which causes a reserved instruction exception on Ingenic XBurst cores. It would seem to make more sense to use local_flush_icache_range() instead which does the same thing but is more portable. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Gleb Natapov <gleb@kernel.org> Cc: kvm@vger.kernel.org Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-mips@linux-mips.org Cc: Sanjay Lal <sanjayl@kymasys.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/mips/kvm/kvm_mips_emul.c')
-rw-r--r--arch/mips/kvm/kvm_mips_emul.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/kvm/kvm_mips_emul.c b/arch/mips/kvm/kvm_mips_emul.c
index e3fec99941a7..bad31c6235d4 100644
--- a/arch/mips/kvm/kvm_mips_emul.c
+++ b/arch/mips/kvm/kvm_mips_emul.c
@@ -887,7 +887,7 @@ int kvm_mips_sync_icache(unsigned long va, struct kvm_vcpu *vcpu)
887 887
888 printk("%s: va: %#lx, unmapped: %#x\n", __func__, va, CKSEG0ADDR(pa)); 888 printk("%s: va: %#lx, unmapped: %#x\n", __func__, va, CKSEG0ADDR(pa));
889 889
890 mips32_SyncICache(CKSEG0ADDR(pa), 32); 890 local_flush_icache_range(CKSEG0ADDR(pa), 32);
891 return 0; 891 return 0;
892} 892}
893 893