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 ; 06 Mar 2019 19:15:50 -0000 Received: from p5492e2fc.dip0.t-ipconnect.de ([84.146.226.252] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1h1c16-0003NN-UF for speck@linutronix.de; Wed, 06 Mar 2019 20:15:49 +0100 Date: Wed, 6 Mar 2019 20:15:48 +0100 (CET) From: Thomas Gleixner Subject: Re: [patch V6 10/14] MDS basics 10 In-Reply-To: <20190305184254.GH31083@redhat.com> Message-ID: References: <20190301214738.281554861@linutronix.de> <20190301214848.075448450@linutronix.de> <20190305184254.GH31083@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: speck@linutronix.de List-ID: Andrea, On Tue, 5 Mar 2019, speck for Andrea Arcangeli wrote: > Hi Thomas, > > On Fri, Mar 01, 2019 at 10:47:48PM +0100, speck for Thomas Gleixner wrote: > > +/* Update the static key controlling the MDS CPU buffer clear in idle */ > > +static void update_mds_branch_idle(void) > > +{ > > + /* > > + * Enable the idle clearing on CPUs which are affected only by > > + * MDBDS and not any other MDS variant. The other variants cannot > > + * be mitigated when SMT is enabled, so clearing the buffers on > > + * idle would be a window dressing exercise. > > + */ > > + if (!boot_cpu_has(X86_BUG_MSBDS_ONLY)) > > + return; > > + > > + if (sched_smt_active()) > > + static_branch_enable(&mds_idle_clear); > > Do you think it's worth also clearing > MSR_MISC_FEATURES_ENABLES_RING3MWAIT_BIT by setting > ring3mwait_disabled when sched_smt_active() is true above? Not sure. > I don't expect anybody will pass manually ring3mwait=disable to the > kernel on XEON_PHI_KNL/XEON_PHI_KNM. I'm not aware of any app using > the user mwait, which also makes this not a big deal.. but it goes > both ways, it's also not a big deal for userland to turn it off when > we report SMT is enabled and safe in sysfs. True and as usual we don't really know what people are doing and wreckaging existing applications which rely on that would be not nice. Thanks, tglx