Commit 264ada23 authored by Sean Christopherson's avatar Sean Christopherson Committed by Zheng Zengkai
Browse files

x86/cpufeatures: Add Intel SGX hardware bits

mainline inclusion
from mainline-v5.11-rc1
commit e7b6385b
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4SIGI


CVE: NA

--------------------------------

Populate X86_FEATURE_SGX feature from CPUID and tie it to the Kconfig
option with disabled-features.h.

IA32_FEATURE_CONTROL.SGX_ENABLE must be examined in addition to the CPUID
bits to enable full SGX support.  The BIOS must both set this bit and lock
IA32_FEATURE_CONTROL for SGX to be supported (Intel SDM section 36.7.1).
The setting or clearing of this bit has no impact on the CPUID bits above,
which is why it needs to be detected separately.

Intel-SIG: commit e7b6385b x86/cpufeatures: Add Intel SGX hardware bits
Backport for SGX Foundations support

Signed-off-by: default avatarSean Christopherson <sean.j.christopherson@intel.com>
Co-developed-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Acked-by: default avatarJethro Beekman <jethro@fortanix.com>
Link: https://lkml.kernel.org/r/20201112220135.165028-4-jarkko@kernel.org


Signed-off-by: Fan Du <fan.du@intel.com> #openEuler_contributor
Signed-off-by: default avatarLaibin Qiu <qiulaibin@huawei.com>
Reviewed-by: default avatarBamvor Zhang <bamvor.zhang@suse.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 57713416
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment