Help With Identifying CPUID faulting logic in Xen code
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.
Thanks
Caleb
Quoted 7 lines · Fonyuy-Asheri Caleb
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?
Quoted 7 lines
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.hfile depending on the guest type.I started looking at the file
xen/arch/x86/cpuid.cbut 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
Thank you
Caleb
----- Original Message -----
Quoted 31 lines
From: "Andrew Cooper" <[email protected]>
To: "Fonyuy-Asheri Caleb" <[email protected]>, "xen-devel" <[email protected]>
Cc: "Jan Beulich" <[email protected]>
Sent: Friday, January 3, 2025 3:35:43 PM
Subject: Re: Help With Identifying CPUID faulting logic in Xen codeQuoted 7 lines · Fonyuy-Asheri Caleb
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?Quoted 7 lines
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.hfile depending on the guest type.I started looking at the file
xen/arch/x86/cpuid.cbut 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_faultingspecifically is the constant you're looking for, in the Xen code.~Andrew