Skip to content

two KVM MMU fixes for TDX

Yan Zhao kvm lkml 2 versions – Applied

Status from this message: Applied to kvm-coco-queue, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 1 replyApplied
  2. v12 patches 4 repliesSuperseded

Changes in v2 from the cover letter

- Use kvm_check_request(KVM_REQ_VM_DEAD) to detect VM dead in patch 2. (Sean)

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/2KVM: TDX: Handle SEPT zap error due to page add error in premaparch/x86/kvm/vmx/tdx.c+45 -190 replies
2/2KVM: x86/mmu: Bail out kvm_tdp_map_page() when VM deadarch/x86/kvm/mmu/mmu.c+4 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] two KVM MMU fixes for TDX

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

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.

v2:
- Use kvm_check_request(KVM_REQ_VM_DEAD) to detect VM dead in patch 2. (Sean)

v1: https://lore.kernel.org/all/[email protected]

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(-)
Signature · 1 line
2.43.2