儲存庫 vbox 的更動 17139
- 時間撮記:
- 2009-2-25 下午04:39:54 (16 年 以前)
- 位置:
- trunk/src/VBox/VMM
- 檔案:
-
- 修改 3 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/VMM/PGMInternal.h
r17138 r17139 4759 4759 return VINF_SUCCESS; 4760 4760 } 4761 4762 /** 4763 * Checks if the page is locked (e.g. the active CR3 or one of the four PDs of a PAE PDPT) 4764 * 4765 * @returns VBox status code. 4766 * @param pVM VM Handle. 4767 * @param pPage PGM pool page 4768 */ 4769 DECLINLINE(bool) pgmPoolIsPageLocked(PVM pVM, PPGMPOOLPAGE pPage) 4770 { 4771 if (pPage->fLocked) 4772 { 4773 LogFlow(("pgmPoolIsPageLocked found root page %s\n", pgmPoolPoolKindToStr(pPage->enmKind))); 4774 if (pPage->cModifications) 4775 pPage->cModifications = 1; /* reset counter (can't use 0, or else it will be reinserted in the modified list) */ 4776 return true; 4777 } 4778 Assert(pPage != pVM->pgm.s.CTX_SUFF(pShwPageCR3)); 4779 return false; 4780 } 4761 4781 #endif 4762 4782 -
trunk/src/VBox/VMM/VMMAll/PGMAllMap.cpp
r17134 r17139 302 302 AssertFatal(pShwPaePd); 303 303 304 PPGMPOOLPAGE pPoolPagePde = pgmPoolGetPageByHCPhys(pVM, pShwPdpt->a[iPdPt].u & X86_PDPE_PG_MASK); 305 AssertFatal(pPoolPagePde); 306 304 PPGMPOOLPAGE pPoolPagePd = pgmPoolGetPageByHCPhys(pVM, pShwPdpt->a[iPdPt].u & X86_PDPE_PG_MASK); 305 AssertFatal(pPoolPagePd); 306 307 #ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY 308 if (!pgmPoolIsPageLocked(pVM, pPoolPagePd)) 309 { 310 /* Mark the page as locked; disallow flushing. */ 311 pgmPoolLockPage(pVM->pgm.s.CTX_SUFF(pPool), pPoolPagePd); 312 } 313 #endif 307 314 if (pShwPaePd->a[iPDE].n.u1Present) 308 315 { 309 316 Assert(!(pShwPaePd->a[iPDE].u & PGM_PDFLAGS_MAPPING)); 310 pgmPoolFree(pVM, pShwPaePd->a[iPDE].u & X86_PDE_PG_MASK, pPoolPagePd e->idx, iNewPDE);317 pgmPoolFree(pVM, pShwPaePd->a[iPDE].u & X86_PDE_PG_MASK, pPoolPagePd->idx, iNewPDE); 311 318 } 312 319 … … 322 329 { 323 330 Assert(!(pShwPaePd->a[iPDE].u & PGM_PDFLAGS_MAPPING)); 324 pgmPoolFree(pVM, pShwPaePd->a[iPDE].u & X86_PDE_PG_MASK, pPoolPagePd e->idx, iNewPDE);331 pgmPoolFree(pVM, pShwPaePd->a[iPDE].u & X86_PDE_PG_MASK, pPoolPagePd->idx, iNewPDE); 325 332 } 326 333 … … 386 393 case PGMMODE_PAE_NX: 387 394 { 388 PX86PDPT p Pdpt = NULL;395 PX86PDPT pShwPdpt = NULL; 389 396 PX86PDPAE pShwPaePd = NULL; 390 397 … … 392 399 unsigned iPDE = iOldPDE * 2 % 512; 393 400 #ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY 394 p Pdpt= (PX86PDPT)PGMPOOL_PAGE_2_PTR_BY_PGM(&pVM->pgm.s, pShwPageCR3);395 pShwPaePd = pgmShwGetPaePDPtr(&pVM->pgm.s, p Pdpt, (iPD << X86_PDPT_SHIFT));396 #else 397 p Pdpt= pgmShwGetPaePDPTPtr(&pVM->pgm.s);401 pShwPdpt = (PX86PDPT)PGMPOOL_PAGE_2_PTR_BY_PGM(&pVM->pgm.s, pShwPageCR3); 402 pShwPaePd = pgmShwGetPaePDPtr(&pVM->pgm.s, pShwPdpt, (iPD << X86_PDPT_SHIFT)); 403 #else 404 pShwPdpt = pgmShwGetPaePDPTPtr(&pVM->pgm.s); 398 405 pShwPaePd = pgmShwGetPaePDPtr(&pVM->pgm.s, (iPD << X86_PDPT_SHIFT)); 399 406 #endif … … 407 414 pShwPaePd->a[iPDE].u = 0; 408 415 /* Clear the PGM_PDFLAGS_MAPPING flag for the page directory pointer entry. (legacy PAE guest mode) */ 409 pPdpt->a[iPD].u &= ~PGM_PLXFLAGS_MAPPING; 416 pShwPdpt->a[iPD].u &= ~PGM_PLXFLAGS_MAPPING; 417 418 #ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY 419 PPGMPOOLPAGE pPoolPagePd = pgmPoolGetPageByHCPhys(pVM, pShwPdpt->a[iPD].u & X86_PDPE_PG_MASK); 420 AssertFatal(pPoolPagePd); 421 422 if (pgmPoolIsPageLocked(pVM, pPoolPagePd)) 423 { 424 /* Mark the page as unlocked; allow flushing again. */ 425 pgmPoolUnlockPage(pVM->pgm.s.CTX_SUFF(pPool), pPoolPagePd); 426 } 427 #endif 428 410 429 break; 411 430 } -
trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
r17137 r17139 908 908 } 909 909 910 #ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY911 /**912 * Checks if the page is locked (e.g. the active CR3 or one of the four PDs of a PAE PDPT)913 *914 * @returns VBox status code.915 * @param pVM VM Handle.916 * @param pPage PGM pool page917 */918 bool pgmPoolIsPageLocked(PVM pVM, PPGMPOOLPAGE pPage)919 {920 if (pPage->fLocked)921 {922 LogFlow(("pgmPoolIsPageLocked found root page %s\n", pgmPoolPoolKindToStr(pPage->enmKind)));923 if (pPage->cModifications)924 pPage->cModifications = 1; /* reset counter (can't use 0, or else it will be reinserted in the modified list) */925 return true;926 }927 928 #ifdef VBOX_STRICT929 Assert(pPage != pVM->pgm.s.CTX_SUFF(pShwPageCR3));930 931 # ifndef IN_RING0932 switch (PGMGetShadowMode(pVM))933 {934 case PGMMODE_PAE:935 case PGMMODE_PAE_NX:936 {937 switch (pPage->enmKind)938 {939 case PGMPOOLKIND_PAE_PD_FOR_PAE_PD:940 case PGMPOOLKIND_PAE_PD0_FOR_32BIT_PD:941 case PGMPOOLKIND_PAE_PD1_FOR_32BIT_PD:942 case PGMPOOLKIND_PAE_PD2_FOR_32BIT_PD:943 case PGMPOOLKIND_PAE_PD3_FOR_32BIT_PD:944 {945 PX86PDPT pPdpt = pgmShwGetPaePDPTPtr(&pVM->pgm.s);946 Assert(pPdpt);947 948 for (unsigned i=0;i<X86_PG_PAE_PDPE_ENTRIES;i++)949 {950 Assert( !(pPdpt->a[i].u & PGM_PLXFLAGS_MAPPING)951 || (pPage->Core.Key != (pPdpt->a[i].u & X86_PDPE_PG_MASK)));952 }953 break;954 }955 }956 957 break;958 }959 }960 # endif961 #endif /* VBOX_STRICT */962 return false;963 }964 #endif /* VBOX_WITH_PGMPOOL_PAGING_ONLY */965 966 967 910 # ifndef IN_RING3 968 911 /**
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器