VMM: perform per-guest-pcore init at setup (XCC)
[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 #define VMM_VMCALL_PRINTF       0x1     /* Enable VMCALL output console hack */
12
13 #define VMM_ALL_FLAGS   (VMM_VMCALL_PRINTF)
14
15 enum {
16         RESUME,
17         REG_RSP_RIP_CR3,
18         REG_RIP,
19         REG_ALL,
20 };
21
22 /* eventually, this is a system call. For now, it's #c/vmctl.
23  * You fill in the blanks, and write the struct to #c/vmctl.
24  * On return, i.e. vmexit, it's updated with the new values.
25  */
26 struct vmctl {
27         uint64_t command;
28         uint64_t cr3;
29         uint64_t gva;
30         uint64_t gpa;
31         uint64_t exit_qual;
32         uint64_t shutdown;
33         uint64_t ret_code;
34         uint64_t core;
35         uint32_t interrupt;
36         uint32_t intrinfo1;
37         uint32_t intrinfo2;
38         struct hw_trapframe regs;
39 };