Skip to content

Optimize page table walk

Avi Kivity kvm 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest10 patches 1 replyIn review
  2. v29 patches 11 repliesSuperseded
  3. v15 patches 15 repliesSuperseded

Changes in v3 from the cover letter

fix another boolflip pointed out by Xiao Guangrong some cosmetics

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10KVM: MMU: Push clean gpte write protection out of gpte_access()arch/x86/kvm/mmu.c arch/x86/kvm/mmu.h arch/x86/kvm/paging_tmpl.h+26 -130 replies
2/10KVM: MMU: Optimize gpte_access() slightlyarch/x86/kvm/paging_tmpl.h+1 -30 replies
3/10KVM: MMU: Move gpte_access() out of paging_tmpl.harch/x86/kvm/mmu.c arch/x86/kvm/paging_tmpl.h+15 -160 replies
4/10KVM: MMU: Update accessed and dirty bits after guest pagetable walkarch/x86/kvm/paging_tmpl.h+47 -290 replies
5/10KVM: MMU: Optimize pte permission checksarch/x86/include/asm/kvm_host.h arch/x86/kvm/mmu.c arch/x86/kvm/mmu.h +2 more+61 -360 replies
6/10KVM: MMU: Simplify walk_addr_generic() looparch/x86/kvm/paging_tmpl.h+25 -350 replies
7/10KVM: MMU: Optimize is_last_gpte()arch/x86/include/asm/kvm_host.h arch/x86/kvm/mmu.c arch/x86/kvm/mmu.h +1 more+41 -200 replies
8/10KVM: MMU: Eliminate eperm temporaryarch/x86/kvm/paging_tmpl.h+1 -40 replies
9/10KVM: MMU: Avoid access/dirty update loop if all is wellarch/x86/kvm/paging_tmpl.h+20 -60 replies
10/10KVM: MMU: Eliminate pointless temporary 'ac'arch/x86/kvm/paging_tmpl.h+1 -41 reply

Reviews trailers per patch

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

PatchXiao Guangrong
1/10R-b
2/10R-b
3/10R-b
4/10R-b
5/10R-b
6/10R-b
7/10R-b
8/10R-b
9/10R-b
10/10R-b

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

Read the v3 thread

Cover letter [PATCH v3 00/10] Optimize page table walk

The page table walk has gotten crufty over the years and is threatening to become even more crufty when SMAP is introduced. Clean it up (and optimize it) somewhat.

v3:
fix another boolflip pointed out by Xiao Guangrong some cosmetics

v2:
fix SMEP false positive by moving checks to the end of the walk fix last_pte_bitmap documentation
fix incorrect SMEP fault permission checks
introduce helper for accessing the permission bitmap

Avi Kivity (10):
KVM: MMU: Push clean gpte write protection out of gpte_access()
KVM: MMU: Optimize gpte_access() slightly
KVM: MMU: Move gpte_access() out of paging_tmpl.h
KVM: MMU: Update accessed and dirty bits after guest pagetable walk
KVM: MMU: Optimize pte permission checks
KVM: MMU: Simplify walk_addr_generic() loop
KVM: MMU: Optimize is_last_gpte()
KVM: MMU: Eliminate eperm temporary
KVM: MMU: Avoid access/dirty update loop if all is well
KVM: MMU: Eliminate pointless temporary 'ac'

 arch/x86/include/asm/kvm_host.h |  14 +++
 arch/x86/kvm/mmu.c              |  91 +++++++++++++++++++
 arch/x86/kvm/mmu.h              |  25 +++---
 arch/x86/kvm/paging_tmpl.h      | 191 +++++++++++++++++-----------------------
 arch/x86/kvm/x86.c              |  11 +--
 5 files changed, 202 insertions(+), 130 deletions(-)
Signature · 1 line
1.7.12