[PATCH] KVM: arm64: Use acquire/release to communicate FF-A version negotiation
Oliver Upton
oliver.upton at linux.dev
Mon Apr 7 15:07:46 PDT 2025
On Mon, 07 Apr 2025 16:27:55 +0100, Will Deacon wrote:
> The pKVM FF-A proxy rejects FF-A requests other than FFA_VERSION until
> version negotiation is complete, which is signalled by setting the
> global 'has_version_negotiated' variable.
>
> To avoid excessive locking, this variable is checked directly from
> kvm_host_ffa_handler() in response to an FF-A call, but this can race
> against another CPU performing the negotiation and potentially lead to
> reading a torn value (incredibly unlikely for a 'bool') or problematic
> re-ordering of the accesses to 'has_version_negotiated' and
> 'hyp_ffa_version' whereby a stale version number could be read by
> __do_ffa_mem_xfer().
>
> [...]
Applied to fixes, thanks!
[1/1] KVM: arm64: Use acquire/release to communicate FF-A version negotiation
https://git.kernel.org/kvmarm/kvmarm/c/a344e258acb0
--
Best,
Oliver
More information about the linux-arm-kernel
mailing list