From c7010da194d17b3160926d545c28a98c159e3947 Mon Sep 17 00:00:00 2001 From: Andy Lutomirski Date: Tue, 9 Feb 2021 18:27:28 -0800 Subject: [PATCH] x86/fault: Skip erratum #93 workaround on new CPUs Erratum #93 applies to the first generation of AMD K8 CPUs. Skip the workaround on newer CPUs. Signed-off-by: Andy Lutomirski --- arch/x86/mm/fault.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index cbb1a97544736d..3fe2f4800b69c7 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c @@ -442,9 +442,8 @@ static void dump_pagetable(unsigned long address) */ static int is_errata93(struct pt_regs *regs, unsigned long address) { -#if defined(CONFIG_X86_64) && defined(CONFIG_CPU_SUP_AMD) - if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD - || boot_cpu_data.x86 != 0xf) +#if defined(CONFIG_X86_64) + if (!is_amd_k8_pre_npt()) return 0; if (user_mode(regs))