Re: [PATCH v2 7/7] KVM: x86/mmu: Lazily allocate memslot rmaps

From: Paolo Bonzini
Date: Tue May 04 2021 - 16:23:06 EST


On 29/04/21 23:18, Ben Gardon wrote:
+ /*
+ * If set, the rmap should be allocated for any newly created or
+ * modified memslots. If allocating rmaps lazily, this may be set
+ * before the rmaps are allocated for existing memslots, but
+ * shadow_mmu_active will not be set until after the rmaps are fully
+ * allocated.
+ */
+ bool alloc_memslot_rmaps;

Let's remove the whole sentence starting with "If allocating rmaps lazily". The part about shadow_mmu_active should go there, while the rest is pointless as long as we just say that this flag will be accessed only under slots_arch_lock.

(Regarding shadow_mmu_active, I think I know what Sean will be suggesting because I had a similar thought and decided it introduced extra unnecessary complication... but maybe not, so let's see what he says).

Paolo