]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
x86/cpu/AMD: Add speculative control support for AMD
authorTom Lendacky <thomas.lendacky@amd.com>
Wed, 20 Dec 2017 10:52:54 +0000 (10:52 +0000)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Thu, 11 Jan 2018 20:35:02 +0000 (18:35 -0200)
commit8c3fc9e98177daee2281ed40e3d61f9cf4eee576
tree05dc29d825df140aa6a86c554ece98f26f302753
parentd2e0236f395e876f5303fb5021e4fe6eea881402
x86/cpu/AMD: Add speculative control support for AMD

CVE-2017-5753
CVE-2017-5715

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.

On AMD family 0x10, 0x12 and 0x16 processors where either of the above
features are not supported, IBPB can be achieved by disabling
indirect branch predictor support in MSR 0xc0011021[14] at boot.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
arch/x86/include/asm/cpufeatures.h
arch/x86/include/asm/msr-index.h
arch/x86/kernel/cpu/amd.c