I did not see this posted here. But Linux actually runs faster with Mitigations On(For ALL CPU Vulnerabilities found so far) for Zen4.
Code with mitigations being faster than without may seem counter intuitive at first, but mitigations also structure the code for which the CPUs can be optimized again.
So my first thought was that if the CPU detects no mitigations are applied it instead applies mitigations in microcode which are slower due to being applied at run time instead at compile time.
Another theory which I now favor was put forward in the comments at Phoronix
"Like it or not, these mitigations are VERY strong signals to the CPU as to what the software will do next. And CPU designers looking for optimizations LOVE
It's not that hard to imagine that AMD have tuned their design and made optimizations _expecting_ the usage patterns that they themselves recommend. If the CPU is tuned to *expect* a memory barrier at specific points and you don't issue one, then you do so at your detriment.
If I were to hypothesize, one possibility is that issuing a memory barrier tells the CPU that it can forget about past state, and that frees up microarchitectural registers to prefetch the next bit of processing. A simple optimization *built on the assumption that mitigations=on
.* It could also, ironically, be a very helpful signal to prediction and prefetch when done correctly."