Received: from lithops.sigma-star.at (mailout.nod.at [116.203.167.152]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 838723016EE for ; Mon, 16 Feb 2026 10:53:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=116.203.167.152 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771239230; cv=none; b=bJPHVD7lKiFEmZvOgpTNWyllaETF1IlhJvs+23Mn3EWSgXjkxTY9tDe4vy1UE0K1B2MxXQs7KV8xHxpMCyjYmGys9DTxLPoaHCg4LfdZRddkRpubF5g6Tso/n1aMk1kanGbIIwM1sjVgwhdpTKzIlD+9mOjRJ+bV3B3cM+8Rtx4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771239230; c=relaxed/simple; bh=OAvTr+7doGTt4XTuGTUZB3P2cQHthHB6RhX2kW5Z2cI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=cgI7WquoK6zDQfRQMxGzJ3EXkM5z6HzGoEg67OF5b9ry8TEsdkt+hJAla8VyO/L480tNQ4l/CJn5QuVk8bCCnE2p7fWV8M7hangylObP8OKjkYuTNxJQBjd7hLM2G9HLhOO9Oe+1jMohP7KpWpIqkeWAiqqf+vW9VuzDz/yYqB4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nod.at; spf=fail smtp.mailfrom=nod.at; arc=none smtp.client-ip=116.203.167.152 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nod.at Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nod.at Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id C8A0C2E52E5; Mon, 16 Feb 2026 11:44:02 +0100 (CET) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Ehh5-08_RXPc; Mon, 16 Feb 2026 11:44:02 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 4C3772E52E4; Mon, 16 Feb 2026 11:44:02 +0100 (CET) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id EOsfL8ZCfmuk; Mon, 16 Feb 2026 11:44:02 +0100 (CET) Received: from nailgun.corp.sigma-star.at (unknown [82.150.214.1]) by lithops.sigma-star.at (Postfix) with ESMTPSA id DF8C92E52E0; Mon, 16 Feb 2026 11:44:01 +0100 (CET) From: Richard Weinberger To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, tglx@kernel.org, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, Richard Weinberger Subject: [PATCH 1/2] x86: Don't clear X86_BUG_F00F before setting it Date: Mon, 16 Feb 2026 11:43:42 +0100 Message-ID: <20260216104343.3625292-1-richard@nod.at> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On x86 SMP systems with the F00F bug is present the following warning occurs for each application processor: [ 0.013122] ------------[ cut here ]------------ [ 0.013122] WARNING: arch/x86/kernel/cpu/cpuid-deps.c:126 at do_clear_= cpu_cap+0xb4/0x110, CPU#1: swapper/1/0 [ 0.013122] Modules linked in: [ 0.013122] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Not tainted 6.19.0-10= 445-g0f2acd3148e0 #379 PREEMPT(full) [ 0.013122] Hardware name: , BIOS 4.51 PG 04/03/97 [ 0.013122] EIP: do_clear_cpu_cap+0xb4/0x110 [ 0.013122] Code: 08 83 c7 08 85 c0 75 ce 84 d2 75 c2 8b 45 f0 64 2b 0= 5 08 80 af c4 75 64 83 c4 68 5b 5e 5f 5d c3 8b 0d 78 7a a1 c4 85 c9 74 83= <0f> 0b e9 7c ff ff ff 2e 8d 74 26 00 b8 20 79 a1 c4 89 55 8c e8 33 [ 0.013122] EAX: 00000000 EBX: c1143ed8 ECX: 00000001 EDX: 000002c0 [ 0.013122] ESI: c7ee8060 EDI: c1143f38 EBP: c1143f48 ESP: c1143ed4 [ 0.013122] DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068 EFLAGS: 00210= 002 [ 0.013122] CR0: 80050033 CR2: 00000000 CR3: 04b15000 CR4: 00000010 [ 0.013122] Call Trace: [ 0.013122] clear_cpu_cap+0x8/0x10 [ 0.013122] init_intel+0x1b/0x4b0 [ 0.013122] identify_cpu+0x154/0x750 [ 0.013122] identify_secondary_cpu+0x3d/0x90 [ 0.013122] start_secondary+0x6b/0xf0 [ 0.013122] startup_32_smp+0x151/0x160 [ 0.013122] ---[ end trace 0000000000000000 ]--- Commit ee8962082a44 ("x86/alternatives: Catch late X86_FEATURE modifiers"= ) introduced the warning to catch changes to x86 features after alternatives have been applied. Since the X86_BUG_F00F CPU feature is first cleared in intel_workarounds() and then set for the affected families, the feature flags are unnecessarily modified. On systems where the F00F bug is actually present, clearing the flag first triggers the warning. Fix this by not clearing the flag first. Clearing it first is relict from commit e2604b49e8a8 ("x86, cpu: Convert F00F bug detection"). Fixes: ee8962082a44 ("x86/alternatives: Catch late X86_FEATURE modifiers"= ) Signed-off-by: Richard Weinberger --- arch/x86/kernel/cpu/intel.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index 646ff33c4651..73f6bf182333 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c @@ -394,7 +394,6 @@ static void intel_workarounds(struct cpuinfo_x86 *c) * system. Announce that the fault handler will be checking for it. * The Quark is also family 5, but does not have the same bug. */ - clear_cpu_bug(c, X86_BUG_F00F); if (c->x86_vfm >=3D INTEL_FAM5_START && c->x86_vfm < INTEL_QUARK_X1000)= { static int f00f_workaround_enabled; =20 --=20 2.51.0