]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/cpu/AMD: Add speculative control support for AMD
authorTom Lendacky <thomas.lendacky@amd.com>
Fri, 15 Dec 2017 17:16:54 +0000 (09:16 -0800)
committerKirtikar Kashyap <kirtikar.kashyap@oracle.com>
Fri, 12 Jan 2018 18:19:57 +0000 (10:19 -0800)
commit28b8f4f0c111a6e2489a1422134d37e297e33720
tree6b2da1dbb3a452982da6fd352ede5f1950e78f43
parent35c0f76f3de95422531c137455f525063f85db42
x86/cpu/AMD: Add speculative control support for AMD

Add speculative control support for AMD processors. For AMD, speculative
control is indicated as follows:

  CPUID EAX=0x00000007, ECX=0x00 return EDX[26] indicates support for
  both IBRS and IBPB.

  CPUID EAX=0x80000008, ECX=0x00 return EBX[12] indicates support for
  just IBPB.

Orabug: 27344012
CVE: CVE-2017-5715

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Tim Chen <tim.c.chen@linux.inte.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
[Backport: We don't have 39c06df4dc10a "x86/cpufeature: Cleanup get_cpu_cap()"
 which adds a nice enum and we neither do we have 2167ceabf3416
 "x86/cpu: Add CLZERO detection". As such we just a partial backport
 of the last one and only look for one specific bit (12).]

Reviewed-by: John Haxby <john.haxby@oracle.com>
Signed-off-by: Kirtikar Kashyap <kirtikar.kashyap@oracle.com>
arch/x86/include/asm/cpufeature.h
arch/x86/kernel/cpu/common.c
arch/x86/kernel/cpu/scattered.c