File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -589,6 +589,13 @@ struct fpu_state_config {
589589 * even without XSAVE support, i.e. legacy features FP + SSE
590590 */
591591 u64 legacy_features ;
592+ /*
593+ * @independent_features:
594+ *
595+ * Features that are supported by XSAVES, but not managed as part of
596+ * the FPU core, such as LBR
597+ */
598+ u64 independent_features ;
592599};
593600
594601/* FPU state configuration information */
Original file line number Diff line number Diff line change @@ -788,6 +788,9 @@ void __init fpu__init_system_xstate(unsigned int legacy_size)
788788 goto out_disable ;
789789 }
790790
791+ fpu_kernel_cfg .independent_features = fpu_kernel_cfg .max_features &
792+ XFEATURE_MASK_INDEPENDENT ;
793+
791794 /*
792795 * Clear XSAVE features that are disabled in the normal CPUID.
793796 */
Original file line number Diff line number Diff line change @@ -64,9 +64,9 @@ static inline u64 xfeatures_mask_supervisor(void)
6464static inline u64 xfeatures_mask_independent (void )
6565{
6666 if (!cpu_feature_enabled (X86_FEATURE_ARCH_LBR ))
67- return XFEATURE_MASK_INDEPENDENT & ~XFEATURE_MASK_LBR ;
67+ return fpu_kernel_cfg . independent_features & ~XFEATURE_MASK_LBR ;
6868
69- return XFEATURE_MASK_INDEPENDENT ;
69+ return fpu_kernel_cfg . independent_features ;
7070}
7171
7272/* XSAVE/XRSTOR wrapper functions */
You can’t perform that action at this time.
0 commit comments