diff options
author | Chang S. Bae <chang.seok.bae@intel.com> | 2021-10-22 01:55:18 +0300 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2021-10-26 11:18:09 +0300 |
commit | 8bf26758ca9659866b844dd51037314b4c0fa6bd (patch) | |
tree | 4c702e253c9112ab848855451484aef3a9148ad0 /arch/x86/include/asm/fpu | |
parent | dae1bd58389615d401a84aedc38fa075ef8f7de6 (diff) | |
download | linux-8bf26758ca9659866b844dd51037314b4c0fa6bd.tar.xz |
x86/fpu: Add XFD state to fpstate
Add storage for XFD register state to struct fpstate. This will be used to
store the XFD MSR state. This will be used for switching the XFD MSR when
FPU content is restored.
Add a per-CPU variable to cache the current MSR value so the MSR has only
to be written when the values are different.
Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20211021225527.10184-15-chang.seok.bae@intel.com
Diffstat (limited to 'arch/x86/include/asm/fpu')
-rw-r--r-- | arch/x86/include/asm/fpu/types.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/include/asm/fpu/types.h b/arch/x86/include/asm/fpu/types.h index 595122fcaf51..b1897638d68d 100644 --- a/arch/x86/include/asm/fpu/types.h +++ b/arch/x86/include/asm/fpu/types.h @@ -322,6 +322,9 @@ struct fpstate { /* @user_xfeatures: xfeatures valid in UABI buffers */ u64 user_xfeatures; + /* @xfd: xfeatures disabled to trap userspace use. */ + u64 xfd; + /* @is_valloc: Indicator for dynamically allocated state */ unsigned int is_valloc : 1; |