儲存庫 vbox 的更動 17271
- 時間撮記:
- 2009-3-3 下午12:50:12 (16 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/VMM/VMMAll/PGMAllMap.cpp
r17195 r17271 310 310 /* Mark the page as locked; disallow flushing. */ 311 311 pgmPoolLockPage(pVM->pgm.s.CTX_SUFF(pPool), pPoolPagePd); 312 } 313 #endif 312 313 if (pShwPaePd->a[iPDE].n.u1Present) 314 { 315 Assert(!(pShwPaePd->a[iPDE].u & PGM_PDFLAGS_MAPPING)); 316 pgmPoolFree(pVM, pShwPaePd->a[iPDE].u & X86_PDE_PG_MASK, pPoolPagePd->idx, iNewPDE); 317 } 318 } 319 # ifdef VBOX_STRICT 320 else 321 { 322 if (pShwPaePd->a[iPDE].u & PGM_PDFLAGS_MAPPING) 323 { 324 Assert(PGMGetGuestMode(pVM) >= PGMMODE_PAE); 325 AssertFatalMsg((pShwPaePd->a[iPDE].u & X86_PDE_PG_MASK) == pMap->aPTs[i].HCPhysPaePT0, ("%RX64 vs %RX64\n", pShwPaePd->a[iPDE+1].u & X86_PDE_PG_MASK, pMap->aPTs[i].HCPhysPaePT0)); 326 Assert(pShwPaePd->a[iPDE+1].u & PGM_PDFLAGS_MAPPING); 327 AssertFatalMsg((pShwPaePd->a[iPDE+1].u & X86_PDE_PG_MASK) == pMap->aPTs[i].HCPhysPaePT1, ("%RX64 vs %RX64\n", pShwPaePd->a[iPDE+1].u & X86_PDE_PG_MASK, pMap->aPTs[i].HCPhysPaePT1)); 328 } 329 } 330 # endif 331 #else 314 332 if (pShwPaePd->a[iPDE].n.u1Present) 315 333 { … … 317 335 pgmPoolFree(pVM, pShwPaePd->a[iPDE].u & X86_PDE_PG_MASK, pPoolPagePd->idx, iNewPDE); 318 336 } 319 337 #endif 320 338 X86PDEPAE PdePae0; 321 339 PdePae0.u = PGM_PDFLAGS_MAPPING | X86_PDE_P | X86_PDE_A | X86_PDE_RW | X86_PDE_US | pMap->aPTs[i].HCPhysPaePT0; … … 326 344 AssertFatal(iPDE < 512); 327 345 346 #ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY 347 if ( pShwPaePd->a[iPDE].n.u1Present 348 && !(pShwPaePd->a[iPDE].u & PGM_PDFLAGS_MAPPING)) 349 { 350 #else 328 351 if (pShwPaePd->a[iPDE].n.u1Present) 329 352 { 330 353 Assert(!(pShwPaePd->a[iPDE].u & PGM_PDFLAGS_MAPPING)); 354 #endif 331 355 pgmPoolFree(pVM, pShwPaePd->a[iPDE].u & X86_PDE_PG_MASK, pPoolPagePd->idx, iNewPDE); 332 356 } 333 334 357 X86PDEPAE PdePae1; 335 358 PdePae1.u = PGM_PDFLAGS_MAPPING | X86_PDE_P | X86_PDE_A | X86_PDE_RW | X86_PDE_US | pMap->aPTs[i].HCPhysPaePT1; … … 365 388 #ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY 366 389 Assert(pShwPageCR3); 390 # ifdef IN_RC 391 Assert(pShwPageCR3 != pVM->pgm.s.CTX_SUFF(pShwPageCR3)); 392 # endif 393 394 PX86PDPT pCurrentShwPdpt = NULL; 395 396 if ( PGMGetGuestMode(pVM) >= PGMMODE_PAE 397 && pShwPageCR3 != pVM->pgm.s.CTX_SUFF(pShwPageCR3)) 398 { 399 pCurrentShwPdpt = pgmShwGetPaePDPTPtr(&pVM->pgm.s); 400 } 367 401 #endif 368 402 … … 396 430 PX86PDPAE pShwPaePd = NULL; 397 431 398 const unsigned iP D= iOldPDE / 256; /* iOldPDE * 2 / 512; iOldPDE is in 4 MB pages */432 const unsigned iPdpt = iOldPDE / 256; /* iOldPDE * 2 / 512; iOldPDE is in 4 MB pages */ 399 433 unsigned iPDE = iOldPDE * 2 % 512; 400 434 #ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY 401 435 pShwPdpt = (PX86PDPT)PGMPOOL_PAGE_2_PTR_BY_PGM(&pVM->pgm.s, pShwPageCR3); 402 pShwPaePd = pgmShwGetPaePDPtr(&pVM->pgm.s, pShwPdpt, (iPD << X86_PDPT_SHIFT)); 436 pShwPaePd = pgmShwGetPaePDPtr(&pVM->pgm.s, pShwPdpt, (iPdpt << X86_PDPT_SHIFT)); 437 438 if (pCurrentShwPdpt) 439 { 440 /* If the page directory of the old CR3 is reused in the new one, then don't clear the hypervisor mappings. */ 441 if ((pCurrentShwPdpt->a[iPdpt].u & X86_PDPE_PG_MASK) == (pShwPdpt->a[iPdpt].u & X86_PDPE_PG_MASK)) 442 break; 443 } 403 444 #else 404 445 pShwPdpt = pgmShwGetPaePDPTPtr(&pVM->pgm.s); 405 pShwPaePd = pgmShwGetPaePDPtr(&pVM->pgm.s, (iP D<< X86_PDPT_SHIFT));446 pShwPaePd = pgmShwGetPaePDPtr(&pVM->pgm.s, (iPdpt << X86_PDPT_SHIFT)); 406 447 #endif 407 448 AssertFatal(pShwPaePd); … … 414 455 pShwPaePd->a[iPDE].u = 0; 415 456 /* Clear the PGM_PDFLAGS_MAPPING flag for the page directory pointer entry. (legacy PAE guest mode) */ 416 pShwPdpt->a[iP D].u &= ~PGM_PLXFLAGS_MAPPING;417 418 #ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY 419 PPGMPOOLPAGE pPoolPagePd = pgmPoolGetPageByHCPhys(pVM, pShwPdpt->a[iP D].u & X86_PDPE_PG_MASK);457 pShwPdpt->a[iPdpt].u &= ~PGM_PLXFLAGS_MAPPING; 458 459 #ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY 460 PPGMPOOLPAGE pPoolPagePd = pgmPoolGetPageByHCPhys(pVM, pShwPdpt->a[iPdpt].u & X86_PDPE_PG_MASK); 420 461 AssertFatal(pPoolPagePd); 421 462
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器