From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 B73162E4997; Tue, 15 Jul 2025 13:47:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752587237; cv=none; b=hGzH4y6qU9iG6g5WqTEp51FmrKA20pkfo/TThNv9fx+U+saaTz760mz9tqO5sXrk2CSLb7dArboeaagAVudy3596a7Ht1f4wKVKKbG8qm0yIQt8WWIq4NCNj4/LyrhyIKSeyyoqO/s4/9y7F+cbGW0zinGKLGP0i47KeAf8GAGU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752587237; c=relaxed/simple; bh=6GlMMl3xj1dN/zMs9O1B2nOK3f6Y/6xYo1F0lL/Ypns=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZNUvvBTRjbjnk4YFNpDGTIDtFAtZtYwWs/IHQ25vgrLKe20twBXs6Rz7/gWwDVLFEfsB8M8S/L7iuWwpZ1gXOIygU76uulrw2Iu44BkKJRGojPvQPDemxv2CH90ZrAfIyp8Dq8FRO+d4jvC6SO3Bj5BS9EDqV/UoXlixq31xyls= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=k54+8Gx+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="k54+8Gx+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21BD0C4CEE3; Tue, 15 Jul 2025 13:47:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1752587237; bh=6GlMMl3xj1dN/zMs9O1B2nOK3f6Y/6xYo1F0lL/Ypns=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k54+8Gx++3ENow7IOWF83ZHPCWBdq6FI9IhgJt6pJwlM902pQIvSH3ql/oHp6IOdv Bg1EJ7j3DnIJPbusQUeKcaae+oeSpqYZLY0mBg2MWjjs4TZ+LgoSlbpS84al9rcw8+ 8sOvBzvP7liMjc4MdglPHdFmeohA+OP6VhvvBwaw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Aijay Adams , JP Kobryn , "Borislav Petkov (AMD)" , Tony Luck , Qiuxu Zhuo , stable@kernel.org Subject: [PATCH 6.1 25/88] x86/mce: Make sure CMCI banks are cleared during shutdown on Intel Date: Tue, 15 Jul 2025 15:14:01 +0200 Message-ID: <20250715130755.525458854@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250715130754.497128560@linuxfoundation.org> References: <20250715130754.497128560@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: JP Kobryn commit 30ad231a5029bfa16e46ce868497b1a5cdd3c24d upstream. CMCI banks are not cleared during shutdown on Intel CPUs. As a side effect, when a kexec is performed, CPUs coming back online are unable to rediscover/claim these occupied banks which breaks MCE reporting. Clear the CPU ownership during shutdown via cmci_clear() so the banks can be reclaimed and MCE reporting will become functional once more. [ bp: Massage commit message. ] Reported-by: Aijay Adams Signed-off-by: JP Kobryn Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Tony Luck Reviewed-by: Qiuxu Zhuo Cc: Link: https://lore.kernel.org/20250627174935.95194-1-inwardvessel@gmail.com Signed-off-by: Greg Kroah-Hartman --- arch/x86/kernel/cpu/mce/intel.c | 1 + 1 file changed, 1 insertion(+) --- a/arch/x86/kernel/cpu/mce/intel.c +++ b/arch/x86/kernel/cpu/mce/intel.c @@ -500,6 +500,7 @@ void mce_intel_feature_init(struct cpuin void mce_intel_feature_clear(struct cpuinfo_x86 *c) { intel_clear_lmce(); + cmci_clear(); } bool intel_filter_mce(struct mce *m)