Merge tag 'x86-urgent-2025-11-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull misc x86 fixes from Ingo Molnar:

- Limit AMD microcode Entrysign sha256 signature checking to
known CPU generations

- Disable AMD RDSEED32 on certain Zen5 CPUs that have a
microcode version before when the microcode-based fix was
issued for the AMD-SB-7055 erratum

- Fix FPU AMD XFD state synchronization on signal delivery

- Fix (work around) a SSE4a-disassembly related build failure
on X86_NATIVE_CPU=y builds

- Extend the AMD Zen6 model space with a new range of models

- Fix <asm/intel-family.h> CPU model comments

- Fix the CONFIG_CFI=y and CONFIG_LTO_CLANG_FULL=y build, which
was unhappy due to missing kCFI type annotations of clear_page()
variants

* tag 'x86-urgent-2025-11-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/mm: Ensure clear_page() variants always have __kcfi_typeid_ symbols
x86/cpu: Add/fix core comments for {Panther,Nova} Lake
x86/CPU/AMD: Extend Zen6 model range
x86/build: Disable SSE4a
x86/fpu: Ensure XFD state on signal delivery
x86/CPU/AMD: Add RDSEED fix for Zen5
x86/microcode/AMD: Limit Entrysign signature checking to known generations

Changed files
+40 -6
arch
x86
include
kernel
cpu
microcode
fpu
+1 -1
arch/x86/Makefile
··· 75 75 # 76 76 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 77 77 # 78 - KBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx 78 + KBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -mno-sse4a 79 79 KBUILD_RUSTFLAGS += --target=$(objtree)/scripts/target.json 80 80 KBUILD_RUSTFLAGS += -Ctarget-feature=-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2 81 81
+3 -3
arch/x86/include/asm/intel-family.h
··· 150 150 151 151 #define INTEL_LUNARLAKE_M IFM(6, 0xBD) /* Lion Cove / Skymont */ 152 152 153 - #define INTEL_PANTHERLAKE_L IFM(6, 0xCC) /* Cougar Cove / Crestmont */ 153 + #define INTEL_PANTHERLAKE_L IFM(6, 0xCC) /* Cougar Cove / Darkmont */ 154 154 155 155 #define INTEL_WILDCATLAKE_L IFM(6, 0xD5) 156 156 157 - #define INTEL_NOVALAKE IFM(18, 0x01) 158 - #define INTEL_NOVALAKE_L IFM(18, 0x03) 157 + #define INTEL_NOVALAKE IFM(18, 0x01) /* Coyote Cove / Arctic Wolf */ 158 + #define INTEL_NOVALAKE_L IFM(18, 0x03) /* Coyote Cove / Arctic Wolf */ 159 159 160 160 /* "Small Core" Processors (Atom/E-Core) */ 161 161
+3
arch/x86/include/asm/page_64.h
··· 43 43 void clear_page_orig(void *page); 44 44 void clear_page_rep(void *page); 45 45 void clear_page_erms(void *page); 46 + KCFI_REFERENCE(clear_page_orig); 47 + KCFI_REFERENCE(clear_page_rep); 48 + KCFI_REFERENCE(clear_page_erms); 46 49 47 50 static inline void clear_page(void *page) 48 51 {
+11 -1
arch/x86/kernel/cpu/amd.c
··· 516 516 setup_force_cpu_cap(X86_FEATURE_ZEN5); 517 517 break; 518 518 case 0x50 ... 0x5f: 519 - case 0x90 ... 0xaf: 519 + case 0x80 ... 0xaf: 520 520 case 0xc0 ... 0xcf: 521 521 setup_force_cpu_cap(X86_FEATURE_ZEN6); 522 522 break; ··· 1035 1035 } 1036 1036 } 1037 1037 1038 + static const struct x86_cpu_id zen5_rdseed_microcode[] = { 1039 + ZEN_MODEL_STEP_UCODE(0x1a, 0x02, 0x1, 0x0b00215a), 1040 + ZEN_MODEL_STEP_UCODE(0x1a, 0x11, 0x0, 0x0b101054), 1041 + }; 1042 + 1038 1043 static void init_amd_zen5(struct cpuinfo_x86 *c) 1039 1044 { 1045 + if (!x86_match_min_microcode_rev(zen5_rdseed_microcode)) { 1046 + clear_cpu_cap(c, X86_FEATURE_RDSEED); 1047 + msr_clear_bit(MSR_AMD64_CPUID_FN_7, 18); 1048 + pr_emerg_once("RDSEED32 is broken. Disabling the corresponding CPUID bit.\n"); 1049 + } 1040 1050 } 1041 1051 1042 1052 static void init_amd(struct cpuinfo_x86 *c)
+19 -1
arch/x86/kernel/cpu/microcode/amd.c
··· 233 233 return true; 234 234 } 235 235 236 + static bool cpu_has_entrysign(void) 237 + { 238 + unsigned int fam = x86_family(bsp_cpuid_1_eax); 239 + unsigned int model = x86_model(bsp_cpuid_1_eax); 240 + 241 + if (fam == 0x17 || fam == 0x19) 242 + return true; 243 + 244 + if (fam == 0x1a) { 245 + if (model <= 0x2f || 246 + (0x40 <= model && model <= 0x4f) || 247 + (0x60 <= model && model <= 0x6f)) 248 + return true; 249 + } 250 + 251 + return false; 252 + } 253 + 236 254 static bool verify_sha256_digest(u32 patch_id, u32 cur_rev, const u8 *data, unsigned int len) 237 255 { 238 256 struct patch_digest *pd = NULL; 239 257 u8 digest[SHA256_DIGEST_SIZE]; 240 258 int i; 241 259 242 - if (x86_family(bsp_cpuid_1_eax) < 0x17) 260 + if (!cpu_has_entrysign()) 243 261 return true; 244 262 245 263 if (!need_sha_check(cur_rev))
+3
arch/x86/kernel/fpu/core.c
··· 825 825 !fpregs_state_valid(fpu, smp_processor_id())) 826 826 os_xrstor_supervisor(fpu->fpstate); 827 827 828 + /* Ensure XFD state is in sync before reloading XSTATE */ 829 + xfd_update_state(fpu->fpstate); 830 + 828 831 /* Reset user states in registers. */ 829 832 restore_fpregs_from_init_fpstate(XFEATURE_MASK_USER_RESTORE); 830 833