[PATCH 09/10] x86/fpu: Remove unnecessary CPUID level check

From: Dave Hansen
Date: Fri Dec 13 2024 - 15:52:50 EST



From: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>

The CPUID level dependency table will entirely zap X86_FEATURE_XSAVE
if the CPUID level is too low. This code is unreachable. Kill it.

Signed-off-by: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
---

b/arch/x86/kernel/fpu/xstate.c | 5 -----
1 file changed, 5 deletions(-)

diff -puN arch/x86/kernel/fpu/xstate.c~xsave-leaf-checks-2 arch/x86/kernel/fpu/xstate.c
--- a/arch/x86/kernel/fpu/xstate.c~xsave-leaf-checks-2 2024-12-13 12:45:36.903226562 -0800
+++ b/arch/x86/kernel/fpu/xstate.c 2024-12-13 12:45:36.907226732 -0800
@@ -764,11 +764,6 @@ void __init fpu__init_system_xstate(unsi
return;
}

- if (boot_cpu_data.cpuid_level < XSTATE_CPUID) {
- WARN_ON_FPU(1);
- return;
- }
-
/*
* Find user xstates supported by the processor.
*/
_