VirtualBox

Changeset 45808 in vbox for trunk/src/VBox/VMM/VMMR3/VMM.cpp


Ignore:
Timestamp:
Apr 29, 2013 12:41:07 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
85377
Message:

VMM,DevVGA: Don't resolve RC symbols when HM is enabled (part 1).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/VMM.cpp

    r45701 r45808  
    348348    if (pLogger)
    349349    {
    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        }
    355358
    356359# ifdef VBOX_WITH_R0_LOGGING
     
    376379     * Allocate RC release logger instances (finalized in the relocator).
    377380     */
    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        }
    386392    }
    387393#endif /* VBOX_WITH_RC_RELEASE_LOGGING */
     
    829835     * Get other RC entry points.
    830836     */
    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    }
    836845
    837846    /*
     
    856865    RTRCPTR RCPtrLoggerFlush = 0;
    857866
    858     if (pVM->vmm.s.pRCLoggerR3
     867    if (   pVM->vmm.s.pRCLoggerR3
    859868#ifdef VBOX_WITH_RC_RELEASE_LOGGING
    860869        || pVM->vmm.s.pRCRelLoggerR3
     
    862871       )
    863872    {
     873        Assert(!HMIsEnabled(pVM));
    864874        rc = PDMR3LdrGetSymbolRC(pVM, VMMGC_MAIN_MODULE_NAME, "vmmGCLoggerFlush", &RCPtrLoggerFlush);
    865875        AssertReleaseMsgRC(rc, ("vmmGCLoggerFlush not found! rc=%Rra\n", rc));
     
    868878    if (pVM->vmm.s.pRCLoggerR3)
    869879    {
     880        Assert(!HMIsEnabled(pVM));
    870881        RTRCPTR RCPtrLoggerWrapper = 0;
    871882        rc = PDMR3LdrGetSymbolRC(pVM, VMMGC_MAIN_MODULE_NAME, "vmmGCLoggerWrapper", &RCPtrLoggerWrapper);
     
    881892    if (pVM->vmm.s.pRCRelLoggerR3)
    882893    {
     894        Assert(!HMIsEnabled(pVM));
    883895        RTRCPTR RCPtrLoggerWrapper = 0;
    884896        rc = PDMR3LdrGetSymbolRC(pVM, VMMGC_MAIN_MODULE_NAME, "vmmGCRelLoggerWrapper", &RCPtrLoggerWrapper);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette