|
@@ -221,6 +221,15 @@ void fpu__init_cpu_xstate(void)
|
|
{
|
|
{
|
|
if (!boot_cpu_has(X86_FEATURE_XSAVE) || !xfeatures_mask)
|
|
if (!boot_cpu_has(X86_FEATURE_XSAVE) || !xfeatures_mask)
|
|
return;
|
|
return;
|
|
|
|
+ /*
|
|
|
|
+ * Make it clear that XSAVES supervisor states are not yet
|
|
|
|
+ * implemented should anyone expect it to work by changing
|
|
|
|
+ * bits in XFEATURE_MASK_* macros and XCR0.
|
|
|
|
+ */
|
|
|
|
+ WARN_ONCE((xfeatures_mask & XFEATURE_MASK_SUPERVISOR),
|
|
|
|
+ "x86/fpu: XSAVES supervisor states are not yet implemented.\n");
|
|
|
|
+
|
|
|
|
+ xfeatures_mask &= ~XFEATURE_MASK_SUPERVISOR;
|
|
|
|
|
|
cr4_set_bits(X86_CR4_OSXSAVE);
|
|
cr4_set_bits(X86_CR4_OSXSAVE);
|
|
xsetbv(XCR_XFEATURE_ENABLED_MASK, xfeatures_mask);
|
|
xsetbv(XCR_XFEATURE_ENABLED_MASK, xfeatures_mask);
|