KVM: arm64: Allow pKVM on v1.0 compatible FF-A implementations
authorOliver Upton <oliver.upton@linux.dev>
Tue, 18 Jul 2023 18:45:37 +0000 (18:45 +0000)
committerOliver Upton <oliver.upton@linux.dev>
Wed, 19 Jul 2023 16:59:18 +0000 (16:59 +0000)
commit84f68679032147dcdac9bb4d8eb8f4638e995dc6
tree2baa8c096effd45f28496a319abe1a9260abf31e
parent9d2a55b403eea26cab7c831d8e1c00ef1e6a6850
KVM: arm64: Allow pKVM on v1.0 compatible FF-A implementations

pKVM initialization fails on systems with v1.1+ FF-A implementations, as
the hyp does a strict match on the returned version from FFA_VERSION.
This is a stronger assertion than required by the specification, which
requires minor revisions be backwards compatible with earlier revisions
of the same major version.

Relax the check in hyp_ffa_init() to only test the returned major
version. Even though v1.1 broke ABI, the expectation is that firmware
incapable of using the v1.0 ABI return NOT_SUPPORTED instead of a valid
version.

Acked-by: Marc Zyngier <maz@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20230718184537.3220867-1-oliver.upton@linux.dev
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/kvm/hyp/nvhe/ffa.c