Commit 49bb9600 authored by Huacai Chen's avatar Huacai Chen Committed by Paolo Bonzini

KVM: MIPS: Let indexed cacheops cause guest exit on Loongson-3

Loongson-3's indexed cache operations need a node-id in the address,
but in KVM guest the node-id may be incorrect. So, let indexed cache
operations cause guest exit on Loongson-3.
Reviewed-by: default avatarAleksandar Markovic <aleksandar.qemu.devel@gmail.com>
Signed-off-by: default avatarHuacai Chen <chenhc@lemote.com>
Co-developed-by: default avatarJiaxun Yang <jiaxun.yang@flygoat.com>
Message-Id: <1590220602-3547-9-git-send-email-chenhc@lemote.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 52c07e1c
...@@ -2853,8 +2853,12 @@ static int kvm_vz_hardware_enable(void) ...@@ -2853,8 +2853,12 @@ static int kvm_vz_hardware_enable(void)
write_c0_guestctl0(MIPS_GCTL0_CP0 | write_c0_guestctl0(MIPS_GCTL0_CP0 |
(MIPS_GCTL0_AT_GUEST << MIPS_GCTL0_AT_SHIFT) | (MIPS_GCTL0_AT_GUEST << MIPS_GCTL0_AT_SHIFT) |
MIPS_GCTL0_CG | MIPS_GCTL0_CF); MIPS_GCTL0_CG | MIPS_GCTL0_CF);
if (cpu_has_guestctl0ext) if (cpu_has_guestctl0ext) {
if (current_cpu_type() != CPU_LOONGSON64)
set_c0_guestctl0ext(MIPS_GCTL0EXT_CGI); set_c0_guestctl0ext(MIPS_GCTL0EXT_CGI);
else
clear_c0_guestctl0ext(MIPS_GCTL0EXT_CGI);
}
if (cpu_has_guestid) { if (cpu_has_guestid) {
write_c0_guestctl1(0); write_c0_guestctl1(0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment