When SGX EDECCSSA support was added to KVM in commit 16a7fe3728a8 ("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: 16a7fe3728a8 ("KVM/VMX: Allow exposing EDECCSSA user leaf function to KVM guest") This is backport the commit from upstream: 7efb4d8a392a KVM: VMX: Also clear SGX EDECCSSA in KVM CPU caps when SGX is disabled Reference - Link: https://lore.kernel.org/r/20240905120837.579102-1-kai.huang@intel.com
This PR includes incremental backporting patches which mainly covers some SGX bugfix. The total patch number is 9: 7efb4d8a392a KVM: VMX: Also clear SGX EDECCSSA in KVM CPU caps when SGX is disabled 2e52ac6b8e2e x86/sgx: Add overflow check in sgx_validate_offset_length() 16a7fe3728a8 KVM/VMX: Allow exposing EDECCSSA user leaf function to KVM guest 370839c241f7 x86/sgx: Allow enclaves to use Asynchrounous Exit Notification 7b72c823ddf8 x86/sgx: Reduce delay and interference of enclave release ee56a283988d x86/sgx: Improve comments for sgx_encl_lookup/alloc_backing() 81fa6fd13b5c x86/sgx: Handle VA page allocation failure for EAUG on PF. 133e049a3f8c x86/sgx: Do not fail on incomplete sanitization on premature stop of ksgxd 5f4d1fd5b5d3 selftests/sgx: Ignore OpenSSL 3.0 deprecated functions warning
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/4509