AMD Auto IBRS Linux Patches Updated For Better Performance Over Generic Retpolines

Written by Michael Larabel in AMD on 30 November 2022 at 06:31 AM EST. Add A Comment
While AMD EPYC Genoa launched a few weeks back and the Ryzen 7000 series launched in late September, one of the AMD Zen 4 patch series we are still waiting to arrive for the mainline Linux kernel is the Automatic IBRS enablement.

Automatic IBRS (Indirect Branch Restricted Speculation) is new with Zen 4 processors and can allow for greater performance over the generic Retpolines (return trampolines) mitigation currently used by AMD processors for their Spectre V2 mitigation. The automatic aspect of this new Zen 4 security feature is that it's hardware-managed of IBRS mitigation resources automatically across privilege level transitions. AMD Automatic IBRS is similar in nature to Intel Enhanced IBRS.

So while this Automatic IBRS feature has the ability to help improve Ryzen 7000 series / EPYC 9004 series Linux performance over the generic Retpolines implementation currently used by default, we are still waiting for this feature to be properly wired up within the Linux kernel. (This also appears to be related to the odd Spectre V2 mitigation performance behavior on Zen 4 previously noted but will presumably clear up once this Auto IBRS is properly handled.)

In early November AMD did post Linux patches for Automatic IBRS and now nearly a month later it's up to the third take on these patches. The Automatic IBRS patches have addressed more comments raised during the upstream developer code review over the past month, along with other low-level changes.

Those interested can find the v3 patches on the mailing list. Here's to hoping that this work gets buttoned up in time for the v6.2 kernel cycle, especially since it has the ability to help with performance over the generic Retpolines approach... We'll see ultimately if it gets backported to kernel stable series. Automatic IBRS is an intended feature of Zen 4 that can influence performance and so I remain a mix of frustrated/surprised that this wasn't something tackled months ago pre-launch for helping ensure an optimal out-of-the-box experience. Once this work is ready to go for mainline, I'll certainly run some comparison benchmarks.
Related News
About The Author
Michael Larabel

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