feat(notifications): bind and unbind
Handle bind and unbind interfaces. The bind interface is intended for a
given receiver to enable a sender to set the specified notifications.
The unbind interface revokes the sender's ability to set the specified
notifications.
Bindings are tracked per notification in the receiver's vm structure.
This patch adds handling to FFA_NOTIFICATION_BIND and
FFA_NOTIFICATION_UNBIND, functions to validate the bindings,
as well as to make any bindings updates.
Change-Id: I7c70fe4e1285d6f58738d0229568666ce2075d12
Signed-off-by: J-Alves <joao.alves@arm.com>
diff --git a/src/arch/fake/hypervisor/ffa.c b/src/arch/fake/hypervisor/ffa.c
index 5a5a13b..7b61f0b 100644
--- a/src/arch/fake/hypervisor/ffa.c
+++ b/src/arch/fake/hypervisor/ffa.c
@@ -10,6 +10,7 @@
#include "hf/ffa_internal.h"
#include "hf/vcpu.h"
+#include "hf/vm.h"
ffa_vm_id_t arch_ffa_spmc_id_get(void)
{
@@ -64,6 +65,16 @@
return false;
}
+bool plat_ffa_is_notifications_bind_valid(struct vcpu *current,
+ ffa_vm_id_t sender_id,
+ ffa_vm_id_t receiver_id)
+{
+ (void)current;
+ (void)sender_id;
+ (void)receiver_id;
+ return false;
+}
+
ffa_partition_properties_t plat_ffa_partition_properties(
ffa_vm_id_t current_id, const struct vm *target)
{
@@ -102,3 +113,15 @@
return ffa_error(FFA_NOT_SUPPORTED);
}
+
+struct vm_locked plat_ffa_vm_find_locked(ffa_vm_id_t vm_id)
+{
+ (void)vm_id;
+ return (struct vm_locked){.vm = NULL};
+}
+
+bool plat_ffa_is_vm_id(ffa_vm_id_t vm_id)
+{
+ (void)vm_id;
+ return false;
+}