Update spci_msg_send to new SPCI beta API.

This removes the header in the message buffers, as the header data is now
passed in the SPCI_MSG_SEND parameters.

Bug: 141469322
Change-Id: I3a61f5470fd95ba2d47df33f5c96466ba286af85
diff --git a/test/hftest/inc/hftest_impl.h b/test/hftest/inc/hftest_impl.h
index f3eb407..9598b12 100644
--- a/test/hftest/inc/hftest_impl.h
+++ b/test/hftest/inc/hftest_impl.h
@@ -140,8 +140,8 @@
 	const struct fdt_header *fdt;
 
 	/* These are used in services. */
-	struct spci_message *send;
-	struct spci_message *recv;
+	void *send;
+	void *recv;
 	size_t memory_size;
 };
 
@@ -291,12 +291,12 @@
 		ASSERT_EQ(run_res.sleep.ns, HF_SLEEP_INDEFINITE);             \
                                                                               \
 		/* Send the selected service to run and let it be handled. */ \
-		memcpy_s(send_buffer->payload, SPCI_MSG_PAYLOAD_MAX, service, \
+		memcpy_s(send_buffer, SPCI_MSG_PAYLOAD_MAX, service,          \
 			 msg_length);                                         \
-		spci_message_init(send_buffer, msg_length, vm_id,             \
-				  hf_vm_get_id());                            \
                                                                               \
-		ASSERT_EQ(spci_msg_send(0), 0);                               \
+		ASSERT_EQ(spci_msg_send(hf_vm_get_id(), vm_id, msg_length, 0) \
+				  .func,                                      \
+			  SPCI_SUCCESS_32);                                   \
 		run_res = hf_vcpu_run(vm_id, 0);                              \
 		ASSERT_EQ(run_res.code, HF_VCPU_RUN_YIELD);                   \
 	} while (0)
diff --git a/test/hftest/service.c b/test/hftest/service.c
index c04c253..ed35e74 100644
--- a/test/hftest/service.c
+++ b/test/hftest/service.c
@@ -95,8 +95,6 @@
 		}
 	}
 
-	struct spci_message *recv_msg = (struct spci_message *)recv;
-
 	/* Prepare the context. */
 
 	/* Set up the mailbox. */
@@ -104,7 +102,8 @@
 
 	/* Receive the name of the service to run. */
 	ret = spci_msg_wait();
-	memiter_init(&args, recv_msg->payload, spci_msg_send_size(ret));
+	ASSERT_EQ(ret.func, SPCI_MSG_SEND_32);
+	memiter_init(&args, recv, spci_msg_send_size(ret));
 	service = find_service(&args);
 	hf_mailbox_clear();
 
@@ -122,8 +121,8 @@
 	ctx = hftest_get_context();
 	memset_s(ctx, sizeof(*ctx), 0, sizeof(*ctx));
 	ctx->abort = abort;
-	ctx->send = (struct spci_message *)send;
-	ctx->recv = (struct spci_message *)recv;
+	ctx->send = send;
+	ctx->recv = recv;
 	ctx->memory_size = memory_size;
 
 	/* Pause so the next time cycles are given the service will be run. */