Skip to content

KVM: x86/mmu: Always enable the TDP MMU when TDP is enabled

David Matlack kvm linux-mm llvm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9KVM: x86/mmu: Always enable the TDP MMU when TDP is enabledDocumentation/admin-guide/kernel-parameters.txt arch/x86/kvm/mmu/tdp_mmu.c+3 -54 replies
2/9KVM: x86/mmu: Drop kvm->arch.tdp_mmu_enabledarch/x86/include/asm/kvm_host.h arch/x86/kvm/mmu.h arch/x86/kvm/mmu/mmu.c +1 more+19 -360 replies
3/9KVM: x86/mmu: Consolidate mmu_seq calculations in kvm_faultin_pfn()arch/x86/kvm/mmu/mmu.c arch/x86/kvm/mmu/mmu_internal.h arch/x86/kvm/mmu/paging_tmpl.h+8 -130 replies
4/9KVM: x86/mmu: Rename __direct_map() to nonpaging_map()arch/x86/kvm/mmu/mmu.c arch/x86/kvm/mmu/mmu_internal.h+8 -80 replies
5/9KVM: x86/mmu: Separate TDP and non-paging fault handlingarch/x86/kvm/mmu/mmu.c+50 -270 replies
6/9KVM: x86/mmu: Stop needlessly making MMU pages available for TDP MMU faultsarch/x86/kvm/mmu/mmu.c+0 -40 replies
7/9KVM: x86/mmu: Handle "error PFNs" in kvm_faultin_pfn()arch/x86/kvm/mmu/mmu.c+8 -70 replies
8/9KVM: x86/mmu: Avoid memslot lookup during KVM_PFN_ERR_HWPOISON handlingarch/x86/kvm/mmu/mmu.c+9 -70 replies
9/9KVM: x86/mmu: Try to handle no-slot faults during kvm_faultin_pfn()arch/x86/kvm/mmu/mmu.c arch/x86/kvm/mmu/paging_tmpl.h+27 -321 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/9] KVM: x86/mmu: Always enable the TDP MMU when TDP is enabled

Patch 1 deletes the module parameter tdp_mmu and forces KVM to always use the TDP MMU when TDP hardware support is enabled. The rest of the patches are related cleanups that follow (although the kvm_faultin_pfn() cleanups at the end are only tangentially related at best).

The TDP MMU was introduced in 5.10 and has been enabled by default since 5.15. At this point there are no known functionality gaps between the TDP MMU and the shadow MMU, and the TDP MMU uses less memory and scales better with the number of vCPUs. In other words, there is no good reason to disable the TDP MMU.

Dropping the ability to disable the TDP MMU reduces the number of possible configurations that need to be tested to validate KVM (i.e. no need to test with tdp_mmu=N), and simplifies the code.

David Matlack (9):
KVM: x86/mmu: Always enable the TDP MMU when TDP is enabled
KVM: x86/mmu: Drop kvm->arch.tdp_mmu_enabled
KVM: x86/mmu: Consolidate mmu_seq calculations in kvm_faultin_pfn()
KVM: x86/mmu: Rename __direct_map() to nonpaging_map()
KVM: x86/mmu: Separate TDP and non-paging fault handling
KVM: x86/mmu: Stop needlessly making MMU pages available for TDP MMU
faults
KVM: x86/mmu: Handle "error PFNs" in kvm_faultin_pfn()
KVM: x86/mmu: Avoid memslot lookup during KVM_PFN_ERR_HWPOISON
handling
KVM: x86/mmu: Try to handle no-slot faults during kvm_faultin_pfn()

 .../admin-guide/kernel-parameters.txt         |   3 +-
 arch/x86/include/asm/kvm_host.h               |   9 -
 arch/x86/kvm/mmu.h                            |   8 +-
 arch/x86/kvm/mmu/mmu.c                        | 197 ++++++++++--------
 arch/x86/kvm/mmu/mmu_internal.h               |   1 +
 arch/x86/kvm/mmu/paging_tmpl.h                |  10 +-
 arch/x86/kvm/mmu/tdp_mmu.c                    |   9 +-
 7 files changed, 115 insertions(+), 122 deletions(-)

base-commit: 93472b79715378a2386598d6632c654a2223267b

Signature · 1 line
2.37.1.595.g718a3a8f04-goog