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

Re: [PATCH 02/10] xen/arm: ffa: Rework feature discovery


  • To: Julien Grall <julien@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Thu, 26 Sep 2024 06:52:02 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • 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=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=hZoBumWpKVDl3CP8hE2LKUBjGpYx59LLCGVSa9l2xns=; b=LraaEICq6u5Bjt2UfSFAs8kzqKzM59M1YzDe/2b/+fqDPriSn1IvM+37gfe8KgXhHgCwkJaxRRQI+UpNoFPNPGv7hnz7jYkJGwo4PNgnB9BSc64iMh4Z/DBtFlhpySuPVJ+gVIr1Eis75sqnhBTuYd7fdwOwa+//KwfwMpjrBu98Eyok/sk+XPYbBUI+klG1mO1+FkPjY6mUHZ/bXSdD0ncysHzNCR8YJ8Giheji3TW7vTnwBG6qwTnBc53X+WFJFDpIssLSFsAZRWVDP1u5ileut+3iV7hvOGW7kOSjxb5VYvfLF18sdgjG5/6DE8OJIP03vF6yK0ps2Mg86+XJnQ==
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=hZoBumWpKVDl3CP8hE2LKUBjGpYx59LLCGVSa9l2xns=; b=VBcJXbOY7ccVd0RZSgXTrM+aBTCAOsK1MRXG8i8LcZOqFAul48NrsDJnTOY9K+4tIzDk15IhivJ19uM+oHZoPBF6gizLJJYYDXJRJC4snr3kLXfqDQjxlXhPrXVXNzxW/pdkvoQvys92zagijr9R4Z7RI6K9OiDxvfwTwig75V50pgwuTYrTn4GbLn0fr4aCZ5BSaMq+h+ty0wURSWhIZBhGudrnMp2PtkbMc63v6GA4IT8HDzIshnVJ/9+0zBemm6jelyC8C8zId469mT/ehYxF4dVdsauGwz3t36iD3UwGo97Ps9OYDaWCRpN/CIvK48ANlA+fgGETKS+uNLc2NQ==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=tXuVr/YWGAXcI2FqufdxGKeEdc4SNdiK3fMdFX96bW1IvRR80pfVW7FjUEMtLJCbL7miogX47T2JpoTN5vK7YsmTlDX2cCgK8OFZOA63kLXsYhuRggIfwGA6zczjjd5yTY+r9Qr/pZJO+bToK2ND26/FXgjpA6zZyOPz2a+kSZm01sobCYAAfTDkp5tUyU9beswQvpyYlOVKoEWnd9SADf4u1TJ/lPdFThoGavUG8Nby4SKUn6xwjE7CpjLfYWmaZLLtnb7wJ5jXsyCEAjA0Acl/RMvLbCoeLN9ce232XKBYe2YAGRLiftpdkMWpA3AuFDXMzMxFOv5ObXQdbhMwZg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rrftyxBPjTMU1PdLDky5RwDUikyhewPOJm/nq21GPRNCV3fOgUvJAAApv/wFKL7MSCOh0IJ0csmllFgjQr8bbTxxWbImPI7XVrvq6Sn9IXnNbckSxf+SmrMhlUE9NLKdpEg4r5xTGI8FAiGJPNjT1tynBJAMvpl6V+LTdVMKAvJ6SJ6BdWZnVO8ma7/vlxS5NtnFMd/RwQhlZ3F2E4XJGHwXLoh5cdYrshwJeoQTJtNRzo8Kj+bZvT8nz4lXLXTIfbqch4qdXDIeKxQzitjFN7BcYvoJbAFb9CdZkS2nllaMn1r0woWleW7p12neQ4YSgUGQ5hJTe0WyGDxlk834MA==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>
  • Delivery-date: Thu, 26 Sep 2024 06:52:26 +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: AQHbCo5ExIbA7l69J0+4YFeayWExYrJjiLEAgAMWSoCAAJsygIACcdgA
  • Thread-topic: [PATCH 02/10] xen/arm: ffa: Rework feature discovery

