2 * vmx_assist.h: Context definitions for the VMXASSIST world switch.
4 * Leendert van Doorn, leendert@watson.ibm.com
5 * Copyright (c) 2005, International Business Machines Corporation.
11 #define VMXASSIST_BASE 0xD0000
12 #define VMXASSIST_MAGIC 0x17101966
13 #define VMXASSIST_MAGIC_OFFSET (VMXASSIST_BASE+8)
15 #define VMXASSIST_NEW_CONTEXT (VMXASSIST_BASE + 12)
16 #define VMXASSIST_OLD_CONTEXT (VMXASSIST_NEW_CONTEXT + 4)
21 struct arbyte_fields {
22 unsigned int seg_type : 4,
40 struct vmx_assist_context {
41 uint32_t eip; /* execution pointer */
42 uint32_t esp; /* stack pointer */
43 uint32_t eflags; /* flags register */
45 uint32_t cr3; /* page table directory */
47 uint32_t idtr_limit; /* idt */
49 uint32_t gdtr_limit; /* gdt */
51 uint32_t cs_sel; /* cs selector */
54 union vmcs_arbytes cs_arbytes;
55 uint32_t ds_sel; /* ds selector */
58 union vmcs_arbytes ds_arbytes;
59 uint32_t es_sel; /* es selector */
62 union vmcs_arbytes es_arbytes;
63 uint32_t ss_sel; /* ss selector */
66 union vmcs_arbytes ss_arbytes;
67 uint32_t fs_sel; /* fs selector */
70 union vmcs_arbytes fs_arbytes;
71 uint32_t gs_sel; /* gs selector */
74 union vmcs_arbytes gs_arbytes;
75 uint32_t tr_sel; /* task selector */
78 union vmcs_arbytes tr_arbytes;
79 uint32_t ldtr_sel; /* ldtr selector */
82 union vmcs_arbytes ldtr_arbytes;
84 typedef struct vmx_assist_context vmx_assist_context_t;
86 #endif /* __ASSEMBLY__ */
88 #endif /* _VMX_ASSIST_H_ */
96 * indent-tabs-mode: nil