OSDN Git Service

x86/fpu/amx: Enable the AMX feature in 64-bit mode
authorChang S. Bae <chang.seok.bae@intel.com>
Thu, 21 Oct 2021 22:55:27 +0000 (15:55 -0700)
committerBorislav Petkov <bp@suse.de>
Tue, 26 Oct 2021 08:53:03 +0000 (10:53 +0200)
commit2308ee57d93d896618dd65c996429c9d3e469fe0
treebaa443ee20a3f77e78fced1523307383b21b78b6
parentdb3e7321b4b84b1cb39598ff79b90d1252481378
x86/fpu/amx: Enable the AMX feature in 64-bit mode

Add the AMX state components in XFEATURE_MASK_USER_SUPPORTED and the
TILE_DATA component to the dynamic states and update the permission check
table accordingly.

This is only effective on 64 bit kernels as for 32bit kernels
XFEATURE_MASK_TILE is defined as 0.

TILE_DATA is caller-saved state and the only dynamic state. Add build time
sanity check to ensure the assumption that every dynamic feature is caller-
saved.

Make AMX state depend on XFD as it is dynamic feature.

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-24-chang.seok.bae@intel.com
arch/x86/include/asm/fpu/xstate.h
arch/x86/kernel/cpu/cpuid-deps.c
arch/x86/kernel/fpu/core.c
arch/x86/kernel/fpu/xstate.c