Re: [PATCH v3 09/35] x86/bugs: Restructure srbds mitigation

From: Josh Poimboeuf
Date: Mon Feb 10 2025 - 18:44:23 EST


On Wed, Jan 08, 2025 at 02:24:49PM -0600, David Kaplan wrote:
> +static void __init srbds_apply_mitigation(void)
> +{
> + if (!boot_cpu_has_bug(X86_BUG_SRBDS))
> + return;

I realize this is just preserving the existing behavior, but for
consistency with the others this should check for cpu_mitigations_off()
so the mitigation doesn't get printed.

> update_srbds_msr();
> pr_info("%s\n", srbds_strings[srbds_mitigation]);

More generally, IMO these should be printed in the select (or update)
functions rather than in the apply functions.

--
Josh