refactor: report FFA_YIELD

Report `FFA_YIELD` argument to `FFA_FEATURES` as supported when caller
is SP.

Change-Id: I38271a113559c05759fa8a38fd87c11d8a8456b2
Signed-off-by: Karl Meakin <karl.meakin@arm.com>
diff --git a/src/api.c b/src/api.c
index 23af32e..e597391 100644
--- a/src/api.c
+++ b/src/api.c
@@ -2634,6 +2634,20 @@
 		}
 		return api_ffa_feature_success(0);
 
+	/*
+	 * This function is restricted to the secure virtual FF-A instance (i.e.
+	 * only report success to SPs).
+	 */
+	case FFA_YIELD_32:
+		if (!vm_id_is_current_world(current->vm->id)) {
+			dlog_verbose(
+				"FFA_FEATURES: %s is only supported at secure "
+				"virtual FF-A instance\n",
+				ffa_func_name(FFA_YIELD_32));
+			return ffa_error(FFA_NOT_SUPPORTED);
+		}
+		return api_ffa_feature_success(0);
+
 	case FFA_RXTX_MAP_64: {
 		if (FFA_VERSION_1_2 > FFA_VERSION_COMPILED) {
 			return ffa_error(FFA_NOT_SUPPORTED);