Skip to content

KVM: TDX: Syntehsize SHUTDOWN on unhandled EPT Violation

Sean Christopherson kvm linux-coco lkml 1 version Applied

Status from this message: Applied to kvm-x86 vmx. I moved the ratelimit patch first, as Yan suggested

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest3 patches 16 repliesApplied

Changes in v2 from the cover letter

- Return SHUTDOWN directly, via a new helper. [Rick]
- Ratelimit the error message. [Sashiko, (and past me, amusingly)]

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/3KVM: x86: Add a helper to prepare vcpu->run for a SHUTDOWN exit to userspacearch/x86/kvm/svm/svm.c arch/x86/kvm/vmx/tdx.c arch/x86/kvm/vmx/vmx.c +2 more+12 -81 reply
2/3KVM: TDX: Synthesize SHUTDOWN instead of returning -EIO on unhandled EPT violationarch/x86/kvm/vmx/tdx.c+2 -23 replies
3/3KVM: TDX: Ratelimit the "EPT Violation on pending acceptance page" warningarch/x86/kvm/vmx/tdx.c+2 -24 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchBinbin Wu
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/3] KVM: TDX: Syntehsize SHUTDOWN on unhandled EPT Violation

Signal SHUTDOWN instead of -EIO if the guest accesses an unaccepted page and has disabled EPT Violation #VEs on such accesses. Returning -EIO is all but guaranteed to mislead the VMM into thinking KVM (or the VMM) messed up, and will likely result in the VM being terminated instead of rebooted.

v2:
- Return SHUTDOWN directly, via a new helper. [Rick]
- Ratelimit the error message. [Sashiko, (and past me, amusingly)]

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

Sean Christopherson (3):
KVM: x86: Add a helper to prepare vcpu->run for a SHUTDOWN exit to
userspace
KVM: TDX: Synthesize SHUTDOWN instead of returning -EIO on unhandled
EPT violation
KVM: TDX: Ratelimit the "EPT Violation on pending acceptance page"
warning

 arch/x86/kvm/svm/svm.c   |  3 +--
 arch/x86/kvm/vmx/tdx.c   | 11 +++++------
 arch/x86/kvm/vmx/vmx.c   |  3 +--
 arch/x86/kvm/x86.c       |  3 +--
 include/linux/kvm_host.h |  8 ++++++++
 5 files changed, 16 insertions(+), 12 deletions(-)

base-commit: a0bc8e1d7a82bb143b8f8f44ae3a01938f37c2ea

Signature · 1 line
2.56.0.rc1.315.gc6ed9934b7-goog