While Intel has supported CPUID Faulting on processors going back to Ivy Bridge and supported this feature in the Linux kernel since early 2017, only now the AMD support is being wired up and making use of the existing Intel code paths.
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.
While long supported by Intel CPUs with Ivy Bridge in 2012 and the Linux kernel since 2017, only last week was an AMD patch posted for CPUID Faulting support.
This patch introduces CPUID faulting support on AMD using the same user interface as Intel. The patch doesn’t specify what generations of AMD CPUs are capable of natively supporting User CPUID Faulting.