]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
x86/mce: Save and use APEI corrected threshold limit
authorYazen Ghannam <yazen.ghannam@amd.com>
Tue, 4 Nov 2025 14:55:45 +0000 (14:55 +0000)
committerBorislav Petkov (AMD) <bp@alien8.de>
Fri, 21 Nov 2025 09:32:28 +0000 (10:32 +0100)
commiteeb3f76d73baed4c8ecc883e1eaafba3cb8aae1d
tree4db68a23532ca422dc5e0d10390fa137d6c1547c
parent56f17be67a332d146821d1a812ab16388d07ace7
x86/mce: Save and use APEI corrected threshold limit

The MCA threshold limit generally is not something that needs to change during
runtime. It is common for a system administrator to decide on a policy for
their managed systems.

If MCA thresholding is OS-managed, then the threshold limit must be set at
every boot. However, many systems allow the user to set a value in their BIOS.
And this is reported through an APEI HEST entry even if thresholding is not in
FW-First mode.

Use this value, if available, to set the OS-managed threshold limit.  Users
can still override it through sysfs if desired for testing or debug.

APEI is parsed after MCE is initialized. So reset the thresholding blocks
later to pick up the threshold limit.

Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/20251104-wip-mca-updates-v8-0-66c8eacf67b9@amd.com
arch/x86/include/asm/mce.h
arch/x86/kernel/acpi/apei.c
arch/x86/kernel/cpu/mce/amd.c
arch/x86/kernel/cpu/mce/internal.h
arch/x86/kernel/cpu/mce/threshold.c