[PATCH v2 3/3] firmware: arm_ffa: Share FF-A version negotiation
Jamie Nguyen
jamien at nvidia.com
Thu Nov 12 08:30:47 PST 2026
On Thu, Nov 12, 2026 at 11:14:08AM +0000, Sudeep Holla wrote:
[...]
> + guard(mutex)(&ffa_version_lock);
> + if (!ffa_version) {
> + invoke(&args, &res);
Can this scenario happen?
1) pKVM is enabled but not yet initialised, and offset-2 AML runs
(e.g. during the initial ACPI scan), so ffh.c gets here first and
negotiates directly with EL3.
2) The result is cached.
3) Once pKVM is up, ffa_version_check() gets the cached version and
never sends FFA_VERSION through the proxy.
If so, then I think kvm_host_ffa_handler() would reject the transport's
calls, since has_version_negotiated is never set.
Should we decline here instead, without caching, while
is_protected_kvm_enabled() && !is_pkvm_initialized(), like ffa_probe()
already does?
More information about the linux-arm-kernel
mailing list