Commit a02e0079 authored by Sebastian Ene's avatar Sebastian Ene
Browse files

ANDROID: KVM: arm64: Use the hypervisor lock for FF-A transactions



Synchronize the access to the hypervisor FF-A buffers using the
hypervisor buffers lock instead of the host lock. This is required to
prevent concurrent access to the hypervisor pair of buffers when
multipple VMs attempt to use them as part of an FF-A transaction.

The locks from step 3,6 where replaced with the hypervisor buffers lock:

1. Host driver copies data into the
Host(RX/TX buffers mapped inside the Hypervisor)
2. Host driver issues smc(..) to the Hypervisor
3. Hypervisor locks the host buffers    <- LOCK ACQUIRED
4. Hypervisor validates and copies the content from the
Host(RX/TX buffers mapped inside the Hypervisor) to the Hyp(RX/TX buffers
mapped inside EL3/SPMC)
5. The call is forwarded to EL3
6. Hypervisor unlocks the host buffers. <- LOCK RELEASED

Bug: 269285339
Bug: 278749606
Change-Id: If28b20850bd7d86d65e2f08a5e1a093690586458
Signed-off-by: default avatarSebastian Ene <sebastianene@google.com>
parent 964a8150
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment