Updating Linux driver to use defined VM ID offset
The driver currently assumes VM IDs start at zero. They start at 1, which is
defined by HF_VM_ID_OFFSET.
Bug: 132421503
Change-Id: I2e4a63f1aabc3ffab9621df85cbc49c658cc1b92
diff --git a/main.c b/main.c
index b2e787a..9b55798 100644
--- a/main.c
+++ b/main.c
@@ -42,7 +42,7 @@
#define CONFIG_HAFNIUM_MAX_VMS 16
#define CONFIG_HAFNIUM_MAX_VCPUS 32
-#define FIRST_SECONDARY_VM_ID 1
+#define FIRST_SECONDARY_VM_ID (HF_VM_ID_OFFSET + 1)
struct hf_vcpu {
struct hf_vm *vm;
@@ -792,7 +792,7 @@
*/
static void hf_free_resources(void)
{
- spci_vm_id_t i;
+ uint16_t i;
spci_vcpu_index_t j;
/*