]> git.baikalelectronics.ru Git - kernel.git/commit
x86/fpu/xstate: Prepare XSAVE feature table for gaps in state component numbers
authorChang S. Bae <chang.seok.bae@intel.com>
Thu, 21 Oct 2021 22:55:23 +0000 (15:55 -0700)
committerBorislav Petkov <bp@suse.de>
Tue, 26 Oct 2021 08:53:02 +0000 (10:53 +0200)
commit8f70fdeee9fe0b2381ead486ab7110606dbb59fd
treeef68ec1e7a55192c5249d3e6b99f022569d87526
parent9ffc41315956536c07e6d84e488274d0d5969f6f
x86/fpu/xstate: Prepare XSAVE feature table for gaps in state component numbers

The kernel checks at boot time which features are available by walking a
XSAVE feature table which contains the CPUID feature bit numbers which need
to be checked whether a feature is available on a CPU or not. So far the
feature numbers have been linear, but AMX will create a gap which the
current code cannot handle.

Make the table entries explicitly indexed and adjust the loop code
accordingly to prepare for that.

No functional change.

Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20211021225527.10184-20-chang.seok.bae@intel.com
arch/x86/kernel/fpu/xstate.c