Changeset 45808 in vbox for trunk/src/VBox/VMM/VMMR3/VMM.cpp
- Timestamp:
- Apr 29, 2013 12:41:07 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 85377
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/VMM.cpp
r45701 r45808 348 348 if (pLogger) 349 349 { 350 pVM->vmm.s.cbRCLogger = RT_OFFSETOF(RTLOGGERRC, afGroups[pLogger->cGroups]); 351 rc = MMR3HyperAllocOnceNoRel(pVM, pVM->vmm.s.cbRCLogger, 0, MM_TAG_VMM, (void **)&pVM->vmm.s.pRCLoggerR3); 352 if (RT_FAILURE(rc)) 353 return rc; 354 pVM->vmm.s.pRCLoggerRC = MMHyperR3ToRC(pVM, pVM->vmm.s.pRCLoggerR3); 350 if (!HMIsEnabled(pVM)) 351 { 352 pVM->vmm.s.cbRCLogger = RT_OFFSETOF(RTLOGGERRC, afGroups[pLogger->cGroups]); 353 rc = MMR3HyperAllocOnceNoRel(pVM, pVM->vmm.s.cbRCLogger, 0, MM_TAG_VMM, (void **)&pVM->vmm.s.pRCLoggerR3); 354 if (RT_FAILURE(rc)) 355 return rc; 356 pVM->vmm.s.pRCLoggerRC = MMHyperR3ToRC(pVM, pVM->vmm.s.pRCLoggerR3); 357 } 355 358 356 359 # ifdef VBOX_WITH_R0_LOGGING … … 376 379 * Allocate RC release logger instances (finalized in the relocator). 377 380 */ 378 PRTLOGGER pRelLogger = RTLogRelDefaultInstance(); 379 if (pRelLogger) 380 { 381 pVM->vmm.s.cbRCRelLogger = RT_OFFSETOF(RTLOGGERRC, afGroups[pRelLogger->cGroups]); 382 rc = MMR3HyperAllocOnceNoRel(pVM, pVM->vmm.s.cbRCRelLogger, 0, MM_TAG_VMM, (void **)&pVM->vmm.s.pRCRelLoggerR3); 383 if (RT_FAILURE(rc)) 384 return rc; 385 pVM->vmm.s.pRCRelLoggerRC = MMHyperR3ToRC(pVM, pVM->vmm.s.pRCRelLoggerR3); 381 if (!HMIsEnabled(pVM)) 382 { 383 PRTLOGGER pRelLogger = RTLogRelDefaultInstance(); 384 if (pRelLogger) 385 { 386 pVM->vmm.s.cbRCRelLogger = RT_OFFSETOF(RTLOGGERRC, afGroups[pRelLogger->cGroups]); 387 rc = MMR3HyperAllocOnceNoRel(pVM, pVM->vmm.s.cbRCRelLogger, 0, MM_TAG_VMM, (void **)&pVM->vmm.s.pRCRelLoggerR3); 388 if (RT_FAILURE(rc)) 389 return rc; 390 pVM->vmm.s.pRCRelLoggerRC = MMHyperR3ToRC(pVM, pVM->vmm.s.pRCRelLoggerR3); 391 } 386 392 } 387 393 #endif /* VBOX_WITH_RC_RELEASE_LOGGING */ … … 829 835 * Get other RC entry points. 830 836 */ 831 int rc = PDMR3LdrGetSymbolRC(pVM, VMMGC_MAIN_MODULE_NAME, "CPUMGCResumeGuest", &pVM->vmm.s.pfnCPUMRCResumeGuest); 832 AssertReleaseMsgRC(rc, ("CPUMGCResumeGuest not found! rc=%Rra\n", rc)); 833 834 rc = PDMR3LdrGetSymbolRC(pVM, VMMGC_MAIN_MODULE_NAME, "CPUMGCResumeGuestV86", &pVM->vmm.s.pfnCPUMRCResumeGuestV86); 835 AssertReleaseMsgRC(rc, ("CPUMGCResumeGuestV86 not found! rc=%Rra\n", rc)); 837 if (!HMIsEnabled(pVM)) 838 { 839 int rc = PDMR3LdrGetSymbolRC(pVM, VMMGC_MAIN_MODULE_NAME, "CPUMGCResumeGuest", &pVM->vmm.s.pfnCPUMRCResumeGuest); 840 AssertReleaseMsgRC(rc, ("CPUMGCResumeGuest not found! rc=%Rra\n", rc)); 841 842 rc = PDMR3LdrGetSymbolRC(pVM, VMMGC_MAIN_MODULE_NAME, "CPUMGCResumeGuestV86", &pVM->vmm.s.pfnCPUMRCResumeGuestV86); 843 AssertReleaseMsgRC(rc, ("CPUMGCResumeGuestV86 not found! rc=%Rra\n", rc)); 844 } 836 845 837 846 /* … … 856 865 RTRCPTR RCPtrLoggerFlush = 0; 857 866 858 if ( pVM->vmm.s.pRCLoggerR3867 if ( pVM->vmm.s.pRCLoggerR3 859 868 #ifdef VBOX_WITH_RC_RELEASE_LOGGING 860 869 || pVM->vmm.s.pRCRelLoggerR3 … … 862 871 ) 863 872 { 873 Assert(!HMIsEnabled(pVM)); 864 874 rc = PDMR3LdrGetSymbolRC(pVM, VMMGC_MAIN_MODULE_NAME, "vmmGCLoggerFlush", &RCPtrLoggerFlush); 865 875 AssertReleaseMsgRC(rc, ("vmmGCLoggerFlush not found! rc=%Rra\n", rc)); … … 868 878 if (pVM->vmm.s.pRCLoggerR3) 869 879 { 880 Assert(!HMIsEnabled(pVM)); 870 881 RTRCPTR RCPtrLoggerWrapper = 0; 871 882 rc = PDMR3LdrGetSymbolRC(pVM, VMMGC_MAIN_MODULE_NAME, "vmmGCLoggerWrapper", &RCPtrLoggerWrapper); … … 881 892 if (pVM->vmm.s.pRCRelLoggerR3) 882 893 { 894 Assert(!HMIsEnabled(pVM)); 883 895 RTRCPTR RCPtrLoggerWrapper = 0; 884 896 rc = PDMR3LdrGetSymbolRC(pVM, VMMGC_MAIN_MODULE_NAME, "vmmGCRelLoggerWrapper", &RCPtrLoggerWrapper);
Note:
See TracChangeset
for help on using the changeset viewer.