summaryrefslogtreecommitdiff
path: root/tools/docs/lib
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2025-08-22 15:05:23 +0800
committerSean Christopherson <seanjc@google.com>2025-09-10 12:06:35 -0700
commit2bc2694fe20bf06eb73524426e3f4581d7b28923 (patch)
tree2860cff897d4e46784ef494a274f00b3751c1d94 /tools/docs/lib
parent3ccbf6f47098f5d5e247d1b7739d0fd90802187b (diff)
KVM: TDX: Do not retry locally when the retry is caused by invalid memslot
Avoid local retries within the TDX EPT violation handler if a retry is triggered by faulting in an invalid memslot, indicating that the memslot is undergoing a removal process. Faulting in a GPA from an invalid memslot will never succeed, and holding SRCU prevents memslot deletion from succeeding, i.e. retrying when the memslot is being actively deleted will lead to (breakable) deadlock. Opportunistically export kvm_vcpu_gfn_to_memslot() to allow for a per-vCPU lookup (which, strictly speaking, is unnecessary since TDX doesn't support SMM, but aligns the TDX code with the MMU code). Fixes: b0327bb2e7e0 ("KVM: TDX: Retry locally in TDX EPT violation handler on RET_PF_RETRY") Reported-by: Reinette Chatre <reinette.chatre@intel.com> Closes: https://lore.kernel.org/all/20250519023737.30360-1-yan.y.zhao@intel.com [Yan: Wrote patch log, comment, fixed a minor error, function export] Signed-off-by: Yan Zhao <yan.y.zhao@intel.com> Link: https://lore.kernel.org/r/20250822070523.26495-1-yan.y.zhao@intel.com [sean: massage changelog, relocate and tweak comment] Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/docs/lib')
0 files changed, 0 insertions, 0 deletions