feat(notifications): support returned in FFA_PARTITION_INFO_GET

Change-Id: Idae639e437fb49dc8f22fc542e4625305f65fb76
Signed-off-by: J-Alves <joao.alves@arm.com>
diff --git a/src/api.c b/src/api.c
index 21bec1d..0d628bd 100644
--- a/src/api.c
+++ b/src/api.c
@@ -371,7 +371,7 @@
 	 * A Null UUID retrieves information for all VMs.
 	 */
 	for (uint16_t index = 0; index < vm_get_count(); ++index) {
-		const struct vm *vm = vm_find_index(index);
+		struct vm *vm = vm_find_index(index);
 
 		if (uuid_is_null || ffa_uuid_equal(uuid, &vm->uuid)) {
 			partitions[vm_count].vm_id = vm->id;
@@ -379,6 +379,10 @@
 			partitions[vm_count].properties =
 				plat_ffa_partition_properties(current_vm->id,
 							      vm);
+			partitions[vm_count].properties |=
+				vm_are_notifications_enabled(vm)
+					? FFA_PARTITION_NOTIFICATION
+					: 0;
 
 			++vm_count;
 		}
@@ -2733,7 +2737,7 @@
 		return ffa_error(FFA_DENIED);
 	}
 
-	if (!vm_are_notifications_enabled(receiver_locked)) {
+	if (!vm_locked_are_notifications_enabled(receiver_locked)) {
 		dlog_verbose("Notifications are not enabled.\n");
 		ret = ffa_error(FFA_NOT_SUPPORTED);
 		goto out;
@@ -2821,7 +2825,7 @@
 		return ffa_error(FFA_INVALID_PARAMETERS);
 	}
 
-	if (!vm_are_notifications_enabled(receiver_locked)) {
+	if (!vm_locked_are_notifications_enabled(receiver_locked)) {
 		dlog_verbose("Receiver's notifications not enabled.\n");
 		ret = ffa_error(FFA_DENIED);
 		goto out;
diff --git a/src/load.c b/src/load.c
index 4d5fe30..501d00e 100644
--- a/src/load.c
+++ b/src/load.c
@@ -213,7 +213,7 @@
 		/* Updating boot list according to boot_order */
 		vm_update_boot(vm_locked.vm);
 
-		if (vm_are_notifications_enabled(vm_locked) &&
+		if (vm_locked_are_notifications_enabled(vm_locked) &&
 		    !plat_ffa_notifications_bitmap_create_call(
 			    vm_locked.vm->id, vm_locked.vm->vcpu_count)) {
 			return false;
diff --git a/src/vm.c b/src/vm.c
index 47d4650..699e498 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -494,9 +494,14 @@
 			       .pending != 0ULL;
 }
 
-bool vm_are_notifications_enabled(struct vm_locked vm_locked)
+bool vm_are_notifications_enabled(struct vm *vm)
 {
-	return vm_locked.vm->notifications.enabled == true;
+	return vm->notifications.enabled == true;
+}
+
+bool vm_locked_are_notifications_enabled(struct vm_locked vm_locked)
+{
+	return vm_are_notifications_enabled(vm_locked.vm);
 }
 
 static bool vm_is_notification_bit_set(ffa_notifications_bitmap_t notifications,