From: Tony Luck <tony.luck@intel.com>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Hans de Goede" <hansg@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>, Breno Leitao <leitao@debian.org>,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org, patches@lists.linux.dev,
Tony Luck <tony.luck@intel.com>,
Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Subject: [PATCH 3/7] platform/x86/intel/bff: Add stub Intel bitfix filter driver
Date: Tue, 25 Aug 2026 11:15:22 -0700 [thread overview]
Message-ID: <20260825181526.13203-4-tony.luck@intel.com> (raw)
In-Reply-To: <20260825181526.13203-1-tony.luck@intel.com>
Check if platform supports enhanced cache error reporting and the
bitfix filter reset feature.
Co-developed-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
---
drivers/platform/x86/intel/bff.c | 59 +++++++++++++++++++++++++++++
drivers/platform/x86/intel/Kconfig | 13 +++++++
drivers/platform/x86/intel/Makefile | 1 +
3 files changed, 73 insertions(+)
create mode 100644 drivers/platform/x86/intel/bff.c
diff --git a/drivers/platform/x86/intel/bff.c b/drivers/platform/x86/intel/bff.c
new file mode 100644
index 000000000000..9522bdb1401d
--- /dev/null
+++ b/drivers/platform/x86/intel/bff.c
@@ -0,0 +1,59 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/* Copyright(c) 2026 Intel Corporation. */
+
+/*
+ * Intel driver to reset bitfix filters when they overflow.
+ *
+ * Each bitfix filter has limited slots to track corrected errors.
+ * These slots can be filled by transient corrected errors (e.g.,
+ * bit flips from particle strikes) that don't represent permanent
+ * hardware defects.
+ *
+ * When the filter overflows (yellow status), reset it to reclaim
+ * slots occupied by transient corrected errors. If the overflow
+ * repeats frequently after reset, it indicates persistent hardware
+ * defects that need attention: the system should be scheduled for
+ * servicing.
+ */
+#define pr_fmt(fmt) "bff: " fmt
+
+#include <linux/cpufeature.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/types.h>
+
+#include <asm/cpufeatures.h>
+#include <asm/mce.h>
+#include <asm/msr.h>
+#include <asm/msr-index.h>
+
+static int __init bff_init(void)
+{
+ u64 core_caps, mcg_cap;
+
+ if (!cpu_feature_enabled(X86_FEATURE_MCA))
+ return -ENODEV;
+ rdmsrq(MSR_IA32_MCG_CAP, mcg_cap);
+ if (!(mcg_cap & MCG_TES_P))
+ return -ENODEV;
+
+ if (!cpu_feature_enabled(X86_FEATURE_CORE_CAPABILITIES))
+ return -ENODEV;
+
+ rdmsrq(MSR_IA32_CORE_CAPS, core_caps);
+ if (!(core_caps & MSR_IA32_CORE_CAPS_BFF_RESET_DETECT))
+ return -ENODEV;
+
+ return 0;
+}
+
+static void __exit bff_exit(void)
+{
+}
+
+module_init(bff_init);
+module_exit(bff_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("Intel bitfix filter reset driver");
diff --git a/drivers/platform/x86/intel/Kconfig b/drivers/platform/x86/intel/Kconfig
index 2900407d6095..f4e9af0116ee 100644
--- a/drivers/platform/x86/intel/Kconfig
+++ b/drivers/platform/x86/intel/Kconfig
@@ -251,3 +251,16 @@ config INTEL_VSEC
To compile this driver as a module, choose M here: the module will
be called intel_vsec.
+
+config INTEL_BFF_RESET
+ tristate "Intel bitfix filter reset driver"
+ depends on CPU_SUP_INTEL && X86_MCE
+ help
+ Adds support for Intel systems that implement bitfix filters to
+ suppress repeated logging and signaling of the same corrected
+ error. Those filters can become clogged with transient errors
+ over time. Clearing the filter may make space for additional
+ hard errors.
+
+ To compile this driver as a module, choose M here: the module will
+ be called intel_bff.
diff --git a/drivers/platform/x86/intel/Makefile b/drivers/platform/x86/intel/Makefile
index 138b13756158..dc4e374758d5 100644
--- a/drivers/platform/x86/intel/Makefile
+++ b/drivers/platform/x86/intel/Makefile
@@ -27,6 +27,7 @@ intel-target-$(CONFIG_INTEL_ISHTP_ECLITE) += ishtp_eclite.o
intel-target-$(CONFIG_INTEL_OAKTRAIL) += oaktrail.o
intel-target-$(CONFIG_INTEL_SDSI) += sdsi.o
intel-target-$(CONFIG_INTEL_VSEC) += vsec.o
+intel-target-$(CONFIG_INTEL_BFF_RESET) += bff.o
# Intel PMIC / PMC / P-Unit drivers
intel-target-$(CONFIG_INTEL_BYTCRC_PWRSRC) += bytcrc_pwrsrc.o
--
2.55.0
next prev parent reply other threads:[~2026-08-25 18:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-25 18:15 [PATCH 0/7] Intel platform driver to reset bitfix filters Tony Luck
2026-08-25 18:15 ` [PATCH 1/7] cacheinfo: Export get_cpu_cacheinfo_id() for loadable modules Tony Luck
2026-08-25 18:15 ` [PATCH 2/7] x86/mce: Enumeration updates for Intel bitfix filter reset Tony Luck
2026-08-26 8:15 ` Ilpo Järvinen
2026-08-25 18:15 ` Tony Luck [this message]
2026-08-25 18:15 ` [PATCH 4/7] platform/x86/intel/bff: Add Diamond Rapids support Tony Luck
2026-08-26 8:17 ` Ilpo Järvinen
2026-08-26 16:10 ` Luck, Tony
2026-08-25 18:15 ` [PATCH 5/7] platform/x86/intel/bff: Reset bitfix filter when it overflows Tony Luck
2026-08-25 18:15 ` [PATCH 6/7] platform/x86/intel/bff: Compute unique ID for overflowed filter Tony Luck
2026-08-26 8:26 ` Ilpo Järvinen
2026-08-25 18:15 ` [PATCH 7/7] platform/x86/intel/bff: Report frequent filter resets Tony Luck
2026-08-26 8:39 ` Ilpo Järvinen
2026-08-25 18:28 ` [PATCH 0/7] Intel platform driver to reset bitfix filters Borislav Petkov
2026-08-25 18:55 ` Luck, Tony
2026-08-25 19:23 ` Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260825181526.13203-4-tony.luck@intel.com \
--to=tony.luck@intel.com \
--cc=bp@alien8.de \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=leitao@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@lists.linux.dev \
--cc=platform-driver-x86@vger.kernel.org \
--cc=qiuxu.zhuo@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.