From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (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 BD3F921FF2E for ; Fri, 15 May 2026 00:27:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778804831; cv=none; b=bcHPkVkBKyk9MeIvRHcJ9SQFH/hf1i2QTlguq+RXM55adKW73aVOkJS/1sfNtVvUaWnWQ68j2iVls94h01cm3dwVYrXU5BOWqWOm7fhcr0UEsHl8ItYAUDgmxT2fp+lzDBul3PtCLM2+TQPwZGKtgThUP4HNHDCq3CAHQGHT1QY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778804831; c=relaxed/simple; bh=70dF4NSBOzzqyJCf95BBO0NRcByTjoO440kK2N8B2ug=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=duOPOQV1r9yHrZYqaF0HkUKPl66rJiGN1YQ/CJBhQarlTLxYQv24No2yvvrVsw0WeF+XG/ZVJ4Ru+QZclvVO+hnK2qr5sQa8Nedj1EjvQ7K7l63f7kTJwunXzOb9RlBDaz8W95b5cPt2iPNoIBdEOIBWqaAiNARcD9Vt+8JbPYs= 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=BhsigFnK; arc=none smtp.client-ip=192.198.163.12 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="BhsigFnK" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1778804829; x=1810340829; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=70dF4NSBOzzqyJCf95BBO0NRcByTjoO440kK2N8B2ug=; b=BhsigFnKL6ripPDZssMOVogGk2iFQ1qqfl9J2scXaOeRvcvooY7DTudY 8ymzhZVareOvzsswjpV9w8tE0+PZRVpz+a2FzrjBZv8N/S23a6dOw6GhU 3mCXt+6utItWEcLIWRbCM2MjgXqQgJz1e6bQFZpCIGUkFLEo7rWiwRcm4 sQbcaaCZxAdF6VRgkhqBK+AX3ebVG75LgzCpmQ+O6KNc+C5ix0st2Wvi6 6CWhAIBJWDYTE3aHkVXVku/WNcgSkFoVaM3xAo6Gan3gFi/AUJtCAupif Qaxtsjdba2o3eUAeMq9ZAoy/gGmQfG6sLV8bPQTXDF64k4/LnUXoioXDV Q==; X-CSE-ConnectionGUID: x6fWMqhJT7eGUyAhnMrAHw== X-CSE-MsgGUID: pAZEiok7RWKNxEGbFNmhqA== X-IronPort-AV: E=McAfee;i="6800,10657,11786"; a="83613074" X-IronPort-AV: E=Sophos;i="6.23,235,1770624000"; d="scan'208";a="83613074" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2026 17:27:02 -0700 X-CSE-ConnectionGUID: LOs8g3nkSX2xR8/LhPxRZA== X-CSE-MsgGUID: 42HLrR4oQTOGXFJQXOl3gA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,235,1770624000"; d="scan'208";a="238418079" Received: from sohilmeh.sc.intel.com ([172.25.103.65]) by orviesa008.jf.intel.com with ESMTP; 14 May 2026 17:27:01 -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 v2 1/3] x86/cpu/intel: Don't clear X86_BUG_F00F before setting it Date: Thu, 14 May 2026 17:24:58 -0700 Message-ID: <20260515002500.2463393-2-sohil.mehta@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260515002500.2463393-1-sohil.mehta@intel.com> References: <20260515002500.2463393-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 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 --- 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