AMD Updates Linux Patches For Automatic IBRS On Zen 4

Written by Michael Larabel in AMD on 12 January 2023 at 07:00 AM EST. Add A Comment
AMD
Since early November AMD has been working on Linux patches for Automatic IBRS. AutoIBRS is a new Zen 4 CPU feature intended to provide better performance than generic Retpolines as part of the Spectre V2 mitigations. Two months later the Linux AutoIBRS patches still haven't been merged yet but up to their sixth revision.

Even with Automatic IBRS (Indirect Branch. Restricted Speculation) intended to be used by default in place of generic Retpolines for better performance, it's been slow getting these patches upstreamed -- and ordinarily something we'd ideally like to see upstreamed pre-launch.


In any event these patches for benefiting AMD Ryzen 7000 series and AMD EPYC 9004 series server processors were updated this week. Besides enabling AutoIBRS by default when the CPU feature is present, the code also propagates AutoIBRS support to KVM virtualized guests too.
The AMD Zen4 core supports a new feature called Automatic IBRS (Indirect Branch Restricted Speculation).

Enable Automatic IBRS by default if the CPU feature is present. It typically provides greater performance over the incumbent generic retpolines mitigation.

Patch 1 adds support for the whole leaf that contains the AutoIBRS feature bit.

Patches 2-5 mainly move the existing features over from scattered / open-coded in KVM into the new shared leaf, where they match hardware.

Patch 6 Adds support for AutoIBRS by turning its EFER enablement bit on at startup if the feature is available.

Patch 7 Adds support for propagating AutoIBRS to the guest.

Hopefully we'll see this work finally buttoned up in time for the Linux 6.3 merge window next month. Those wanting the AutoIBRS patches now can find them via the kernel mailing list.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com 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 OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week