Sanitize vcoreid from untrusted sources
[akaros.git] / kern / include / ros / vmm.h
1 /* Copyright (c) 2015 Google Inc.
2  * Barret Rhoden <brho@cs.berkeley.edu>
3  * See LICENSE for details.
4  *
5  * Arch-independent VMM kernel headers */
6
7 #pragma once
8
9 #include <ros/arch/vmm.h>
10
11 /* VMCALL FUNCTION NUMBERS */
12 #define VMCALL_PRINTC           0x1
13 #define VMCALL_SMPBOOT          0x2
14 #define VMCALL_GET_TSCFREQ      0x3
15 #define VMCALL_TRACE_TF         0x4
16
17 #define VMM_CTL_GET_EXITS               1
18 #define VMM_CTL_SET_EXITS               2
19 #define VMM_CTL_GET_FLAGS               3
20 #define VMM_CTL_SET_FLAGS               4
21
22 #define VMM_CTL_EXIT_HALT               (1 << 0)
23 #define VMM_CTL_EXIT_PAUSE              (1 << 1)
24 #define VMM_CTL_EXIT_MWAIT              (1 << 2)
25 #define VMM_CTL_ALL_EXITS               ((1 << 3) - 1)
26
27 #define VMM_CTL_FL_KERN_PRINTC          (1 << 0)
28 #define VMM_CTL_ALL_FLAGS               (VMM_CTL_FL_KERN_PRINTC)