Commit 793b886c authored by Chang S. Bae's avatar Chang S. Bae Committed by Aichun Shi
Browse files

x86/fpu: Add XFD handling for dynamic states

mainline inclusion
from mainline-v5.16-rc1
commit db3e7321
category: feature
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I590ZC


CVE: NA

Intel-SIG: commit db3e7321 x86/fpu: Add XFD handling for dynamic states.

--------------------------------

To handle the dynamic sizing of buffers on first use the XFD MSR has to be
armed. Store the delta between the maximum available and the default
feature bits in init_fpstate where it can be retrieved for task creation.

If the delta is non zero then dynamic features are enabled. This needs also
to enable the static key which guards the XFD updates. This is delayed to
an initcall because the FPU setup runs before jump labels are initialized.

Signed-off-by: default avatarChang S. Bae <chang.seok.bae@intel.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20211021225527.10184-23-chang.seok.bae@intel.com


Signed-off-by: default avatarLin Wang <lin.x.wang@intel.com>
Signed-off-by: default avatarAichun Shi <aichun.shi@intel.com>
parent 3cde4ef3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment