[PATCH 00/10] xen/arm: ffa: FF-A v1.2 support

Bertrand Marquis posted 10 patches 2 weeks, 2 days ago
There is a newer version of this series
xen/arch/arm/include/asm/tee/ffa.h |   2 +-
xen/arch/arm/tee/ffa.c             | 205 +++++++++++++++++-------
xen/arch/arm/tee/ffa_msg.c         | 203 ++++++++++++++++++-----
xen/arch/arm/tee/ffa_notif.c       |  14 +-
xen/arch/arm/tee/ffa_partinfo.c    | 248 ++++++++++++++++++-----------
xen/arch/arm/tee/ffa_private.h     | 133 ++++++++++------
xen/arch/arm/tee/ffa_rxtx.c        | 160 +++++++++++++++----
xen/arch/arm/tee/ffa_shm.c         |  30 ++--
8 files changed, 703 insertions(+), 292 deletions(-)
[PATCH 00/10] xen/arm: ffa: FF-A v1.2 support
Posted by Bertrand Marquis 2 weeks, 2 days ago
This series updates Xen’s FF-A mediator on Arm to implement the FF-A
v1.2 interface while keeping existing v1.0/v1.1 guests working.

Patches 1–5 rework the low-level plumbing:

  1) add the FF-A v1.2 function IDs and probe the new ABIs
  2) track per-VM FFA_VERSION state and enforce negotiation
  3) harden RX/TX mapping and validation
  4) rework SPMC RX/TX buffer management so access is serialized and
     RX buffers are always released back to the SPMC
  5) switch the mediator to spec-compliant signed 32-bit status codes

Patches 6–9 update the data structures and direct-call paths:

  6) add ffa_uuid helpers and rework partition-info handling
  7) refactor direct requests via a common RUN/direct completion helper
  8) add the v1.1/v1.2 SEND2 header layout
  9) add MSG_SEND_DIRECT_REQ2/RESP2 support and marshal the extended
     register set for v1.2 guests

Patch 10 tightens the dispatcher and advertises FF-A v1.2 only to guests
that negotiated v1.2:

  - reject SMCCC64 calls from AArch32 guests
  - expose the new FIDs and RX/TX capacity fields
  - bump Xen's FF-A version to 1.2 once the implementation is complete

v1.0/v1.1 guests continue to use the v1.1 ABI without behaviour changes,
while v1.2 guests can negotiate the wider ABI and use RUN, SEND2, and
DIRECT_REQ2/RESP2 with the extended register set.

This serie was validated through gitlab-ci here:
https://gitlab.com/xen-project/people/bmarquis/xen-ffa-research/-/tree/ffa-v1.2/v0
Build pipeline for the serie:
https://gitlab.com/xen-project/people/bmarquis/xen-ffa-research/-/pipelines/2183322953

Bertrand Marquis (10):
  xen/arm: ffa: add FF-A v1.2 function IDs
  xen/arm: ffa: per-VM FFA_VERSION negotiation state
  xen/arm: ffa: harden RX/TX mapping
  xen/arm: ffa: rework SPMC RX/TX buffer management
  xen/arm: ffa: use signed 32-bit status codes
  xen/arm: ffa: add UUID helpers for partition info
  xen/arm: ffa: refactor direct requests via RUN helper
  xen/arm: ffa: add v1.2 SEND2 header layout
  xen/arm: ffa: add MSG_SEND_DIRECT_REQ2 support
  xen/arm: ffa: advertise FF-A v1.2

 xen/arch/arm/include/asm/tee/ffa.h |   2 +-
 xen/arch/arm/tee/ffa.c             | 205 +++++++++++++++++-------
 xen/arch/arm/tee/ffa_msg.c         | 203 ++++++++++++++++++-----
 xen/arch/arm/tee/ffa_notif.c       |  14 +-
 xen/arch/arm/tee/ffa_partinfo.c    | 248 ++++++++++++++++++-----------
 xen/arch/arm/tee/ffa_private.h     | 133 ++++++++++------
 xen/arch/arm/tee/ffa_rxtx.c        | 160 +++++++++++++++----
 xen/arch/arm/tee/ffa_shm.c         |  30 ++--
 8 files changed, 703 insertions(+), 292 deletions(-)

-- 
2.51.2


[PATCH 00/10] xen/arm: ffa: FF-A v1.2 support
Posted by Bertrand Marquis 2 weeks, 2 days ago
This series updates Xen’s FF-A mediator on Arm to implement the FF-A
v1.2 interface while keeping existing v1.0/v1.1 guests working.

Patches 1–5 rework the low-level plumbing:

  1) add the FF-A v1.2 function IDs and probe the new ABIs
  2) track per-VM FFA_VERSION state and enforce negotiation
  3) harden RX/TX mapping and validation
  4) rework SPMC RX/TX buffer management so access is serialized and
     RX buffers are always released back to the SPMC
  5) switch the mediator to spec-compliant signed 32-bit status codes

Patches 6–9 update the data structures and direct-call paths:

  6) add ffa_uuid helpers and rework partition-info handling
  7) refactor direct requests via a common RUN/direct completion helper
  8) add the v1.1/v1.2 SEND2 header layout
  9) add MSG_SEND_DIRECT_REQ2/RESP2 support and marshal the extended
     register set for v1.2 guests

Patch 10 tightens the dispatcher and advertises FF-A v1.2 only to guests
that negotiated v1.2:

  - reject SMCCC64 calls from AArch32 guests
  - expose the new FIDs and RX/TX capacity fields
  - bump Xen's FF-A version to 1.2 once the implementation is complete

