public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] two KVM MMU fixes for TDX
@ 2025-02-17  8:55 Yan Zhao
  2025-02-17  8:56 ` [PATCH 1/2] KVM: TDX: Handle SEPT zap error due to page add error in premap Yan Zhao
  2025-02-17  8:57 ` [PATCH 2/2] KVM: x86/mmu: Bail out kvm_tdp_map_page() when VM dead Yan Zhao
  0 siblings, 2 replies; 7+ messages in thread
From: Yan Zhao @ 2025-02-17  8:55 UTC (permalink / raw)
  To: pbonzini, seanjc; +Cc: rick.p.edgecombe, linux-kernel, kvm, Yan Zhao

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(-)

-- 
2.43.2


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-02-20  1:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-17  8:55 [PATCH 0/2] two KVM MMU fixes for TDX Yan Zhao
2025-02-17  8:56 ` [PATCH 1/2] KVM: TDX: Handle SEPT zap error due to page add error in premap Yan Zhao
2025-02-17  8:57 ` [PATCH 2/2] KVM: x86/mmu: Bail out kvm_tdp_map_page() when VM dead Yan Zhao
2025-02-18 16:03   ` Sean Christopherson
2025-02-19  2:17     ` Yan Zhao
2025-02-19 14:18       ` Sean Christopherson
2025-02-20  1:50         ` Yan Zhao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox