From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796382729; b=id+1ECJWMrO6JBTDH+f08hwChW+d8Z89Ms53WqUjZkFVz/XecTRS43Sd4PulFIOKkQAg Lfbl8jd9Fsj1wVR1L6XrsH3oHhLhdqLOYbTVDpqGAm3ZI+8zA93zMw8XyZEi1v7tG+0vC sVQExtbLdbYmkJcXNc1w2EJhOJou0bIILxbaQPEccjwGoSahE73TSHJ1LKwUMdMcVPKSe n7qR79hVgGVXAL673Vq52sMMZsjA7wByUPzPehqXnsY5r23HSyAnuxc2VghU+W5MnSjMh /UprGV6t+os1+SZ8tfKD66krENIfwrth5yBuyRcsqLzeZ7wv486taSkffBViB8u8q9Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796382729; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=ERd3Zahj9tY7QMB/lqucLVL/NBrtkem67xifhcF0nQw=; b=vHPNMMB0z9C5ht88ZNY/+00wdOISpeEzsc3/nS5cDDsGXRqCeHM6zN/FZRtM4bHKhDg5 ToC8DyD0MpMe0LAOFpDMRyvj6UMBc7F/21mE/wEMZBQLEWwbtyYeu3YSWvaPXc6P40KAi oUhTN235cpVw4WutkiXr92cKZ6zYP89Y1qtSQg1IGk+h+inxesD/Fq9+BhNpMGritb+wo la+v4WgLw3Xdc4edyQ7iQMomzxHoEObiIlB2WKV4zYYUAMtt1AKpk+uiDGs96u3bbGxqH s3er6wsxKffSnTTmZ9Fi5o6Y3BluQxYe5autCi4rkqPnwtmsUfhwcrLBva1mvSZ4qyA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=WyYCaYLm; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5193F606A33E; Fri, 4 Dec 2026 11:12:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=WyYCaYLm Received: by smtp.kernel.org (Postfix) with ESMTPSA id AAA8B1F00A3F; Fri, 4 Dec 2026 11:12:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796382729; bh=ERd3Zahj9tY7QMB/lqucLVL/NBrtkem67xifhcF0nQw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=WyYCaYLmo5FdnS53sRnRfqD5+VeXeWuwGRGVzYeb9y+vssrXO8jLzTQgWz8yeDSOA 4JltkGAO3MMe3PKBB0XoC4j88CNF3GA8HHmNF/OKo5P+Ij5ixXmUEsTRUH+xjPzXGb V7XdGuLHmfW0l1gIxIBo8bram89FiwXVin18bghg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Adrian Schlegel , "Borislav Petkov (AMD)" , Qiuxu Zhuo , Tony Luck , Yazen Ghannam , Sohil Mehta , stable@kernel.org Subject: [PATCH 6.18 542/703] x86/mce: Do not treat cache hierarchy errors as memory errors Date: Fri, 4 Dec 2026 19:07:21 +0900 Message-ID: <20261204100642.201959529@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100627.522266145@linuxfoundation.org> References: <20261204100627.522266145@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Adrian Schlegel commit 29b74cf57f432d60da2b79c827f1379125409611 upstream. On Intel and Zhaoxin, mce_is_memory_error() also returns true for cache hierarchy errors. All callers expect it to report memory errors only. The CEC uses it to count corrected DRAM errors. A corrected cache error only names the cache line that was affected, not a faulty DRAM page. With a faulty CPU core, the CEC therefore soft-offlines healthy pages. On an i9-9900K this caused about 500 soft-offline attempts per hour. Report only memory controller errors on Intel and Zhaoxin, as is already done for AMD. Fixes: fa92c5869426 ("x86, mce: Support memory error recovery for both UCNA and Deferred error in machine_check_poll") Signed-off-by: Adrian Schlegel Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Qiuxu Zhuo Reviewed-by: Tony Luck Reviewed-by: Yazen Ghannam Reviewed-by: Sohil Mehta Cc: Link: https://patch.msgid.link/20261012193305.38931-1-me@adrianschlegel.com Signed-off-by: Greg Kroah-Hartman --- arch/x86/kernel/cpu/mce/core.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) --- a/arch/x86/kernel/cpu/mce/core.c +++ b/arch/x86/kernel/cpu/mce/core.c @@ -540,21 +540,13 @@ bool mce_is_memory_error(struct mce *m) case X86_VENDOR_INTEL: case X86_VENDOR_ZHAOXIN: /* - * Intel SDM Volume 3B - 15.9.2 Compound Error Codes + * Intel SDM Volume 3B "Compound Error Codes". * - * Bit 7 of the MCACOD field of IA32_MCi_STATUS is used for - * indicating a memory error. Bit 8 is used for indicating a - * cache hierarchy error. The combination of bit 2 and bit 3 - * is used for indicating a `generic' cache hierarchy error - * But we can't just blindly check the above bits, because if - * bit 11 is set, then it is a bus/interconnect error - and - * either way the above bits just gives more detail on what - * bus/interconnect error happened. Note that bit 12 can be - * ignored, as it's the "filter" bit. + * Memory controller errors have an MCACOD of 000F 0000 1MMM CCCC: + * bit 7 set, bits 8-11 and 13-15 clear. Bit 12 is the "filter" + * bit and is ignored. */ - return (m->status & 0xef80) == BIT(7) || - (m->status & 0xef00) == BIT(8) || - (m->status & 0xeffc) == 0xc; + return (m->status & 0xef80) == BIT(7); default: return false;