v1.0/v1.1 guests continue to use the v1.1 ABI without behaviour changes,
while v1.2 guests can negotiate the wider ABI and use RUN, SEND2, and
DIRECT_REQ2/RESP2 with the extended register set.

This serie was validated through gitlab-ci here:
https://gitlab.com/xen-project/people/bmarquis/xen-ffa-research/-/tree/ffa-v1.2/v0?ref_type=heads

Bertrand Marquis (10):
  xen/arm: ffa: add FF-A v1.2 function IDs
  xen/arm: ffa: per-VM FFA_VERSION negotiation state
  xen/arm: ffa: harden RX/TX mapping
  xen/arm: ffa: rework SPMC RX/TX buffer management
  xen/arm: ffa: use signed 32-bit status codes
  xen/arm: ffa: add UUID helpers for partition info
  xen/arm: ffa: refactor direct requests via RUN helper
  xen/arm: ffa: add v1.2 SEND2 header layout
  xen/arm: ffa: add MSG_SEND_DIRECT_REQ2 support
  xen/arm: ffa: advertise FF-A v1.2

 xen/arch/arm/include/asm/tee/ffa.h |   2 +-
 xen/arch/arm/tee/ffa.c             | 205 +++++++++++++++++-------
 xen/arch/arm/tee/ffa_msg.c         | 203 ++++++++++++++++++-----
 xen/arch/arm/tee/ffa_notif.c       |   6 +-
 xen/arch/arm/tee/ffa_partinfo.c    | 248 ++++++++++++++++++-----------
 xen/arch/arm/tee/ffa_private.h     | 129 ++++++++++-----
 xen/arch/arm/tee/ffa_rxtx.c        | 160 +++++++++++++++----
 xen/arch/arm/tee/ffa_shm.c         |  30 ++--
 8 files changed, 697 insertions(+), 286 deletions(-)

-- 
2.51.2


Re: [PATCH 00/10] xen/arm: ffa: FF-A v1.2 support
Posted by Bertrand Marquis 2 weeks, 2 days ago
Hi,

Please ignore this mail, cover letter was sent in duplicate with
my serie and this one is an old version missing the pipeline link.

Rest of the serie is ok.

Sorry for that.

Bertrand

> On 27 Nov 2025, at 16:51, Bertrand Marquis <bertrand.marquis@arm.com> wrote:
> 
> This series updates Xen’s FF-A mediator on Arm to implement the FF-A
> v1.2 interface while keeping existing v1.0/v1.1 guests working.
> 
> Patches 1–5 rework the low-level plumbing:
> 
>  1) add the FF-A v1.2 function IDs and probe the new ABIs
>  2) track per-VM FFA_VERSION state and enforce negotiation
>  3) harden RX/TX mapping and validation
>  4) rework SPMC RX/TX buffer management so access is serialized and
>     RX buffers are always released back to the SPMC
>  5) switch the mediator to spec-compliant signed 32-bit status codes
> 
> Patches 6–9 update the data structures and direct-call paths:
> 
>  6) add ffa_uuid helpers and rework partition-info handling
>  7) refactor direct requests via a common RUN/direct completion helper
>  8) add the v1.1/v1.2 SEND2 header layout
>  9) add MSG_SEND_DIRECT_REQ2/RESP2 support and marshal the extended
>     register set for v1.2 guests
> 
> Patch 10 tightens the dispatcher and advertises FF-A v1.2 only to guests
> that negotiated v1.2:
> 
>  - reject SMCCC64 calls from AArch32 guests
>  - expose the new FIDs and RX/TX capacity fields
>  - bump Xen's FF-A version to 1.2 once the implementation is complete
> 
> v1.0/v1.1 guests continue to use the v1.1 ABI without behaviour changes,
> while v1.2 guests can negotiate the wider ABI and use RUN, SEND2, and
> DIRECT_REQ2/RESP2 with the extended register set.
> 
> This serie was validated through gitlab-ci here:
> https://gitlab.com/xen-project/people/bmarquis/xen-ffa-research/-/tree/ffa-v1.2/v0?ref_type=heads
> 
> Bertrand Marquis (10):
>  xen/arm: ffa: add FF-A v1.2 function IDs
>  xen/arm: ffa: per-VM FFA_VERSION negotiation state
>  xen/arm: ffa: harden RX/TX mapping
>  xen/arm: ffa: rework SPMC RX/TX buffer management
>  xen/arm: ffa: use signed 32-bit status codes
>  xen/arm: ffa: add UUID helpers for partition info
>  xen/arm: ffa: refactor direct requests via RUN helper
>  xen/arm: ffa: add v1.2 SEND2 header layout
>  xen/arm: ffa: add MSG_SEND_DIRECT_REQ2 support
>  xen/arm: ffa: advertise FF-A v1.2
> 
> xen/arch/arm/include/asm/tee/ffa.h |   2 +-
> xen/arch/arm/tee/ffa.c             | 205 +++++++++++++++++-------
> xen/arch/arm/tee/ffa_msg.c         | 203 ++++++++++++++++++-----
> xen/arch/arm/tee/ffa_notif.c       |   6 +-
> xen/arch/arm/tee/ffa_partinfo.c    | 248 ++++++++++++++++++-----------
> xen/arch/arm/tee/ffa_private.h     | 129 ++++++++++-----
> xen/arch/arm/tee/ffa_rxtx.c        | 160 +++++++++++++++----
> xen/arch/arm/tee/ffa_shm.c         |  30 ++--
> 8 files changed, 697 insertions(+), 286 deletions(-)
> 
> -- 
> 2.51.2
> 
>