x86/mm: Switch to new Intel CPU model defines
PATCH 1/1 x86/mm: Switch to new Intel CPU model defines
From: Tony Luck <[email protected]>
[ Upstream commit 2eda374e883ad297bd9fe575a16c1dc850346075 ]
New CPU #defines encode vendor and family as well as model.
[ dhansen: vertically align 0's in invlpg_miss_ids[] ]
[ Ricardo: I used the old match macro X86_MATCH_INTEL_FAM6_MODEL()
instead of X86_MATCH_VFM() as in the upstream commit. ]
---
I tested this backport on an Alder Lake system. Now pr_info("Incomplete global flushes, disabling PCID") is back in dmesg. I also tested on a Meteor Lake system, which is not affected by the INVLPG issue. The message in question is not there before and after the backport, as expected.
This backport fixes the last remaining caller of x86_match_cpu() that does not use the family of X86_MATCH_*() macros.
Thomas Lindroth intially reported the regression in
https://lore.kernel.org/all/[email protected]/
Maybe Tony and/or the x86 maintainers can ack this backport?
--- arch/x86/mm/init.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-)
arch/x86/mm/init.c +6 -10
@@ -261,21 +261,17 @@ static void __init probe_page_size_mask(void) } } -#define INTEL_MATCH (_model) { .vendor = X86_VENDOR_INTEL, \ - .family = 6, \ - .model = _model, \ - }/* * INVLPG may not properly flush Global entries * on these CPUs when PCIDs are enabled. */ static const struct x86_cpu_id invlpg_miss_ids[] = { -INTEL_MATCH (INTEL_FAM6_ALDERLAKE ), -INTEL_MATCH (INTEL_FAM6_ALDERLAKE_L ), -INTEL_MATCH (INTEL_FAM6_ATOM_GRACEMONT ), -INTEL_MATCH (INTEL_FAM6_RAPTORLAKE ), -INTEL_MATCH (INTEL_FAM6_RAPTORLAKE_P ), -INTEL_MATCH (INTEL_FAM6_RAPTORLAKE_S ), +X86_MATCH_INTEL_FAM6_MODEL (ALDERLAKE ,0 ), +X86_MATCH_INTEL_FAM6_MODEL (ALDERLAKE_L ,0 ), +X86_MATCH_INTEL_FAM6_MODEL (ATOM_GRACEMONT ,0 ), +X86_MATCH_INTEL_FAM6_MODEL (RAPTORLAKE ,0 ), +X86_MATCH_INTEL_FAM6_MODEL (RAPTORLAKE_P ,0 ), +X86_MATCH_INTEL_FAM6_MODEL (RAPTORLAKE_S ,0 ), {} };
Signature · 1 line
2.34.1
Quoted 1 line
Maybe Tony and/or the x86 maintainers can ack this backport?
Ricardo,
Thanks for doing this backport (and checking all the other FAM6 uses)
LGTM
-Tony
Quoted 8 lines · Ricardo Neri
From: Tony Luck <[email protected]>
[ Upstream commit
2eda374e883ad297bd9fe575a16c1dc850346075]New CPU #defines encode vendor and family as well as model.
[ dhansen: vertically align 0's in invlpg_miss_ids[] ]
Quoted 7 lines
Signed-off-by Tony Luck <[email protected]>Signed-off-by Dave Hansen <[email protected]>Signed-off-by Borislav Petkov (AMD) <[email protected]>[ Ricardo: I used the old match macro
X86_MATCH_INTEL_FAM6_MODEL()
instead ofX86_MATCH_VFM()as in the upstream commit. ]Signed-off-by Ricardo Neri <[email protected]>