RE: [PATCH v2 05/35] x86/bugs: Restructure taa mitigation

From: Kaplan, David
Date: Thu Nov 14 2024 - 10:08:23 EST


[AMD Official Use Only - AMD Internal Distribution Only]

> -----Original Message-----
> From: Pawan Gupta <pawan.kumar.gupta@xxxxxxxxxxxxxxx>
> Sent: Wednesday, November 13, 2024 10:43 PM
> To: Kaplan, David <David.Kaplan@xxxxxxx>
> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>; Borislav Petkov <bp@xxxxxxxxx>; Peter
> Zijlstra <peterz@xxxxxxxxxxxxx>; Josh Poimboeuf <jpoimboe@xxxxxxxxxx>; Ingo
> Molnar <mingo@xxxxxxxxxx>; Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>;
> x86@xxxxxxxxxx; H . Peter Anvin <hpa@xxxxxxxxx>; linux-kernel@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH v2 05/35] x86/bugs: Restructure taa mitigation
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> On Tue, Nov 05, 2024 at 03:54:25PM -0600, David Kaplan wrote:
> > +static void __init taa_update_mitigation(void) {
> > + if (!boot_cpu_has_bug(X86_BUG_TAA))
> > + return;
> > +
> > + if (mitigate_any_verw())
> > + taa_mitigation = TAA_MITIGATION_VERW;
>
> This isn't right, TAA_MITIGATION_UCODE_NEEDED can never get set
> irrespective of microcode.
>
> The UCODE_NEEDED checks in taa_select_mitigation() actually belongs here.

Ah, I see your point. I'll fix this, and for mmio/rfds too.

Thanks --David Kaplan