x86/cpu: Detect VMX features on Intel, Centaur and Zhaoxin CPUs
authorSean Christopherson <sean.j.christopherson@intel.com>
Sat, 21 Dec 2019 04:45:04 +0000 (20:45 -0800)
committerBorislav Petkov <bp@suse.de>
Mon, 13 Jan 2020 17:02:53 +0000 (18:02 +0100)
commitb47ce1fed42eeb9ac8c07fcda6c795884826723d
tree0278a4d9fecc2ae1a62c69c6ca9955e5f8750fac
parent159348784ff0654291f4c7607fc55e73da8e87e8
x86/cpu: Detect VMX features on Intel, Centaur and Zhaoxin CPUs

Add an entry in struct cpuinfo_x86 to track VMX capabilities and fill
the capabilities during IA32_FEAT_CTL MSR initialization.

Make the VMX capabilities dependent on IA32_FEAT_CTL and
X86_FEATURE_NAMES so as to avoid unnecessary overhead on CPUs that can't
possibly support VMX, or when /proc/cpuinfo is not available.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20191221044513.21680-11-sean.j.christopherson@intel.com
arch/x86/Kconfig.cpu
arch/x86/include/asm/processor.h
arch/x86/include/asm/vmxfeatures.h
arch/x86/kernel/cpu/common.c
arch/x86/kernel/cpu/feat_ctl.c