win-pvdrivers

view common/include/public/hvm/vmx_assist.h @ 62:edd4a2ad5b44

Removed old inf files
author James Harper <james.harper@bendigoit.com.au>
date Wed Dec 19 10:22:50 2007 +1100 (2007-12-19)
parents 5712dede5a1b
children
line source
1 /*
2 * vmx_assist.h: Context definitions for the VMXASSIST world switch.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to
6 * deal in the Software without restriction, including without limitation the
7 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8 * sell copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 *
22 * Leendert van Doorn, leendert@watson.ibm.com
23 * Copyright (c) 2005, International Business Machines Corporation.
24 */
26 #ifndef _VMX_ASSIST_H_
27 #define _VMX_ASSIST_H_
29 #define VMXASSIST_BASE 0xD0000
30 #define VMXASSIST_MAGIC 0x17101966
31 #define VMXASSIST_MAGIC_OFFSET (VMXASSIST_BASE+8)
33 #define VMXASSIST_NEW_CONTEXT (VMXASSIST_BASE + 12)
34 #define VMXASSIST_OLD_CONTEXT (VMXASSIST_NEW_CONTEXT + 4)
36 #ifndef __ASSEMBLY__
38 #define NR_EXCEPTION_HANDLER 32
39 #define NR_INTERRUPT_HANDLERS 16
40 #define NR_TRAPS (NR_EXCEPTION_HANDLER+NR_INTERRUPT_HANDLERS)
42 union vmcs_arbytes {
43 struct arbyte_fields {
44 unsigned int seg_type : 4,
45 s : 1,
46 dpl : 2,
47 p : 1,
48 reserved0 : 4,
49 avl : 1,
50 reserved1 : 1,
51 default_ops_size: 1,
52 g : 1,
53 null_bit : 1,
54 reserved2 : 15;
55 } fields;
56 unsigned int bytes;
57 };
59 /*
60 * World switch state
61 */
62 struct vmx_assist_context {
63 uint32_t eip; /* execution pointer */
64 uint32_t esp; /* stack pointer */
65 uint32_t eflags; /* flags register */
66 uint32_t cr0;
67 uint32_t cr3; /* page table directory */
68 uint32_t cr4;
69 uint32_t idtr_limit; /* idt */
70 uint32_t idtr_base;
71 uint32_t gdtr_limit; /* gdt */
72 uint32_t gdtr_base;
73 uint32_t cs_sel; /* cs selector */
74 uint32_t cs_limit;
75 uint32_t cs_base;
76 union vmcs_arbytes cs_arbytes;
77 uint32_t ds_sel; /* ds selector */
78 uint32_t ds_limit;
79 uint32_t ds_base;
80 union vmcs_arbytes ds_arbytes;
81 uint32_t es_sel; /* es selector */
82 uint32_t es_limit;
83 uint32_t es_base;
84 union vmcs_arbytes es_arbytes;
85 uint32_t ss_sel; /* ss selector */
86 uint32_t ss_limit;
87 uint32_t ss_base;
88 union vmcs_arbytes ss_arbytes;
89 uint32_t fs_sel; /* fs selector */
90 uint32_t fs_limit;
91 uint32_t fs_base;
92 union vmcs_arbytes fs_arbytes;
93 uint32_t gs_sel; /* gs selector */
94 uint32_t gs_limit;
95 uint32_t gs_base;
96 union vmcs_arbytes gs_arbytes;
97 uint32_t tr_sel; /* task selector */
98 uint32_t tr_limit;
99 uint32_t tr_base;
100 union vmcs_arbytes tr_arbytes;
101 uint32_t ldtr_sel; /* ldtr selector */
102 uint32_t ldtr_limit;
103 uint32_t ldtr_base;
104 union vmcs_arbytes ldtr_arbytes;
106 unsigned char rm_irqbase[2];
107 };
108 typedef struct vmx_assist_context vmx_assist_context_t;
110 #endif /* __ASSEMBLY__ */
112 #endif /* _VMX_ASSIST_H_ */
114 /*
115 * Local variables:
116 * mode: C
117 * c-set-style: "BSD"
118 * c-basic-offset: 4
119 * tab-width: 4
120 * indent-tabs-mode: nil
121 * End:
122 */