Intel LKGS, AMD Automatic IBRS & Caching AMD Debug Registers Merged For Linux 6.3

Written by Michael Larabel in Linux Kernel on 22 February 2023 at 11:23 AM EST. Add A Comment
LINUX KERNEL
The x86 CPU updates have been merged for the Linux 6.3 kernel that include a few new features worth mentioning for AMD and Intel customers.

Most significant on the AMD side is mainlining support for Automatic IBRS, a new feature to Zen 4 CPUs with the Ryzen 7000 series and EPYC 9004 series that is akin to Intel eIBRS functionality. Enabling Automatic IBRS is lower overhead Spectre V2 mitigations than the current Retpolines approach. Automatic IBRS is supported as a Zen 4 architectural feature but sadly wasn't wired up for the Linux kernel pre-launch but now at least is in place for the Linux 6.3 cycle.


My testing has shown Automatic IBRS helping the Ryzen 9 7950X performance over the prior mitigation handling and further enhances the performance of new AMD 4th Gen EPYC "Genoa" server processors too. This is a nice little performance win with Linux 6.3 for those using these new AMD processors.

Also on the AMD side with the x86/cpu pull is caching of the AMD debug registers in per-CPU variables to avoid extra MSR writes where possible. This is for a debug registers swap feature with AMD SEV-ES guests.

Intel and AMD x86 CPUs


Over on the Intel side there is now support for the LKGS instruction "Load Kernel GS" that is part of their forthcoming "FRED" support with future CPUs. LKGS allows managing the state of the GS segment register in a more flexible manner. FRED is the Intel Flexible Return and Event delivery architecture to simplify transitions between privilege levels. With Linux 6.3 just the LKGS instruction is supported and not yet the rest of FRED.

The full list of x86/cpu patches for the Linux 6.3 merge window can be found on the LKML.
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