Skip to content

Commit b49c65c

Browse files
committed
KVM: VMX: Also clear SGX EDECCSSA in KVM CPU caps when SGX is disabled
JIRA: https://issues.redhat.com/browse/RHEL-22826 Upstream Status: merged into the linux.git commit 7efb4d8 Author: Kai Huang <kai.huang@intel.com> Date: Fri Sep 6 00:08:37 2024 +1200 KVM: VMX: Also clear SGX EDECCSSA in KVM CPU caps when SGX is disabled When SGX EDECCSSA support was added to KVM in commit 16a7fe3 ("KVM/VMX: Allow exposing EDECCSSA user leaf function to KVM guest"), it forgot to clear the X86_FEATURE_SGX_EDECCSSA bit in KVM CPU caps when KVM SGX is disabled. Fix it. Fixes: 16a7fe3 ("KVM/VMX: Allow exposing EDECCSSA user leaf function to KVM guest") Signed-off-by: Kai Huang <kai.huang@intel.com> Link: https://lore.kernel.org/r/20240905120837.579102-1-kai.huang@intel.com Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Vladis Dronov <vdronov@redhat.com>
1 parent aeb09f6 commit b49c65c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/x86/kvm/vmx/vmx.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7999,6 +7999,7 @@ static __init void vmx_set_cpu_caps(void)
79997999
kvm_cpu_cap_clear(X86_FEATURE_SGX_LC);
80008000
kvm_cpu_cap_clear(X86_FEATURE_SGX1);
80018001
kvm_cpu_cap_clear(X86_FEATURE_SGX2);
8002+
kvm_cpu_cap_clear(X86_FEATURE_SGX_EDECCSSA);
80028003
}
80038004

80048005
if (vmx_umip_emulated())

0 commit comments

Comments
 (0)