Changeset 18266 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Mar 25, 2009 5:25:53 PM (16 years ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllHandler.cpp
r18234 r18266 169 169 { 170 170 rc = pgmHandlerPhysicalSetRamFlagsAndFlushShadowPTs(pVM, pNew, pRam); 171 if (rc == VINF_PGM_GCPHYS_ALIASED) 172 { 173 pVM->pgm.s.fSyncFlags |= PGM_SYNC_CLEAR_PGM_POOL; 174 VM_FF_SET(pVM, VM_FF_PGM_SYNC_CR3); 175 } 171 if (rc == VINF_PGM_SYNC_CR3) 172 rc = VINF_PGM_GCPHYS_ALIASED; 176 173 pVM->pgm.s.fPhysCacheFlushPending = true; 177 174 HWACCMFlushTLB(pVM); … … 203 200 * @returns VBox status code. 204 201 * @retval VINF_SUCCESS when shadow PTs was successfully updated. 205 * @retval VINF_PGM_ GCPHYS_ALIASEDwhen the shadow PTs could be updated because206 * the guest page aliased or/and mapped by multiple PTs. 202 * @retval VINF_PGM_SYNC_CR3 when the shadow PTs could be updated because 203 * the guest page aliased or/and mapped by multiple PTs. FFs set. 207 204 * @param pVM The VM handle. 208 205 * @param pCur The physical handler. … … 441 438 int rc = pgmPoolTrackFlushGCPhys(pVM, pPage, &fFlushTLBs); 442 439 AssertLogRelRCReturnVoid(rc); 443 if (rc == VINF_PGM_GCPHYS_ALIASED)444 {445 pVM->pgm.s.fSyncFlags |= PGM_SYNC_CLEAR_PGM_POOL;446 VM_FF_SET(pVM, VM_FF_PGM_SYNC_CR3);447 rc = VINF_PGM_SYNC_CR3;448 }449 440 # ifdef IN_RC 450 else if (fFlushTLBs)441 if (fFlushTLBs && rc != VINF_PGM_SYNC_CR3) 451 442 PGM_INVL_GUEST_TLBS(); 452 443 # else … … 580 571 */ 581 572 rc = pgmHandlerPhysicalSetRamFlagsAndFlushShadowPTs(pVM, pCur, pRam); 582 if (rc == VINF_PGM_GCPHYS_ALIASED)583 {584 pVM->pgm.s.fSyncFlags |= PGM_SYNC_CLEAR_PGM_POOL;585 VM_FF_SET(pVM, VM_FF_PGM_SYNC_CR3);586 }587 573 pVM->pgm.s.fPhysCacheFlushPending = true; 588 574 … … 891 877 */ 892 878 rc = pgmHandlerPhysicalSetRamFlagsAndFlushShadowPTs(pVM, pCur, pRam); 893 if (rc == VINF_PGM_GCPHYS_ALIASED)894 {895 pVM->pgm.s.fSyncFlags |= PGM_SYNC_CLEAR_PGM_POOL;896 VM_FF_SET(pVM, VM_FF_PGM_SYNC_CR3);897 }898 879 pVM->pgm.s.fPhysCacheFlushPending = true; 899 880 HWACCMFlushTLB(pVM); -
trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp
r18230 r18266 382 382 bool fFlushTLBs = false; 383 383 int rc = pgmPoolTrackFlushGCPhys(pVM, pPage, &fFlushTLBs); 384 if (rc == VINF_SUCCESS) 385 /* nothing */; 386 else if (rc == VINF_PGM_GCPHYS_ALIASED) 387 { 388 pVM->pgm.s.fSyncFlags |= PGM_SYNC_CLEAR_PGM_POOL; 389 VM_FF_SET(pVM, VM_FF_PGM_SYNC_CR3); 390 rc = VINF_PGM_SYNC_CR3; 391 } 392 else 393 { 394 AssertRCReturn(rc, rc); 395 AssertMsgFailedReturn(("%Rrc\n", rc), VERR_INTERNAL_ERROR); 396 } 384 AssertMsgReturn(rc == VINF_SUCCESS || rc == VINF_PGM_GCPHYS_ALIASED, ("%Rrc\n", rc), RT_FAILURE(rc) ? rc : VERR_INTERNAL_ERROR); 397 385 398 386 /* -
trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
r18215 r18266 2630 2630 * @returns VBox status code. 2631 2631 * @retval VINF_SUCCESS if all references has been successfully cleared. 2632 * @retval VINF_PGM_ GCPHYS_ALIASED if we're better off with a CR3 sync and2633 * a page pool cleaning.2632 * @retval VINF_PGM_SYNC_CR3 if we're better off with a CR3 sync and a page 2633 * pool cleaning. FF and sync flags are set. 2634 2634 * 2635 2635 * @param pVM The VM handle. … … 2706 2706 rc = VINF_PGM_GCPHYS_ALIASED; 2707 2707 #endif 2708 2709 if (rc == VINF_PGM_GCPHYS_ALIASED) 2710 { 2711 pVM->pgm.s.fSyncFlags |= PGM_SYNC_CLEAR_PGM_POOL; 2712 VM_FF_SET(pVM, VM_FF_PGM_SYNC_CR3); 2713 rc = VINF_PGM_SYNC_CR3; 2714 } 2708 2715 2709 2716 return rc; … … 3954 3961 } 3955 3962 3956 /* Force a shadow mode reinit (necessary for nested paging and ept). */ 3963 /* 3964 * Force a shadow mode reinit (necessary for nested paging and ept). 3965 * Reinit the current shadow paging mode as well; nested paging and 3966 * EPT use a root CR3 which will get flushed here. 3967 */ 3957 3968 pVM->pgm.s.enmShadowMode = PGMMODE_INVALID; 3958 3959 /* Reinit the current shadow paging mode as well; nested paging and EPT use a root CR3 which will get flushed here. */3960 3969 rc = PGMR3ChangeMode(pVM, PGMGetGuestMode(pVM)); 3961 3970 AssertRC(rc);
Note:
See TracChangeset
for help on using the changeset viewer.