Skip to content

Commit 0291c94

Browse files
kaihuangAvenger-285714
authored andcommitted
KVM: VMX: Also clear SGX EDECCSSA in KVM CPU caps when SGX is disabled
Upstream commit 7efb4d8a392a18e37fcdb5e77c111af6e9a9e2f2 Conflict: none 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. Intel-SIG: commit 7efb4d8a392a KVM: VMX: Also clear SGX EDECCSSA in KVM CPU caps when SGX is disabled Backport a SGX bug fix from upstream. 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]> [ Zhiquan Li: amend commit log ] Signed-off-by: Zhiquan Li <[email protected]>
1 parent 4af8278 commit 0291c94

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/x86/kvm/vmx/vmx.c

+1
Original file line numberDiff line numberDiff line change
@@ -7987,6 +7987,7 @@ static __init void vmx_set_cpu_caps(void)
79877987
kvm_cpu_cap_clear(X86_FEATURE_SGX_LC);
79887988
kvm_cpu_cap_clear(X86_FEATURE_SGX1);
79897989
kvm_cpu_cap_clear(X86_FEATURE_SGX2);
7990+
kvm_cpu_cap_clear(X86_FEATURE_SGX_EDECCSSA);
79907991
}
79917992

79927993
if (vmx_umip_emulated())

0 commit comments

Comments
 (0)