Intel Posts Linux Kernel Patches For Supporting APX - Advanced Performance Extensions

Intel initially detailed Advanced Performance Extensions (APX) back in mid-2023 as extensions to double the number of general purpose registers and add other performance features. In the time since they have done a lot preparing the GCC and LLVM/Clang compilers for the new APX ISA features while finally today they sent out an initial set of patches for preparing the Linux kernel for APX processors.

Intel doesn’t intend for Advanced Performance Extensions to be used in kernel-mode but rather just user-space applications. However, the Linux kernel needs to make accommodations around Advanced Performance Extensions for the new register state managed by the XSAVE instruction set, adjusting the XSAVE buffer offset, and ensuring all kernel assumptions are safe/relevant in an APX world.

A set of patches from Intel engineers today establish a “request for comments” baseline on Linux kernel support for Advanced Performance Extensions. The patches make kernel adjustments to the XSTATE code, go ahead in enabling APX support, and dropping MPX support as it collides with APX. Finishing up the Linux kernel removal of the Intel Memory Protection Extensions (MPX) support is needed since the new XSTATE component for APX is used in the position previously used by MPX - thus a fundamental conflict between MPX and APX although no processor exists that would support both features.

Linux kernel APX patches

This RFC patch series is what lays out that initial APX enablement by the Linux kernel. As it’s in an RFC state, it may still take some time before the design elements are all settled down and ultimately upstreamed.

I don’t believe I’ve seen Intel publicly indicate what generation of processors will first feature APX. However, given that we are only seeing these kernel-side APX patches now and it will be some months before the patches are all worked through and upstreamed, and potentially a couple extra months before it’s in turn with a stable kernel and beginning to appear in prominent Linux distributions, this is still a significant affair. As we already know for example that Diamond Rapids will have AVX10.2/512 support and compiler patches have made known ISA capabilities already for both Diamond Rapids and Clearwater Forest, given all things considered we’re likely not going to see APX support until after that “Xeon 7” generation. So perhaps for “Xeon 8” is where APX will make its debut.

From these APX enablement patches for the Linux kernel further pointing to APX not coming with Granite Rapids or Clearwater Forest is that it notes testing was done just on an “internal Intel emulator.” With Intel confirming in the recent Xeon 6500P and 6700P announcement that Clearwater Forest is already operational and fully functional, plus the fact of seeing Intel engineers bringing up Granite Rapids and Clearwater Forest hardware testing in other patches, the fact they are still relying on a simulator/emulator for APX testing punts its debut out past that point.