RFC KVM: x86/mmu: Eager Page Splitting for the TDP MMU
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest15 patches 63 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/15 | KVM: x86/mmu: Rename rmap_write_protect to kvm_vcpu_write_protect_gfnarch/ | +3 | 2 replies | |
| 2/15 | KVM: x86/mmu: Rename __rmap_write_protect to rmap_write_protectarch/ | +6 | 2 replies | |
| 3/15 | KVM: x86/mmu: Automatically update iter->old_spte if cmpxchg failsarch/ | +18 | 2 replies | |
| 4/15 | KVM: x86/mmu: Factor out logic to atomically install a new page tablearch/ | +37 | 4 replies | |
| 5/15 | KVM: x86/mmu: Abstract mmu caches out to a separate structarch/ arch/ arch/ | +52 | 3 replies | |
| 6/15 | KVM: x86/mmu: Derive page role from parentarch/ | +23 | 6 replies | |
| 7/15 | KVM: x86/mmu: Pass in vcpu->arch.mmu_caches instead of vcpuarch/ | +7 | 1 reply | |
| 8/15 | KVM: x86/mmu: Helper method to check for large and present sptesarch/ arch/ | +6 | 3 replies | |
| 9/15 | KVM: x86/mmu: Move restore_acc_track_spte to spte.carch/ arch/ arch/ | +19 | 1 reply | |
| 10/15 | KVM: x86/mmu: Abstract need_resched logic from tdp_mmu_iter_cond_reschedarch/ | +10 | 1 reply | |
| 11/15 | KVM: x86/mmu: Refactor tdp_mmu iterators to take kvm_mmu_page rootarch/ arch/ arch/ | +14 | 1 reply | |
| 12/15 | KVM: x86/mmu: Split large pages when dirty logging is enabledarch/ arch/ arch/ +5 more | +273 | 17 replies | |
| 13/15 | KVM: x86/mmu: Split large pages during CLEAR_DIRTY_LOGarch/ arch/ | +26 | 13 replies | |
| 14/15 | KVM: x86/mmu: Add tracepoint for splitting large pagesarch/ arch/ | +22 | 0 replies | |
| 15/15 | KVM: x86/mmu: Update page stats when splitting large pagesarch/ | +6 | 2 replies |
Reviews trailers per patch
8 of 15 patches have a Reviewed-by or Acked-by.
| Patch | Ben Gardon | Peter Xu |
|---|---|---|
| 1/15 | R-b | R-b |
| 2/15 | R-b | R-b |
| 3/15 | ||
| 4/15 | ||
| 5/15 | R-b | |
| 6/15 | ||
| 7/15 | R-b | |
| 8/15 | R-b | |
| 9/15 | R-b | |
| 10/15 | R-b | |
| 11/15 | R-b | |
| 12/15 | ||
| 13/15 | ||
| 14/15 | ||
| 15/15 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RFC PATCH 00/15] KVM: x86/mmu: Eager Page Splitting for the TDP MMU
This series is a first pass at implementing Eager Page Splitting for the TDP MMU. For context on the motivation and design of Eager Page Splitting, please see the RFC design proposal and discussion [1].
Paolo, I went ahead and added splitting in both the intially-all-set case (only splitting the region passed to CLEAR_DIRTY_LOG) and the case where we are not using initially-all-set (splitting the entire memslot when dirty logging is enabled) to give you an idea of what both look like.
Note: I will be on vacation all of next week so I will not be able to respond to reviews until Monday November 29. I thought it would be useful to seed discussion and reviews with an early version of the code rather than putting it off another week. But feel free to also ignore this until I get back :)
This series compiles and passes the most basic splitting test:
$ ./dirty_log_perf_test -s anonymous_hugetlb_2mb -v 2 -i 4
But please operate under the assumption that this code is probably buggy.
[1] https://lore.kernel.org/kvm/CALzav=dV_U4r1K9oDq4esb4mpBQDQ2ROQ5zH5wV3KpOaZrRW-A@mail.gmail.com/#t
David Matlack (15):
KVM: x86/mmu: Rename rmap_write_protect to kvm_vcpu_write_protect_gfn
KVM: x86/mmu: Rename __rmap_write_protect to rmap_write_protect
KVM: x86/mmu: Automatically update iter->old_spte if cmpxchg fails
KVM: x86/mmu: Factor out logic to atomically install a new page table
KVM: x86/mmu: Abstract mmu caches out to a separate struct
KVM: x86/mmu: Derive page role from parent
KVM: x86/mmu: Pass in vcpu->arch.mmu_caches instead of vcpu
KVM: x86/mmu: Helper method to check for large and present sptes
KVM: x86/mmu: Move restore_acc_track_spte to spte.c
KVM: x86/mmu: Abstract need_resched logic from
tdp_mmu_iter_cond_resched
KVM: x86/mmu: Refactor tdp_mmu iterators to take kvm_mmu_page root
KVM: x86/mmu: Split large pages when dirty logging is enabled
KVM: x86/mmu: Split large pages during CLEAR_DIRTY_LOG
KVM: x86/mmu: Add tracepoint for splitting large pages
KVM: x86/mmu: Update page stats when splitting large pages
arch/x86/include/asm/kvm_host.h | 22 ++- arch/x86/kvm/mmu/mmu.c | 185 +++++++++++++----- arch/x86/kvm/mmu/mmu_internal.h | 3 + arch/x86/kvm/mmu/mmutrace.h | 20 ++ arch/x86/kvm/mmu/spte.c | 64 +++++++ arch/x86/kvm/mmu/spte.h | 7 + arch/x86/kvm/mmu/tdp_iter.c | 5 +- arch/x86/kvm/mmu/tdp_iter.h | 10 +- arch/x86/kvm/mmu/tdp_mmu.c | 322 +++++++++++++++++++++++--------- arch/x86/kvm/mmu/tdp_mmu.h | 5 + arch/x86/kvm/x86.c | 6 + 11 files changed, 501 insertions(+), 148 deletions(-)
Signature · 1 line
2.34.0.rc2.393.gf8c9666880-goog