Re: [PATCH v4 5/7] x86/pti: Do not enable PTI on processors which are not vulnerable to Meltdown

From: Alan Cox
Date: Thu Jan 25 2018 - 10:13:42 EST


On Thu, 25 Jan 2018 09:23:07 +0000
David Woodhouse <dwmw@xxxxxxxxxxxx> wrote:

> Also, for CPUs which don't speculate at all, don't report that they're vulnerable
> to the Spectre variants either.
>
> Leave the cpu_no_meltdown[] match table with just X86_VENDOR_AMD in it for now,
> even though that could be done with a simple comparison, on the assumption that
> we'll have more to add.
>
> Based on suggestions from Dave Hansen and Alan Cox.

Looks good to me. I've been doing some more document spelunking and have
some more stuff for 32bit but not for 64bit capable systems.

X86_VENDOR_NSC, 5

is safe as the MediaGX/Geode doesn't have speculation. However CYRIX,5
isn't because there are a mix of CPU types there.

Most interesting is the Cyrix one. I'm going to have to resurrect my
Cyrix kit because some of the Cyrix processors actually have control bits
to turn on/off the BTB and also the return stack predictor (PCR0 bits 1
and 0 respecively) and no lfence so you need to change system flags
or reload a segment register to force a stall.

Alan