This series changes the tdp_mmu module parameter to read-only so that the TDP MMU can be tracked in a global variable instead of per-VM state. Then it splits out a separate page fault handler for the TDP MMU and makes some clean ups along the way. v2: - Make tdp_mmu read-only instead of deleting it entirely [Paolo] - Fix 32-bit compilation failures [kernel test robot] v1: https://lore.kernel.org/kvm/20220815230110.2266741-1-dmatlack@xxxxxxxxxx/ Cc: Kai Huang <kai.huang@xxxxxxxxx> Cc: Peter Xu <peterx@xxxxxxxxxx> David Matlack (10): KVM: x86/mmu: Change tdp_mmu to a read-only parameter KVM: x86/mmu: Move TDP MMU VM init/uninit behind tdp_mmu_enabled KVM: x86/mmu: Grab mmu_invalidate_seq in kvm_faultin_pfn() 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: Handle no-slot faults in kvm_faultin_pfn() KVM: x86/mmu: Initialize fault.{gfn,slot} earlier for direct MMUs KVM: x86/mmu: Split out TDP MMU page fault handling KVM: x86/mmu: Stop needlessly making MMU pages available for TDP MMU faults KVM: x86/mmu: Rename __direct_map() to direct_map() arch/x86/include/asm/kvm_host.h | 9 -- arch/x86/kvm/mmu.h | 11 +- arch/x86/kvm/mmu/mmu.c | 241 ++++++++++++++++++++------------ arch/x86/kvm/mmu/mmu_internal.h | 8 +- arch/x86/kvm/mmu/paging_tmpl.h | 12 +- arch/x86/kvm/mmu/tdp_mmu.c | 11 -- arch/x86/kvm/mmu/tdp_mmu.h | 7 +- 7 files changed, 170 insertions(+), 129 deletions(-) base-commit: 372d07084593dc7a399bf9bee815711b1fb1bcf2 prerequisite-patch-id: 2e3661ba8856c29b769499bac525b6943d9284b8 -- 2.37.2.672.g94769d06f0-goog