[MODERATED] Re: Encrypted Message
Josh Poimboeuf <[email protected]>
| Newsgroups | org.kernel.lore.historical-speck |
|---|---|
| Message-ID | <20190304170603.mx4rwst72yhv2y7m@treble> |
On Sun, Mar 03, 2019 at 10:55:47PM -0500, speck for Jon Masters wrote:
> 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)
> >
> > /* Default mitigation for L1TF-affected CPUs */
> > static enum mds_mitigations mds_mitigation __ro_after_init = MDS_MITIGATION_FULL;
> > +static bool mds_nosmt __ro_after_init = false;
> >
> > static const char * const mds_strings[] = {
> > [MDS_MITIGATION_OFF] = "Vulnerable",
> > @@ -238,8 +239,13 @@ static void mds_select_mitigation(void)
> > if (mds_mitigation == MDS_MITIGATION_FULL) {
> > if (!boot_cpu_has(X86_FEATURE_MD_CLEAR))
> > mds_mitigation = 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?
That would be the cpu_smt_disable() call :-)
--
Josh