Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Seth Forshee <sforshee@nvidia.com>
To: Sudeep Holla <sudeep.holla@kernel.org>,
	 Sebastian Ene <sebastianene@google.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,  Seth Forshee <sforshee@nvidia.com>
Subject: [PATCH 0/2] firmware: arm_ffa: Fix RXTX_MAP buffer size regressions
Date: Mon, 01 Jun 2026 15:45:10 -0500	[thread overview]
Message-ID: <20260601-b4-ffa-rxtx-map-fixes-v1-0-c071b12ae05c@nvidia.com> (raw)

Commit 83210251fd70 ("firmware: arm_ffa: Use the correct buffer size
during RXTX_MAP") caused a regression for some FF-A implementations. It
has the effect of passing the size of the page-aligned buffers to
FFA_RXTX_MAP, which may be larger than the maximum size supported by the
SPMC. When this happens FFA_RXTX_MAP will fail with INVALID_PARAMETERS.

The following patches deal with two distinct scenarios which lead to
this issue. With FF-A v1.2+, FFA_FEATURES can specify a maximum supported
RX/TX buffer size, so patch 1 decodes this field and honors the maximum if
specified. For FF-A v1.1 and earlier the maximum is unknown, so patch 2
deals with this by first attempting FFA_RXTX_MAP with the page-aligned
buffer size (preserving the behavior introduced by commit 83210251fd70).
If this fails due to invalid parameters it retries with the minimum buffer
size from FFA_FEATURES.

Testing was done with FF-A v1.1 and v1.2 implementations, both of which
reject buffer sizes larger than 4K. Both implementations were tested with
4K, 16K, and 64K pages. Without these patches, probe fails for page sizes
larger than 4K with the message "failed to register FFA RxTx buffers."
With the patches probe succeeds for all page sizes.

The patches are based on for-next/ffa/fixes.

Signed-off-by: Seth Forshee <sforshee@nvidia.com>
---
Seth Forshee (2):
      firmware: arm_ffa: Honor maximum RX/TX buffer size
      firmware: arm_ffa: Fall back to minimum buffer size if RXTX_MAP fails

 drivers/firmware/arm_ffa/driver.c | 51 ++++++++++++++++++++++++++++++++++-----
 1 file changed, 45 insertions(+), 6 deletions(-)
---
base-commit: a6848a50404eefb6f0b131c21881a2d8d21b31a9
change-id: 20260531-b4-ffa-rxtx-map-fixes-244ede71a935

Best regards,
--  
Seth Forshee <sforshee@nvidia.com>



             reply	other threads:[~2026-06-01 20:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-01 20:45 Seth Forshee [this message]
2026-06-01 20:45 ` [PATCH 1/2] firmware: arm_ffa: Honor maximum RX/TX buffer size Seth Forshee
2026-06-02 15:56   ` Sudeep Holla
2026-06-02 16:12     ` Seth Forshee
2026-06-02 16:27       ` Sudeep Holla
2026-06-02 17:05         ` Seth Forshee
2026-06-02 21:58           ` Seth Forshee
2026-06-01 20:45 ` [PATCH 2/2] firmware: arm_ffa: Fall back to minimum buffer size if RXTX_MAP fails Seth Forshee
2026-06-02 15:48   ` Sudeep Holla
2026-06-02 16:21     ` Seth Forshee
2026-06-02 16:29       ` Sudeep Holla
2026-06-02 17:12         ` Seth Forshee
2026-06-02 16:51 ` [PATCH 0/2] firmware: arm_ffa: Fix RXTX_MAP buffer size regressions Sudeep Holla
2026-06-02 17:19   ` Seth Forshee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260601-b4-ffa-rxtx-map-fixes-v1-0-c071b12ae05c@nvidia.com \
    --to=sforshee@nvidia.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sebastianene@google.com \
    --cc=sudeep.holla@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox