Re: [PATCH] x86/cpu, x86/pti: Do not enable PTI on AMD processors
From: Dave Hansen
Date: Wed Dec 27 2017 - 03:48:29 EST
On 12/26/2017 09:43 PM, Tom Lendacky wrote:
> --- a/arch/x86/kernel/cpu/common.c
> +++ b/arch/x86/kernel/cpu/common.c
> @@ -923,8 +923,8 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
>
> setup_force_cpu_cap(X86_FEATURE_ALWAYS);
>
> - /* Assume for now that ALL x86 CPUs are insecure */
> - setup_force_cpu_bug(X86_BUG_CPU_INSECURE);
> + if (c->x86_vendor != X86_VENDOR_AMD)
> + setup_force_cpu_bug(X86_BUG_CPU_INSECURE);
Does this disable it in a way that it can be turned back on via the
kernel command-line?
This is a rather wide class of issues and I would rather not just
hard-code it in a way that we say one vendor has never and will never be
affected.