From f9aed6578565593ff2b5d9e90f8e6e80e5d9831d Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Sat, 15 Dec 2018 15:57:33 -0600 Subject: cpu/intel/common: decouple IA32_FEATURE_CONTROL lock from set_vmx() Newer CPUs/SoCs need to configure other features via the IA32_FEATURE_CONTROL msr, such as SGX, which cannot be done if the msr is already locked. Create separate functions for setting the vmx flag and lock bit, and rename existing function to indicate that the lock bit will be set in addition to vmx flag (per Kconfig). This will allow Skylake/Kabylake (and others?) to use the common VMX code without breaking SGX, while ensuring no change in functionality to existing platforms which current set both together. Test: build/boot each affected platform, ensure no change in functionality Change-Id: Iee772fe87306b4729ca012cef8640d3858e2cb06 Signed-off-by: Matt DeVillier Reviewed-on: https://review.coreboot.org/c/30229 Reviewed-by: Nico Huber Reviewed-by: David Guckian Tested-by: build bot (Jenkins) --- src/cpu/intel/common/Kconfig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/cpu/intel/common/Kconfig') diff --git a/src/cpu/intel/common/Kconfig b/src/cpu/intel/common/Kconfig index 739333e4aa..56bed22a1a 100644 --- a/src/cpu/intel/common/Kconfig +++ b/src/cpu/intel/common/Kconfig @@ -7,9 +7,8 @@ config ENABLE_VMX bool "Enable VMX for virtualization" default y -config SET_VMX_LOCK_BIT - bool "Set lock bit after configuring VMX" - depends on ENABLE_VMX +config SET_IA32_FC_LOCK_BIT + bool "Set IA32_FEATURE_CONTROL lock bit" default y help Although the Intel manual says you must set the lock bit in addition -- cgit v1.2.3