[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250227184502.10288-7-chang.seok.bae@intel.com>
Date: Thu, 27 Feb 2025 10:44:51 -0800
From: "Chang S. Bae" <chang.seok.bae@...el.com>
To: linux-kernel@...r.kernel.org
Cc: x86@...nel.org,
tglx@...utronix.de,
mingo@...hat.com,
bp@...en8.de,
dave.hansen@...ux.intel.com,
chang.seok.bae@...el.com
Subject: [PATCH RFC v1 06/11] x86/fpu/mpx: Remove MPX xstate component support
A new xstate component is set to occupy the position previously used by
MPX in the non-compacted format, then creating a fundamental conflict
between the two.
Currently, xfeature_noncompact_order[] includes MPX, but the introduction
of the new feature would cause a direct conflict there unless MPX is
removed. Fortunately, MPX support has already been deprecated and
effectively removed by commit:
45fc24e89b7c ("x86/mpx: remove MPX from arch/x86")
Explicitly disable the deprecated feature to reserve a space for the new
xstate.
Signed-off-by: Chang S. Bae <chang.seok.bae@...el.com>
---
Several code references to this feature macro remain, primarily on the
KVM side. While they are likely to become obsolete after this patch,
their cleanup has been deferred at this review stage: This can be
addressed in a follow-up patch or included as an optional part of APX
enablement, I suppose.
---
arch/x86/include/asm/fpu/xstate.h | 2 --
arch/x86/kernel/fpu/xstate.c | 8 --------
2 files changed, 10 deletions(-)
diff --git a/arch/x86/include/asm/fpu/xstate.h b/arch/x86/include/asm/fpu/xstate.h
index 7f39fe7980c5..e87d36a31ab1 100644
--- a/arch/x86/include/asm/fpu/xstate.h
+++ b/arch/x86/include/asm/fpu/xstate.h
@@ -30,8 +30,6 @@
XFEATURE_MASK_ZMM_Hi256 | \
XFEATURE_MASK_Hi16_ZMM | \
XFEATURE_MASK_PKRU | \
- XFEATURE_MASK_BNDREGS | \
- XFEATURE_MASK_BNDCSR | \
XFEATURE_MASK_XTILE)
/*
diff --git a/arch/x86/kernel/fpu/xstate.c b/arch/x86/kernel/fpu/xstate.c
index d04221d0fa0a..16f45fff8811 100644
--- a/arch/x86/kernel/fpu/xstate.c
+++ b/arch/x86/kernel/fpu/xstate.c
@@ -69,8 +69,6 @@ static unsigned short xsave_cpuid_features[] __initdata = {
[XFEATURE_FP] = X86_FEATURE_FPU,
[XFEATURE_SSE] = X86_FEATURE_XMM,
[XFEATURE_YMM] = X86_FEATURE_AVX,
- [XFEATURE_BNDREGS] = X86_FEATURE_MPX,
- [XFEATURE_BNDCSR] = X86_FEATURE_MPX,
[XFEATURE_OPMASK] = X86_FEATURE_AVX512F,
[XFEATURE_ZMM_Hi256] = X86_FEATURE_AVX512F,
[XFEATURE_Hi16_ZMM] = X86_FEATURE_AVX512F,
@@ -101,8 +99,6 @@ static const enum xfeature xfeature_noncompact_order[] = {
XFEATURE_FP,
XFEATURE_SSE,
XFEATURE_YMM,
- XFEATURE_BNDREGS,
- XFEATURE_BNDCSR,
XFEATURE_OPMASK,
XFEATURE_ZMM_Hi256,
XFEATURE_Hi16_ZMM,
@@ -360,8 +356,6 @@ static __init void os_xrstor_booting(struct xregs_state *xstate)
XFEATURE_MASK_ZMM_Hi256 | \
XFEATURE_MASK_Hi16_ZMM | \
XFEATURE_MASK_PKRU | \
- XFEATURE_MASK_BNDREGS | \
- XFEATURE_MASK_BNDCSR | \
XFEATURE_MASK_PASID | \
XFEATURE_MASK_CET_USER | \
XFEATURE_MASK_XTILE)
@@ -555,8 +549,6 @@ static bool __init check_xstate_against_struct(int nr)
*/
switch (nr) {
case XFEATURE_YMM: return XCHECK_SZ(sz, nr, struct ymmh_struct);
- case XFEATURE_BNDREGS: return XCHECK_SZ(sz, nr, struct mpx_bndreg_state);
- case XFEATURE_BNDCSR: return XCHECK_SZ(sz, nr, struct mpx_bndcsr_state);
case XFEATURE_OPMASK: return XCHECK_SZ(sz, nr, struct avx_512_opmask_state);
case XFEATURE_ZMM_Hi256: return XCHECK_SZ(sz, nr, struct avx_512_zmm_uppers_state);
case XFEATURE_Hi16_ZMM: return XCHECK_SZ(sz, nr, struct avx_512_hi16_state);
--
2.45.2
Powered by blists - more mailing lists