KVM: arm64: Trap FFA_VERSION host call in pKVM
authorSebastian Ene <sebastianene@google.com>
Thu, 13 Jun 2024 13:20:32 +0000 (13:20 +0000)
committerOliver Upton <oliver.upton@linux.dev>
Fri, 14 Jun 2024 20:28:29 +0000 (20:28 +0000)
commitc9c012625e12699a4c6c4d4cdd17cbe600e01cd2
tree9ccc6ede86a7ed16faecd434bbb9f2352d3997a9
parent83a7eefedc9b56fe7bfeff13b6c7356688ffa670
KVM: arm64: Trap FFA_VERSION host call in pKVM

The pKVM hypervisor initializes with FF-A version 1.0. The spec requires
that no other FF-A calls to be issued before the version negotiation
phase is complete. Split the hypervisor proxy initialization code in two
parts so that we can move the later one after the host negotiates its
version.

Without trapping the call, the host drivers can negotiate a higher
version number with TEE which can result in a different memory layout
described during the memory sharing calls.

Signed-off-by: Sebastian Ene <sebastianene@google.com>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Tested-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20240613132035.1070360-2-sebastianene@google.com
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/kvm/hyp/nvhe/ffa.c