Re: [PATCH v2 03/35] x86/bugs: Add AUTO mitigations for mds/taa/mmio/rfds

From: Pawan Gupta
Date: Wed Nov 13 2024 - 21:28:37 EST


On Tue, Nov 05, 2024 at 03:54:23PM -0600, David Kaplan wrote:
> @@ -1995,6 +2004,7 @@ void cpu_bugs_smt_update(void)
> update_mds_branch_idle();
> break;
> case MDS_MITIGATION_OFF:
> + case MDS_MITIGATION_AUTO:

This implies AUTO and OFF are similar, which is counter intuitive.
While mitigation selection code ...

> + if (mds_mitigation == MDS_MITIGATION_AUTO)
> + mds_mitigation = MDS_MITIGATION_FULL;
> +

... indicates that AUTO is equivalent to FULL. So, I think AUTO should be
handled the same way as FULL in cpu_bugs_smt_update() as well.

Same for TAA and MMIO below.

> break;
> }
>
> @@ -2006,6 +2016,7 @@ void cpu_bugs_smt_update(void) break;
> case TAA_MITIGATION_TSX_DISABLED:
> case TAA_MITIGATION_OFF:
> + case TAA_MITIGATION_AUTO:
> break;
> }
>
> @@ -2016,6 +2027,7 @@ void cpu_bugs_smt_update(void)
> pr_warn_once(MMIO_MSG_SMT);
> break;
> case MMIO_MITIGATION_OFF:
> + case MMIO_MITIGATION_AUTO:
> break;
> }