linux: enable X86_SGX and X86_SGX_KVM on x86

Enable Intel Software Guard eXtensions (SGX) on x86 when using Linux
5.11.0 or later. Also enable KVM guests to create SGX enclaves if
running Linux 5.13.0 or later.
This commit is contained in:
Vincent Haupert
2021-11-29 08:03:26 +01:00
parent f4c450e862
commit 1f65b4c416
@@ -473,6 +473,11 @@ let
# Detect buffer overflows on the stack
CC_STACKPROTECTOR_REGULAR = {optional = true; tristate = whenOlder "4.18" "y";};
} // optionalAttrs stdenv.hostPlatform.isx86 {
# Enable Intel SGX
X86_SGX = whenAtLeast "5.11" yes;
# Allow KVM guests to load SGX enclaves
X86_SGX_KVM = whenAtLeast "5.13" yes;
};
microcode = {