]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: MIPS: Add CPUCFG emulation for Loongson-3
authorHuacai Chen <chenhc@lemote.com>
Sat, 23 May 2020 07:56:38 +0000 (15:56 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 4 Jun 2020 17:51:33 +0000 (13:51 -0400)
commit3b8cd255059fb2c9d3e6d75e3e2683ca5df8bcad
treed9b831da059d45b689210a8f845a539b9f9c917e
parentcfdd1ee90ed686e064b651c8f93fcc51a57321b6
KVM: MIPS: Add CPUCFG emulation for Loongson-3

Loongson-3 overrides lwc2 instructions to implement CPUCFG and CSR
read/write functions. These instructions all cause guest exit so CSR
doesn't benifit KVM guest (and there are always legacy methods to
provide the same functions as CSR). So, we only emulate CPUCFG and let
it return a reduced feature list (which means the virtual CPU doesn't
have any other advanced features, including CSR) in KVM.

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-12-git-send-email-chenhc@lemote.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/mips/include/asm/kvm_host.h
arch/mips/include/uapi/asm/inst.h
arch/mips/kvm/mips.c
arch/mips/kvm/vz.c