]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: MIPS: Introduce and use cpu_guest_has_ldpte
authorHuacai Chen <chenhc@lemote.com>
Sat, 23 May 2020 07:56:33 +0000 (15:56 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 4 Jun 2020 17:49:00 +0000 (13:49 -0400)
commit43545d51caeebe71ae666785b07a99bd04705bc7
tree1029d1e6a5a180ce00a03d99128a60dc9a00007b
parent00c8d1260c5bf10544d57251849e450127cbca9e
KVM: MIPS: Introduce and use cpu_guest_has_ldpte

Loongson-3 has lddir/ldpte instructions and their related CP0 registers
are the same as HTW. So we introduce a cpu_guest_has_ldpte flag and use
it to indicate whether we need to save/restore HTW related CP0 registers
(PWBase, PWSize, PWField and PWCtl).

Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Reviewed-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>
Signed-off-by: Huacai Chen <chenhc@lemote.com>
Co-developed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Message-Id: <1590220602-3547-7-git-send-email-chenhc@lemote.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/mips/include/asm/cpu-features.h
arch/mips/kernel/cpu-probe.c
arch/mips/kvm/vz.c