feat(indirect message): forward FFA_RX_RELEASE to SPMC
Within FF-A v1.1 indirect messaging, the SPMC owns a VM's RX buffers;
the Hypervisor must acquire ownership through FFA_RX_ACQUIRE ABI when
it needs to deliver a message to a VM, and notify the SPMC when the VM
releases it, by forwarding FFA_RX_RELEASE messages.
SPMC's view of a VM mailbox may not follow current mailbox
FSM (empty->received->read->empty), SPMC may not be aware of VM
message delivery and the consequent received->read mailbox transition.
Change-Id: I391054410573cc80549905f1a4bd2bbd19ac17fe
Signed-off-by: Federico Recanati <federico.recanati@arm.com>
diff --git a/inc/hf/api.h b/inc/hf/api.h
index 50b95fa..f17f1fb 100644
--- a/inc/hf/api.h
+++ b/inc/hf/api.h
@@ -47,7 +47,8 @@
struct vcpu *current);
struct ffa_value api_ffa_msg_recv(bool block, struct vcpu *current,
struct vcpu **next);
-struct ffa_value api_ffa_rx_release(struct vcpu *current, struct vcpu **next);
+struct ffa_value api_ffa_rx_release(ffa_vm_id_t receiver_id,
+ struct vcpu *current, struct vcpu **next);
struct ffa_value api_ffa_rx_acquire(ffa_vm_id_t receiver_id,
struct vcpu *current);
struct ffa_value api_vm_configure_pages(
diff --git a/inc/hf/arch/plat/ffa.h b/inc/hf/arch/plat/ffa.h
index d4a163e..dce8f6c 100644
--- a/inc/hf/arch/plat/ffa.h
+++ b/inc/hf/arch/plat/ffa.h
@@ -74,7 +74,12 @@
struct ffa_value args,
struct ffa_value *ret);
-bool plat_ffa_acquire_receiver_rx(struct vm_locked to_locked,
+bool plat_ffa_rx_release_forward(struct vm_locked vm_locked,
+ struct ffa_value *ret);
+
+bool plat_ffa_rx_release_forwarded(struct vm_locked vm_locked);
+
+bool plat_ffa_acquire_receiver_rx(struct vm_locked locked,
struct ffa_value *ret);
bool plat_ffa_is_indirect_msg_supported(struct vm_locked sender_locked,