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

From: Brendan Jackman
Date: Mon Feb 10 2025 - 12:36:01 EST


On Mon, 10 Feb 2025 at 18:22, Kaplan, David <David.Kaplan@xxxxxxx> wrote:
> > This is still peeking at other mitigations in _apply_mitigation.
> > Shouldn't we shunt that logic into _update_mitigation?
> >
> > I guess this would need a new enum value but that doesn't seem too bad. Worth it
> > to have all the inter-mitigation dependencies localised into *_udpate_mitigation IMO.
>
> I don't think it is peeking at other mitigations, it's only looking at what other bugs the CPU has (which is static). Looking at the mds/taa/etc. mitigation values is done in mmio_update_mitigation.

Hmm, that's true but it doesn't quite shake my underlying feeling that
we're leaving isolation of logic on the table here. I know I said
"inter-mitigation dependencies" but if we could even keep all the
inter-_vuln_ dependencies in one place that would be really nice.

But, I will come back to this once I've looked at the rest of the
series. Maybe it doesn't really make sense to try and fully isolate
these things.