Changeset 86461 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Oct 6, 2020 4:40:59 PM (4 years ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r86458 r86461 1193 1193 Assert( PdeSrc.n.u1User == PdeDst.n.u1User 1194 1194 && (PdeSrc.n.u1Write || !PdeDst.n.u1Write || pVCpu->pgm.s.cNetwareWp0Hacks > 0)); 1195 # ifndef PGM_WITHOUT_MAPPING 1195 # ifndef PGM_WITHOUT_MAPPINGS 1196 1196 if (PdeDst.u & PGM_PDFLAGS_MAPPING) 1197 1197 { … … 1204 1204 } 1205 1205 else 1206 # endif /* !PGM_WITHOUT_MAPPING */1206 # endif /* !PGM_WITHOUT_MAPPINGS */ 1207 1207 if (!fIsBigPage) 1208 1208 { … … 1302 1302 * Page directory is not present, mark shadow PDE not present. 1303 1303 */ 1304 # ifndef PGM_WITHOUT_MAPPINGS 1304 1305 if (!(PdeDst.u & PGM_PDFLAGS_MAPPING)) 1306 # endif 1305 1307 { 1306 1308 pgmPoolFree(pVM, PdeDst.u & SHW_PDE_PG_MASK, pShwPde->idx, iPDDst); … … 1309 1311 PGM_INVL_PG(pVCpu, GCPtrPage); 1310 1312 } 1313 # ifndef PGM_WITHOUT_MAPPINGS 1311 1314 else 1312 1315 { … … 1314 1317 STAM_COUNTER_INC(&pVCpu->pgm.s.CTX_SUFF(pStats)->CTX_MID_Z(Stat,InvalidatePagePDMappings)); 1315 1318 } 1319 # endif 1316 1320 } 1317 1321 return rc; … … 2984 2988 SHWPDE PdeDst = *pPdeDst; 2985 2989 2990 # ifndef PGM_WITHOUT_MAPPINGS 2986 2991 Assert(!(PdeDst.u & PGM_PDFLAGS_MAPPING)); 2992 # endif 2987 2993 Assert(!PdeDst.n.u1Present); /* We're only supposed to call SyncPT on PDE!P and conflicts.*/ 2988 2994 … … 3247 3253 PdeDst = pPDDst->a[iPDDst]; 3248 3254 # endif 3255 # ifndef PGM_WITHOUT_MAPPINGS 3249 3256 if (!(PdeDst.u & PGM_PDFLAGS_MAPPING)) 3257 # endif 3250 3258 { 3251 3259 if (!PdeDst.n.u1Present) … … 3781 3789 const SHWPDE PdeDst = pPDDst->a[iPDDst]; 3782 3790 # endif 3791 # ifndef PGM_WITHOUT_MAPPINGS 3783 3792 if (PdeDst.u & PGM_PDFLAGS_MAPPING) 3784 3793 { … … 3791 3800 } 3792 3801 } 3793 else if ( (PdeDst.u & X86_PDE_P) 3794 || ((PdeDst.u & (X86_PDE_P | PGM_PDFLAGS_TRACK_DIRTY)) == (X86_PDE_P | PGM_PDFLAGS_TRACK_DIRTY)) 3795 ) 3802 else 3803 # endif 3804 if ( (PdeDst.u & X86_PDE_P) 3805 || ((PdeDst.u & (X86_PDE_P | PGM_PDFLAGS_TRACK_DIRTY)) == (X86_PDE_P | PGM_PDFLAGS_TRACK_DIRTY)) ) 3796 3806 { 3797 3807 HCPhysShw = PdeDst.u & SHW_PDE_PG_MASK; -
trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
r82968 r86461 482 482 uShw.pv = PGMPOOL_PAGE_2_PTR(pVM, pPage); 483 483 const unsigned iShw = off / sizeof(X86PDEPAE); 484 #ifndef PGM_WITHOUT_MAPPINGS 484 485 Assert(!(uShw.pPDPae->a[iShw].u & PGM_PDFLAGS_MAPPING)); 486 #endif 485 487 if (uShw.pPDPae->a[iShw].n.u1Present) 486 488 { … … 499 501 AssertBreak(iShw2 < RT_ELEMENTS(uShw.pPDPae->a)); 500 502 503 #ifndef PGM_WITHOUT_MAPPINGS 501 504 Assert(!(uShw.pPDPae->a[iShw2].u & PGM_PDFLAGS_MAPPING)); 505 #endif 502 506 if (uShw.pPDPae->a[iShw2].n.u1Present) 503 507 { … … 3803 3807 case PGMPOOLKIND_64BIT_PD_FOR_64BIT_PD: 3804 3808 Assert(iUserTable < X86_PG_PAE_ENTRIES); 3809 #ifndef PGM_WITHOUT_MAPPINGS 3805 3810 Assert(!(u.pau64[iUserTable] & PGM_PDFLAGS_MAPPING)); 3811 #endif 3806 3812 break; 3807 3813 case PGMPOOLKIND_64BIT_PDPT_FOR_64BIT_PDPT: … … 4485 4491 { 4486 4492 if ( pShwPD->a[i].n.u1Present 4493 #ifndef PGM_WITHOUT_MAPPINGS 4487 4494 && !(pShwPD->a[i].u & PGM_PDFLAGS_MAPPING) 4495 #endif 4488 4496 ) 4489 4497 { … … 4510 4518 { 4511 4519 if ( pShwPD->a[i].n.u1Present 4512 && !(pShwPD->a[i].u & PGM_PDFLAGS_MAPPING)) 4520 #ifndef PGM_WITHOUT_MAPPINGS 4521 && !(pShwPD->a[i].u & PGM_PDFLAGS_MAPPING) 4522 #endif 4523 ) 4513 4524 { 4514 4525 #ifdef PGM_WITH_LARGE_PAGES -
trunk/src/VBox/VMM/VMMAll/PGMAllShw.h
r86453 r86461 344 344 345 345 # elif PGM_SHW_TYPE == PGM_TYPE_EPT 346 const unsigned iPd = ((GCPtr >> SHW_PD_SHIFT) & SHW_PD_MASK);347 346 PEPTPD pPDDst; 348 EPTPDE Pde;349 350 347 int rc = pgmShwGetEPTPDPtr(pVCpu, GCPtr, NULL, &pPDDst); 351 if (rc != VINF_SUCCESS) /** @todo this function isn't expected to return informational status codes. Check callers / fix. */ 348 if (rc == VINF_SUCCESS) /** @todo this function isn't expected to return informational status codes. Check callers / fix. */ 349 { /* likely */ } 350 else 352 351 { 353 352 AssertRC(rc); … … 355 354 } 356 355 Assert(pPDDst); 357 Pde = pPDDst->a[iPd]; 356 357 const unsigned iPd = ((GCPtr >> SHW_PD_SHIFT) & SHW_PD_MASK); 358 EPTPDE Pde = pPDDst->a[iPd]; 358 359 359 360 # elif PGM_SHW_TYPE == PGM_TYPE_32BIT || PGM_SHW_TYPE == PGM_TYPE_NESTED_32BIT 360 361 X86PDE Pde = pgmShwGet32BitPDE(pVCpu, GCPtr); 362 361 363 # else 362 364 # error "Misconfigured PGM_SHW_TYPE or something..." … … 396 398 */ 397 399 PSHWPT pPT; 400 # ifndef PGM_WITHOUT_MAPPINGS 398 401 if (!(Pde.u & PGM_PDFLAGS_MAPPING)) 402 # endif 399 403 { 400 404 int rc2 = PGM_HCPHYS_2_PTR(pVM, pVCpu, Pde.u & SHW_PDE_PG_MASK, &pPT); … … 402 406 return rc2; 403 407 } 408 # ifndef PGM_WITHOUT_MAPPINGS 404 409 else /* mapping: */ 405 410 { 406 # if PGM_SHW_TYPE == PGM_TYPE_AMD64 \407 || PGM_SHW_TYPE == PGM_TYPE_EPT \408 || defined(PGM_WITHOUT_MAPPINGS)411 # if PGM_SHW_TYPE == PGM_TYPE_AMD64 \ 412 || PGM_SHW_TYPE == PGM_TYPE_EPT \ 413 || defined(PGM_WITHOUT_MAPPINGS) 409 414 AssertFailed(); /* can't happen */ 410 415 pPT = NULL; /* shut up MSC */ 411 # else416 # else 412 417 Assert(pgmMapAreMappingsEnabled(pVM)); 413 418 414 419 PPGMMAPPING pMap = pgmGetMapping(pVM, (RTGCPTR)GCPtr); 415 420 AssertMsgReturn(pMap, ("GCPtr=%RGv\n", GCPtr), VERR_PGM_MAPPING_IPE); 416 # if PGM_SHW_TYPE == PGM_TYPE_32BIT || PGM_SHW_TYPE == PGM_TYPE_NESTED_32BIT421 # if PGM_SHW_TYPE == PGM_TYPE_32BIT || PGM_SHW_TYPE == PGM_TYPE_NESTED_32BIT 417 422 pPT = pMap->aPTs[(GCPtr - pMap->GCPtr) >> X86_PD_SHIFT].CTX_SUFF(pPT); 418 # else /* PAE */423 # else /* PAE */ 419 424 pPT = pMap->aPTs[(GCPtr - pMap->GCPtr) >> X86_PD_SHIFT].CTX_SUFF(paPaePTs); 425 # endif 420 426 # endif 421 # endif422 427 } 428 # endif /* !PGM_WITHOUT_MAPPINGS */ 423 429 const unsigned iPt = (GCPtr >> SHW_PT_SHIFT) & SHW_PT_MASK; 424 430 SHWPTE Pte = pPT->a[iPt];
Note:
See TracChangeset
for help on using the changeset viewer.