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

From: Ben Gardon
Date: Mon May 03 2021 - 13:30:02 EST


On Mon, May 3, 2021 at 6:42 AM Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:
>
> On 29/04/21 23:18, Ben Gardon wrote:
> > +int alloc_memslots_rmaps(struct kvm *kvm, struct kvm_memslots *slots)
>
> This can be static, can't it?

Ah, yes. Absolutely.

>
> Paolo
>
> > +{
> > + struct kvm_memory_slot *slot;
> > + int r = 0;
> > +
> > + kvm_for_each_memslot(slot, slots) {
> > + r = alloc_memslot_rmap(kvm, slot, slot->npages);
> > + if (r)
> > + break;
> > + }
> > + return r;
> > +}
> > +
>