Skip to content

KVM: MMU: unify and cleanup the code of walking pte list

Xiao Guangrong kvm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest5 patches 3 repliesIn review

Changes in v3 from the cover letter

- address Gleb's comments, remove the remained "goto restart" in kvm_set_pte_rmapp
- improve the changelog

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5KVM: MMU: introduce mmu_spte_establisharch/x86/kvm/mmu.c arch/x86/kvm/paging_tmpl.h+48 -491 reply
2/5KVM: MMU: clarify the logic in kvm_set_pte_rmapparch/x86/kvm/mmu.c+8 -90 replies
3/5KVM: MMU: unify the code of walking pte listarch/x86/kvm/mmu.c arch/x86/kvm/mmu_audit.c+86 -970 replies
4/5KVM: MMU: fix spte assertionarch/x86/kvm/mmu.c+6 -140 replies
5/5KVM: MMU: fast drop all spte on the pte_listarch/x86/kvm/mmu.c+27 -91 reply

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchGleb Natapov
SeriesR-b
1/5
2/5
3/5
4/5
5/5

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 0/5] KVM: MMU: unify and cleanup the code of walking pte list

Current code has two ways to walk pte_list, the one is pte_list_walk and the another way is rmap_get_first and rmap_get_next, they have the same logic. This patchset tries to unify the code and also make the code more tidy.

Patch 1: KVM: MMU: introduce mmu_spte_establish, which tries to eliminates the different between walking parent pte list and rmap, prepare for the later patch.

Patch 2: KVM: MMU: clarify the logic in kvm_set_pte_rmapp, which prepares for the next patch, no logic changed.

Patch 3: KVM: MMU: unify the code of walking pte list, unify the walking code.

Patch 4: KVM: MMU: fix spte assertion, fix a minor bug and remove the duplicate code.

Patch 5: KVM: MMU: fast drop all spte on the pte_list, optimize for dropping all sptes on rmap and remove all the "goto restart" pattern introduced by the Patch 3.

Marcelo, Gleb, please apply them after applying the patchset of [PATCH v3 0/3] KVM: MMU: simple cleanups.

Changelog:
v3:
- address Gleb's comments, remove the remained "goto restart" in kvm_set_pte_rmapp
- improve the changelog

Thanks!