Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 24 Jul 2018 15:36:35 -0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by Galois.linutronix.de with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fhzMW-0004Je-5Y for speck@linutronix.de; Tue, 24 Jul 2018 17:36:34 +0200 Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fhzMU-0001pX-5C for speck@linutronix.de; Tue, 24 Jul 2018 15:36:30 +0000 Date: Tue, 24 Jul 2018 17:36:27 +0200 From: Peter Zijlstra Subject: [MODERATED] Re: BUG: disabling SMT from BIOS Message-ID: <20180724153627.GR2494@hirez.programming.kicks-ass.net> References: <20180722220201.usehg7du4krlmmvf@treble> <20180723084410.GY2494@hirez.programming.kicks-ass.net> <20180723124553.btzfagzsnoxoouhz@treble> <20180723151356.7wkmmqksvwqvlgdg@treble> MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: speck@linutronix.de List-ID: On Tue, Jul 24, 2018 at 09:30:37AM +0200, speck for Jiri Kosina wrote: > On Mon, 23 Jul 2018, speck for Josh Poimboeuf wrote: > > > From: Josh Poimboeuf > > Subject: [PATCH] cpu/hotplug: detect SMT disabled by BIOS > > > > If SMT is disabled in BIOS, the CPU code doesn't properly detect it. > > The /sys/devices/system/cpu/smt/control file shows 'on', and the 'l1tf' > > vulnerabilities file shows SMT as vulnerable. > > > > Fix it by forcing 'cpu_smt_control' to CPU_SMT_NOT_SUPPORTED in such a > > case. Unfortunately the detection can only be done after bringing all > > the CPUs online, so we have to overwrite any previous writes to the > > variable. > > > > Reported-by: Joe Mario > > Fixes: f048c399e0f7 ("x86/topology: Provide topology_smt_supported()") > > Signed-off-by: Josh Poimboeuf > > Tested-by: Jiri Kosina Thanks guys! I've pushed this out to speck/{master,linux-4.1[764].y}. In specific, I've not touched the 4.9 branch since that is dwmw2's baby and I didn't know if I was supposed to touch that. If there's anything funny, that's because I'm basically useless at this git thing, but let me know and I'll try and fix it ;-)