From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (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 962A03A9001 for ; Mon, 18 May 2026 22:21:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779142871; cv=none; b=SiLKnSpNLhUnw779jsLueZKkqn4HJ/GBYJVZC3Fjjrud8C0PEQ6m2jNdR7irzWIB7MKRT1EOmqa6u80FWAhulsHkZDJcAOBiHE6t0e01+hjL52n+K9eyuPpX01KkolraKJK/X8cRLEuRPlB4hPQ7brKk8av0pKBpza6dP8Y4HSI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779142871; c=relaxed/simple; bh=RI5M292dnns+QA/N4s9MWozsKnc5cghUbjZ1Ts5Njm0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PzpyhRFdKmrA3VTHqgo05YPlupAZFejO1N1hsUI8Nz8wpxS4SEmrUqybxgJ4kty/PMrgjfQpAQcWgYt3RX5LtctDyzu5TXkVgMrapxaPXnnMKnhAo3TOusvZfUe9cdbfLeQx0AnQptS9WziFtC4EAjujoY8fIozr4ClIOifDdJ0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=l+ni/C4o; arc=none smtp.client-ip=198.175.65.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="l+ni/C4o" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1779142867; x=1810678867; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=RI5M292dnns+QA/N4s9MWozsKnc5cghUbjZ1Ts5Njm0=; b=l+ni/C4oidtLIGpqMlYlC5v8u3xtB4+MEPsuFm+175F8izP45EwTy2Un WtV33X0Y060YrpbV0vTJWay7wUfhos1vNVRqGw0TSc8hy+8bVN3KH/ziV YBu8z5wBHjrdVzSYEfoGbFCoZ6S4hqb/XQBQVYbBniO47+NYwaPBlvNrM 8GFtRq1ThkMK6xH/C3YAvWeaY2GvAKiw9x/73hhwXsBWwNo5B/hYaC92I rU8tCU6IHKoOBcyXJYpX4AQRYRSd1HrPW56gTlfUqitH8kx/K8qAGe5nu q+RwvEEcsAf/nSeE7LMyNFL6qC31j4qXh0oHzZasR2i0tuLXT7dC9uEt0 A==; X-CSE-ConnectionGUID: a//rQPKHTyeMZa5sLCqGhA== X-CSE-MsgGUID: U9jA6M5sRCmDU1bCuRy/Cg== X-IronPort-AV: E=McAfee;i="6800,10657,11790"; a="90317857" X-IronPort-AV: E=Sophos;i="6.23,242,1770624000"; d="scan'208";a="90317857" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2026 15:21:06 -0700 X-CSE-ConnectionGUID: oNv3ONqtTFOtbpmsdDR+vg== X-CSE-MsgGUID: 81HB9Y0/QryBmVea3S6NPQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,242,1770624000"; d="scan'208";a="244564547" Received: from sohilmeh.sc.intel.com ([172.25.103.65]) by orviesa005.jf.intel.com with ESMTP; 18 May 2026 15:21:06 -0700 From: Sohil Mehta To: Dave Hansen , Borislav Petkov , x86@kernel.org Cc: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , Josh Poimboeuf , Richard Weinberger , Andrew Cooper , Tony Luck , Sohil Mehta , "Ahmed S . Darwish" , linux-kernel@vger.kernel.org Subject: [PATCH v3 1/3] x86/cpu/intel: Don't clear X86_BUG_F00F before setting it Date: Mon, 18 May 2026 15:17:16 -0700 Message-ID: <20260518221718.3303288-2-sohil.mehta@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260518221718.3303288-1-sohil.mehta@intel.com> References: <20260518221718.3303288-1-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-Transfer-Encoding: 8bit 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 flag 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 the commit message] Signed-off-by: Sohil Mehta Reviewed-by: Ahmed S. Darwish --- v3: - Picked up Ahmed's review tag. v2: - Reworded commit message to clarify the issue. --- 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 f28c0efb7c8f..e957c5a1501c 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c @@ -395,7 +395,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 >= INTEL_FAM5_START && c->x86_vfm < INTEL_QUARK_X1000) { static int f00f_workaround_enabled; -- 2.43.0