vmm: Allow the user to set GUEST_FS/GS_BASE (XCC)
[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         uintptr_t                               fsbase;
19         uintptr_t                               gsbase;
20 };
21
22 /* Intel VM Trap Injection Fields */
23 #define VM_TRAP_VALID               (1 << 31)
24 #define VM_TRAP_ERROR_CODE          (1 << 11)
25 #define VM_TRAP_HARDWARE            (3 << 8)
26 /* End Intel VM Trap Injection Fields */