3fa7cf2b3d6b73d5884e1f2d6dd28859750497ac
[akaros.git] / kern / arch / x86 / ros / vmm.h
1 /* Copyright (c) 2015 Google Inc.
2  * Barret Rhoden <brho@cs.berkeley.edu>
3  * See LICENSE for details.
4  *
5  * x86 VMM kernel headers */
6
7 #pragma once
8
9 #include <ros/arch/vmx.h>
10
11 /* Initialization data provided by the userspace part of the VMM when setting
12  * up a guest physical core (vmx vcpu). */
13 struct vmm_gpcore_init {
14         void                                    *posted_irq_desc;
15         void                                    *vapic_addr;
16         void                                    *apic_addr;
17         void                                    *user_data;
18 };
19
20 /* Intel VM Trap Injection Fields */
21 #define VM_TRAP_VALID               (1 << 31)
22 #define VM_TRAP_ERROR_CODE          (1 << 11)
23 #define VM_TRAP_HARDWARE            (3 << 8)
24 /* End Intel VM Trap Injection Fields */