x86/fpu: Add placeholder for 'Processor Trace' XSAVE state
[cascardo/linux.git] / arch / x86 / kernel / fpu / xstate.c
index d425cda..c2e2349 100644 (file)
 
 #include <asm/tlbflush.h>
 
+/*
+ * Although we spell it out in here, the Processor Trace
+ * xfeature is completely unused.  We use other mechanisms
+ * to save/restore PT state in Linux.
+ */
 static const char *xfeature_names[] =
 {
        "x87 floating point registers"  ,
@@ -23,7 +28,7 @@ static const char *xfeature_names[] =
        "AVX-512 opmask"                ,
        "AVX-512 Hi256"                 ,
        "AVX-512 ZMM_Hi256"             ,
-       "unknown xstate feature"        ,
+       "Processor Trace (unused)"      ,
 };
 
 /*
@@ -470,7 +475,8 @@ static void check_xstate_against_struct(int nr)
         * numbers.
         */
        if ((nr < XFEATURE_YMM) ||
-           (nr >= XFEATURE_MAX)) {
+           (nr >= XFEATURE_MAX) ||
+           (nr == XFEATURE_PT_UNIMPLEMENTED_SO_FAR)) {
                WARN_ONCE(1, "no structure for xstate: %d\n", nr);
                XSTATE_WARN_ON(1);
        }