As a follow-up to the article a few weeks ago about AMD enabling User CPUID Faulting support for Linux, that code looks like it’s ready to go for being introduced in the upcoming Linux 6.17 kernel.
Intel has supported CPUID Faulting since the Ivy Bridge CPU era and enabled it for the Linux kernel in 2017. Only now the AMD support is being enabled and leveraging those existing Intel code paths within the kernel. The Linux kernel patch doesn’t note which AMD CPU cores are capable of handling CPUID Faulting.
CPUID Faulting is a feature for having the processor fault on attempts to execute a CPUID instruction above privilege level zero (CPL 0 / Ring 0). In turn this can be used for a tracer to emulate the CPUID instruction and similar use-cases like by some VMMs/hypervisors for trapping user-space CPUID instructions.
The news now is that the AMD User CPUID Faulting support has been queued within the tip/tip.git x86/cpu branch. With the patch making it into this common TIP branch of x86 CPU changes, it’s likely to be submitted for the upcoming Linux 6.17 merge window, which should happen in late July or early August. The enablement is pretty basic in just checking for the presence of the User CPUID faulting feature bit on AMD CPUs and setting the relevant MSR then following the code previously laid out by Intel.