File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -110,12 +110,9 @@ EXPORT_SYMBOL_GPL(cpu_has_xfeatures);
110
110
static int xfeature_is_supervisor (int xfeature_nr )
111
111
{
112
112
/*
113
- * We currently do not support supervisor states, but if
114
- * we did, we could find out like this.
115
- *
116
- * SDM says: If state component 'i' is a user state component,
117
- * ECX[0] return 0; if state component i is a supervisor
118
- * state component, ECX[0] returns 1.
113
+ * Extended State Enumeration Sub-leaves (EAX = 0DH, ECX = n, n > 1)
114
+ * returns ECX[0] set to (1) for a supervisor state, and cleared (0)
115
+ * for a user state.
119
116
*/
120
117
u32 eax , ebx , ecx , edx ;
121
118
@@ -419,7 +416,8 @@ static void __init setup_init_fpu_buf(void)
419
416
print_xstate_features ();
420
417
421
418
if (boot_cpu_has (X86_FEATURE_XSAVES ))
422
- init_fpstate .xsave .header .xcomp_bv = (u64 )1 << 63 | xfeatures_mask ;
419
+ init_fpstate .xsave .header .xcomp_bv = XCOMP_BV_COMPACTED_FORMAT |
420
+ xfeatures_mask ;
423
421
424
422
/*
425
423
* Init all the features state with header.xfeatures being 0x0
You can’t perform that action at this time.
0 commit comments