Bug 11597 - [Anolis23.2][RC1][HYGON]Fix failures on Hygon CSV2/CSV3 guest when boot or live migrate these guests
Summary: [Anolis23.2][RC1][HYGON]Fix failures on Hygon CSV2/CSV3 guest when boot or li...
Status: RESOLVED FIXED
Alias: None
Product: ANCK 6.6 Dev
Classification: ANCK
Component: X86 (show other bugs) X86
Version: 6.6.25-2.2
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: Guanjun
QA Contact: shuming
URL:
Whiteboard:
Keywords: Function
Depends on:
Blocks:
 
Reported: 2024-11-01 12:36 UTC by wojiaohanliyang
Modified: 2024-11-27 14:03 UTC (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wojiaohanliyang hygon_group 2024-11-01 12:36:40 UTC
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:
Comment 1 小龙 admin 2024-11-01 12:53:43 UTC
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/4056
Comment 2 banye97 alibaba_cloud_group 2024-11-27 14:03:18 UTC
已pick 至 6.6.25-002.2_rc2 中