Skip to content

Simplify and fix fetch()

Avi Kivity kvm 4 versions – Applied

Status from this message: Applied, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest8 patches 2 repliesApplied
  2. v38 patches 5 repliesSuperseded
  3. v28 patches 2 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v17 patches14 repliesSuperseded

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/8KVM: MMU: Add link_shadow_page() helperarch/x86/kvm/mmu.c arch/x86/kvm/paging_tmpl.h+12 -50 replies
2/8KVM: MMU: Use __set_spte to link shadow pagesarch/x86/kvm/mmu.c+1 -10 replies
3/8KVM: MMU: Add drop_large_spte() helperarch/x86/kvm/mmu.c arch/x86/kvm/paging_tmpl.h+9 -40 replies
4/8KVM: MMU: Add validate_direct_spte() helperarch/x86/kvm/mmu.c arch/x86/kvm/paging_tmpl.h+29 -210 replies
5/8KVM: MMU: Add gpte_valid() helperarch/x86/kvm/paging_tmpl.h+17 -80 replies
6/8KVM: MMU: Simplify spte fetch() functionarch/x86/kvm/paging_tmpl.h+49 -430 replies
7/8KVM: MMU: Validate all gptes during fetch, not just those used for new pagesarch/x86/kvm/paging_tmpl.h+24 -90 replies
8/8KVM: MMU: Eliminate redundant temporaries in FNAME(fetch)arch/x86/kvm/paging_tmpl.h+24 -350 replies

Reviews trailers per patch

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

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

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

Read the v4 thread

Cover letter [PATCH v4 0/8] Simplify and fix fetch()

fetch() has become a monster, with a zillion continues, breaks, and gotos. Simplify it before Xiao adds even more.

Also fix the gpte validation race.

Avi Kivity (8):
KVM: MMU: Add link_shadow_page() helper
KVM: MMU: Use __set_spte to link shadow pages
KVM: MMU: Add drop_large_spte() helper
v2: s/drop_spte_if_large/drop_large_spte/g
KVM: MMU: Add validate_direct_spte() helper
KVM: MMU: Add gpte_changed() helper
v4: change name to gpte_changed(), move error handling back to fetch()
v2: add comments
make validate_indirect_spte() look at spte in its own level, not one below (but adjust caller so no net effect)
KVM: MMU: Simplify spte fetch() function
v2: add comments
update 'sptep' and 'level' for last level
KVM: MMU: Validate all gptes during fetch, not just those used for
new pages
v4: fix freeing of incorrect shadow page on changed gpte
v3: fix top-level gpte validation oops
v2: validate top-level gpte (in root page)
KVM: MMU: Eliminate redundant temporaries in FNAME(fetch)
v2: new patch

 arch/x86/kvm/mmu.c         |   41 ++++++++++++
 arch/x86/kvm/paging_tmpl.h |  150 ++++++++++++++++++++++----------------------
 2 files changed, 115 insertions(+), 76 deletions(-)