[tip: x86/urgent] x86/CPU: Fix FPDSS on Hygon
From: tip-bot2 for Shance Luo
Date: Mon Nov 23 2026 - 23:36:35 EST
The following commit has been merged into the x86/urgent branch of tip:
Commit-ID: 4c2abd86d10720ce4a2330c2ca01cca39bd727ab
Gitweb: https://git.kernel.org/tip/4c2abd86d10720ce4a2330c2ca01cca39bd727ab
Author: Shance Luo <luoshance@xxxxxxxx>
AuthorDate: Thu, 19 Nov 2026 15:53:30 +08:00
Committer: Borislav Petkov (AMD) <bp@xxxxxxxxx>
CommitterDate: Mon, 23 Nov 2026 20:18:05 -08:00
x86/CPU: Fix FPDSS on Hygon
Hygon family 0x18 CPUs are affected by the same floating-point divider issue
as AMD Zen1: the divider can leave partial results of previous operations
behind, which another attacker thread can sample.
Enable the mitigation.
Signed-off-by: Shance Luo <luoshance@xxxxxxxx>
Signed-off-by: Borislav Petkov (AMD) <bp@xxxxxxxxx>
Cc: <stable@xxxxxxxxxx>
Link: https://patch.msgid.link/20261119075330.961-1-luoshance@xxxxxxxx
---
arch/x86/kernel/cpu/hygon.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/x86/kernel/cpu/hygon.c b/arch/x86/kernel/cpu/hygon.c
index ec51c2b..0bccb93 100644
--- a/arch/x86/kernel/cpu/hygon.c
+++ b/arch/x86/kernel/cpu/hygon.c
@@ -228,6 +228,9 @@ static void init_hygon(struct cpuinfo_x86 *c)
/* Hygon CPUs don't need fencing after x2APIC/TSC_DEADLINE MSR writes. */
clear_cpu_cap(c, X86_FEATURE_APIC_MSRS_FENCE);
+
+ pr_notice_once("Hygon FPDSS bug detected, enabling mitigation.\n");
+ msr_set_bit(MSR_AMD64_FP_CFG, MSR_AMD64_FP_CFG_ZEN1_DENORM_FIX_BIT);
}
static void cpu_detect_tlb_hygon(struct cpuinfo_x86 *c)