Changeset 2679 in vbox for trunk/src/VBox/VMM
- Timestamp:
- May 16, 2007 7:11:24 PM (18 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGM.cpp
r2663 r2679 158 158 static DECLCALLBACK(int) pgmR3RelocatePhysHandler(PAVLROGCPHYSNODECORE pNode, void *pvUser); 159 159 static DECLCALLBACK(int) pgmR3RelocateVirtHandler(PAVLROGCPTRNODECORE pNode, void *pvUser); 160 static DECLCALLBACK(void) pgmR3ResetNoMorePhysWritesFlag(PVM pVM, VMSTATE enmState, VMSTATE enmOldState, void *pvUser); 160 161 static DECLCALLBACK(int) pgmR3Save(PVM pVM, PSSMHANDLE pSSM); 161 162 static DECLCALLBACK(int) pgmR3Load(PVM pVM, PSSMHANDLE pSSM, uint32_t u32Version); … … 447 448 448 449 /** 449 * The only purpose of this function is to clear the fNoMorePhysWrites flag450 * which prevents writing to physical memory once pgmR3Save() is called.451 */452 #ifdef VBOX_STRICT453 DECLCALLBACK(void)454 PGMR3ResetNoMorePhysWritesFlag(PVM pVM, VMSTATE aState, VMSTATE aOldState, void *aUser)455 {456 if (aState == VMSTATE_RUNNING)457 pVM->pgm.s.fNoMorePhysWrites = false;458 }459 #endif460 461 462 /**463 450 * Initiates the paging of VM. 464 451 * … … 495 482 496 483 #ifdef VBOX_STRICT 497 VMR3AtStateRegister (pVM, PGMR3ResetNoMorePhysWritesFlag, NULL);484 VMR3AtStateRegister(pVM, pgmR3ResetNoMorePhysWritesFlag, NULL); 498 485 #endif 499 486 … … 799 786 #if HC_ARCH_BITS == 64 800 787 LogRel(("Debug: HCPhys32BitPD=%VHp aHCPhysPaePDs={%VHp,%VHp,%VHp,%VHp} HCPhysPaePDPTR=%VHp HCPhysPaePML4=%VHp\n", 801 pVM->pgm.s.HCPhys32BitPD, pVM->pgm.s.aHCPhysPaePDs[0], pVM->pgm.s.aHCPhysPaePDs[1], pVM->pgm.s.aHCPhysPaePDs[2], pVM->pgm.s.aHCPhysPaePDs[3], 788 pVM->pgm.s.HCPhys32BitPD, pVM->pgm.s.aHCPhysPaePDs[0], pVM->pgm.s.aHCPhysPaePDs[1], pVM->pgm.s.aHCPhysPaePDs[2], pVM->pgm.s.aHCPhysPaePDs[3], 802 789 pVM->pgm.s.HCPhysPaePDPTR, pVM->pgm.s.HCPhysPaePML4)); 803 790 LogRel(("Debug: HCPhysInterPD=%VHp HCPhysInterPaePDPTR=%VHp HCPhysInterPaePML4=%VHp\n", … … 806 793 MMPage2Phys(pVM, pVM->pgm.s.apInterPTs[0]), MMPage2Phys(pVM, pVM->pgm.s.apInterPTs[1]), 807 794 MMPage2Phys(pVM, pVM->pgm.s.apInterPaePTs[0]), MMPage2Phys(pVM, pVM->pgm.s.apInterPaePTs[1]), 808 MMPage2Phys(pVM, pVM->pgm.s.apInterPaePDs[0]), MMPage2Phys(pVM, pVM->pgm.s.apInterPaePDs[1]), MMPage2Phys(pVM, pVM->pgm.s.apInterPaePDs[2]), MMPage2Phys(pVM, pVM->pgm.s.apInterPaePDs[3]), 795 MMPage2Phys(pVM, pVM->pgm.s.apInterPaePDs[0]), MMPage2Phys(pVM, pVM->pgm.s.apInterPaePDs[1]), MMPage2Phys(pVM, pVM->pgm.s.apInterPaePDs[2]), MMPage2Phys(pVM, pVM->pgm.s.apInterPaePDs[3]), 809 796 MMPage2Phys(pVM, pVM->pgm.s.pInterPaePDPTR64))); 810 797 #endif … … 1334 1321 1335 1322 1323 #ifdef VBOX_STRICT 1324 /** 1325 * VM state change callback for clearing fNoMorePhysWrites after 1326 * a snapshot has been created. 1327 */ 1328 static DECLCALLBACK(void) pgmR3ResetNoMorePhysWritesFlag(PVM pVM, VMSTATE enmState, VMSTATE enmOldState, void *pvUser) 1329 { 1330 if (enmState == VMSTATE_RUNNING) 1331 pVM->pgm.s.fNoMorePhysWrites = false; 1332 } 1333 #endif 1334 1335 1336 1336 /** 1337 1337 * Execute state save operation. … … 1345 1345 PPGM pPGM = &pVM->pgm.s; 1346 1346 1347 #ifdef VBOX_STRICT1348 1347 /* No more writes to physical memory after this point! */ 1349 1348 pVM->pgm.s.fNoMorePhysWrites = true; 1350 #endif1351 1349 1352 1350 /* -
trunk/src/VBox/VMM/PGMInternal.h
r2663 r2679 720 720 #if HC_ARCH_BITS == 64 || GC_ARCH_BITS == 64 721 721 bool Alignment[4]; /**< Align the structure size on a 64-bit boundrary. */ 722 #endif 722 #endif 723 723 } PGMPOOLPAGE, *PPGMPOOLPAGE, **PPPGMPOOLPAGE; 724 724 … … 1270 1270 #if GC_ARCH_BITS == 32 && HC_ARCH_BITS == 64 1271 1271 RTGCPTR alignment0; /**< structure size alignment. */ 1272 #endif 1272 #endif 1273 1273 1274 1274 DECLR0CALLBACKMEMBER(int, pfnR0ShwGetPage,(PVM pVM, RTGCUINTPTR GCPtr, uint64_t *pfFlags, PRTHCPHYS pHCPhys)); … … 1343 1343 #if GC_ARCH_BITS == 32 && HC_ARCH_BITS == 64 1344 1344 RTGCPTR alignment2; /**< structure size alignment. */ 1345 #endif 1345 #endif 1346 1346 /** @} */ 1347 1347 … … 1458 1458 GCPTRTYPE(PPGMPOOL) pPoolGC; 1459 1459 1460 /** We're not in a state which permits writes to guest memory. 1461 * (Only used in strict builds.) */ 1462 bool fNoMorePhysWrites; 1463 1460 1464 /** Flush the cache on the next access. */ 1461 1465 bool fPhysCacheFlushPending; … … 1465 1469 /** PGMPhysWrite cache */ 1466 1470 PGMPHYSCACHE pgmphyswritecache; 1467 1468 #ifdef VBOX_STRICT1469 /** Physical memory was already saved, no more writes which wouldn't be part of the1470 * saved state! */1471 bool fNoMorePhysWrites;1472 #endif1473 1471 1474 1472 /** @name Release Statistics -
trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp
r2663 r2679 942 942 #endif 943 943 944 AssertMsg(!pVM->pgm.s.fNoMorePhysWrites, ("Calling PGMPhysWrite after pgmR3Save()!\n")); 944 945 AssertMsg(cbWrite > 0, ("don't even think about writing zero bytes!\n")); 945 946 if (cbWrite == 0) 946 947 return; 947 948 948 #ifdef VBOX_STRICT949 /*950 * pgmR3Save() was already called, any bytes we write now will not be part of the951 * saved state!952 */953 AssertMsg(pVM->pgm.s.fNoMorePhysWrites == false, ("Calling PGMPhysWrite after pgmR3Save()!\n"));954 955 949 LogFlow(("PGMPhysWrite: %VGp %d\n", GCPhys, cbWrite)); 956 #endif957 950 958 951 #ifdef IN_RING3
Note:
See TracChangeset
for help on using the changeset viewer.