Hi Julien, > -----Original Message----- > From: Julien Grall <jul...@xen.org> > Subject: Re: [XEN PATCH v8 08/22] xen/arm: ffa: add support for FFA_ID_GET > >> +static uint16_t get_vm_id(const struct domain *d) > >> +{ > >> + /* +1 since 0 is reserved for the hypervisor in FF-A */ > >> + return d->domain_id + 1; > > > > Since here you want 0 to be reserved, I think maybe you can use > > the "d->arch.p2m.vmid"? According to the logic in p2m_alloc_vmid(), > > the "d->arch.p2m.vmid" is also a per-domain u16 value that starts > > from 1. > > I would rather not do that for a few reasons: > 1) This is assuming the P2M code is initialized first > 2) We should not rely on the VMID to be fixed. We may need to change > that if we want to run more VMs than the number of VMIDs (we may even > need multiple VMIDs per domain...).
Yeah these arguments are reasonable. Forget about my comments then. Kind regards, Henry > > Cheers, > > -- > Julien Grall