Consistently use spci_vm_id_t for VM ID.

Before we had a mix of spci_vm_id_t, uint32_t and uint64_t.

Change-Id: I7b51e48490f0f54064e1121242052873bddad2b5
diff --git a/inc/hf/arch/cpu.h b/inc/hf/arch/cpu.h
index ccacbbb..384da06 100644
--- a/inc/hf/arch/cpu.h
+++ b/inc/hf/arch/cpu.h
@@ -24,6 +24,8 @@
 
 #include "hf/addr.h"
 
+#include "vmapi/hf/spci.h"
+
 /**
  * Disables interrutps.
  */
@@ -38,7 +40,7 @@
  * Reset the register values other than the PC and argument which are set with
  * `arch_regs_set_pc_arg()`.
  */
-void arch_regs_reset(struct arch_regs *r, bool is_primary, uint64_t vm_id,
+void arch_regs_reset(struct arch_regs *r, bool is_primary, spci_vm_id_t vm_id,
 		     uint64_t vcpu_id, paddr_t table);
 
 /**
diff --git a/inc/hf/vm.h b/inc/hf/vm.h
index 9548f2b..e35edc6 100644
--- a/inc/hf/vm.h
+++ b/inc/hf/vm.h
@@ -73,7 +73,7 @@
 };
 
 struct vm {
-	uint32_t id;
+	spci_vm_id_t id;
 	/** See api.c for the partial ordering on locks. */
 	struct spinlock lock;
 	uint32_t vcpu_count;
diff --git a/inc/vmapi/hf/abi.h b/inc/vmapi/hf/abi.h
index 55c7491..a625a8e 100644
--- a/inc/vmapi/hf/abi.h
+++ b/inc/vmapi/hf/abi.h
@@ -16,6 +16,7 @@
 
 #pragma once
 
+#include "hf/spci.h"
 #include "hf/types.h"
 
 enum hf_vcpu_run_code {
@@ -88,11 +89,11 @@
 	enum hf_vcpu_run_code code;
 	union {
 		struct {
-			uint32_t vm_id;
+			spci_vm_id_t vm_id;
 			uint16_t vcpu;
 		} wake_up;
 		struct {
-			uint16_t vm_id;
+			spci_vm_id_t vm_id;
 		} message;
 		struct {
 			uint64_t ns;
diff --git a/inc/vmapi/hf/call.h b/inc/vmapi/hf/call.h
index 69296d6..239244f 100644
--- a/inc/vmapi/hf/call.h
+++ b/inc/vmapi/hf/call.h
@@ -48,7 +48,7 @@
 /**
  * Returns the VM's own ID.
  */
-static inline uint32_t hf_vm_get_id(void)
+static inline spci_vm_id_t hf_vm_get_id(void)
 {
 	return hf_call(HF_VM_GET_ID, 0, 0, 0);
 }
@@ -64,7 +64,7 @@
 /**
  * Returns the number of VCPUs configured in the given secondary VM.
  */
-static inline int64_t hf_vcpu_get_count(uint32_t vm_id)
+static inline int64_t hf_vcpu_get_count(spci_vm_id_t vm_id)
 {
 	return hf_call(HF_VCPU_GET_COUNT, vm_id, 0, 0);
 }
@@ -74,7 +74,7 @@
  *
  * Returns an hf_vcpu_run_return struct telling the scheduler what to do next.
  */
-static inline struct hf_vcpu_run_return hf_vcpu_run(uint32_t vm_id,
+static inline struct hf_vcpu_run_return hf_vcpu_run(spci_vm_id_t vm_id,
 						    uint32_t vcpu_idx)
 {
 	return hf_vcpu_run_return_decode(
@@ -179,7 +179,7 @@
  * Returns -1 on failure or if there are no waiters; the VM id of the next
  * waiter otherwise.
  */
-static inline int64_t hf_mailbox_waiter_get(uint32_t vm_id)
+static inline int64_t hf_mailbox_waiter_get(spci_vm_id_t vm_id)
 {
 	return hf_call(HF_MAILBOX_WAITER_GET, vm_id, 0, 0);
 }
@@ -217,7 +217,7 @@
  *  - 1 if it was called by the primary VM and the primary VM now needs to wake
  *    up or kick the target vCPU.
  */
-static inline int64_t hf_interrupt_inject(uint32_t target_vm_id,
+static inline int64_t hf_interrupt_inject(spci_vm_id_t target_vm_id,
 					  uint32_t target_vcpu_idx,
 					  uint32_t intid)
 {
@@ -233,7 +233,7 @@
  * TODO: replace this with a better API once we have decided what that should
  *       look like.
  */
-static inline int64_t hf_share_memory(uint32_t vm_id, hf_ipaddr_t addr,
+static inline int64_t hf_share_memory(spci_vm_id_t vm_id, hf_ipaddr_t addr,
 				      size_t size, enum hf_share share)
 {
 	return hf_call(HF_SHARE_MEMORY, (((uint64_t)vm_id) << 32) | share, addr,