Re: [PATCH v1 1/2] KVM: s390: selftests: add selftest for CMMA migration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 24 Mar 2023 14:31:15 +0100
Nico Boehr <nrb@xxxxxxxxxxxxx> wrote:

> Quoting Claudio Imbrenda (2023-03-23 15:36:44)
> > > diff --git a/tools/testing/selftests/kvm/s390x/cmma_test.c b/tools/testing/selftests/kvm/s390x/cmma_test.c
> > > new file mode 100644
> > > index 000000000000..76751abf2331
> > > --- /dev/null
> > > +++ b/tools/testing/selftests/kvm/s390x/cmma_test.c  
> [...]
> > > +static void create_main_memslot(struct kvm_vm *vm)
> > > +{
> > > +     int i;
> > > +
> > > +     vm_userspace_mem_region_add(vm, VM_MEM_SRC_ANONYMOUS, 0, 0, MAIN_PAGE_COUNT, 0);
> > > +     for (i = 0; i < NR_MEM_REGIONS; i++)
> > > +             vm->memslots[i] = 0;  
> > 
> > can you explain why you are zeroing all memslots?  
> 
> I think it's not all memslots, this array only contains IDs of some memslots.  I think the IDs are set to 0 to indicate "this slot is unused".
> 
> I did this here, because that's what __vm_create does. Since I can't use __vm_create (I want my custom memslots), I have to use ____vm_create and I thought it's good to just do the same thing here.

can you please add a comment to explain this



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux