[PATCH v4 0/9] KVM: TDX: Enable VM-DoS Prevention Features for TDX
Xiaoyao Li <[email protected]>
| Newsgroups | dev.linux.lists.linux-coco,org.kernel.vger.kvm,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Hi all, This is v4 of the series to enable the Notify VM Exit and Bus Lock VM exit for TDX, which fixes the KVM CAP issue related with them and allow userspace to actually enable the features. Compared to v3, this v4 adds 5 more patches. The first 8 patches target for stable kernels while only the patch 9 doesn't have to. Patch 1 is a single patch to enable Notify VM exit for TDX. Except patch 6, patch 2-7 are mandatory for enabling Bus Lock VM exit for TDX in patch 8. Patch 6 itself is a fix for VMX and is OK for cc stable though maybe not necessary. Patch 6 is added to this series since it can help stop Sashiko repeating its finding of VMX's pre-existing issue, and it's also necessary for patch 9 to consilidate the exit handler for VMX and TDX. There are other issues of existing code found during previous review, like the EPT MISCONFIG handling. Given they are not mandatory for enabling the Notify VM exit and Bus Lock VM exit for TDX, the plan is to address them in a follow-up series separately. Please refer to v1 for a full background. v3: https://lore.kernel.org/all/[email protected]/ v2: https://lore.kernel.org/all/[email protected]/ v1: https://lore.kernel.org/all/[email protected]/ Xiaoyao Li (9): KVM: TDX: Enable Notify VM exit KVM: TDX: Check if there is valid exit infos based on vp_enter_ret KVM: TDX: Set bits 31:16 to 0 for the synthesized Exit Reason KVM: TDX: Don't assume exit_reason[31:16] is all-0 in tdx_to_vmx_exit_reason() KVM: TDX: Update exit_reason on wait_for_sept_zap return KVM: VMX: Preserve negative return value in vmx_handle_exit() with bus lock detected KVM: VMX: Make handle_bus_lock_vmexit() a shared helper KVM: TDX: Enable Bus Lock VM exit KVM: VMX: Consolidate the exit handler for VMX and TDX arch/x86/kvm/vmx/common.h | 20 ++++++++++ arch/x86/kvm/vmx/main.c | 49 ++++++++++++++++++----- arch/x86/kvm/vmx/tdx.c | 82 ++++++++++++++++++++++++++++++--------- arch/x86/kvm/vmx/vmx.c | 46 ++-------------------- 4 files changed, 126 insertions(+), 71 deletions(-) base-commit: 1b731e5ded480bd1e5546aed35584238661ce72e -- 2.43.0