Skip to content

Commit

Permalink
MIPS: KVM: Limit Trap-and-Emulate to MIPS32R2 only
Browse files Browse the repository at this point in the history
[ Upstream commit 01edc5e ]

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>
  • Loading branch information
FlyGoat authored and gregkh committed Sep 3, 2020
1 parent 7fafbbe commit fcd0ea8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions arch/mips/Kconfig
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion arch/mips/kvm/Kconfig
Expand Up @@ -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.

Expand Down

0 comments on commit fcd0ea8

Please sign in to comment.