Re: [PATCH v2 04/35] x86/bugs: Restructure mds mitigation
From: Pawan Gupta
Date: Wed Nov 13 2024 - 22:03:51 EST
On Tue, Nov 05, 2024 at 03:54:24PM -0600, David Kaplan wrote:
> @@ -277,12 +304,19 @@ enum rfds_mitigations {
> static enum rfds_mitigations rfds_mitigation __ro_after_init =
> IS_ENABLED(CONFIG_MITIGATION_RFDS) ? RFDS_MITIGATION_AUTO : RFDS_MITIGATION_OFF;
>
> +/* Return TRUE if any VERW-based mitigation is enabled. */
> +static bool __init mitigate_any_verw(void)
s/mitigate_any_verw/verw_enabled/ ?
> +{
> + return (mds_mitigation != MDS_MITIGATION_OFF ||
> + taa_mitigation != TAA_MITIGATION_OFF ||
TAA_MITIGATION_TSX_DISABLED does not require VERW, this should be:
taa_mitigation != TAA_MITIGATION_OFF ||
taa_mitigation != TAA_MITIGATION_TSX_DISABLED ||
> + mmio_mitigation != MMIO_MITIGATION_OFF ||
> + rfds_mitigation != RFDS_MITIGATION_OFF);
> +}