]> git.baikalelectronics.ru Git - kernel.git/commit
x86/fpu: Add XFD handling for dynamic states
authorChang S. Bae <chang.seok.bae@intel.com>
Thu, 21 Oct 2021 22:55:26 +0000 (15:55 -0700)
committerBorislav Petkov <bp@suse.de>
Tue, 26 Oct 2021 08:53:03 +0000 (10:53 +0200)
commitce2f78ba90360f9158c2a3662ed05c4d33323186
tree99dcb5fd5aeb7d5562aba88069d9fdd14d989b28
parentf8400714860d237b2ea0ad7fd3697ec0ede8b36f
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: Chang S. Bae <chang.seok.bae@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20211021225527.10184-23-chang.seok.bae@intel.com
arch/x86/kernel/fpu/xstate.c