hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/arch/x86/kernel/fpu/xstate.c
....@@ -892,6 +892,14 @@
892892 setup_init_fpu_buf();
893893 setup_xstate_comp_offsets();
894894 setup_supervisor_only_offsets();
895
+
896
+ /*
897
+ * CPU capabilities initialization runs before FPU init. So
898
+ * X86_FEATURE_OSXSAVE is not set. Now that XSAVE is completely
899
+ * functional, set the feature bit so depending code works.
900
+ */
901
+ setup_force_cpu_cap(X86_FEATURE_OSXSAVE);
902
+
895903 print_xstate_offset_size();
896904
897905 pr_info("x86/fpu: Enabled xstate features 0x%llx, context size is %d bytes, using '%s' format.\n",