linux-mips
[Top] [All Lists]

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

To: linux-mips <linux-mips@linux-mips.org>, Sanjay Lal <sanjayl@kymasys.com>, Ralf Baechle <ralf@linux-mips.org>
Subject: [PATCH] MIPS: mark KVM_GUEST (T&E KVM) as BROKEN_ON_SMP
From: James Hogan <james.hogan@imgtec.com>
Date: Fri, 12 Jul 2013 12:26:11 +0100
Cc: David Daney <david.daney@cavium.com>, kvm <kvm@vger.kernel.org>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7
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.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Sanjay Lal <sanjayl@kymasys.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: David Daney <david.daney@cavium.com>
Cc: linux-mips@linux-mips.org
Cc: kvm@vger.kernel.org
---
 arch/mips/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 7a58ab9..6a6a096 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -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
 
-- 
1.8.1.2


<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] MIPS: mark KVM_GUEST (T&E KVM) as BROKEN_ON_SMP, James Hogan <=