Re: [PATCH v3 2/2] KVM: x86/mmu: Clarify TDP MMU page list invariants

From: Paolo Bonzini
Date: Thu Jan 07 2021 - 12:34:41 EST


On 07/01/21 01:19, Ben Gardon wrote:
- /* List of struct tdp_mmu_pages being used as roots */
+ /*
+ * List of struct tdp_mmu_pages being used as roots.
^^^

s/tdp/kvm/

Queued with this change, thanks.

Paolo

+ * All struct kvm_mmu_pages in the list should have
+ * tdp_mmu_page set.
+ * All struct kvm_mmu_pages in the list should have a positive
+ * root_count except when a thread holds the MMU lock and is removing
+ * an entry from the list.
+ */
struct list_head tdp_mmu_roots;
- /* List of struct tdp_mmu_pages not being used as roots */
+
+ /*
+ * List of struct tdp_mmu_pages not being used as roots.
+ * All struct kvm_mmu_pages in the list should have
+ * tdp_mmu_page set and a root_count of 0.
+ */