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]

 



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.




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux