AMD Adding STIBP "Always-On Preferred Mode" To Linux

Written by Michael Larabel in Hardware on 14 December 2018 at 04:00 AM EST. 9 Comments
Initially during the Linux 4.20 kernel merge window with the STIBP addition for cross-hyperthread Spectre V2 mitigation it was turned on by default for all processes. But that turned out to have a sizable performance hit so the behavior was changed to only turn it on for processes under SECCOMP or when requested via the PRCTL interface. However, AMD is landing a patch that for select CPUs will have an always-on mode as evidently that's preferred for some AMD processors.

Tom Lendacky of AMD explained on the proposed patch, "Different AMD processors may have different implementations of STIBP. When STIBP is conditionally enabled, some implementations would benefit from having STIBP always on instead of toggling the STIBP bit through MSR writes. This preference is advertised through a CPUID feature bit. When conditional STIBP support is requested at boot and the CPU advertises STIBP always-on mode as preferred, switch to STIBP "on" support."

Presumably with the AMD CPUs preferring the always-on STIBP, their performance impact would be less than what we've seen on the Intel side. But the patch doesn't include any performance figures. I'll try some AMD STIBP tests soon to see if any of my hardware has this always-on preferred mode bit set.

The patch for now is just floating on the kernel mailing list but given the timing will perhaps be ready for the upcoming Linux 4.21 merge window.
Related News
About The Author
Author picture

Michael Larabel is the principal author of and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via

Popular News This Week