mbox series

[0/2] two KVM MMU fixes for TDX

Message ID 20250217085535.19614-1-yan.y.zhao@intel.com (mailing list archive)
Headers show
Series two KVM MMU fixes for TDX | expand

Message

Yan Zhao Feb. 17, 2025, 8:55 a.m. UTC
Hi, 

There are two fixes to KVM MMU for TDX in response to two hypothetically
triggered errors:
(1) errors in tdh_mem_page_add(),
(2) fatal errors in tdh_mem_sept_add()/tdh_mem_page_aug().

Patch 1 handles the error in SEPT zap resulting from error (1).
Patch 2 fixes a possible stuck in the kernel loop introduced by error (2).
(A similar fix in SEPT SEAMCALL local retry is also required if the fix in
patch 2 looks good to you).

The two errors are not observed in any real workloads yet.
The series is tested by faking the error in the SEAMCALL wrapper while
bypassing the real SEAMCALLs.

Thanks
Yan

Yan Zhao (2):
  KVM: TDX: Handle SEPT zap error due to page add error in premap
  KVM: x86/mmu: Bail out kvm_tdp_map_page() when VM dead

 arch/x86/kvm/mmu/mmu.c |  4 +++
 arch/x86/kvm/vmx/tdx.c | 64 +++++++++++++++++++++++++++++-------------
 2 files changed, 49 insertions(+), 19 deletions(-)