Displaying 1 result from an estimated 1 matches for "max_vmid".
Did you mean:
max_vid
2013 Sep 06
2
[PATCH] xen: arm: improve VMID allocation.
...m/p2m.c
@@ -3,6 +3,7 @@
#include <xen/lib.h>
#include <xen/errno.h>
#include <xen/domain_page.h>
+#include <xen/bitops.h>
#include <asm/flushtlb.h>
#include <asm/gic.h>
@@ -306,6 +307,46 @@ int p2m_alloc_table(struct domain *d)
return 0;
}
+#define MAX_VMID 256
+
+/* VTTBR_EL2 VMID field is 8 bits. Using a bitmap here limits us to
+ * 256 concurrent domains. */
+DECLARE_BITMAP(vmid_mask, MAX_VMID);
+
+void p2m_vmid_allocator_init(void)
+{
+ /* VMID 0 is reserved */
+ set_bit(0, vmid_mask);
+}
+
+/* p2m_alloc|free_vmid must both be called with th...