Skip to content

xen/arm: ffa: FF-A v1.2 support

Bertrand Marquis xen-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest12 patches 6 repliesIn review
  2. v112 patches 16 repliesSuperseded

Changes in v2 from the cover letter

- Rebase on staging
- Remove invalid ASSERT in patch 5
- Add extra comment to use ACCESS_ONCE for guest_vers in patch 2
- Add Jens R-b in other patches

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12xen/arm: ffa: add FF-A v1.2 function IDsxen/arch/arm/include/asm/tee/ffa.h xen/arch/arm/tee/ffa.c xen/arch/arm/tee/ffa_private.h+19 -90 replies
2/12xen/arm: ffa: per-VM FFA_VERSION negotiation statexen/arch/arm/tee/ffa.c xen/arch/arm/tee/ffa_msg.c xen/arch/arm/tee/ffa_partinfo.c +2 more+106 -311 reply
3/12xen/arm: ffa: Fix is_64bit initxen/arch/arm/tee/ffa.c xen/arch/arm/tee/ffa_private.h+13 -10 replies
4/12xen/arm: ffa: harden RX/TX mappingxen/arch/arm/tee/ffa.c xen/arch/arm/tee/ffa_private.h xen/arch/arm/tee/ffa_rxtx.c+62 -150 replies
5/12xen/arm: ffa: rework SPMC RX/TX buffer managementxen/arch/arm/tee/ffa.c xen/arch/arm/tee/ffa_partinfo.c xen/arch/arm/tee/ffa_private.h +2 more+149 -861 reply
6/12xen/arm: ffa: rework VM RX/TX buffer managementxen/arch/arm/tee/ffa.c xen/arch/arm/tee/ffa_msg.c xen/arch/arm/tee/ffa_partinfo.c +3 more+72 -370 replies
7/12xen/arm: ffa: use signed 32-bit status codesxen/arch/arm/tee/ffa.c xen/arch/arm/tee/ffa_notif.c xen/arch/arm/tee/ffa_partinfo.c +2 more+29 -260 replies
8/12xen/arm: ffa: add UUID helpers for partition infoxen/arch/arm/tee/ffa_partinfo.c xen/arch/arm/tee/ffa_private.h+154 -760 replies
9/12xen/arm: ffa: Add FFA_RUN supportxen/arch/arm/tee/ffa.c xen/arch/arm/tee/ffa_msg.c xen/arch/arm/tee/ffa_private.h+87 -340 replies
10/12xen/arm: ffa: add v1.2 SEND2 header layoutxen/arch/arm/tee/ffa_msg.c+47 -110 replies
11/12xen/arm: ffa: add MSG_SEND_DIRECT_REQ2 supportxen/arch/arm/tee/ffa.c xen/arch/arm/tee/ffa_msg.c+59 -00 replies
12/12xen/arm: ffa: advertise FF-A v1.2xen/arch/arm/tee/ffa.c xen/arch/arm/tee/ffa_private.h+37 -110 replies

Reviews trailers per patch

All 12 patches have a Reviewed-by or Acked-by.

PatchJens Wiklander
1/12R-b
2/12R-b
3/12R-b
4/12R-b
5/12R-b
6/12R-b
7/12R-b
8/12R-b
9/12R-b
10/12R-b
11/12R-b
12/12R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/12] xen/arm: ffa: FF-A v1.2 support

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–7 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) Fix is_64bit initialisation
4) harden RX/TX mapping and validation
5) rework SPMC RX/TX buffer management so access is serialized and RX buffers are always released back to the SPMC
6) rework VM RX/TX buffer to have generic acquire/release function equivalent to SPMC access functions
7) switch the mediator to spec-compliant signed 32-bit status codes

Patches 8–11 update the data structures and direct-call paths:

8) add ffa_uuid helpers and rework partition-info handling
9) add FFA_RUN support
10) add the v1.1/v1.2 SEND2 header layout
11) add MSG_SEND_DIRECT_REQ2/RESP2 support and marshal the extended register set for v1.2 guests

Patch 12 tightens the dispatcher and advertises FF-A v1.2:

- reject SMCCC64 calls from AArch32 guests
- expose 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/v2
Build pipeline for the serie:
https://gitlab.com/xen-project/people/bmarquis/xen-ffa-research/-/pipelines/2215466965

Changes since v1:
- Rebase on staging
- Remove invalid ASSERT in patch 5
- Add extra comment to use ACCESS_ONCE for guest_vers in patch 2
- Add Jens R-b in other patches

Changes since v0:
- Rework version negotiation to prevent concurrency issues
- Introduce patch 3 to fix an init bug
- Introduce patch 5 to make VM RX/TX buffer acquire/release working in the same way as SPMC RX/TX buffers
- minor fixes described in each patch changelog

Bertrand Marquis (12):
xen/arm: ffa: add FF-A v1.2 function IDs xen/arm: ffa: per-VM FFA_VERSION negotiation state xen/arm: ffa: Fix is_64bit init
xen/arm: ffa: harden RX/TX mapping xen/arm: ffa: rework SPMC RX/TX buffer management xen/arm: ffa: rework VM 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: Add FFA_RUN support
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 |   3 +-
 xen/arch/arm/tee/ffa.c             | 202 ++++++++++++++++------
 xen/arch/arm/tee/ffa_msg.c         | 232 +++++++++++++++++++------
 xen/arch/arm/tee/ffa_notif.c       |  14 +-
 xen/arch/arm/tee/ffa_partinfo.c    | 263 +++++++++++++++++------------
 xen/arch/arm/tee/ffa_private.h     | 154 +++++++++++------
 xen/arch/arm/tee/ffa_rxtx.c        | 237 +++++++++++++++++++++-----
 xen/arch/arm/tee/ffa_shm.c         |  52 +++---
 8 files changed, 827 insertions(+), 330 deletions(-)
Signature · 1 line
2.51.2