]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
x86/cpufeatures: Add eXtended Feature Disabling (XFD) feature bit
authorChang S. Bae <chang.seok.bae@intel.com>
Thu, 21 Oct 2021 22:55:16 +0000 (15:55 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Thu, 5 May 2022 07:14:18 +0000 (09:14 +0200)
commitd36c8f1f2e7ef5119de1e900040952b3626fb97c
tree661ce698dc28bc7db40f82a3f9053f06e47b481f
parentd43c57a1713ef73f5c423efecaa061ec4e448287
x86/cpufeatures: Add eXtended Feature Disabling (XFD) feature bit

BugLink: https://bugs.launchpad.net/bugs/1967750
Intel's eXtended Feature Disable (XFD) feature is an extension of the XSAVE
architecture. XFD allows the kernel to enable a feature state in XCR0 and
to receive a #NM trap when a task uses instructions accessing that state.

This is going to be used to postpone the allocation of a larger XSTATE
buffer for a task to the point where it is actually using a related
instruction after the permission to use that facility has been granted.

XFD is not used by the kernel, but only applied to userspace. This is a
matter of policy as the kernel knows how a fpstate is reallocated and the
XFD state.

The compacted XSAVE format is adjustable for dynamic features. Make XFD
depend on XSAVES.

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-13-chang.seok.bae@intel.com
(cherry picked from commit c351101678ce54492b6e09810ec02efc0df036a9)
Acked-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
arch/x86/include/asm/cpufeatures.h
arch/x86/kernel/cpu/cpuid-deps.c