From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 027F717736 for ; Fri, 15 May 2026 19:16:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778872569; cv=none; b=KUywTizG3pZx9ljqONsIHK5sjhx5Gd8Cxxzyb6lvXWrf5GgEbUvl7CWTRbKiyOvAhy9pbFiEPphVGnFrNSbczhr1YM0zzCWShO9BeXJFxP7LkkussxqB/TMaVppsuzxnftGN8y49EOlkrPpU7X8FBkpsHMS6gWk3MGVm3TwEavY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778872569; c=relaxed/simple; bh=B5vos1JlEgJACQk4IWfAmXF2EPiGgRGUq1/+yI8g+eY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=JlY8xPXd7CoB9O217hNQiyQa5J+rSxgVBrkWuDOMVgd36d6FXV7eKhlEj4+Z8ZdVFCz7GppICUYx6v7FeoshNDyPx9Hfz+f1C7vv/s07idqq1VLWJuNMXG6Cqd4R3VySKQBMALtqw+fWjx/SfUF4RPiyKVvqsrlpujP6Kus7mWo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=kguH0nZc; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=AOYUKvJK; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="kguH0nZc"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="AOYUKvJK" Date: Fri, 15 May 2026 21:16:03 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1778872564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=r8QDAdJ6B2vabdhVzsvlhZsDAHySMj9+6KysPnp51UQ=; b=kguH0nZcGXMEXnihLMxv2xulCGTGJsOJ96GVnD7jJM1BUqa5joeYMCZLdoodrLQc2VKBIm JdXoKal67X5+zXTGy9BwAa5MzWaP55LaN5IUTyWvbbvnpGfzHIYFGpN8GaSaxxxaQEk3NF /UxpOKQPxcHesufQxwfd7EbNjQTYw/Vq+cOpgxFz2rsG7C75Opvkxk5mQPS7zRZiRabicH NHcZ5VexL24jKwL8cr6gE95tTR/EekZrvXb7/1WSv0HX8rLpQvZFSrPlg6NM+IWD2KyAZl FGERZZACAB1geAAwcNjYFtPZe+rGj0Ny8txJWcpqtFOBEuqtLW7Pxe/ufgoe0A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1778872564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=r8QDAdJ6B2vabdhVzsvlhZsDAHySMj9+6KysPnp51UQ=; b=AOYUKvJKxIKnLwviQpU55OuAk6FjGXRCdYS/0IjLjMdFxZuSZgsNK/rC4c43kembF/NE8A 4YmC/upocQtgWjAw== From: "Ahmed S. Darwish" To: Sohil Mehta Cc: Dave Hansen , Borislav Petkov , x86@kernel.org, Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , Josh Poimboeuf , Richard Weinberger , Andrew Cooper , Tony Luck , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/3] x86/cpu/intel: Don't clear X86_BUG_F00F before setting it Message-ID: References: <20260515002500.2463393-1-sohil.mehta@intel.com> <20260515002500.2463393-2-sohil.mehta@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260515002500.2463393-2-sohil.mehta@intel.com> On Thu, 14 May 2026, Sohil Mehta wrote: > > From: Richard Weinberger > > 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 > [sohil: reworded commit message] > Signed-off-by: Sohil Mehta > --- Reviewed-by: Ahmed S. Darwish