Consistently use spci_vm_id_t for VM ID.
Change-Id: I1ce2b315e025478bc780a57e56f12eead932cb2e
diff --git a/main.c b/main.c
index 3ef6bad..cee5ffa 100644
--- a/main.c
+++ b/main.c
@@ -104,7 +104,7 @@
/**
* Retrieves a VM from its ID, returning NULL if the VM doesn't exist.
*/
-static struct hf_vm *hf_vm_from_id(uint32_t vm_id)
+static struct hf_vm *hf_vm_from_id(spci_vm_id_t vm_id)
{
if (vm_id < FIRST_SECONDARY_VM_ID ||
vm_id >= FIRST_SECONDARY_VM_ID + hf_vm_count)
@@ -167,7 +167,7 @@
*
* It wakes up the thread if it's sleeping, or kicks it if it's already running.
*/
-static void hf_handle_wake_up_request(uint32_t vm_id, uint16_t vcpu)
+static void hf_handle_wake_up_request(spci_vm_id_t vm_id, uint16_t vcpu)
{
struct hf_vm *vm = hf_vm_from_id(vm_id);
@@ -196,7 +196,7 @@
* Injects an interrupt into a vCPU of the VM and ensures the vCPU will run to
* handle the interrupt.
*/
-static void hf_interrupt_vm(uint32_t vm_id, uint64_t int_id)
+static void hf_interrupt_vm(spci_vm_id_t vm_id, uint64_t int_id)
{
struct hf_vm *vm = hf_vm_from_id(vm_id);
uint16_t vcpu;
@@ -231,9 +231,9 @@
/**
* Notify all waiters on the given VM.
*/
-static void hf_notify_waiters(uint32_t vm_id)
+static void hf_notify_waiters(spci_vm_id_t vm_id)
{
- int64_t waiter_vm_id;
+ spci_vm_id_t waiter_vm_id;
while ((waiter_vm_id = hf_mailbox_waiter_get(vm_id)) != -1) {
if (waiter_vm_id == HF_PRIMARY_VM_ID) {
@@ -251,7 +251,7 @@
/**
* Delivers a message to a VM.
*/
-static void hf_deliver_message(uint32_t vm_id)
+static void hf_deliver_message(spci_vm_id_t vm_id)
{
struct hf_vm *vm = hf_vm_from_id(vm_id);
uint32_t i;