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=1796389444; b=meAS0KRdGg962/5Z/dOIDYRrB2lCPqn6MytdT59cr/kJGB1yzb79FFtmq+r3yXg5DCcj hl3YJqpLOq8eL2OMJ70LRsguGUPQHYr+O4p6RUZpBv9MwiLJntmur0HSx5qagnHLKt9KV v/4TKWQ1YXQKeC46GEgyaMcGU/BEsr6S0wDMnOY60FtPqNT2LgSQTejJ3NMsTB/cS+zii 8YX8AAi3U3ilHgof2TA5+R0MkUn6BvbGDyomsfOG4ppF9O3LaZ9GDkrDetMOjkPNfZ7Nn 1jPQM0Xs9yacQMlL2Y2FKRzDraTCtD8t16iFZvM9560jyQGiErbLOnRnAEWObX7j8iQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796389444; 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=z+9mXPBUEAz/HUjKi1YS9inN4ojJIXhG4sxN9p+oHiw=; b=TAMkJeqUVMsBpk6HlulNwnKVIxGK15y5EWBg10oSvKBxePj6akAH307ldtWBDf8olsZL Orb1SC0RizHuydrsTI+c1AbHGaumEO/MltVBYj5+jodXpIG+ohIEXAx94raJINm1m89tM 1IONGdUxY4ruXJe97E1a3bbPhuM2zTNTmxtzwqvACu8VWyZhfLCIMu4MXaF/4iyXCIpgE 5+ozftsZ8kDvfkR4Edfee1Z1aNhaVWaPpdnl7N7nJuje8b2GoTHz8IiH7Wi+KhoT5Ot/9 XJpxbaDfWe4pjj11x6Yr0zJgpeH5/SkopvULu5BJWx/Ka6Jf3RUYGIOsjKriOAhFGeg== 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=guetl8Bu; 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 A6630606A330; Fri, 4 Dec 2026 13:04:04 +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=guetl8Bu Received: by smtp.kernel.org (Postfix) with ESMTPSA id 256621F00A02; Fri, 4 Dec 2026 13:04:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796389444; bh=z+9mXPBUEAz/HUjKi1YS9inN4ojJIXhG4sxN9p+oHiw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=guetl8BuCoLFa+8FXFzxXNDFnbUjBM5d8//FTeI8aPXuQXp1SBqD+f7drJZnMVUV7 /+TpQuafCEO5amZPwZRypBvWEK+MUonLqtlgrLnGqwrylX4aZujnwkaNK3PkpRwWrv j83PZn5SJFb7cbdI/uvpbTEHDv38BwgXLHcdDjXA= 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.1 0994/1059] x86/mce: Do not treat cache hierarchy errors as memory errors Date: Fri, 4 Dec 2026 19:08:45 +0900 Message-ID: <20261204100709.743727081@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@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.1-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 @@ -514,21 +514,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;