]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
x86/fpu/apx: Enable APX state support
authorChang S. Bae <chang.seok.bae@intel.com>
Wed, 16 Apr 2025 02:16:54 +0000 (19:16 -0700)
committerIngo Molnar <mingo@kernel.org>
Wed, 16 Apr 2025 07:44:14 +0000 (09:44 +0200)
With securing APX against conflicting MPX, it is now ready to be enabled.
Include APX in the enabled xfeature set.

Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Sohil Mehta <sohil.mehta@intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Link: https://lore.kernel.org/r/20250416021720.12305-5-chang.seok.bae@intel.com
arch/x86/include/asm/fpu/xstate.h
arch/x86/kernel/fpu/xstate.c

index 7f39fe7980c52c69b247ab5f1700d7df45ef26cd..b308a76afbb7cfdfe2f4d7ed3cf442f471eda5cc 100644 (file)
@@ -32,7 +32,8 @@
                                      XFEATURE_MASK_PKRU | \
                                      XFEATURE_MASK_BNDREGS | \
                                      XFEATURE_MASK_BNDCSR | \
-                                     XFEATURE_MASK_XTILE)
+                                     XFEATURE_MASK_XTILE | \
+                                     XFEATURE_MASK_APX)
 
 /*
  * Features which are restored when returning to user space.
index 14f5c1bb208003f86cacc8bdf859009067c5d607..2ac1fc18227336a2afac6643a64d07c38c9bf67e 100644 (file)
@@ -371,7 +371,8 @@ static __init void os_xrstor_booting(struct xregs_state *xstate)
         XFEATURE_MASK_BNDCSR |                 \
         XFEATURE_MASK_PASID |                  \
         XFEATURE_MASK_CET_USER |               \
-        XFEATURE_MASK_XTILE)
+        XFEATURE_MASK_XTILE |                  \
+        XFEATURE_MASK_APX)
 
 /*
  * setup the xstate image representing the init state