alistair23-linux/arch
KarimAllah Ahmed d28b387fb7 KVM/VMX: Allow direct access to MSR_IA32_SPEC_CTRL
[ Based on a patch from Ashok Raj <ashok.raj@intel.com> ]

Add direct access to MSR_IA32_SPEC_CTRL for guests. This is needed for
guests that will only mitigate Spectre V2 through IBRS+IBPB and will not
be using a retpoline+IBPB based approach.

To avoid the overhead of saving and restoring the MSR_IA32_SPEC_CTRL for
guests that do not actually use the MSR, only start saving and restoring
when a non-zero is written to it.

No attempt is made to handle STIBP here, intentionally. Filtering STIBP
may be added in a future patch, which may require trapping all writes
if we don't want to pass it through directly to the guest.

[dwmw2: Clean up CPUID bits, save/restore manually, handle reset]

Signed-off-by: KarimAllah Ahmed <karahmed@amazon.de>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Jim Mattson <jmattson@google.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jun Nakajima <jun.nakajima@intel.com>
Cc: kvm@vger.kernel.org
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Tim Chen <tim.c.chen@linux.intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Asit Mallick <asit.k.mallick@intel.com>
Cc: Arjan Van De Ven <arjan.van.de.ven@intel.com>
Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Ashok Raj <ashok.raj@intel.com>
Link: https://lkml.kernel.org/r/1517522386-18410-5-git-send-email-karahmed@amazon.de
2018-02-03 23:06:52 +01:00
..
alpha alpha/PCI: Fix noname IRQ level detection 2018-01-20 16:22:36 -08:00
arc ARC fixes for 4.15-rc7 2018-01-05 16:06:35 -08:00
arm ARM: SoC fixes for 4.15 2018-01-19 11:21:31 -08:00
arm64 KVM fixes for v4.15-rc9 2018-01-20 11:41:09 -08:00
blackfin
c6x
cris
frv
h8300
hexagon
ia64 ia64: Rewrite atomic_add and atomic_sub 2018-01-19 10:47:51 -08:00
m32r kernel/exit.c: export abort() to modules 2018-01-04 16:45:09 -08:00
m68k
metag
microblaze
mips MIPS: Fix undefined reference to physical_memsize 2018-01-18 20:44:29 +00:00
mn10300
nios2
openrisc
parisc parisc: qemu idle sleep support 2018-01-06 12:28:04 +01:00
powerpc KVM fixes for v4.15-rc9 2018-01-20 11:41:09 -08:00
riscv riscv: rename SR_* constants to match the spec 2018-01-07 15:14:39 -08:00
s390 KVM: s390: another fix for cmma migration 2018-01-24 16:25:53 +01:00
score
sh SolutionEngine771x: add Ether TSU resource 2018-01-09 12:21:14 -05:00
sparc sparc64: fix typo in CONFIG_CRYPTO_DES_SPARC64 => CONFIG_CRYPTO_CAMELLIA_SPARC64 2018-01-24 16:47:55 -05:00
tile
um Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-12-23 11:53:04 -08:00
unicore32 kernel/exit.c: export abort() to modules 2018-01-04 16:45:09 -08:00
x86 KVM/VMX: Allow direct access to MSR_IA32_SPEC_CTRL 2018-02-03 23:06:52 +01:00
xtensa
.gitignore
Kconfig