refactor: extract VM's log buffer into separate struct

Extract the `log_buffer` and `log_buffer_length` fields from the `vm`
struct into a separate `log_buffer` struct.

Change-Id: I5d63418b6d9ee9dcf7792d89a229beea28d02c48
Signed-off-by: Karl Meakin <karl.meakin@arm.com>
diff --git a/inc/hf/api.h b/inc/hf/api.h
index 4c30552..5bbbe7f 100644
--- a/inc/hf/api.h
+++ b/inc/hf/api.h
@@ -154,6 +154,7 @@
 struct ffa_value api_ffa_mem_perm_set(vaddr_t base_addr, uint32_t page_count,
 				      uint32_t mem_perm, struct vcpu *current);
 
+void api_flush_log_buffer(ffa_id_t id, struct log_buffer *buffer);
 struct ffa_value api_ffa_console_log(const struct ffa_value args,
 				     struct vcpu *current);
 
diff --git a/inc/hf/vm.h b/inc/hf/vm.h
index bdd029a..3559634 100644
--- a/inc/hf/vm.h
+++ b/inc/hf/vm.h
@@ -199,6 +199,11 @@
 	bool permissive;
 };
 
+struct log_buffer {
+	char chars[LOG_BUFFER_SIZE];
+	uint16_t len;
+};
+
 struct vm {
 	ffa_id_t id;
 	struct ffa_uuid uuids[PARTITION_MAX_UUIDS];
@@ -242,8 +247,7 @@
 		bool npi_injected;
 	} notifications;
 
-	char log_buffer[LOG_BUFFER_SIZE];
-	uint16_t log_buffer_length;
+	struct log_buffer log_buffer;
 
 	/**
 	 * Wait entries to be used when waiting on other VM mailboxes. See