Skip to content

KVM: x86/mmu: Don't zap "direct" non-leaf SPTEs on memslot removal

Sean Christopherson kvm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3KVM: x86/mmu: Zap only SPs that shadow gPTEs when deleting memslotarch/x86/kvm/mmu/mmu.c+6 -101 reply
2/3KVM: x86/mmu: Add lockdep assert to enforce safe usage of kvm_unmap_gfn_range()arch/x86/kvm/mmu/mmu.c+10 -04 replies
3/3KVM: x86: Clean up documentation for KVM_X86_QUIRK_SLOT_ZAP_ALLDocumentation/virt/kvm/api.rst+9 -70 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchYan Zhao
1/3R-b T-b
2/3
3/3

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

Read the v1 thread

Cover letter [PATCH 0/3] KVM: x86/mmu: Don't zap "direct" non-leaf SPTEs on memslot removal

When doing a targeted zap during memslot removal (DELETE or MOVE) zap only leaf SPTEs and non-leaf SPTEs with gPTEs, as zapping non-leaf SPTEs without gPTEs is unnecessary and weird because sp->gfn for such SPTEs is rounded, i.e. night tightly coupled to the memslot.

Massage the related documentation so that KVM doesn't get stuck maintaining undesirable ABI (again), and opportunistically add a lockdep assertion in kvm_unmap_gfn_range() (largely because I keep forgetting that memslot updates are special).

Sean Christopherson (3):
KVM: x86/mmu: Zap only SPs that shadow gPTEs when deleting memslot
KVM: x86/mmu: Add lockdep assert to enforce safe usage of
kvm_unmap_gfn_range()
KVM: x86: Clean up documentation for KVM_X86_QUIRK_SLOT_ZAP_ALL

 Documentation/virt/kvm/api.rst | 16 +++++++++-------
 arch/x86/kvm/mmu/mmu.c         | 26 ++++++++++++++++----------
 2 files changed, 25 insertions(+), 17 deletions(-)

base-commit: 8cf0b93919e13d1e8d4466eb4080a4c4d9d66d7b

Signature · 1 line
2.47.0.rc1.288.g06298d1525-goog