Hi Jens, > -----Original Message----- > Subject: [XEN PATCH v8 08/22] xen/arm: ffa: add support for FFA_ID_GET > > Adds support for the FF-A function FFA_ID_GET to return the ID of the > calling client. > > Signed-off-by: Jens Wiklander <jens.wiklan...@linaro.org> > --- > xen/arch/arm/tee/ffa.c | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) > > diff --git a/xen/arch/arm/tee/ffa.c b/xen/arch/arm/tee/ffa.c > index 90ed71cbfda3..f129879c5b81 100644 > --- a/xen/arch/arm/tee/ffa.c > +++ b/xen/arch/arm/tee/ffa.c > @@ -181,6 +181,12 @@ static bool ffa_get_version(uint32_t *vers) > return true; > } > > +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. Kind regards, Henry