]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
MIPS: KVM: Limit Trap-and-Emulate to MIPS32R2 only
authorJiaxun Yang <jiaxun.yang@flygoat.com>
Fri, 10 Jul 2020 06:30:17 +0000 (14:30 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Sep 2020 09:29:19 +0000 (11:29 +0200)
[ Upstream commit 01edc5e76ecfecf9a79eec2658f6146ef47bc816 ]

After tons of fixes to get Trap-and-Emulate build on Loongson64,
I've got panic on host machine when trying to run a VM.

I found that it can never work on 64bit systems. Revewing the
code, it looks like R6 can't supportrd by TE as well.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Message-Id: <20200710063047.154611-3-jiaxun.yang@flygoat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/mips/Kconfig
arch/mips/kvm/Kconfig

index a7e40bb1e5bc6e6bdbaae7f92e13cfe0e5fc0614..c43ad3b3cea4b07b909c60e1c8ef126e6dd037ba 100644 (file)
@@ -2203,6 +2203,7 @@ endchoice
 
 config KVM_GUEST
        bool "KVM Guest Kernel"
+       depends on CPU_MIPS32_R2
        depends on BROKEN_ON_SMP
        help
          Select this option if building a guest kernel for KVM (Trap & Emulate)
index 2bf02d849a3a8a50d26d4c0c4c763e6288b004bc..032b3fca6cbba0a352f591c382fb91cca3c6971d 100644 (file)
@@ -37,10 +37,11 @@ choice
 
 config KVM_MIPS_TE
        bool "Trap & Emulate"
+       depends on CPU_MIPS32_R2
        help
          Use trap and emulate to virtualize 32-bit guests in user mode. This
          does not require any special hardware Virtualization support beyond
-         standard MIPS32/64 r2 or later, but it does require the guest kernel
+         standard MIPS32 r2 or later, but it does require the guest kernel
          to be configured with CONFIG_KVM_GUEST=y so that it resides in the
          user address segment.