Use spci_vm_id_t for VM IDs, and rename vm_get to vm_find.

This means that we consistently use _get for looking up by index, _find
for looking up by ID (even if the ID happens to be the same as the index
for now).

Change-Id: I54c958be771151316781f80e2057e3076fc4ae0c
diff --git a/inc/hf/api.h b/inc/hf/api.h
index 75a85e2..1de07ec 100644
--- a/inc/hf/api.h
+++ b/inc/hf/api.h
@@ -25,17 +25,17 @@
 void api_init(struct mpool *ppool);
 int64_t api_vm_get_id(const struct vcpu *current);
 int64_t api_vm_get_count(void);
-int64_t api_vcpu_get_count(uint32_t vm_id, const struct vcpu *current);
+int64_t api_vcpu_get_count(spci_vm_id_t vm_id, const struct vcpu *current);
 void api_regs_state_saved(struct vcpu *vcpu);
-struct hf_vcpu_run_return api_vcpu_run(uint32_t vm_id, uint32_t vcpu_idx,
+struct hf_vcpu_run_return api_vcpu_run(spci_vm_id_t vm_id, uint32_t vcpu_idx,
 				       const struct vcpu *current,
 				       struct vcpu **next);
 int64_t api_vm_configure(ipaddr_t send, ipaddr_t recv, struct vcpu *current,
 			 struct vcpu **next);
 int64_t api_mailbox_clear(struct vcpu *current, struct vcpu **next);
 int64_t api_mailbox_writable_get(const struct vcpu *current);
-int64_t api_mailbox_waiter_get(uint32_t vm_id, const struct vcpu *current);
-int64_t api_share_memory(uint32_t vm_id, ipaddr_t addr, size_t size,
+int64_t api_mailbox_waiter_get(spci_vm_id_t vm_id, const struct vcpu *current);
+int64_t api_share_memory(spci_vm_id_t vm_id, ipaddr_t addr, size_t size,
 			 enum hf_share share, struct vcpu *current);
 
 struct vcpu *api_preempt(struct vcpu *current);
@@ -44,9 +44,9 @@
 
 int64_t api_interrupt_enable(uint32_t intid, bool enable, struct vcpu *current);
 uint32_t api_interrupt_get(struct vcpu *current);
-int64_t api_interrupt_inject(uint32_t target_vm_id, uint32_t target_vcpu_idx,
-			     uint32_t intid, struct vcpu *current,
-			     struct vcpu **next);
+int64_t api_interrupt_inject(spci_vm_id_t target_vm_id,
+			     uint32_t target_vcpu_idx, uint32_t intid,
+			     struct vcpu *current, struct vcpu **next);
 
 int32_t api_spci_msg_send(uint32_t attributes, struct vcpu *current,
 			  struct vcpu **next);
diff --git a/inc/hf/vm.h b/inc/hf/vm.h
index c54c5f0..9548f2b 100644
--- a/inc/hf/vm.h
+++ b/inc/hf/vm.h
@@ -94,7 +94,7 @@
 
 bool vm_init(uint32_t vcpu_count, struct mpool *ppool, struct vm **new_vm);
 uint32_t vm_get_count(void);
-struct vm *vm_get(uint32_t id);
+struct vm *vm_find(spci_vm_id_t id);
 struct vm_locked vm_lock(struct vm *vm);
 void vm_unlock(struct vm_locked *locked);
 struct vcpu *vm_get_vcpu(struct vm *vm, uint32_t vcpu_index);