[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211203003636.11417-11-jiaxun.yang@flygoat.com>
Date: Fri, 3 Dec 2021 00:36:36 +0000
From: Jiaxun Yang <jiaxun.yang@...goat.com>
To: x86@...nel.org
Cc: tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
dave.hansen@...ux.intel.com, hpa@...or.com,
chang.seok.bae@...el.com, linux-kernel@...r.kernel.org,
Jiaxun Yang <jiaxun.yang@...goat.com>,
Jiaxun Yang <j.yang-87@....ed.ac.uk>
Subject: [RFC PATCH 10/10] x86/fpu: Mark AVX512 xfeatures as kernel dynamic
As only a few user space processes use AVX512, only
allocate state buffer for AVX512 when in use can save
some memory.
Also we are going to have heterogeneous processors that
only some cores support AVX512, it can be helpful when
dealing with such processors.
Signed-off-by: Jiaxun Yang <j.yang-87@....ed.ac.uk>
---
arch/x86/include/asm/fpu/xstate.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/include/asm/fpu/xstate.h b/arch/x86/include/asm/fpu/xstate.h
index d3a8c0855a5d..ac2744732264 100644
--- a/arch/x86/include/asm/fpu/xstate.h
+++ b/arch/x86/include/asm/fpu/xstate.h
@@ -50,7 +50,8 @@
#define XFEATURE_MASK_USER_DYNAMIC XFEATURE_MASK_XTILE_DATA
/* Features which are dynamically allocated only when in use */
-#define XFEATURE_MASK_KERNEL_DYNAMIC XFEATURE_MASK_XTILE_DATA
+#define XFEATURE_MASK_KERNEL_DYNAMIC \
+ (XFEATURE_MASK_AVX512 | XFEATURE_MASK_XTILE_DATA)
/* All currently supported supervisor features */
#define XFEATURE_MASK_SUPERVISOR_SUPPORTED (XFEATURE_MASK_PASID)
--
2.30.2
Powered by blists - more mailing lists