lkml.org 
[lkml]   [2021]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 6/6] KVM: x86/mmu: Lazily allocate memslot rmaps
From
Date
On 28/04/21 00:36, Ben Gardon wrote:
> -static int kvm_alloc_memslot_metadata(struct kvm_memory_slot *slot,
> +static int kvm_alloc_memslot_metadata(struct kvm *kvm,
> + struct kvm_memory_slot *slot,
> unsigned long npages)
> {
> int i;
> @@ -10892,7 +10950,7 @@ static int kvm_alloc_memslot_metadata(struct kvm_memory_slot *slot,
> */
> memset(&slot->arch, 0, sizeof(slot->arch));
>
> - r = alloc_memslot_rmap(slot, npages);
> + r = alloc_memslot_rmap(kvm, slot, npages);
> if (r)
> return r;
>

I wonder why you need alloc_memslot_rmap at all here in
kvm_alloc_memslot_metadata, or alternatively why you need to do it in
kvm_arch_assign_memslots. It seems like only one of those would be
necessary.

Paolo

\
 
 \ /
  Last update: 2021-04-28 12:04    [W:0.150 / U:0.748 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site