refactor(memory share): split check of hyp retrieve request
Section 17.4.3 of the FF-A v1.2 ALP0 spec states that the SPM should
distinguish between retrieve request originating from the hypervisor and
one originating from a Borrower VM, forwarded by the Hypervisor by
checking the endpoint memory access descriptor count. For the former
case the count should be 0 otherwise >=1. This patch separates this
check from the validation that the all other fields in the transaction
descriptor, except the handle, are 0.
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
Change-Id: I1829069450633db560048cf0bc08d1ad055a8dcc
diff --git a/src/api.c b/src/api.c
index 3ab64a7..39ab353 100644
--- a/src/api.c
+++ b/src/api.c
@@ -3707,7 +3707,7 @@
goto out;
}
- if (!is_ffa_hypervisor_retrieve_request(retrieve_msg, to_locked)) {
+ if (!is_ffa_hypervisor_retrieve_request(retrieve_msg)) {
if (!ffa_memory_region_sanity_check(retrieve_msg, ffa_version,
fragment_length, false)) {
ret = ffa_error(FFA_INVALID_PARAMETERS);