Skip to content

KVM MMU refactoring part 2: role changes

Paolo Bonzini kvm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest25 patches 40 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/25KVM: x86/mmu: avoid indirect call for get_cr3arch/x86/kvm/mmu.h arch/x86/kvm/mmu/mmu.c arch/x86/kvm/mmu/paging_tmpl.h +1 more+20 -96 replies
2/25KVM: x86/mmu: nested EPT cannot be used in SMMarch/x86/kvm/mmu/mmu.c+5 -31 reply
3/25KVM: x86/mmu: constify uses of struct kvm_mmu_role_regsarch/x86/kvm/mmu/mmu.c+14 -111 reply
4/25KVM: x86/mmu: pull computation of kvm_mmu_role_regs to kvm_init_mmuarch/x86/kvm/mmu/mmu.c+14 -130 replies
5/25KVM: x86/mmu: rephrase unclear commentarch/x86/kvm/mmu/paging_tmpl.h+1 -11 reply
6/25KVM: nVMX/nSVM: do not monkey-patch inject_page_fault callbackarch/x86/include/asm/kvm_host.h arch/x86/kvm/mmu/mmu.c arch/x86/kvm/svm/nested.c +2 more+23 -72 replies
7/25KVM: x86/mmu: remove "bool base_only" argumentsarch/x86/kvm/mmu/mmu.c+23 -431 reply
8/25KVM: x86/mmu: split cpu_mode from mmu_rolearch/x86/include/asm/kvm_host.h arch/x86/kvm/mmu/mmu.c arch/x86/kvm/mmu/paging_tmpl.h+68 -426 replies
9/25KVM: x86/mmu: do not recompute root level from kvm_mmu_role_regsarch/x86/kvm/mmu/mmu.c+8 -151 reply
10/25KVM: x86/mmu: remove ept_ad fieldarch/x86/include/asm/kvm_host.h arch/x86/kvm/mmu/mmu.c arch/x86/kvm/mmu/paging_tmpl.h+1 -31 reply
11/25KVM: x86/mmu: remove kvm_calc_shadow_root_page_role_commonarch/x86/kvm/mmu/mmu.c+2 -194 replies
12/25KVM: x86/mmu: cleanup computation of MMU roles for two-dimensional pagingarch/x86/kvm/mmu/mmu.c+9 -324 replies
13/25KVM: x86/mmu: cleanup computation of MMU roles for shadow pagingarch/x86/kvm/mmu/mmu.c+6 -110 replies
14/25KVM: x86/mmu: store shadow EFER.NX in the MMU rolearch/x86/kvm/mmu/mmu.c+12 -110 replies
15/25KVM: x86/mmu: remove extended bits from mmu_role, rename fieldarch/x86/include/asm/kvm_host.h arch/x86/kvm/mmu/mmu.c arch/x86/kvm/mmu/paging_tmpl.h +1 more+39 -411 reply
16/25KVM: x86/mmu: rename kvm_mmu_role unionarch/x86/include/asm/kvm_host.h arch/x86/kvm/mmu/mmu.c+17 -171 reply
17/25KVM: x86/mmu: remove redundant bits from extended rolearch/x86/include/asm/kvm_host.h arch/x86/kvm/mmu/mmu.c+10 -60 replies
18/25KVM: x86/mmu: remove valid from extended rolearch/x86/include/asm/kvm_host.h arch/x86/kvm/mmu/mmu.c+4 -80 replies
19/25KVM: x86/mmu: simplify and/or inline computation of shadow MMU rolesarch/x86/kvm/mmu/mmu.c+19 -353 replies
20/25KVM: x86/mmu: pull CPU mode computation to kvm_init_mmuarch/x86/kvm/mmu/mmu.c+9 -121 reply
21/25KVM: x86/mmu: replace shadow_root_level with root_role.levelarch/x86/include/asm/kvm_host.h arch/x86/kvm/mmu.h arch/x86/kvm/mmu/mmu.c +3 more+18 -241 reply
22/25KVM: x86/mmu: replace root_level with cpu_mode.base.levelarch/x86/include/asm/kvm_host.h arch/x86/kvm/mmu/mmu.c arch/x86/kvm/mmu/paging_tmpl.h+9 -141 reply
23/25KVM: x86/mmu: replace direct_map with root_role.directarch/x86/include/asm/kvm_host.h arch/x86/kvm/mmu/mmu.c arch/x86/kvm/x86.c+18 -221 reply
24/25KVM: x86/mmu: initialize constant-value fields just oncearch/x86/include/asm/kvm_host.h arch/x86/kvm/mmu/mmu.c arch/x86/kvm/svm/nested.c +1 more+46 -382 replies
25/25KVM: x86/mmu: extract initialization of the page walking dataarch/x86/kvm/mmu/mmu.c+28 -591 reply

