Re: [PATCH 13/13] KVM: x86/mmu: Tear down roots in fast invalidation thread

From: Paolo Bonzini
Date: Thu Apr 01 2021 - 06:38:16 EST


On 31/03/21 23:08, Ben Gardon wrote:
+/*
+ * Since kvm_tdp_mmu_invalidate_roots has acquired a reference to each
+ * invalidated root, they will not be freed until this function drops the
+ * reference. Before dropping that reference, tear down the paging
+ * structure so that whichever thread does drop the last reference
+ * only has to do a trivial ammount of work. Since the roots are invalid,
+ * no new SPTEs should be created under them.
+ */
+void kvm_tdp_mmu_zap_all_fast(struct kvm *kvm)

Please rename this to kvm_tdp_mmu_zap_invalidated_roots.

Paolo