Skip to content

KVM: x86/mmu: Page fault handling cleanups

Sean Christopherson kvm lkml 1 version Applied

Status from this message: Queued, thanks. Looking at the KVM_BUG_ON now since patch 1 is somewhat

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 of 4 patches 2 repliesApplied

3 of 4 patches are in this archive. The cover letter announces 4.

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/4KVM: x86/mmu: Return -EIO if page fault returns RET_PF_INVALIDarch/x86/kvm/mmu/mmu.c+2 -10 replies
2/4KVM: x86/mmu: Invert RET_PF_* check when falling through to emulationarch/x86/kvm/mmu/mmu.c+2 -20 replies
4/4KVM: x86/mmu: Bail early from final #PF handling on spurious faultsarch/x86/kvm/mmu/mmu.c arch/x86/kvm/mmu/paging_tmpl.h+19 -10 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/4] KVM: x86/mmu: Page fault handling cleanups

Cleanups for page fault handling that were encountered during early TDX enabling, but are worthwhile on their own. Specifically, patch 4 fixes an issue where KVM doesn't detect a spurious page fault (due to the fault being fixed by a different pCPU+vCPU) and does the full gamut of writing the SPTE, updating stats, and prefetching SPTEs.

Sean Christopherson (4):
KVM: x86/mmu: Return -EIO if page fault returns RET_PF_INVALID
KVM: x86/mmu: Invert RET_PF_* check when falling through to emulation
KVM: x86/mmu: Return unique RET_PF_* values if the fault was fixed
KVM: x86/mmu: Bail early from final #PF handling on spurious faults

 arch/x86/kvm/mmu/mmu.c         | 70 +++++++++++++++++++++-------------
 arch/x86/kvm/mmu/mmutrace.h    | 13 +++----
 arch/x86/kvm/mmu/paging_tmpl.h |  3 ++
 3 files changed, 52 insertions(+), 34 deletions(-)
Signature · 1 line
2.28.0