Skip to content

KVM: x86/mmu: Bug fixes and cleanups in get_mmio_spte()

Sean Christopherson kvm lkml 1 version Applied

Status from this message: Queued, thanks (and thanks for Ccing stable on the first two already :)).

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 8 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/4KVM: x86/mmu: Use -1 to flag an undefined spte in get_mmio_spte()arch/x86/kvm/mmu/mmu.c arch/x86/kvm/mmu/tdp_mmu.c+7 -22 replies
2/4KVM: x86/mmu: Get root level from walkers when retrieving MMIO SPTEarch/x86/kvm/mmu/mmu.c arch/x86/kvm/mmu/tdp_mmu.c arch/x86/kvm/mmu/tdp_mmu.h+13 -113 replies
3/4KVM: x86/mmu: Use raw level to index into MMIO walks' sptes arrayarch/x86/kvm/mmu/mmu.c arch/x86/kvm/mmu/tdp_mmu.c+8 -91 reply
4/4KVM: x86/mmu: Optimize not-present/MMIO SPTE check in get_mmio_spte()arch/x86/kvm/mmu/mmu.c+13 -71 reply

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchVitaly Kuznetsov
1/4
2/4R-b
3/4R-b
4/4R-b

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/4] KVM: x86/mmu: Bug fixes and cleanups in get_mmio_spte()

Two fixes for bugs that were introduced along with the TDP MMU (though I strongly suspect only the one reported by Richard, fixed in patch 2/4, is hittable in practice). Two additional cleanup on top to try and make the code a bit more readable and shave a few cycles.

Sean Christopherson (4):
KVM: x86/mmu: Use -1 to flag an undefined spte in get_mmio_spte()
KVM: x86/mmu: Get root level from walkers when retrieving MMIO SPTE
KVM: x86/mmu: Use raw level to index into MMIO walks' sptes array
KVM: x86/mmu: Optimize not-present/MMIO SPTE check in get_mmio_spte()

 arch/x86/kvm/mmu/mmu.c     | 53 +++++++++++++++++++++-----------------
 arch/x86/kvm/mmu/tdp_mmu.c |  9 ++++---
 arch/x86/kvm/mmu/tdp_mmu.h |  4 ++-
 3 files changed, 39 insertions(+), 27 deletions(-)
Signature · 1 line
2.29.2.684.gfbc64c5ab5-goog