linux-s390.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Claudio Imbrenda <imbrenda@linux.ibm.com>
To: Nico Boehr <nrb@linux.ibm.com>
Cc: borntraeger@linux.ibm.com, frankja@linux.ibm.com,
	shuah@kernel.org, kvm@vger.kernel.org,
	linux-s390@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v1 1/2] KVM: s390: selftests: add selftest for CMMA migration
Date: Fri, 24 Mar 2023 14:58:00 +0100	[thread overview]
Message-ID: <20230324145800.6cf5b6e9@p-imbrenda> (raw)
In-Reply-To: <167966467508.41638.7406110796797557962@t14-nrb>

On Fri, 24 Mar 2023 14:31:15 +0100
Nico Boehr <nrb@linux.ibm.com> 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

  reply	other threads:[~2023-03-24 13:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-08 14:48 [PATCH v1 0/2] KVM: s390: CMMA migration selftest and small bugfix Nico Boehr
2023-02-08 14:48 ` [PATCH v1 2/2] KVM: s390: fix KVM_S390_GET_CMMA_BITS for GFNs in memslot holes Nico Boehr
2023-03-23 12:36   ` Claudio Imbrenda
2023-02-08 14:48 ` [PATCH v1 1/2] KVM: s390: selftests: add selftest for CMMA migration Nico Boehr
2023-03-23 14:36   ` Claudio Imbrenda
2023-03-24 13:31     ` Nico Boehr
2023-03-24 13:58       ` Claudio Imbrenda [this message]
2023-03-22 15:00 ` [PATCH v1 0/2] KVM: s390: CMMA migration selftest and small bugfix Nico Boehr
2023-03-22 15:06   ` Claudio Imbrenda
2023-03-23 14:38 ` Claudio Imbrenda
2023-03-24 13:32   ` Nico Boehr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230324145800.6cf5b6e9@p-imbrenda \
    --to=imbrenda@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=frankja@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=nrb@linux.ibm.com \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).