Re: [PATCH] x86/fpu: Fix the os panic issue caused by the XGETBV instruction

From: H. Peter Anvin
Date: Fri Jan 17 2025 - 22:14:41 EST


On 1/17/25 14:10, Sean Christopherson wrote:

Note that XFD is already listed as dependent on XGETBV1.

But I doubt the kernel needs to be resilient to deliberately misconfigured
or crazy virtual machine setups.

I don't see anything in the SDM that suggests this is a misconfigured CPU. Intel
might not have plans to ship such CPUs, but AFAICT it's not a violation of the
architecture as defined in the SDM.

The SDM even explicitly says that protection keys can exist and be used without
PKU state being supported in XSAVE at all, at which point assuming the existence
of XGETBV1 is rather nonsensical.


Whether or not a combination is *possible* at all is totally separate from whether or not it is worth for Linux to support it. The CPUID dependency list exists for exactly that reason -- it defines *Linux policy* with regards to feature dependencies.

-hpa