fix(dir_msg): enforce direct message ABI pairs
FF-A v1.2 spec introduces two new ABIs for direct messaging,
FFA_MSG_SEND_DIRECT_REQ2 and FFA_MSG_SEND_DIRECT_RESP2.
This patch ensures the newly introduced ABIs are always used
as a pair and never mixed with the existing ABIs.
Signed-off-by: Kathleen Capella <kathleen.capella@arm.com>
Change-Id: I0b04eab68a4b31c1b26bbc7f5ee93e9ab4e91175
diff --git a/inc/hf/vcpu.h b/inc/hf/vcpu.h
index e9387f2..d3b2bdd 100644
--- a/inc/hf/vcpu.h
+++ b/inc/hf/vcpu.h
@@ -128,12 +128,18 @@
/*
* If the current vCPU is executing as a consequence of a
- * FFA_MSG_SEND_DIRECT_REQ invocation, then this member holds the
+ * direct request invocation, then this member holds the
* originating VM ID from which the call originated.
* The value HF_INVALID_VM_ID implies the vCPU is not executing as
- * a result of a prior FFA_MSG_SEND_DIRECT_REQ invocation.
+ * a result of a prior direct request invocation.
*/
- ffa_id_t direct_request_origin_vm_id;
+ struct {
+ /**
+ * Indicate whether request is via FFA_MSG_SEND_DIRECT_REQ2.
+ */
+ bool is_ffa_req2;
+ ffa_id_t vm_id;
+ } direct_request_origin;
/** Determine whether partition is currently handling managed exit. */
bool processing_managed_exit;