[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALCETrW8m-4AG4aZUYx35p0kc2aWiUq4p-WCs0+BOtb3WWE3aA@mail.gmail.com>
Date: Tue, 9 Feb 2021 22:06:02 -0800
From: Andy Lutomirski <luto@...nel.org>
To: Andy Lutomirski <luto@...nel.org>
Cc: X86 ML <x86@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Yonghong Song <yhs@...com>,
Masami Hiramatsu <mhiramat@...nel.org>
Subject: Re: [PATCH v2 08/14] x86/fault: Skip erratum #93 workaround on new CPUs
On Tue, Feb 9, 2021 at 6:33 PM Andy Lutomirski <luto@...nel.org> wrote:
>
> Erratum #93 applies to the first generation of AMD K8 CPUs. Skip the
> workaround on newer CPUs.
Whoops, this breaks the !CPU_SUP_AMD build. It needs a fixup like this:
https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/commit/?h=x86/fault&id=06772a3b6918bf6d6d0778946149b7d56ae30d80
Boris, do you want a v3?
>
> Signed-off-by: Andy Lutomirski <luto@...nel.org>
> ---
> 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 cbb1a9754473..3fe2f4800b69 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))
> --
> 2.29.2
>
Powered by blists - more mailing lists