儲存庫 vbox 的更動 17134
- 時間撮記:
- 2009-2-25 下午03:10:11 (16 年 以前)
- 位置:
- trunk
- 檔案:
-
- 修改 7 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/include/VBox/pgm.h
r17058 r17134 329 329 VMMDECL(int) PGMMapSetPage(PVM pVM, RTGCPTR GCPtr, uint64_t cb, uint64_t fFlags); 330 330 VMMDECL(int) PGMMapModifyPage(PVM pVM, RTGCPTR GCPtr, size_t cb, uint64_t fFlags, uint64_t fMask); 331 VMMDECL(int) PGMMapActivateAll(PVM pVM);332 VMMDECL(int) PGMMapDeactivateAll(PVM pVM);333 331 #ifndef IN_RING0 334 332 VMMDECL(bool) PGMMapHasConflicts(PVM pVM); -
trunk/src/VBox/VMM/PGMBth.h
r16864 r17134 149 149 { 150 150 /* Remove the hypervisor mappings from the shadow page table. */ 151 PGMMapDeactivateAll(pVM);151 pgmMapDeactivateCR3(pVM, pVM->pgm.s.CTX_SUFF(pShwPageCR3)); 152 152 153 153 /* It might have been freed already by a pool flush (see e.g. PGMR3MappingsUnfix). */ … … 192 192 193 193 /* Apply all hypervisor mappings to the new CR3. */ 194 return PGMMapActivateAll(pVM);194 return pgmMapActivateCR3(pVM, pVM->pgm.s.CTX_SUFF(pShwPageCR3)); 195 195 # endif 196 196 #else -
trunk/src/VBox/VMM/PGMInternal.h
r17057 r17134 2986 2986 void pgmMapClearShadowPDEs(PVM pVM, PPGMPOOLPAGE pShwPageCR3, PPGMMAPPING pMap, unsigned iOldPDE); 2987 2987 void pgmMapSetShadowPDEs(PVM pVM, PPGMMAPPING pMap, unsigned iNewPDE); 2988 int pgmShwSyncPaePDPtr(PVM pVM, RTGCPTR GCPtr, PX86PDPE pGstPdpe, PX86PDPAE *ppPD); 2989 #endif 2988 2990 int pgmMapDeactivateCR3(PVM pVM, PPGMPOOLPAGE pShwPageCR3); 2989 int pgm ShwSyncPaePDPtr(PVM pVM, RTGCPTR GCPtr, PX86PDPE pGstPdpe, PX86PDPAE *ppPD);2990 #endif 2991 int pgmMapActivateCR3(PVM pVM, PPGMPOOLPAGE pShwPageCR3); 2992 2991 2993 #ifndef IN_RC 2992 2994 int pgmShwSyncLongModePDPtr(PVM pVM, RTGCPTR64 GCPtr, PX86PML4E pGstPml4e, PX86PDPE pGstPdpe, PX86PDPAE *ppPD); -
trunk/src/VBox/VMM/PGMMap.cpp
r16889 r17134 652 652 AssertRCReturn(rc, rc); 653 653 654 rc = PGMMapDeactivateAll(pVM);654 rc = pgmMapDeactivateCR3(pVM, pVM->pgm.s.pShwPageCR3R3); 655 655 AssertRCReturn(rc, rc); 656 656 -
trunk/src/VBox/VMM/VMMAll/PGMAll.cpp
r17059 r17134 2193 2193 register unsigned iPage = pVM->pgm.s.iDynPageMapLast; 2194 2194 # ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY 2195 for (unsigned i=0;i<(MM_HYPER_DYNAMIC_SIZE >> PAGE_SHIFT);i++) 2195 unsigned i; 2196 for (i=0;i<(MM_HYPER_DYNAMIC_SIZE >> PAGE_SHIFT);i++) 2196 2197 { 2197 2198 pVM->pgm.s.iDynPageMapLast = iPage = (iPage + 1) & ((MM_HYPER_DYNAMIC_SIZE >> PAGE_SHIFT) - 1); -
trunk/src/VBox/VMM/VMMAll/PGMAllBth.h
r17059 r17134 4643 4643 uint32_t iOldShwUserTable = pVM->pgm.s.iShwUserTable; 4644 4644 uint32_t iOldShwUser = pVM->pgm.s.iShwUser; 4645 PPGMPOOLPAGE pNewShwPageCR3; 4645 4646 4646 4647 Assert(!(GCPhysCR3 >> (PAGE_SHIFT + 32))); 4647 rc = pgmPoolAlloc(pVM, GCPhysCR3 & GST_CR3_PAGE_MASK, BTH_PGMPOOLKIND_ROOT, SHW_POOL_ROOT_IDX, GCPhysCR3 >> PAGE_SHIFT, &p VM->pgm.s.CTX_SUFF(pShwPageCR3));4648 rc = pgmPoolAlloc(pVM, GCPhysCR3 & GST_CR3_PAGE_MASK, BTH_PGMPOOLKIND_ROOT, SHW_POOL_ROOT_IDX, GCPhysCR3 >> PAGE_SHIFT, &pNewShwPageCR3); 4648 4649 if (rc == VERR_PGM_POOL_FLUSHED) 4649 4650 { 4650 4651 Log(("MapCR3: PGM pool flushed -> signal sync cr3\n")); 4651 pVM->pgm.s.CTX_SUFF(pShwPageCR3) = pOldShwPageCR3;4652 4652 Assert(VM_FF_ISSET(pVM, VM_FF_PGM_SYNC_CR3)); 4653 4653 return VINF_PGM_SYNC_CR3; … … 4655 4655 AssertRCReturn(rc, rc); 4656 4656 rc = VINF_SUCCESS; 4657 4657 4658 pVM->pgm.s.iShwUser = SHW_POOL_ROOT_IDX; 4658 4659 pVM->pgm.s.iShwUserTable = GCPhysCR3 >> PAGE_SHIFT; 4660 pVM->pgm.s.CTX_SUFF(pShwPageCR3) = pNewShwPageCR3; 4659 4661 # ifdef IN_RING0 4660 4662 pVM->pgm.s.pShwPageCR3R3 = MMHyperCCToR3(pVM, pVM->pgm.s.CTX_SUFF(pShwPageCR3)); … … 4682 4684 Assert(VM_FF_ISSET(pVM, VM_FF_PGM_SYNC_CR3_NON_GLOBAL)); 4683 4685 # endif 4684 rc = PGMMapActivateAll(pVM);4686 rc = pgmMapActivateCR3(pVM, pNewShwPageCR3); 4685 4687 AssertRCReturn(rc, rc); 4686 4688 # endif … … 4783 4785 # ifndef PGM_WITHOUT_MAPPINGS 4784 4786 /* Remove the hypervisor mappings from the shadow page table. */ 4785 PGMMapDeactivateAll(pVM);4787 pgmMapDeactivateCR3(pVM, pVM->pgm.s.CTX_SUFF(pShwPageCR3)); 4786 4788 # endif 4787 4789 -
trunk/src/VBox/VMM/VMMAll/PGMAllMap.cpp
r17124 r17134 532 532 * @returns VBox status. 533 533 * @param pVM The virtual machine. 534 */ 535 VMMDECL(int) PGMMapActivateAll(PVM pVM) 534 * @param pShwPageCR3 CR3 root page 535 */ 536 int pgmMapActivateCR3(PVM pVM, PPGMPOOLPAGE pShwPageCR3) 536 537 { 537 538 #ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY … … 552 553 553 554 # ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY 554 Assert(p VM->pgm.s.CTX_SUFF(pShwPageCR3));555 Assert(pShwPageCR3 && pShwPageCR3 == pVM->pgm.s.CTX_SUFF(pShwPageCR3)); 555 556 # endif 556 557 … … 563 564 564 565 pgmMapSetShadowPDEs(pVM, pCur, iPDE); 565 }566 return VINF_SUCCESS;567 }568 569 /**570 * Remove the hypervisor mappings from the active CR3571 *572 * @returns VBox status.573 * @param pVM The virtual machine.574 */575 VMMDECL(int) PGMMapDeactivateAll(PVM pVM)576 {577 #ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY578 /*579 * Can skip this if mappings are disabled.580 */581 if (!pgmMapAreMappingsEnabled(&pVM->pgm.s))582 #else583 /*584 * Can skip this if mappings are safely fixed.585 */586 if (pVM->pgm.s.fMappingsFixed)587 #endif588 return VINF_SUCCESS;589 590 Log(("PGMMapDeactivateAll fixed mappings=%d\n", pVM->pgm.s.fMappingsFixed));591 592 # ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY593 Assert(pVM->pgm.s.CTX_SUFF(pShwPageCR3));594 # endif595 596 /*597 * Iterate mappings.598 */599 for (PPGMMAPPING pCur = pVM->pgm.s.CTX_SUFF(pMappings); pCur; pCur = pCur->CTX_SUFF(pNext))600 {601 unsigned iPDE = pCur->GCPtr >> X86_PD_SHIFT;602 603 pgmMapClearShadowPDEs(pVM, pVM->pgm.s.CTX_SUFF(pShwPageCR3), pCur, iPDE);604 566 } 605 567 return VINF_SUCCESS; … … 630 592 631 593 # ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY 632 Assert(p VM->pgm.s.CTX_SUFF(pShwPageCR3));594 Assert(pShwPageCR3); 633 595 # endif 634 596
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器