Re: [PATCH v3 01/13] x86/retpoline: Add initial retpoline support

From: Borislav Petkov
Date: Fri Jan 05 2018 - 17:44:45 EST


On Fri, Jan 05, 2018 at 10:16:54PM +0000, Woodhouse, David wrote:
> You'd still want a RETPOLINE_AMD flag to enable that lfence; it's not
> just K8.

I think you're forgetting that we set K8 on everything >= K8 on AMD. So
this:

+ if (c->x86_vendor == X86_VENDOR_AMD)
+ setup_force_cpu_cap(X86_FEATURE_RETPOLINE_AMD);

can just as well be dropped and X86_FEATURE_K8 used everywhere.

--
Regards/Gruss,
Boris.

SUSE Linux GmbH, GF: Felix ImendÃrffer, Jane Smithard, Graham Norton, HRB 21284 (AG NÃrnberg)
--