Skip to contentSkip to conversation

MIPS: mark KVM_GUEST (T&E KVM) as BROKEN_ON_SMP

PATCH New James Hogan 1 participant 1 message Jul 12, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: mark KVM_GUEST (T&E KVM) as BROKEN_ON_SMP

Make KVM_GUEST depend on BROKEN_ON_SMP so that it cannot be enabled with SMP.

SMP kernels use ll/sc instructions for an atomic section in the tlb fill handler, with a tlbp instruction contained in the middle. This cannot be emulated with trap & emulate KVM because the tlbp instruction traps and the eret to return to the guest code clears the LLbit which makes the sc instruction always fail.

---
 arch/mips/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/mips/Kconfig +1 -0
index 7a58ab9..6a6a096 100644
@@ -1736,6 +1736,7 @@ endchoice
 
 config KVM_GUEST
 	bool "KVM Guest Kernel"
+	depends on BROKEN_ON_SMP
 	help
 	  Select this option if building a guest kernel for KVM (Trap & Emulate) mode
 
Signature · 1 line
1.8.1.2