Hi Bertrand,

On Thu, Nov 27, 2025 at 4:52 PM Bertrand Marquis
<[email protected]> wrote:
>
> The FF-A spec defines return status values as signed 32-bit integers.
> Align the Xen mediator with this requirement by:
>
> - switching the FF-A helpers (ffa_handle_mem_reclaim(), partition info
>   init, notification ops, dispatcher glue, etc.) to int32_t return types
>   so callers cannot silently truncate negative values
> - masking SMCCC responses/exits in ffa_get_version(),
>   ffa_get_ret_code() and ffa_set_regs_error() to 32 bits before storing
>   them in guest registers
> - updating notifier, shared-memory reclaim, partition-info and
>   dispatcher call sites to use the new prototypes so the entire FF-A
>   path propagates spec-compliant 32-bit signed error codes
>
> While there, tidy up the FF-A notification helpers by using GENMASK(15, 0)
> for endpoint extraction and fix the secure-endpoint check in
> ffa_handle_notification_set() to apply the mask to the endpoint ID before
> calling FFA_ID_IS_SECURE(), instead of testing the wrong halfword of
> src_dst.
>
> Fixes: 911b305e7bdab ("xen/arm: ffa: Enable VM to VM without firmware")
> Signed-off-by: Bertrand Marquis <[email protected]>
> ---
>  xen/arch/arm/tee/ffa.c          | 12 +++++++-----
>  xen/arch/arm/tee/ffa_notif.c    | 14 +++++++-------
>  xen/arch/arm/tee/ffa_partinfo.c |  4 ++--
>  xen/arch/arm/tee/ffa_private.h  | 21 +++++++++++----------
>  xen/arch/arm/tee/ffa_shm.c      |  4 ++--
>  5 files changed, 29 insertions(+), 26 deletions(-)

Looks good.
Reviewed-by: Jens Wiklander <[email protected]>

Cheers,
Jens

Reply via email to