Hi Julien,

> On 24 Sep 2024, at 19:31, Julien Grall <julien@xxxxxxx> wrote:
> 
> Hi Bertrand,
> 
> On 24/09/2024 09:16, Bertrand Marquis wrote:
>>> On 22 Sep 2024, at 11:07, Julien Grall <julien@xxxxxxx> wrote:
>>> 
>>> Hi,
>>> 
>>> On 19/09/2024 14:19, Bertrand Marquis wrote:
>>>> Store the list of ABI we need in a list and go through the list instead
>>>> of having a list of conditions inside the code.
>>>> No functional change.
>>>> Signed-off-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>
>>>> ---
>>>>  xen/arch/arm/tee/ffa.c | 61 +++++++++++++++++++++---------------------
>>>>  1 file changed, 30 insertions(+), 31 deletions(-)
>>>> diff --git a/xen/arch/arm/tee/ffa.c b/xen/arch/arm/tee/ffa.c
>>>> index 7c84aa6aa43d..7ff2529b2055 100644
>>>> --- a/xen/arch/arm/tee/ffa.c
>>>> +++ b/xen/arch/arm/tee/ffa.c
>>>> @@ -74,6 +74,24 @@
>>>>  /* Negotiated FF-A version to use with the SPMC, 0 if not there or 
>>>> supported */
>>>>  static uint32_t __ro_after_init ffa_fw_version;
>>>>  +/* List of ABI we use from the firmware */
>>>> +static const uint32_t ffa_fw_feat_needed[] = {
>>>> +    FFA_VERSION,
>>>> +    FFA_FEATURES,
>>>> +    FFA_NOTIFICATION_BITMAP_CREATE,
>>>> +    FFA_NOTIFICATION_BITMAP_DESTROY,
>>>> +    FFA_PARTITION_INFO_GET,
>>>> +    FFA_NOTIFICATION_INFO_GET_64,
>>>> +    FFA_NOTIFICATION_GET,
>>>> +    FFA_RX_RELEASE,
>>>> +    FFA_RXTX_MAP_64,
>>>> +    FFA_RXTX_UNMAP,
>>>> +    FFA_MEM_SHARE_32,
>>>> +    FFA_MEM_SHARE_64,
>>>> +    FFA_MEM_RECLAIM,
>>>> +    FFA_MSG_SEND_DIRECT_REQ_32,
>>>> +    FFA_MSG_SEND_DIRECT_REQ_64,
>>>> +};
>>> 
>>> NIT: As we are creating an array, could be take the opportunity to provide 
>>> a name for each feature (we could use macro for that)? This would make 
>>> easier for the user to know which feature is missing.
>> In fact those are not "features" per say but ABI we need to use with the 
>> firmware so maybe i should first rename the variable to say abi instead of 
>> feat.
> 
> Thanks for the clarification! With that in mind...
> 
>> Now we could create some features out of those as in practice several ABIs 
>> are needed to be able to use one feature (for example notifications support 
>> require the INFO_GET and the GET).
>> In your mind you wanted to have something like:
>> "Version", FFA_VERSION
>> "Direct Messages", FFA_MSG_SEND_DIRECT_REQ_32,
>> "Direct Messages", FFA_MSG_SEND_DIRECT_REQ_64
>> So that we could print a more meaningfull name or would you be ok with just 
>> printing "FFA_MSG_SEND_DIRECT_REQ_32" ?
> 
> ... I was more thinking about printing which ABI is missing. This is more 
> helpful to the user than knowning which features will be missing.
> 
> This has also the advantage that we can use macro to generate the names.

Ok then i will build a table of strings of the ABI names and use that to say 
what ABI is not supported when there is one.

Cheers
Bertrand

> 
> Cheers,
> 
> -- 
> Julien Grall
> 




 


Rackspace

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