Sanitize vcoreid from untrusted sources
[akaros.git] / kern / include / ros / vmm.h
index 9c74762..fc0ac44 100644 (file)
@@ -8,6 +8,21 @@
 
 #include <ros/arch/vmm.h>
 
-#define        VMM_VMCALL_PRINTF       0x1     /* Enable VMCALL output console hack */
+/* VMCALL FUNCTION NUMBERS */
+#define VMCALL_PRINTC          0x1
+#define VMCALL_SMPBOOT         0x2
+#define VMCALL_GET_TSCFREQ     0x3
+#define VMCALL_TRACE_TF                0x4
 
-#define VMM_ALL_FLAGS  (VMM_VMCALL_PRINTF)
+#define VMM_CTL_GET_EXITS              1
+#define VMM_CTL_SET_EXITS              2
+#define VMM_CTL_GET_FLAGS              3
+#define VMM_CTL_SET_FLAGS              4
+
+#define VMM_CTL_EXIT_HALT              (1 << 0)
+#define VMM_CTL_EXIT_PAUSE             (1 << 1)
+#define VMM_CTL_EXIT_MWAIT             (1 << 2)
+#define VMM_CTL_ALL_EXITS              ((1 << 3) - 1)
+
+#define VMM_CTL_FL_KERN_PRINTC         (1 << 0)
+#define VMM_CTL_ALL_FLAGS              (VMM_CTL_FL_KERN_PRINTC)