- Timestamp:
- May 21, 2008 9:28:34 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllShw.h
r9023 r9039 114 114 #if PGM_SHW_TYPE == PGM_TYPE_NESTED 115 115 return VERR_PAGE_TABLE_NOT_PRESENT; 116 #else 116 117 #else /* PGM_SHW_TYPE != PGM_TYPE_NESTED */ 117 118 /* 118 119 * Get the PDE. 119 120 */ 120 # if PGM_SHW_TYPE == PGM_TYPE_AMD64121 # if PGM_SHW_TYPE == PGM_TYPE_AMD64 121 122 bool fNoExecuteBitValid = !!(CPUMGetGuestEFER(pVM) & MSR_K6_EFER_NXE); 122 123 X86PDEPAE Pde; … … 152 153 Pde.n.u1NoExecute &= Pml4e.n.u1NoExecute & Pdpe.lm.u1NoExecute; 153 154 154 # elif PGM_SHW_TYPE == PGM_TYPE_PAE155 # elif PGM_SHW_TYPE == PGM_TYPE_PAE 155 156 bool fNoExecuteBitValid = !!(CPUMGetGuestEFER(pVM) & MSR_K6_EFER_NXE); 156 157 const unsigned iPDPT = (GCPtr >> SHW_PDPT_SHIFT) & SHW_PDPT_MASK; … … 158 159 X86PDEPAE Pde = CTXMID(pVM->pgm.s.ap,PaePDs)[iPDPT]->a[iPd]; 159 160 160 # else /* PGM_TYPE_32BIT */161 # else /* PGM_TYPE_32BIT */ 161 162 const unsigned iPd = (GCPtr >> X86_PD_SHIFT) & X86_PD_MASK; 162 163 X86PDE Pde = CTXMID(pVM->pgm.s.p,32BitPD)->a[iPd]; 163 # endif164 # endif 164 165 if (!Pde.n.u1Present) 165 166 return VERR_PAGE_TABLE_NOT_PRESENT; … … 179 180 else /* mapping: */ 180 181 { 181 # if PGM_SHW_TYPE == PGM_TYPE_AMD64182 # if PGM_SHW_TYPE == PGM_TYPE_AMD64 182 183 AssertFailed(); /* can't happen */ 183 # else184 # else 184 185 Assert(pgmMapAreMappingsEnabled(&pVM->pgm.s)); 185 186 186 187 PPGMMAPPING pMap = pgmGetMapping(pVM, (RTGCPTR)GCPtr); 187 188 AssertMsgReturn(pMap, ("GCPtr=%VGv\n", GCPtr), VERR_INTERNAL_ERROR); 188 # if PGM_SHW_TYPE == PGM_TYPE_32BIT189 # if PGM_SHW_TYPE == PGM_TYPE_32BIT 189 190 pPT = pMap->aPTs[(GCPtr - pMap->GCPtr) >> X86_PD_SHIFT].CTXALLSUFF(pPT); 190 # else /* PAE */191 # else /* PAE */ 191 192 pPT = pMap->aPTs[(GCPtr - pMap->GCPtr) >> X86_PD_SHIFT].CTXALLSUFF(paPaePTs); 193 # endif 192 194 # endif 193 #endif194 195 } 195 196 const unsigned iPt = (GCPtr >> SHW_PT_SHIFT) & SHW_PT_MASK; … … 218 219 219 220 return VINF_SUCCESS; 220 #endif /* PGM_SHW_TYPE == PGM_TYPE_NESTED */221 #endif /* PGM_SHW_TYPE != PGM_TYPE_NESTED */ 221 222 } 222 223 … … 238 239 PGM_SHW_DECL(int, ModifyPage)(PVM pVM, RTGCUINTPTR GCPtr, size_t cb, uint64_t fFlags, uint64_t fMask) 239 240 { 240 # if PGM_SHW_TYPE == PGM_TYPE_NESTED241 # if PGM_SHW_TYPE == PGM_TYPE_NESTED 241 242 return VERR_PAGE_TABLE_NOT_PRESENT; 242 #else 243 244 # else /* PGM_SHW_TYPE != PGM_TYPE_NESTED */ 243 245 int rc; 244 246 … … 251 253 * Get the PDE. 252 254 */ 253 # if PGM_SHW_TYPE == PGM_TYPE_AMD64255 # if PGM_SHW_TYPE == PGM_TYPE_AMD64 254 256 X86PDEPAE Pde; 255 257 /* PML4 */ … … 277 279 Pde = pPd->a[iPd]; 278 280 279 # elif PGM_SHW_TYPE == PGM_TYPE_PAE281 # elif PGM_SHW_TYPE == PGM_TYPE_PAE 280 282 const unsigned iPDPT = (GCPtr >> SHW_PDPT_SHIFT) & SHW_PDPT_MASK; 281 283 const unsigned iPd = (GCPtr >> X86_PD_PAE_SHIFT) & X86_PD_PAE_MASK; 282 284 X86PDEPAE Pde = CTXMID(pVM->pgm.s.ap,PaePDs)[iPDPT]->a[iPd]; 283 285 284 # else /* PGM_TYPE_32BIT */286 # else /* PGM_TYPE_32BIT */ 285 287 const unsigned iPd = (GCPtr >> X86_PD_SHIFT) & X86_PD_MASK; 286 288 X86PDE Pde = CTXMID(pVM->pgm.s.p,32BitPD)->a[iPd]; 287 # endif289 # endif 288 290 if (!Pde.n.u1Present) 289 291 return VERR_PAGE_TABLE_NOT_PRESENT; … … 315 317 } 316 318 } 317 # endif /* PGM_SHW_TYPE == PGM_TYPE_NESTED */319 # endif /* PGM_SHW_TYPE != PGM_TYPE_NESTED */ 318 320 } 319 321
Note:
See TracChangeset
for help on using the changeset viewer.