[PATCH v2] firmware: arm_ffa: Handle maximum RX/TX buffer size

Sudeep Holla sudeep.holla at kernel.org
Wed Jun 3 02:23:18 PDT 2026


On Tue, Jun 02, 2026 at 09:54:06PM +0000, Seth Forshee wrote:
> A partition manager may reject unsupported RX/TX buffer sizes by
> returning INVALID_PARAMETERS. Commit 83210251fd70 ("firmware: arm_ffa:
> Use the correct buffer size during RXTX_MAP") has the effect of rounding
> up the buffer size from FFA_FEATURES to be PAGE_SIZE-aligned, which may
> be larger than what the partition manager supports. This caused RXTX_MAP
> to fail for some FF-A implementations on kernels with PAGE_SIZE > 4K.
> 
> In FF-A v1.2+ the partition manager can specify a maximum buffer size via
> FFA_FEATURES, but the driver currently doesn't use it. Add support for
> decoding and honoring the maximum buffer size.
> 
> Some v1.1 implementations also return INVALID_PARAMETERS from RXTX_MAP if
> the buffer sizes are too large but lack a mechanism for discovering the
> maximum buffer size. The relevant bits must be zero in v1.1 and earlier,
> corresponding to "no maximum" in v1.2+, so we can handle both using
> the same logic. First, try using a PAGE_SIZE-aligned buffer as is done
> now. If this fails with INVALID_PARAMETERS, retry using the minimum
> buffer size, which should always be supported.
> 
> While there, also update RXTX_MAP_MIN_BUFSZ() to use FIELD_GET() for
> consistency.
> 
> Fixes: 83210251fd70 ("firmware: arm_ffa: Use the correct buffer size during RXTX_MAP")
> Assisted-by: Claude:claude-opus-4-8

I am planning to drop this as you just replace your code with exact verbatim
of what I suggested. I will replace with my suggested-by.

Thanks for testing and posting the patch. I have potentially queued it but
will rebase at v7.2-rc1 and send it as fix, so it may take some time. It will
be backported to v7.1 eventually, may have some trivial conflict but we can
take care when this lands in upstream.

-- 
Regards,
Sudeep



More information about the linux-arm-kernel mailing list