[tip: x86/urgent] x86/bugs: Replace RFDS model checks with VFM ones

From: tip-bot2 for Sohil Mehta

Date: Sun Nov 01 2026 - 22:57:57 EST


The following commit has been merged into the x86/urgent branch of tip:

Commit-ID: b828d777c292c963aa110c33159a59f81d372ce7
Gitweb: https://git.kernel.org/tip/b828d777c292c963aa110c33159a59f81d372ce7
Author: Sohil Mehta <sohil.mehta@xxxxxxxxx>
AuthorDate: Fri, 30 Oct 2026 12:52:14 -07:00
Committer: Borislav Petkov (AMD) <bp@xxxxxxxxx>
CommitterDate: Sun, 01 Nov 2026 17:42:22 -08:00

x86/bugs: Replace RFDS model checks with VFM ones

The RFDS vulnerability check uses raw model numbers to identify Alder
Lake and Raptor Lake. Most Intel-specific code has already moved away
from x86_model checks, but this one got added recently.

Replace the x86_model checks with VFM ones to make them more readable.

Signed-off-by: Sohil Mehta <sohil.mehta@xxxxxxxxx>
Signed-off-by: Borislav Petkov (AMD) <bp@xxxxxxxxx>
Reviewed-by: Pawan Gupta <pawan.kumar.gupta@xxxxxxxxxxxxxxx>
Link: https://patch.msgid.link/20261030195214.1284995-1-sohil.mehta@xxxxxxxxx
---
arch/x86/kernel/cpu/common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 9bd50c6..aba7e99 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -1391,8 +1391,8 @@ static bool __init vulnerable_to_rfds(u64 x86_arch_cap_msr)
* both Core and Atom CPUs. Mark unaffected when Atom CPUs are not
* present.
*/
- if ((boot_cpu_data.x86_model == 0x97 ||
- boot_cpu_data.x86_model == 0xB7) &&
+ if ((boot_cpu_data.x86_vfm == INTEL_ALDERLAKE ||
+ boot_cpu_data.x86_vfm == INTEL_RAPTORLAKE) &&
boot_cpu_data.topo.intel_type != INTEL_CPU_TYPE_ATOM &&
!boot_cpu_has(X86_FEATURE_HYBRID_CPU))
return false;