x86/fpu: Correct AVX512 state tracking
authorNoah Goldstein <goldstein.w.n@gmail.com>
Tue, 16 Nov 2021 16:14:21 +0000 (17:14 +0100)
committerBorislav Petkov <bp@suse.de>
Tue, 16 Nov 2021 16:19:41 +0000 (17:19 +0100)
commit0fe4ff885f8a50082d9dc241b657472894caba16
tree08466886f8c59b329ab793d62f01b1047794ca34
parentfa55b7dcdc43c1aa1ba12bca9d2dd4318c2a0dbf
x86/fpu: Correct AVX512 state tracking

Add a separate, local mask for tracking AVX512 usage which does not
include the opmask xfeature set. Opmask registers usage does not cause
frequency throttling so it is a completely unnecessary false positive.

While at it, carve it out into a separate function to keep that
abomination extracted out.

 [ bp: Rediff and cleanup ontop of 5.16-rc1. ]

Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20210920053951.4093668-1-goldstein.w.n@gmail.com
arch/x86/kernel/fpu/core.c