Re: [patch V6 10/14] MDS basics 10

Thomas Gleixner <[email protected]>
Newsgroups org.kernel.lore.historical-speck
Message-ID <[email protected]>
On Wed, 6 Mar 2019, speck for Thomas Gleixner wrote:

> On Wed, 6 Mar 2019, speck for Borislav Petkov wrote:
> > 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,
> > 
> > ... but we're not enabling the key when SMT on those is disabled,
> > AFAICT. Or is that coming later?
> 
> Five lines down ....

Following up on our conversation on IRC, I've reworded the comment:

 	/*
	 * Enable the idle clearing if SMT is active on CPUs which are
	 * affected only by MSBDS and not any other MDS variant.
	 *
	 * The other variants cannot be mitigated when SMT is enabled, so
	 * clearing the buffers on idle just to prevent the Store Buffer
	 * repartitioning leak would be a window dressing exercise.
 	 */
 	if (!boot_cpu_has_bug(X86_BUG_MSBDS_ONLY))
 		return;

Thanks,

	tglx
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.