Reviews trailers per patch

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

PatchDavid MatlackSean Christopherson
1/25
2/25R-b R-b
3/25R-b R-b
4/25R-b
5/25
6/25
7/25R-b
8/25
9/25
10/25R-b
11/25
12/25
13/25
14/25
15/25
16/25
17/25
18/25
19/25
20/25
21/25R-b
22/25R-b
23/25R-b
24/25
25/25

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

Read the v2 thread

Cover letter [PATCH v2 00/25] KVM MMU refactoring part 2: role changes

This is the MMU root role vs. CPU mode split. While not a requirement in absolute terms for further hacking, it makes it much clearer to reason on whether the previous root is still valid.

Paolo

Paolo Bonzini (25):
KVM: x86/mmu: avoid indirect call for get_cr3
KVM: x86/mmu: nested EPT cannot be used in SMM
KVM: x86/mmu: constify uses of struct kvm_mmu_role_regs
KVM: x86/mmu: pull computation of kvm_mmu_role_regs to kvm_init_mmu
KVM: x86/mmu: rephrase unclear comment
KVM: nVMX/nSVM: do not monkey-patch inject_page_fault callback
KVM: x86/mmu: remove "bool base_only" arguments
KVM: x86/mmu: split cpu_mode from mmu_role
KVM: x86/mmu: do not recompute root level from kvm_mmu_role_regs
KVM: x86/mmu: remove ept_ad field
KVM: x86/mmu: remove kvm_calc_shadow_root_page_role_common
KVM: x86/mmu: cleanup computation of MMU roles for two-dimensional
paging
KVM: x86/mmu: cleanup computation of MMU roles for shadow paging
KVM: x86/mmu: store shadow EFER.NX in the MMU role
KVM: x86/mmu: remove extended bits from mmu_role, rename field
KVM: x86/mmu: rename kvm_mmu_role union
KVM: x86/mmu: remove redundant bits from extended role
KVM: x86/mmu: remove valid from extended role
KVM: x86/mmu: simplify and/or inline computation of shadow MMU roles
KVM: x86/mmu: pull CPU mode computation to kvm_init_mmu
KVM: x86/mmu: replace shadow_root_level with root_role.level
KVM: x86/mmu: replace root_level with cpu_mode.base.level
KVM: x86/mmu: replace direct_map with root_role.direct
KVM: x86/mmu: initialize constant-value fields just once
KVM: x86/mmu: extract initialization of the page walking data

 arch/x86/include/asm/kvm_host.h |  25 +-
 arch/x86/kvm/mmu.h              |  12 +-
 arch/x86/kvm/mmu/mmu.c          | 479 +++++++++++++-------------------
 arch/x86/kvm/mmu/paging_tmpl.h  |  16 +-
 arch/x86/kvm/mmu/tdp_mmu.c      |   4 +-
 arch/x86/kvm/svm/nested.c       |  13 +-
 arch/x86/kvm/svm/svm.c          |   2 +-
 arch/x86/kvm/vmx/nested.c       |   9 +-
 arch/x86/kvm/vmx/vmx.c          |   2 +-
 arch/x86/kvm/x86.c              |  31 ++-
 10 files changed, 260 insertions(+), 333 deletions(-)
Signature · 1 line
2.31.1