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

RE: [XEN PATCH v8 08/22] xen/arm: ffa: add support for FFA_ID_GET


  • To: Julien Grall <julien@xxxxxxx>, Jens Wiklander <jens.wiklander@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Thu, 13 Apr 2023 12:40:13 +0000
  • Accept-language: zh-CN, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5ka1TPzcvs3wzjFmSld0UHQItCpr3ZxdcmEzmyQ6RIU=; b=gWsAIRSljjuDWRKXkXOPth0oM3/gqNAaiJ3+UT9/1AV7fth6fHXdP9CjV9OQlfcKytPO6yxe3swIW0otfXgchlC53VdLOvRUAYxT+4W4IVth/XpE4DeyJOUlUaBKBaCLTrtHdbD2AVYV/P3VlyRNEgo/D1QE3hZQCyHbiYJjQZQUzDeMYXrwUzozs7+cK6j+q5Tjtqf8H9Jrz5OuXdBAlvfFIaxHy7/YT/GlRtG070usl1PoNUxunH9xUZ+qf+Rx6hTl0WBMY3xeHXrNlrl8ux+Ek83lFg9G9oCT6I/OWUETg0EOtL6Fx6gS42qyVnK+jRgmB1y8IFkZvpsTKOH6oA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FG9y0t9VkxUd3tv0sx4/MJVTUQw03TJKIEtymlJ3QCeLLMdVLe9XrlLv23iGaXE/wVpXeeFYlZP4iL79fFbC8IYZxF7SpUtirmHX2cSTxgdiilOQhDxSe/b5MFVnk31JiYaXSA5aheS0FIc/MnHUii5GnX0ojL7xJY+GGASl1vVEKMHDfmj6zACPqHP+spJr551hEsc3UTfaf48TAfMfld/bOTGyj7MBfMaXa7qKWjnrgIhu4lRbezN7HFqWXPSLixilkJMJvyKV5IgS1nvZUYVeWdHQz+sqZLitUKh6j7bkzPl7/e7plCzVw0hBtXXjzRaUIa8+H/3PBZcGkQUxvg==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Marc Bonnici <Marc.Bonnici@xxxxxxx>, Achin Gupta <Achin.Gupta@xxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Thu, 13 Apr 2023 12:40:40 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHZbdfdlkWasQb0b0OUu0VnJOxcoK8pEVxwgAAcEICAAABzkA==
  • Thread-topic: [XEN PATCH v8 08/22] xen/arm: ffa: add support for FFA_ID_GET

Hi Julien,

> -----Original Message-----
> From: Julien Grall <julien@xxxxxxx>
> 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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.