Linux 5.18 Unifying Two More Portions Of AMD & Intel Code

Written by Michael Larabel in Linux Kernel on 22 March 2022 at 12:00 AM EDT. 4 Comments
LINUX KERNEL
Thanks to the nature of open-source and independently-controlled projects like the Linux kernel, there is already much code sharing among competitive hardware vendors in areas where applicable. Much of the Linux kernel's x86/x86_64 code is shared between AMD and Intel (and VIA, Centaur, and Hygon for that matter) where relevant while due to different supported features and implementation differences there is divergence at times. With Linux 5.18 there are two features currently with unique AMD and Intel code paths that are working towards more unification.

First up, the x86/cpu pull for Linux 5.18 merges the AMD and Intel PPIN code paths into a shared one that works for both vendors. This is about the Protected Processor Inventory Number / Protected Processor Identification Number supported by both AMD and Intel CPUs. Currently the kernel has different code paths depending upon the vendor but that is being unified in Linux 5.18.

The PPIN is a unique number assigned to each processor and with the right decoder ring can also be used for figuring out the fab and production run for the processor. In effect it's another "serial number" for each CPU package and can be useful within data centers and other large CPU deployments within organizations. For those concerned about the security aspect of PPIN for uniquely identifying a processor, at least some motherboard BIOS do allow for PPIN reporting to be disabled.

Besides unifying the AMD/Intel PPIN code in Linux 5.18, the kernel changes are making it easier to read this special number. The PPIN will now be exposed under sysfs via /sys/devices/system/cpu/cpu*/topology/ppin. This makes it much easier to read a given socketed CPU's PPIN where as up to now the number was less easily accessible, such as only printing when an MCE occurred and then showing the PPIN as part of the log.


Another Intel/AMD code sharing improvement for Linux 5.18 is working to allow more shared confidential computing code within the kernel. The x86/cc pull request from Borislav Petkov sums up the situation as: "Add shared confidential computing code which will be used by both
vendors instead of proliferating home-grown solutions for technologies which are pretty similar.
"

In particular, this is about the previously written about topic of more code sharing between AMD SEV and Intel TDX. There are many similarities between AMD Secure Encrypted Virtualization and Intel Trust Domain Extensions. It makes sense to unify that code in areas where there is overlap to save on the maintenance burden for both companies and ideally come up with more robust software support with both the TDX and SEV code continuing to balloon in size.

Open-source at its finest and just the two latest examples to point out with the in-development Linux 5.18.
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