android_kernel_oneplus_msm8998/arch/x86
Sean Christopherson 70064f7ea1 KVM: x86: Skip EFER vs. guest CPUID checks for host-initiated writes
commit 11988499e62b310f3bf6f6d0a807a06d3f9ccc96 upstream.

KVM allows userspace to violate consistency checks related to the
guest's CPUID model to some degree.  Generally speaking, userspace has
carte blanche when it comes to guest state so long as jamming invalid
state won't negatively affect the host.

Currently this is seems to be a non-issue as most of the interesting
EFER checks are missing, e.g. NX and LME, but those will be added
shortly.  Proactively exempt userspace from the CPUID checks so as not
to break userspace.

Note, the efer_reserved_bits check still applies to userspace writes as
that mask reflects the host's capabilities, e.g. KVM shouldn't allow a
guest to run with NX=1 if it has been disabled in the host.

Fixes: d80174745b ("KVM: SVM: Only allow setting of EFER_SVME when CPUID SVM is set")
Cc: stable@vger.kernel.org
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-11 12:23:42 +02:00
..
boot x86/build: Specify elf_i386 linker emulation explicitly for i386 objects 2019-04-27 09:33:53 +02:00
configs kconfig: tinyconfig: provide whole choice blocks to avoid warnings 2016-09-24 10:07:42 +02:00
crypto crypto: x86/crct10dif-pcl - fix use via crypto_shash_digest() 2019-06-11 12:23:35 +02:00
entry x86/speculation/mds: Clear CPU buffers on exit to user 2019-05-16 19:45:14 +02:00
ia32 x86/a.out: Clear the dump structure initially 2019-02-20 10:13:23 +01:00
include x86/speculation/mds: Add mitigation mode VMWERV 2019-05-16 19:45:14 +02:00
kernel x86/speculation/mds: Revert CPU buffer clear on double fault exit 2019-06-11 12:23:34 +02:00
kvm KVM: x86: Skip EFER vs. guest CPUID checks for host-initiated writes 2019-06-11 12:23:42 +02:00
lguest x86/paravirt: Prevent rtc_cmos platform device init on PV guests 2015-12-19 21:35:13 +01:00
lib x86/uaccess: Use __uaccess_begin_nospec() and uaccess_try_nospec 2018-12-17 21:55:14 +01:00
math-emu x86/fpu/math-emu: Fix possible uninitialized variable use 2018-02-25 11:03:43 +01:00
mm x86/speculation: Support 'mitigations=' cmdline option 2019-05-16 19:45:15 +02:00
net bpf, x64: increase number of passes 2018-03-28 18:40:17 +02:00
oprofile x86/cpufeature: Carve out X86_FEATURE_* 2018-07-17 11:31:44 +02:00
pci x86/PCI: Fix Broadcom CNB20LE unintended sign extension (redux) 2019-02-20 10:13:04 +01:00
platform Revert "x86/platform/UV: Use efi_runtime_lock to serialise BIOS calls" 2019-03-23 08:44:28 +01:00
power x86/power: Fix swsusp_arch_resume prototype 2018-05-30 07:48:55 +02:00
purgatory x86/kexec: add -fno-PIE 2016-11-26 09:54:52 +01:00
ras x86/ras/mce_amd_inj: Inject bank 4 errors on the NBC 2015-10-12 16:15:48 +02:00
realmode x86/build: Specify elf_i386 linker emulation explicitly for i386 objects 2019-04-27 09:33:53 +02:00
tools x86: Treat R_X86_64_PLT32 as R_X86_64_PC32 2018-03-18 11:17:52 +01:00
um um: Avoid longjmp/setjmp symbol clashes with libpthread.a 2018-11-10 07:41:35 -08:00
video
xen xen: fix xen_qlock_wait() 2018-11-21 09:27:36 +01:00
.gitignore
Kbuild x86/asm/entry, x86/vdso: Move the vDSO code to arch/x86/entry/vdso/ 2015-06-03 18:51:37 +02:00
Kconfig x86/Kconfig: Select SCHED_SMT if SMP enabled 2019-05-16 19:45:11 +02:00
Kconfig.cpu x86/Kconfig/cpus: Fix/complete CPU type help texts 2015-10-21 11:12:56 +02:00
Kconfig.debug x86/cpufeature: Replace the old static_cpu_has() with safe variant 2018-07-17 11:31:44 +02:00
Makefile x86/build: Use cc-option to validate stack alignment parameter 2018-11-27 16:08:00 +01:00
Makefile.um
Makefile_32.cpu