Re: [PATCH v2 1/3] x86/cpu/intel: Don't clear X86_BUG_F00F before setting it
From: Ahmed S. Darwish
Date: Fri May 15 2026 - 15:16:21 EST
On Thu, 14 May 2026, Sohil Mehta wrote:
>
> From: Richard Weinberger <richard@xxxxxx>
>
> On x86 SMP systems with the F00F bug present, the following warning
> occurs for each AP:
>
> WARNING: arch/x86/kernel/cpu/cpuid-deps.c:126 at do_clear_cpu_cap+0xb4/0x110
> Call Trace:
> clear_cpu_cap+0x8/0x10
> init_intel+0x1b/0x4b0
> identify_cpu+0x154/0x750
> identify_secondary_cpu+0x3d/0x90
> start_secondary+0x6b/0xf0
> startup_32_smp+0x151/0x160
>
> The X86_BUG_F00F CPU feature is first cleared in intel_workarounds() and
> then set for the affected models. This sequence works fine on the BSP
> but on AP bringup, where alternatives have already been patched,
> clearing the flag triggers the warning.
>
> There is no technical reason for clearing the flag before setting it.
> It is mainly an artifact of the introduction of X86_BUG_F00F in commit
> e2604b49e8a8 ("x86, cpu: Convert F00F bug detection"). Remove the
> unnecessary clearing of the flag.
>
> Note that the fixes tag references a recent commit that introduced the
> warning rather than the old commit that converted F00F bug detection to
> use clear_cpu_bug().
>
> Fixes: ee8962082a44 ("x86/alternatives: Catch late X86_FEATURE modifiers")
> Signed-off-by: Richard Weinberger <richard@xxxxxx>
> [sohil: reworded commit message]
> Signed-off-by: Sohil Mehta <sohil.mehta@xxxxxxxxx>
> ---
Reviewed-by: Ahmed S. Darwish <darwi@xxxxxxxxxxxxx>