Hi Jens,

> On 3 Dec 2025, at 13:49, Jens Wiklander <[email protected]> wrote:
> 
> Hi Bertrand,
> 
> On Thu, Nov 27, 2025 at 4:52 PM Bertrand Marquis
> <[email protected]> wrote:
>> 
>> Introduce struct ffa_uuid together with nil/equality/set helpers, and
>> use it end-to-end in the partition-info plumbing.
>> 
>> The SP and VM enumeration paths now build UUIDs from the guest
>> registers, call a new ffa_copy_info() helper and ensure non-nil UUID
>> queries only return matching SP entries, relying on firmware UUID
>> filtering. VM entries are skipped because we do not track per-VM UUIDs.
>> 
>> Count requests and subscriber initialisation are updated accordingly so
>> firmware is always called with an explicit UUID. This keeps count and
>> listing requests aligned with the FF-A v1.1 rules while preserving the
>> Linux compatibility workaround for v1.2 requesters.
>> 
>> Signed-off-by: Bertrand Marquis <[email protected]>
>> ---
>> xen/arch/arm/tee/ffa_partinfo.c | 206 ++++++++++++++++++++------------
>> xen/arch/arm/tee/ffa_private.h  |  21 ++++
>> 2 files changed, 152 insertions(+), 75 deletions(-)
>> 
>> diff --git a/xen/arch/arm/tee/ffa_partinfo.c 
>> b/xen/arch/arm/tee/ffa_partinfo.c
>> index 3f4a779f4146..4adbe2736c94 100644
>> --- a/xen/arch/arm/tee/ffa_partinfo.c
>> +++ b/xen/arch/arm/tee/ffa_partinfo.c
>> @@ -33,7 +33,7 @@ static uint16_t subscr_vm_created_count __read_mostly;
>> static uint16_t *subscr_vm_destroyed __read_mostly;
>> static uint16_t subscr_vm_destroyed_count __read_mostly;
>> 
>> -static int32_t ffa_partition_info_get(uint32_t *uuid, uint32_t flags,
>> +static int32_t ffa_partition_info_get(struct ffa_uuid uuid, uint32_t flags,
>>                                       uint32_t *count, uint32_t *fpi_size)
>> {
>>     struct arm_smccc_1_2_regs arg = {
>> @@ -41,15 +41,12 @@ static int32_t ffa_partition_info_get(uint32_t *uuid, 
>> uint32_t flags,
>>         .a5 = flags,
>>     };
>>     struct arm_smccc_1_2_regs resp;
>> -    uint32_t ret;
>> +    int32_t ret;
>> 
>> -    if ( uuid )
>> -    {
>> -        arg.a1 = uuid[0];
>> -        arg.a2 = uuid[1];
>> -        arg.a3 = uuid[2];
>> -        arg.a4 = uuid[3];
>> -    }
>> +    arg.a1 = uuid.val[0] & 0xFFFFFFFFU;
>> +    arg.a2 = (uuid.val[0] >> 32) & 0xFFFFFFFFU;
>> +    arg.a3 = uuid.val[1] & 0xFFFFFFFFU;
>> +    arg.a4 = (uuid.val[1] >> 32) & 0xFFFFFFFFU;
> 
> You were switching to GENMASK in the previous patches, so we should
> probably use that here too.

Agree, I will fix that.

> 
> With that fixed:
> Reviewed-by: Jens Wiklander <[email protected]>

Thanks

Cheers
Bertrand

Reply via email to