x86/fpu/xstate: Define new macros for supervisor and user xstates
authorFenghua Yu <fenghua.yu@intel.com>
Tue, 12 May 2020 14:54:36 +0000 (07:54 -0700)
committerBorislav Petkov <bp@suse.de>
Tue, 12 May 2020 18:34:38 +0000 (20:34 +0200)
commit8ab22804efefea9ecf3c68aa00f1fa69c70fcfad
tree9a8dc8b23aab7ff9658b0c55a4e4d70ee00f07ae
parent5274e6c172c47241534e970df26a522497086624
x86/fpu/xstate: Define new macros for supervisor and user xstates

XCNTXT_MASK is 'all supported xfeatures' before introducing supervisor
xstates.  Rename it to XFEATURE_MASK_USER_SUPPORTED to make clear that
these are user xstates.

Replace XFEATURE_MASK_SUPERVISOR with the following:
- XFEATURE_MASK_SUPERVISOR_SUPPORTED: Currently nothing.  ENQCMD and
  Control-flow Enforcement Technology (CET) will be introduced in separate
  series.
- XFEATURE_MASK_SUPERVISOR_UNSUPPORTED: Currently only Processor Trace.
- XFEATURE_MASK_SUPERVISOR_ALL: the combination of above.

Co-developed-by: Yu-cheng Yu <yu-cheng.yu@intel.com>
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Yu-cheng Yu <yu-cheng.yu@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Link: https://lkml.kernel.org/r/20200512145444.15483-3-yu-cheng.yu@intel.com
arch/x86/include/asm/fpu/xstate.h
arch/x86/kernel/fpu/init.c
arch/x86/kernel/fpu/xstate.c