void kvm_mmu_invpcid_gva(struct kvm_vcpu *vcpu, gva_t gva, unsigned long pcid);
 void kvm_mmu_new_cr3(struct kvm_vcpu *vcpu, gpa_t new_cr3, bool skip_tlb_flush);
 
-void kvm_enable_tdp(void);
-void kvm_disable_tdp(void);
+void kvm_configure_mmu(bool enable_tdp);
 
 static inline gpa_t translate_gpa(struct kvm_vcpu *vcpu, gpa_t gpa, u32 access,
                                  struct x86_exception *exception)
 
 }
 EXPORT_SYMBOL_GPL(kvm_mmu_invpcid_gva);
 
-void kvm_enable_tdp(void)
+void kvm_configure_mmu(bool enable_tdp)
 {
-       tdp_enabled = true;
+       tdp_enabled = enable_tdp;
 }
-EXPORT_SYMBOL_GPL(kvm_enable_tdp);
-
-void kvm_disable_tdp(void)
-{
-       tdp_enabled = false;
-}
-EXPORT_SYMBOL_GPL(kvm_disable_tdp);
-
+EXPORT_SYMBOL_GPL(kvm_configure_mmu);
 
 /* The return value indicates if tlb flush on all vcpus is needed. */
 typedef bool (*slot_level_handler) (struct kvm *kvm, struct kvm_rmap_head *rmap_head);
 
        if (npt_enabled && !npt)
                npt_enabled = false;
 
-       if (npt_enabled)
-               kvm_enable_tdp();
-       else
-               kvm_disable_tdp();
+       kvm_configure_mmu(npt_enabled);
        pr_info("kvm: Nested Paging %sabled\n", npt_enabled ? "en" : "dis");
 
        if (nrips) {
 
                VMX_EPT_RWX_MASK, 0ull);
 
        ept_set_mmio_spte_mask();
-       kvm_enable_tdp();
 }
 
 /*
 
        if (enable_ept)
                vmx_enable_tdp();
-       else
-               kvm_disable_tdp();
+       kvm_configure_mmu(enable_ept);
 
        /*
         * Only enable PML when hardware supports PML feature, and both EPT