On 03/01/2025 2:25 pm, Fonyuy-Asheri Caleb wrote:
> Hello,
>
> I am interested in finding understanding how xen handles CPUID
> faulting and 
> VM exits in general. Please can someone indicate to me the concerned
> files? 
>
> I want to know how xen detects the execution of the CPUID instruction and 
> ensures a guest only gets the features defined in cpuid-autogen.h file 
> depending on the guest type. 
>
> I started looking at the file xen/arch/x86/cpuid.c but don't really
> know which other 
> files to check next.

https://xenbits.xen.org/docs/unstable/features/feature-levelling.html

has a reasonable introduction.  Being nearly a decade old, it's slightly
stale.  AMD now have CPUID Faulting capability too, new in Zen4 CPUs IIRC.

LCAP_faulting specifically is the constant you're looking for, in the
Xen code.

~Andrew

Reply via email to