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=1796381347; b=cGGckVxMWR84g0S0bKpa3gXgtVGQye9115WXXP4ZSr1TiGzGfSzGZ5Fx8yYFH7rQMuqr YeERgtEsgTUE0VOSJyZdazlcjc2iE2yIxAfRsoMZe1dWwpldbQyDZLsln/9G8975jNKGS qGlOAlFZhosliq4FS7WfFifYF378vTVBijOdg5Hh2uOV5hwTpX60rtEZmYJ7EsVH0V7Ns UCn3Sbfo5xD9ByPWu5b/PR33CrjlRLFrfQz91vuuGAiQ+ygDsCmAJ4aOD3GRV5UwNO9bC wYg4BZ1HJtRwaPO2y6IDqwnCLhs+mg9mkcimS5xpMrmoyc1AuoGahORHB48Z2PBBgpQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796381347; 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=jh6Xg13N8vhG+NMEYFbuuObytwYOoObKxv5P2eBby7w=; b=cbJq+N0RKsctfZFuizi3W4U3m5Blf6B7lR7B/Td2j7ectZMDbQZZdmBi+pSEFDfvtRBw iG5mBViXaWX7BQckwubiXR51+zJzSoRKO8cxJLuaZIaLI3UfRfeEaIoV5XM6DnRVPFLYh BjKS4wm8lQycM1oROco+SKmBwCtAMst0oEhnJFMEJgxjv2EegZDhYQ+qkBCnrcD+S7b6q w9G+2Ur9TXX68V+uDLXPEA7oTZkZ/yJmHRvXBvElVO7wTN6a+c8n45PLIqPUJtmqYPAty MyXlUCCFcWICIdby/VT8MjZXv8/7X8IGH/ynVYTBQLWP02h4gqf5hepR7qBSQO+3Tqg== 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=0KRYM01z; 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 2DE27606A322; Fri, 4 Dec 2026 10:49:07 +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=0KRYM01z Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9C571F000C2; Fri, 4 Dec 2026 10:49:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796381347; bh=jh6Xg13N8vhG+NMEYFbuuObytwYOoObKxv5P2eBby7w=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=0KRYM01zoPvyuZFL9l6NlB2o/huF1vjJ5uowRxNZORN+mL7+kyPXJqWJPTExBuSSy 0m35BhmvkaPIOtLawFeuJs3bD3iIByDChx/DcrAwXErkkEbScb8PnfJ3YcYHiCXEb5 XM5YlsF0aAnUJPO9nlXlA+0qMr2s1UtlW4vsAw8Q= 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 7.3 613/742] x86/mce: Do not treat cache hierarchy errors as memory errors Date: Fri, 4 Dec 2026 19:07:57 +0900 Message-ID: <20261204100651.397381738@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100635.034361255@linuxfoundation.org> References: <20261204100635.034361255@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 7.3-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;