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/inc/hf/api.h b/inc/hf/api.h
index ebc6b20..8c6328c 100644
--- a/inc/hf/api.h
+++ b/inc/hf/api.h
@@ -54,14 +54,15 @@
 			     spci_vcpu_index_t target_vcpu_idx, uint32_t intid,
 			     struct vcpu *current, struct vcpu **next);
 
-spci_return_t api_spci_msg_send(uint32_t attributes, struct vcpu *current,
-				struct vcpu **next);
+struct spci_value api_spci_msg_send(spci_vm_id_t sender_vm_id,
+				    spci_vm_id_t receiver_vm_id, uint32_t size,
+				    uint32_t attributes, struct vcpu *current,
+				    struct vcpu **next);
 struct spci_value api_spci_msg_recv(bool block, struct vcpu *current,
 				    struct vcpu **next);
 void api_yield(struct vcpu *current, struct vcpu **next);
 struct spci_value api_spci_version(void);
-spci_return_t api_spci_share_memory(struct vm_locked to_locked,
-				    struct vm_locked from_locked,
-				    struct spci_memory_region *memory_region,
-				    uint32_t memory_to_attributes,
-				    enum spci_memory_share share);
+struct spci_value api_spci_share_memory(
+	struct vm_locked to_locked, struct vm_locked from_locked,
+	struct spci_memory_region *memory_region, uint32_t memory_to_attributes,
+	enum spci_memory_share share);
diff --git a/inc/hf/spci_internal.h b/inc/hf/spci_internal.h
index 8f2a500..e046233 100644
--- a/inc/hf/spci_internal.h
+++ b/inc/hf/spci_internal.h
@@ -68,11 +68,11 @@
 	return (struct spci_value){.func = SPCI_ERROR_32, .arg1 = error_code};
 }
 
-spci_return_t spci_msg_handle_architected_message(
+struct spci_value spci_msg_handle_architected_message(
 	struct vm_locked to_locked, struct vm_locked from_locked,
 	const struct spci_architected_message_header
 		*architected_message_replica,
-	struct spci_message *from_msg_replica, struct spci_message *to_msg);
+	uint32_t size);
 
 bool spci_msg_check_transition(struct vm *to, struct vm *from,
 			       enum spci_memory_share share,
diff --git a/inc/hf/vm.h b/inc/hf/vm.h
index 7ea1e12..4762a2e 100644
--- a/inc/hf/vm.h
+++ b/inc/hf/vm.h
@@ -60,8 +60,17 @@
 
 struct mailbox {
 	enum mailbox_state state;
-	struct spci_message *recv;
-	const struct spci_message *send;
+	void *recv;
+	const void *send;
+
+	/** The ID of the VM which sent the message currently in `recv`. */
+	spci_vm_id_t recv_sender;
+
+	/** The size of the message currently in `recv`. */
+	uint32_t recv_size;
+
+	/** The attributes of the message currently in `recv`. */
+	uint32_t recv_attributes;
 
 	/**
 	 * List of wait_entry structs representing VMs that want to be notified