ia64/xen-unstable

view xen/include/public/vmx_assist.h @ 5755:be1153585cb0

Fix hgignore regexps some more.
author kaf24@firebug.cl.cam.ac.uk
date Tue Jul 12 16:19:59 2005 +0000 (2005-07-12)
parents 2b6c1a809807
children b3a255e88810
line source
1 /*
2 * vmx_assist.h: Context definitions for the VMXASSIST world switch.
3 *
4 * Leendert van Doorn, leendert@watson.ibm.com
5 * Copyright (c) 2005, International Business Machines Corporation.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms and conditions of the GNU General Public License,
9 * version 2, as published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * more details.
15 *
16 * You should have received a copy of the GNU General Public License along with
17 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
18 * Place - Suite 330, Boston, MA 02111-1307 USA.
19 *
20 */
21 #ifndef _VMX_ASSIST_H_
22 #define _VMX_ASSIST_H_
24 #define VMXASSIST_BASE 0xD0000
25 #define VMXASSIST_MAGIC 0x17101966
26 #define VMXASSIST_MAGIC_OFFSET (VMXASSIST_BASE+8)
28 #define VMXASSIST_NEW_CONTEXT (VMXASSIST_BASE + 12)
29 #define VMXASSIST_OLD_CONTEXT (VMXASSIST_NEW_CONTEXT + 4)
31 #ifndef __ASSEMBLY__
33 union vmcs_arbytes {
34 struct arbyte_fields {
35 unsigned int seg_type : 4,
36 s : 1,
37 dpl : 2,
38 p : 1,
39 reserved0 : 4,
40 avl : 1,
41 reserved1 : 1,
42 default_ops_size: 1,
43 g : 1,
44 null_bit : 1,
45 reserved2 : 15;
46 } fields;
47 unsigned int bytes;
48 };
50 /*
51 * World switch state
52 */
53 typedef struct vmx_assist_context {
54 u32 eip; /* execution pointer */
55 u32 esp; /* stack point */
56 u32 eflags; /* flags register */
57 u32 cr0;
58 u32 cr3; /* page table directory */
59 u32 cr4;
60 u32 idtr_limit; /* idt */
61 u32 idtr_base;
62 u32 gdtr_limit; /* gdt */
63 u32 gdtr_base;
64 u32 cs_sel; /* cs selector */
65 u32 cs_limit;
66 u32 cs_base;
67 union vmcs_arbytes cs_arbytes;
68 u32 ds_sel; /* ds selector */
69 u32 ds_limit;
70 u32 ds_base;
71 union vmcs_arbytes ds_arbytes;
72 u32 es_sel; /* es selector */
73 u32 es_limit;
74 u32 es_base;
75 union vmcs_arbytes es_arbytes;
76 u32 ss_sel; /* ss selector */
77 u32 ss_limit;
78 u32 ss_base;
79 union vmcs_arbytes ss_arbytes;
80 u32 fs_sel; /* fs selector */
81 u32 fs_limit;
82 u32 fs_base;
83 union vmcs_arbytes fs_arbytes;
84 u32 gs_sel; /* gs selector */
85 u32 gs_limit;
86 u32 gs_base;
87 union vmcs_arbytes gs_arbytes;
88 u32 tr_sel; /* task selector */
89 u32 tr_limit;
90 u32 tr_base;
91 union vmcs_arbytes tr_arbytes;
92 u32 ldtr_sel; /* ldtr selector */
93 u32 ldtr_limit;
94 u32 ldtr_base;
95 union vmcs_arbytes ldtr_arbytes;
96 } vmx_assist_context_t;
98 #endif /* __ASSEMBLY__ */
100 #endif /* _VMX_ASSIST_H_ */