FF-A: SPMC direct messaging interface.

Adaptation of direct messaging interface to the SPMC.

Change-Id: Ic27d19908d2071be57483a76da61c7f948b86bdb
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
diff --git a/src/vcpu.c b/src/vcpu.c
index 7f1746f..1e4d777 100644
--- a/src/vcpu.c
+++ b/src/vcpu.c
@@ -181,3 +181,15 @@
 
 	return resume;
 }
+
+/**
+ * Return the vCPU corresponding to the other world vCPU whose index
+ * matches current vCPU index.
+ */
+struct vcpu *vcpu_get_other_world_counterpart(struct vcpu *current)
+{
+	struct vm *vm = vm_find(HF_OTHER_WORLD_ID);
+	ffa_vcpu_index_t current_cpu_index = cpu_index(current->cpu);
+
+	return vm_get_vcpu(vm, current_cpu_index);
+}