+109
−0
+10
−0
+13
−0
+43
−5
+1
−0
Loading
Merge Pull Request from: @hanliyang Some enhancement and bugfixes for HYGON CSV/CSV2 issue: https://gitee.com/open_euler/dashboard?issue_id=I98WPG CPUID 0x8000_001f_EDX tells us the minimum ASID (min_csv_asid for short) that can bind to CSV guest, actually, the ASID >= min_csv_asid can also bind to CSV2 guest. ``` KVM: SVM: Fix the available ASID range for CSV2 guest ``` When #VC comes from user space, the #VC handler doesn't switch to atomic context. When #PF is happened in #VC handler, more #VC exception may be triggered in #PF handling path which will cause CSV2 guest to crash. In order to prevent this to occur, we should keep #VC handling in atomic context if the #VC comes from user space. ``` x86/csv2: Keep in atomic context when holding ghcb page if the #VC comes from userspace ``` When CSV2 guest invoke hypercall to sync page enc/dec status to KVM/VMM, KVM should use is_64_bit_hypercall() to determine whether the guest's vCPU is in 64-bit mode. ``` KVM: x86: Calls is_64_bit_hypercall() instead of is_64_bit_mode() in complete_hypercall_exit() ``` In the CSV guest, the .bss..decrypted section of linux will be mapping decrypted at early boot stage, but ovmf or decompression kernel may mapping address range correspond to .bss..decrypted section as encrypted, the guest kernel may crash if don't flush the caches for .bss..decrypted section before using it. ``` x86/head/64: Flush caches for .bss..decrypted section after CR3 switches to early_top_pgt ``` Apply this patch to avoid unexpected nesting #VC when rd/wr MSR_IA32_XSS in the guest. ``` KVM: SEV: Do not intercept accesses to MSR_IA32_XSS for SEV-ES guests ``` Fix the return value when return emulated MSRs info to user space. ``` KVM: x86: Fix KVM_GET_MSRS stack info leak ``` Currently, the KVM can not ensure mapping and unmapping on GHCB pages keep in pair, if we kill the Qemu process accidentally, the GHCB pages may not be unmapped in KVM which will cause memory leak in kernel. ``` KVM: SVM: Unmap ghcb pages if they're still mapped when destroy guest ``` Link:https://gitee.com/openeuler/kernel/pulls/5261 Reviewed-by:Kevin Zhu <zhukeqian1@huawei.com> Signed-off-by:
Zhang Peng <zhangpeng362@huawei.com>