Description of problem: The cloud-kernel 6.6 has backported the commit 0aa6b90ef9d7 ("KVM: SVM: Add support for allowing zero SEV ASIDs"), this commit first check if the asid range to search is valid, this can work because CPUID_Fn8000_001F_EDX limit the asid that can be used for SEV-ES. For Hygon CPUs, the CPUID_Fn8000_001F_EDX only means the minimum value of the ASID that can be used for CSV, the asid in [1, CPUID_Fn8000_001F_ECX] can be used for CSV2 and CSV3. The cloud-kernel 6.6 has backported the commit b7e4be0a224f ("KVM: SEV-ES: Delegate LBR virtualization to the processor"), this commit only enable LBRV in LAUNCH_UPDATE_VMSA handler. But the LBRV must be enabled when run CSV2 or CSV3 guest, so we need explicitly enable LBRV in RECEIVE_UPDATE_VMSA,LAUNCH_ENCRYPT_VMCB,RECEIVE_ENCRYPT_CONTEXT handlers. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/4056
已pick 至 6.6.25-002.2_rc2 中