Changeset 2119 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Apr 17, 2007 8:37:41 AM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 20439
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/SELMAll.cpp
r2117 r2119 145 145 146 146 147 VBOXDESC Desc;148 147 uint32_t u32Limit; 149 148 RTGCPTR pvFlat; 149 uint32_t u1Present, u1DescType, u1Granularity, u4Type; 150 150 151 151 if ( pHiddenSel 152 152 && CPUMAreHiddenSelRegsValid(pVM)) 153 153 { 154 Desc.Gen.u1Present = pHiddenSel->Attr.n.u1Present; 154 u1Present = pHiddenSel->Attr.n.u1Present; 155 u1Granularity = pHiddenSel->Attr.n.u1Granularity; 156 u1DescType = pHiddenSel->Attr.n.u1DescType; 157 u4Type = pHiddenSel->Attr.n.u4Type; 155 158 } 156 159 else 157 160 { 161 VBOXDESC Desc; 162 158 163 if (!(Sel & X86_SEL_LDT)) 159 164 { … … 188 193 | Desc.Gen.u16BaseLow ) 189 194 ); 195 196 u1Present = Desc.Gen.u1Present; 197 u1Granularity = Desc.Gen.u1Granularity; 198 u1DescType = Desc.Gen.u1DescType; 199 u4Type = Desc.Gen.u4Type; 190 200 } 191 201 … … 193 203 * Check if present. 194 204 */ 195 if ( Desc.Gen.u1Present)205 if (u1Present) 196 206 { 197 207 /* … … 199 209 */ 200 210 #define BOTH(a, b) ((a << 16) | b) 201 switch (BOTH( Desc.Gen.u1DescType, Desc.Gen.u4Type))211 switch (BOTH(u1DescType, u4Type)) 202 212 { 203 213 … … 252 262 } 253 263 /* check limit. */ 254 if (! Desc.Gen.u1Granularity && (RTGCUINTPTR)Addr > (RTGCUINTPTR)0xffff)264 if (!u1Granularity && (RTGCUINTPTR)Addr > (RTGCUINTPTR)0xffff) 255 265 return VERR_OUT_OF_SELECTOR_BOUNDS; 256 266 if ((RTGCUINTPTR)Addr <= u32Limit) … … 261 271 *ppvGC = pvFlat; 262 272 if (pcb) 263 *pcb = ( Desc.Gen.u1Granularity ? 0xffffffff : 0xffff) - (RTGCUINTPTR)Addr + 1;273 *pcb = (u1Granularity ? 0xffffffff : 0xffff) - (RTGCUINTPTR)Addr + 1; 264 274 return VINF_SUCCESS; 265 275
Note:
See TracChangeset
for help on using the changeset viewer.