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=1796384114; b=Hz7RhV3Qiz7Olu/4z1HO+TR8gyWL+IRoWqhKxuhVnybHJjtlZTN+NGyehEkooRlpnDak 9ODrRj2/JyFGXpwVFTtDonqsI9FEPSvWcuABUYCtnx3Ay9fwUk8ilPcPf7VeLMFjU4DjI mKE9JzjCmTlUPKkW2PVoxEkVfRc05lCnX9YiizyOPD0/Hegtogo8Hzq19469j/RDkyHlM IASvgXHLVyNlOER7/JcG+r2OUW4ihQC5K3hBtTFGuaG3TchDgWmc53JbtAbIaoSpQzAls v2T/bdGnET8GdqXFKBrJQNoPzZaYuP8AF+lRpqNPALdVB8O9FNhr0QkX7JMHvTy9A8w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796384114; 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=r/EVgFTp0Lpah2BVIRxY2LxJF9uDXBrDxj0Rl6HUF2I=; b=3esMFwYE/PXgzUIYihCogLnRj3BjSlYX/IKHvqqgh6OczXBgQ6jy3vcq1xEGAbzNdRlS XK+OwNhfia3sOzkXOOV8D3BT9ykViSGo/qSVxbmJzL5pqvKDqWAZyInW2WHEi/gCaP/kx q0agkXb8kRITATnJxp2R1PsEs0LdXlgxh8+2eE/vLIhBHDVKpbXjyOKul59hYtLqobpCy Fco3VToewwGvrd2gmabpMnhTtjCtF3FhnGLeP5Zk7IHgT7kFcAoEc9BwCge8y6LNcbpXj WbdyKxWAroqk1gmN9eedzROpzB/Zr+OB1sk+33Ke6jwz9LGh/L8tcg5v8xKp0LX9J9g== 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=qwCebkgc; 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 A0B4B606A330; Fri, 4 Dec 2026 11:35:14 +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=qwCebkgc Received: by smtp.kernel.org (Postfix) with ESMTPSA id 254F41F00897; Fri, 4 Dec 2026 11:35:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796384114; bh=r/EVgFTp0Lpah2BVIRxY2LxJF9uDXBrDxj0Rl6HUF2I=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=qwCebkgcVhKKP6f1Li18S/ykJ4RN4QhsqsCydh5PTArLJwORlTGa9PN4KGjG/uXiV HZ9TpRoD+rRvRG1VDBznirOmvSn6NmCtZZn5wPzmKQ5tWGjf+7RiFh5aOZHo0YY738 iuWH9aIUsdhZ5u71RP1kbMwcERx4ESGr+FItEJSk= 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.12 461/555] x86/mce: Do not treat cache hierarchy errors as memory errors Date: Fri, 4 Dec 2026 19:08:24 +0900 Message-ID: <20261204100626.935688199@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100603.988357525@linuxfoundation.org> References: <20261204100603.988357525@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-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 @@ -526,21 +526,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;