RE: [PATCH v3 06/35] x86/bugs: Restructure mmio mitigation

Kaplan, David
2025-02-21T21:48:48Z

[AMD Official Use Only - AMD Internal Distribution Only]

> -----Original Message-----
> From: Borislav Petkov <bp@alien8.de>
> Sent: Wednesday, February 19, 2025 12:21 PM
> To: Josh Poimboeuf <jpoimboe@kernel.org>
> Cc: Kaplan, David <David.Kaplan@amd.com>; Thomas Gleixner
> <tglx@linutronix.de>; Peter Zijlstra <peterz@infradead.org>; Pawan Gupta
> <pawan.kumar.gupta@linux.intel.com>; Ingo Molnar <mingo@redhat.com>; Dave
> Hansen <dave.hansen@linux.intel.com>; x86@kernel.org; H . Peter Anvin
> <hpa@zytor.com>; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH v3 06/35] x86/bugs: Restructure mmio mitigation
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> On Wed, Feb 12, 2025 at 03:16:46PM -0800, Josh Poimboeuf wrote:
> > static bool __init verw_mitigation_enabled(void) {
> > return mds_mitigation != MDS_MITIGATION_OFF ||
> > (taa_mitigation != TAA_MITIGATION_OFF && taa_vulnerable()) ||
> > (mmio_mitigation != MMIO_MITIGATION_OFF && mmio_needs_verw());
> > (rfds_mitigation != RFDS_MITIGATION_OFF &&
> > !rfds_needs_ucode()); }
>
> Instead of turning it into a head-scratching madness, it might be a lot easier if all the
> places which enable VERW mitigation, would do
>
> verw_mitigation_enabled = true;
>
> and then the code can simply check that static var...
>

Yeah, just implemented this and it does keep it pretty clean.

Thanks! --David Kaplan