feat: remove waiter list notification from FFA_RXTX_MAP ABI
FF-A v1.1 doesn't specify anymore the RX buffer waiter list and
conflicts with FFA_RXTX_MAP forwarding to SPMC; remove the
waiter list notification and the related test
(mailbox, secondary_to_primary_notification_on_configure).
Change-Id: I82cc9ed2877d68fd055984a4f6dc9a9109260c07
Signed-off-by: Federico Recanati <federico.recanati@arm.com>
diff --git a/inc/hf/api.h b/inc/hf/api.h
index 3d31f66..7883434 100644
--- a/inc/hf/api.h
+++ b/inc/hf/api.h
@@ -51,8 +51,7 @@
ipaddr_t send, ipaddr_t recv, uint32_t page_count,
struct mpool *local_page_pool);
struct ffa_value api_ffa_rxtx_map(ipaddr_t send, ipaddr_t recv,
- uint32_t page_count, struct vcpu *current,
- struct vcpu **next);
+ uint32_t page_count, struct vcpu *current);
struct ffa_value api_ffa_rxtx_unmap(ffa_vm_id_t allocator_id,
struct vcpu *current);
struct ffa_value api_yield(struct vcpu *current, struct vcpu **next);
diff --git a/src/api.c b/src/api.c
index 72043d8..8ce12c0 100644
--- a/src/api.c
+++ b/src/api.c
@@ -1240,12 +1240,9 @@
* due to insuffient page table memory.
* - FFA_ERROR FFA_DENIED if the pages are already mapped.
* - FFA_SUCCESS on success if no further action is needed.
- * - FFA_RX_RELEASE if it was called by the primary VM and the primary VM now
- * needs to wake up or kick waiters.
*/
struct ffa_value api_ffa_rxtx_map(ipaddr_t send, ipaddr_t recv,
- uint32_t page_count, struct vcpu *current,
- struct vcpu **next)
+ uint32_t page_count, struct vcpu *current)
{
struct vm *vm = current->vm;
struct ffa_value ret;
@@ -1269,8 +1266,7 @@
goto exit;
}
- /* Tell caller about waiters, if any. */
- ret = api_waiter_result(vm_locked, current, next);
+ ret = (struct ffa_value){.func = FFA_SUCCESS_32};
exit:
mpool_fini(&local_page_pool);
diff --git a/src/arch/aarch64/hypervisor/handler.c b/src/arch/aarch64/hypervisor/handler.c
index 9323ff5..bc141c2 100644
--- a/src/arch/aarch64/hypervisor/handler.c
+++ b/src/arch/aarch64/hypervisor/handler.c
@@ -502,7 +502,7 @@
case FFA_RXTX_MAP_64:
*args = api_ffa_rxtx_map(ipa_init(args->arg1),
ipa_init(args->arg2), args->arg3,
- current, next);
+ current);
return true;
case FFA_RXTX_UNMAP_32:
*args = api_ffa_rxtx_unmap(args->arg1, current);
diff --git a/test/vmapi/primary_with_secondaries/mailbox_common.c b/test/vmapi/primary_with_secondaries/mailbox_common.c
index 64015e7..5ae3265 100644
--- a/test/vmapi/primary_with_secondaries/mailbox_common.c
+++ b/test/vmapi/primary_with_secondaries/mailbox_common.c
@@ -210,36 +210,6 @@
}
/**
- * Send a message before the secondary VM is configured, and receive a
- * notification when it configures.
- */
-TEST(mailbox, secondary_to_primary_notification_on_configure)
-{
- struct ffa_value run_res;
-
- set_up_mailbox();
-
- EXPECT_FFA_ERROR(ffa_msg_send(HF_PRIMARY_VM_ID, SERVICE_VM1, 0,
- FFA_MSG_SEND_NOTIFY),
- FFA_BUSY);
-
- /*
- * Run first VM for it to configure itself. It should result in
- * notifications having to be issued.
- */
- run_res = ffa_run(SERVICE_VM1, 0);
- EXPECT_EQ(run_res.func, FFA_RX_RELEASE_32);
-
- /* A single waiter is returned. */
- EXPECT_EQ(hf_mailbox_waiter_get(SERVICE_VM1), HF_PRIMARY_VM_ID);
- EXPECT_EQ(hf_mailbox_waiter_get(SERVICE_VM1), -1);
-
- /* Send should now succeed. */
- EXPECT_EQ(ffa_msg_send(HF_PRIMARY_VM_ID, SERVICE_VM1, 0, 0).func,
- FFA_SUCCESS_32);
-}
-
-/**
* Sends two messages to secondary VM without letting it run, so second message
* won't go through. Ensure that a notification is delivered when secondary VM
* clears the mailbox.