Re: [PATCH v2 06/35] x86/bugs: Restructure mmio mitigation

From: Pawan Gupta
Date: Thu Nov 14 2024 - 00:04:47 EST


On Tue, Nov 05, 2024 at 03:54:26PM -0600, David Kaplan wrote:
> +static void __init mmio_update_mitigation(void)
> +{
> + if (!boot_cpu_has_bug(X86_BUG_MMIO_STALE_DATA))
> + return;
> +
> + if (mitigate_any_verw())
> + mmio_mitigation = MMIO_MITIGATION_VERW;

Same as TAA, UCODE_NEEDED can't be set irrespective of microcode.

> +
> + pr_info("%s\n", mmio_strings[mmio_mitigation]);

This should be in the 'else' part of below condition, otherwise they can
print conflicting mitigation status.

> + if (boot_cpu_has_bug(X86_BUG_MMIO_UNKNOWN))
> + pr_info("Unknown: No mitigations\n");
> +}