Skip to content

Commit 7efb4d8

Browse files
kaihuangsean-jc
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
1 parent 2ab637d commit 7efb4d8

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
@@ -7963,6 +7963,7 @@ static __init void vmx_set_cpu_caps(void)
79637963
kvm_cpu_cap_clear(X86_FEATURE_SGX_LC);
79647964
kvm_cpu_cap_clear(X86_FEATURE_SGX1);
79657965
kvm_cpu_cap_clear(X86_FEATURE_SGX2);
7966+
kvm_cpu_cap_clear(X86_FEATURE_SGX_EDECCSSA);
79667967
}
79677968

79687969
if (vmx_umip_emulated())

0 commit comments

Comments
 (0)