From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 04 Mar 2019 03:55:59 -0000 Received: from mx1.redhat.com ([209.132.183.28]) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1h0ehp-0007VX-30 for speck@linutronix.de; Mon, 04 Mar 2019 04:55:58 +0100 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 48C8C307DAAF for ; Mon, 4 Mar 2019 03:55:49 +0000 (UTC) Received: from tonnant.bos.jonmasters.org (ovpn-120-248.rdu2.redhat.com [10.10.120.248]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EAB6D6013A for ; Mon, 4 Mar 2019 03:55:48 +0000 (UTC) References: <20190304012138.gikabpafseh2swre@treble> <20190304012322.re2q6n2wjxbwpiin@treble> From: Jon Masters Message-ID: Date: Sun, 3 Mar 2019 22:55:47 -0500 MIME-Version: 1.0 In-Reply-To: <20190304012322.re2q6n2wjxbwpiin@treble> Subject: [MODERATED] Encrypted Message Content-Type: multipart/mixed; boundary="cEpLHCxeripBMAFxEbzjjgYF7IYjndi8P"; protected-headers="v1" To: speck@linutronix.de List-ID: This is an OpenPGP/MIME encrypted message (RFC 4880 and 3156) --cEpLHCxeripBMAFxEbzjjgYF7IYjndi8P Content-Type: text/rfc822-headers; protected-headers="v1" Content-Disposition: inline From: Jon Masters To: speck for Josh Poimboeuf Subject: Re: [PATCH RFC 1/4] 1 --cEpLHCxeripBMAFxEbzjjgYF7IYjndi8P Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 3/3/19 8:23 PM, speck for Josh Poimboeuf wrote: > diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c > index e11654f93e71..0c71ab0d57e3 100644 > --- a/arch/x86/kernel/cpu/bugs.c > +++ b/arch/x86/kernel/cpu/bugs.c > @@ -221,6 +221,7 @@ static void x86_amd_ssb_disable(void) > =20 > /* Default mitigation for L1TF-affected CPUs */ > static enum mds_mitigations mds_mitigation __ro_after_init =3D MDS_MIT= IGATION_FULL; > +static bool mds_nosmt __ro_after_init =3D false; > =20 > static const char * const mds_strings[] =3D { > [MDS_MITIGATION_OFF] =3D "Vulnerable", > @@ -238,8 +239,13 @@ static void mds_select_mitigation(void) > if (mds_mitigation =3D=3D MDS_MITIGATION_FULL) { > if (!boot_cpu_has(X86_FEATURE_MD_CLEAR)) > mds_mitigation =3D MDS_MITIGATION_VMWERV; > + > static_branch_enable(&mds_user_clear); > + > + if (mds_nosmt && !boot_cpu_has(X86_BUG_MSBDS_ONLY)) > + cpu_smt_disable(false); Is there some logic missing here to disable SMT? Jon. --=20 Computer Architect | Sent with my Fedora powered laptop --cEpLHCxeripBMAFxEbzjjgYF7IYjndi8P--