ia64/xen-unstable

view xen/include/asm-ia64/bundle.h @ 10938:bfc69471550e

[IA64] fix a fetch code bug

Fetch code may fail, if there is no corresponding tlb entry
in THASH-VTLB. This patch adds "retry mechanism" to resolve
this issue.

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
author awilliam@xenbuild.aw
date Wed Aug 09 08:01:52 2006 -0600 (2006-08-09)
parents c8bc76d877e0
children 1d74c51c2d5a
line source
1 #ifndef _XEN_IA64_BUNDLE_H
2 #define _XEN_IA64_BUNDLE_H
4 typedef unsigned long IA64_INST;
6 typedef union U_IA64_BUNDLE {
7 unsigned long i64[2];
8 struct { unsigned long template:5,slot0:41,slot1a:18,slot1b:23,slot2:41; };
9 // NOTE: following doesn't work because bitfields can't cross natural
10 // size boundaries
11 //struct { unsigned long template:5, slot0:41, slot1:41, slot2:41; };
12 } IA64_BUNDLE;
14 typedef enum E_IA64_SLOT_TYPE { I, M, F, B, L, ILLEGAL } IA64_SLOT_TYPE;
16 typedef union U_INST64_A5 {
17 IA64_INST inst;
18 struct { unsigned long qp:6, r1:7, imm7b:7, r3:2, imm5c:5, imm9d:9, s:1, major:4; };
19 } INST64_A5;
21 typedef union U_INST64_B4 {
22 IA64_INST inst;
23 struct { unsigned long qp:6, btype:3, un3:3, p:1, b2:3, un11:11, x6:6, wh:2, d:1, un1:1, major:4; };
24 } INST64_B4;
26 typedef union U_INST64_B8 {
27 IA64_INST inst;
28 struct { unsigned long qp:6, un21:21, x6:6, un4:4, major:4; };
29 } INST64_B8;
31 typedef union U_INST64_B9 {
32 IA64_INST inst;
33 struct { unsigned long qp:6, imm20:20, :1, x6:6, :3, i:1, major:4; };
34 } INST64_B9;
36 typedef union U_INST64_I19 {
37 IA64_INST inst;
38 struct { unsigned long qp:6, imm20:20, :1, x6:6, x3:3, i:1, major:4; };
39 } INST64_I19;
41 typedef union U_INST64_I26 {
42 IA64_INST inst;
43 struct { unsigned long qp:6, :7, r2:7, ar3:7, x6:6, x3:3, :1, major:4;};
44 } INST64_I26;
46 typedef union U_INST64_I27 {
47 IA64_INST inst;
48 struct { unsigned long qp:6, :7, imm:7, ar3:7, x6:6, x3:3, s:1, major:4;};
49 } INST64_I27;
51 typedef union U_INST64_I28 { // not privileged (mov from AR)
52 IA64_INST inst;
53 struct { unsigned long qp:6, r1:7, :7, ar3:7, x6:6, x3:3, :1, major:4;};
54 } INST64_I28;
56 typedef union U_INST64_M28 {
57 IA64_INST inst;
58 struct { unsigned long qp:6, :14, r3:7, x6:6, x3:3, :1, major:4;};
59 } INST64_M28;
61 typedef union U_INST64_M29 {
62 IA64_INST inst;
63 struct { unsigned long qp:6, :7, r2:7, ar3:7, x6:6, x3:3, :1, major:4;};
64 } INST64_M29;
66 typedef union U_INST64_M30 {
67 IA64_INST inst;
68 struct { unsigned long qp:6, :7, imm:7, ar3:7,x4:4,x2:2,x3:3,s:1,major:4;};
69 } INST64_M30;
71 typedef union U_INST64_M31 {
72 IA64_INST inst;
73 struct { unsigned long qp:6, r1:7, :7, ar3:7, x6:6, x3:3, :1, major:4;};
74 } INST64_M31;
76 typedef union U_INST64_M32 {
77 IA64_INST inst;
78 struct { unsigned long qp:6, :7, r2:7, cr3:7, x6:6, x3:3, :1, major:4;};
79 } INST64_M32;
81 typedef union U_INST64_M33 {
82 IA64_INST inst;
83 struct { unsigned long qp:6, r1:7, :7, cr3:7, x6:6, x3:3, :1, major:4; };
84 } INST64_M33;
86 typedef union U_INST64_M35 {
87 IA64_INST inst;
88 struct { unsigned long qp:6, :7, r2:7, :7, x6:6, x3:3, :1, major:4; };
90 } INST64_M35;
92 typedef union U_INST64_M36 {
93 IA64_INST inst;
94 struct { unsigned long qp:6, r1:7, :14, x6:6, x3:3, :1, major:4; };
95 } INST64_M36;
97 typedef union U_INST64_M37 {
98 IA64_INST inst;
99 struct { unsigned long qp:6, imm20a:20,:1, x4:4,x2:2,x3:3, i:1, major:4; };
100 } INST64_M37;
102 typedef union U_INST64_M41 {
103 IA64_INST inst;
104 struct { unsigned long qp:6, :7, r2:7, :7, x6:6, x3:3, :1, major:4; };
105 } INST64_M41;
107 typedef union U_INST64_M42 {
108 IA64_INST inst;
109 struct { unsigned long qp:6, :7, r2:7, r3:7, x6:6, x3:3, :1, major:4; };
110 } INST64_M42;
112 typedef union U_INST64_M43 {
113 IA64_INST inst;
114 struct { unsigned long qp:6, r1:7, :7, r3:7, x6:6, x3:3, :1, major:4; };
115 } INST64_M43;
117 typedef union U_INST64_M44 {
118 IA64_INST inst;
119 struct { unsigned long qp:6, imm:21, x4:4, i2:2, x3:3, i:1, major:4; };
120 } INST64_M44;
122 typedef union U_INST64_M45 {
123 IA64_INST inst;
124 struct { unsigned long qp:6, :7, r2:7, r3:7, x6:6, x3:3, :1, major:4; };
125 } INST64_M45;
127 typedef union U_INST64_M46 {
128 IA64_INST inst;
129 struct { unsigned long qp:6, r1:7, un7:7, r3:7, x6:6, x3:3, un1:1, major:4; };
130 } INST64_M46;
132 typedef union U_INST64_M47 {
133 IA64_INST inst;
134 struct { unsigned long qp:6, un14:14, r3:7, x6:6, x3:3, un1:1, major:4; };
135 } INST64_M47;
137 typedef union U_INST64_M1{
138 IA64_INST inst;
139 struct { unsigned long qp:6, r1:7, un7:7, r3:7, x:1, hint:2, x6:6, m:1, major:4; };
140 } INST64_M1;
142 typedef union U_INST64_M2{
143 IA64_INST inst;
144 struct { unsigned long qp:6, r1:7, r2:7, r3:7, x:1, hint:2, x6:6, m:1, major:4; };
145 } INST64_M2;
147 typedef union U_INST64_M3{
148 IA64_INST inst;
149 struct { unsigned long qp:6, r1:7, imm7:7, r3:7, i:1, hint:2, x6:6, s:1, major:4; };
150 } INST64_M3;
152 typedef union U_INST64_M4 {
153 IA64_INST inst;
154 struct { unsigned long qp:6, un7:7, r2:7, r3:7, x:1, hint:2, x6:6, m:1, major:4; };
155 } INST64_M4;
157 typedef union U_INST64_M5 {
158 IA64_INST inst;
159 struct { unsigned long qp:6, imm7:7, r2:7, r3:7, i:1, hint:2, x6:6, s:1, major:4; };
160 } INST64_M5;
162 typedef union U_INST64_M6 {
163 IA64_INST inst;
164 struct { unsigned long qp:6, f1:7, un7:7, r3:7, x:1, hint:2, x6:6, m:1, major:4; };
165 } INST64_M6;
167 typedef union U_INST64_M9 {
168 IA64_INST inst;
169 struct { unsigned long qp:6, :7, f2:7, r3:7, x:1, hint:2, x6:6, m:1, major:4; };
170 } INST64_M9;
172 typedef union U_INST64_M10 {
173 IA64_INST inst;
174 struct { unsigned long qp:6, imm7:7, f2:7, r3:7, i:1, hint:2, x6:6, s:1, major:4; };
175 } INST64_M10;
177 typedef union U_INST64_M12 {
178 IA64_INST inst;
179 struct { unsigned long qp:6, f1:7, f2:7, r3:7, x:1, hint:2, x6:6, m:1, major:4; };
180 } INST64_M12;
182 typedef union U_INST64_M15 {
183 IA64_INST inst;
184 struct { unsigned long qp:6, :7, imm7:7, r3:7, i:1, hint:2, x6:6, s:1, major:4; };
185 } INST64_M15;
187 typedef union U_INST64 {
188 IA64_INST inst;
189 struct { unsigned long :37, major:4; } generic;
190 INST64_A5 A5; // used in build_hypercall_bundle only
191 INST64_B4 B4; // used in build_hypercall_bundle only
192 INST64_B8 B8; // rfi, bsw.[01]
193 INST64_B9 B9; // break.b
194 INST64_I19 I19; // used in build_hypercall_bundle only
195 INST64_I26 I26; // mov register to ar (I unit)
196 INST64_I27 I27; // mov immediate to ar (I unit)
197 INST64_I28 I28; // mov from ar (I unit)
198 INST64_M1 M1; // ld integer
199 INST64_M2 M2;
200 INST64_M3 M3;
201 INST64_M4 M4; // st integer
202 INST64_M5 M5;
203 INST64_M6 M6; // ldfd floating pointer
204 INST64_M9 M9; // stfd floating pointer
205 INST64_M10 M10; // stfd floating pointer
206 INST64_M12 M12; // ldfd pair floating pointer
207 INST64_M15 M15; // lfetch + imm update
208 INST64_M28 M28; // purge translation cache entry
209 INST64_M29 M29; // mov register to ar (M unit)
210 INST64_M30 M30; // mov immediate to ar (M unit)
211 INST64_M31 M31; // mov from ar (M unit)
212 INST64_M32 M32; // mov reg to cr
213 INST64_M33 M33; // mov from cr
214 INST64_M35 M35; // mov to psr
215 INST64_M36 M36; // mov from psr
216 INST64_M37 M37; // break.m
217 INST64_M41 M41; // translation cache insert
218 INST64_M42 M42; // mov to indirect reg/translation reg insert
219 INST64_M43 M43; // mov from indirect reg
220 INST64_M44 M44; // set/reset system mask
221 INST64_M45 M45; // translation purge
222 INST64_M46 M46; // translation access (tpa,tak)
223 INST64_M47 M47; // purge translation entry
224 } INST64;
226 extern unsigned long __vmx_get_domain_bundle(unsigned long iip, IA64_BUNDLE *pbundle);
227 extern IA64_BUNDLE __get_domain_bundle(unsigned long iip);
229 #define MASK_41 ((unsigned long)0x1ffffffffff)
231 #endif /* _XEN_IA64_BUNDLE_H */