Re: [PATCH v2] x86/idle: Remove MFENCEs for X86_BUG_CLFLUSH_MONITOR
From: Ingo Molnar
Date: Wed Apr 02 2025 - 16:04:24 EST
* Dave Hansen <dave.hansen@xxxxxxxxx> wrote:
> On 4/2/25 10:24, Andrew Cooper wrote:
> ...
> > i.e. The SDM was incorrect at the time, and barriers should not have been
> > inserted. Double checking the original AAI65 errata (not available from
> > intel.com any more) shows no mention of barriers either.
> >
> > Note: If this were a general codepath, the MFENCEs would be needed, because
> > AMD CPUs of the same vintage do sport otherwise-unordered CLFLUSHs.
> >
> > Furthermore, use a plain alternative, rather than static_cpu_has_bug() and/or
> > no optimisation. The workaround is a single instruction.
>
> Nit: this never comes out and says that it removes the unnecessary
> barriers. But we can fix that up when we apply this by adding:
>
> Remove the unnecessary barriers. Furthermore, use a plain
> alternative, rather than static_cpu_has_bug() and/or
> no optimisation. The workaround is a single instruction.
So the title says it already:
x86/idle: Remove MFENCEs for X86_BUG_CLFLUSH_MONITOR
But I've added in your sentence as well, because there's no such thing
as too much clarity in a changelog. :-)
> Acked-by: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
Thanks!
Ingo