Changeset 30646 in vbox
- Timestamp:
- Jul 6, 2010 8:00:31 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 63381
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/err.h
r30555 r30646 479 479 /** Inconsistent local and global registration records. */ 480 480 #define VERR_PGM_SHARED_MODULE_REGISTRATION_INCONSISTENCY (-1650) 481 /** No registered modules. */ 482 #define VINF_PGM_SHARED_MODULE_NONE_REGISTERED (1651) 481 483 /** @} */ 482 484 -
trunk/include/VBox/types.h
r28800 r30646 826 826 * Page mapping lock. 827 827 * 828 * @remarks This doesn't work in structures shared between829 * ring-3, ring-0 and/or GC.830 828 */ 831 829 typedef struct PGMPAGEMAPLOCK … … 835 833 /** Just a dummy for the time being. */ 836 834 uint32_t u32Dummy; 835 uint32_t u32Dummy1; 836 # if HC_ARCH_BITS == 64 837 uint32_t u32Align[2]; 838 # endif 837 839 #else 838 840 /** Pointer to the PGMPAGE and lock type. -
trunk/src/VBox/Additions/common/VBoxService/VBoxServicePageSharing.cpp
r30601 r30646 85 85 86 86 87 static DECLCALLBACK(int) VBoxServicePageSharingEmptyTreeCallback(PAVLPVNODECORE pNode, void * );87 static DECLCALLBACK(int) VBoxServicePageSharingEmptyTreeCallback(PAVLPVNODECORE pNode, void *pvUser); 88 88 89 89 static PAVLPVNODECORE pKnownModuleTree = NULL; … … 487 487 488 488 /* Check all registered modules. */ 489 VbglR3CheckSharedModules(); 490 491 /* Activate new module tree. */ 492 pKnownModuleTree = pNewTree; 489 int rc = VbglR3CheckSharedModules(); 490 if (rc == VINF_PGM_SHARED_MODULE_NONE_REGISTERED) 491 { 492 bool fUnregister = false; 493 /* The VM was restored, so reregister all modules the next time. */ 494 RTAvlPVDestroy(&pKnownModuleTree, VBoxServicePageSharingEmptyTreeCallback, &fUnregister); 495 pKnownModuleTree = NULL; 496 } 497 else 498 { 499 /* Activate new module tree. */ 500 pKnownModuleTree = pNewTree; 501 } 493 502 } 494 503 … … 496 505 * RTAvlPVDestroy callback. 497 506 */ 498 static DECLCALLBACK(int) VBoxServicePageSharingEmptyTreeCallback(PAVLPVNODECORE pNode, void * )507 static DECLCALLBACK(int) VBoxServicePageSharingEmptyTreeCallback(PAVLPVNODECORE pNode, void *pvUser) 499 508 { 500 509 PKNOWN_MODULE pModule = (PKNOWN_MODULE)pNode; 510 bool *pfUnregister = (bool *)pvUser; 501 511 502 512 VBoxServiceVerbose(3, "VBoxServicePageSharingEmptyTreeCallback %s %s\n", pModule->Info.szModule, pModule->szFileVersion); 503 513 504 /* Defererence module in the hypervisor. */ 505 int rc = VbglR3UnregisterSharedModule(pModule->Info.szModule, pModule->szFileVersion, (RTGCPTR64)pModule->Info.modBaseAddr, pModule->Info.modBaseSize); 506 AssertRC(rc); 514 /* Dereference module in the hypervisor. */ 515 if ( !pfUnregister 516 || *pfUnregister == true) 517 { 518 #ifdef RT_ARCH_X86 519 int rc = VbglR3UnregisterSharedModule(pModule->Info.szModule, pModule->szFileVersion, (RTGCPTR32)pModule->Info.modBaseAddr, pModule->Info.modBaseSize); 520 #else 521 int rc = VbglR3UnregisterSharedModule(pModule->Info.szModule, pModule->szFileVersion, (RTGCPTR64)pModule->Info.modBaseAddr, pModule->Info.modBaseSize); 522 #endif 523 AssertRC(rc); 524 } 507 525 508 526 if (pModule->hModule) -
trunk/src/VBox/VMM/VMMR0/GMMR0.cpp
r30604 r30646 4169 4169 4170 4170 Log(("GMMR0CheckSharedModules\n")); 4171 Info.pGVM = pGVM; 4172 Info.idCpu = pVCpu->idCpu; 4173 4174 RTAvlGCPtrDoWithAll(&pGVM->gmm.s.pSharedModuleTree, true /* fFromLeft */, gmmR0CheckSharedModule, &Info); 4171 if (pGVM->gmm.s.pSharedModuleTree != NULL) 4172 { 4173 Info.pGVM = pGVM; 4174 Info.idCpu = pVCpu->idCpu; 4175 4176 RTAvlGCPtrDoWithAll(&pGVM->gmm.s.pSharedModuleTree, true /* fFromLeft */, gmmR0CheckSharedModule, &Info); 4177 rc = VINF_SUCCESS; 4178 } 4179 else 4180 rc = VINF_PGM_SHARED_MODULE_NONE_REGISTERED; 4175 4181 4176 4182 Log(("GMMR0CheckSharedModules done!\n")); 4177 rc = VINF_SUCCESS; 4183 4178 4184 GMM_CHECK_SANITY_UPON_LEAVING(pGMM); 4179 4185 }
Note:
See TracChangeset
for help on using the changeset viewer.