VirtualBox

Changeset 45808 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Apr 29, 2013 12:41:07 PM (12 years ago)
Author:
vboxsync
Message:

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

Location:
trunk/src/VBox/VMM
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/PGMAll.cpp

    r45799 r45808  
    24252425 * @param   pVM         Pointer to the VM.
    24262426 */
     2427#if defined(VBOX_STRICT) && defined(IN_RING3)
     2428int pgmLockDebug(PVM pVM, RT_SRC_POS_DECL)
     2429#else
    24272430int pgmLock(PVM pVM)
    2428 {
     2431#endif
     2432{
     2433#if defined(VBOX_STRICT) && defined(IN_RING3)
     2434    int rc = PDMCritSectEnterDebug(&pVM->pgm.s.CritSectX, VERR_SEM_BUSY, (uintptr_t)ASMReturnAddress(), RT_SRC_POS_ARGS);
     2435#else
    24292436    int rc = PDMCritSectEnter(&pVM->pgm.s.CritSectX, VERR_SEM_BUSY);
     2437#endif
    24302438#if defined(IN_RC) || defined(IN_RING0)
    24312439    if (rc == VERR_SEM_BUSY)
  • trunk/src/VBox/VMM/VMMAll/PGMAllHandler.cpp

    r44528 r45808  
    118118    AssertPtrReturn(pfnHandlerR3, VERR_INVALID_POINTER);
    119119    AssertReturn(pfnHandlerR0, VERR_INVALID_PARAMETER);
    120     AssertReturn(pfnHandlerRC, VERR_INVALID_PARAMETER);
     120    AssertReturn(pfnHandlerRC || HMIsEnabled(pVM), VERR_INVALID_PARAMETER);
    121121
    122122    /*
  • trunk/src/VBox/VMM/VMMR3/EM.cpp

    r45693 r45808  
    20402040             */
    20412041            if (   !fFFDone
     2042                && RT_SUCCESS(rc)
    20422043                && rc != VINF_EM_TERMINATE
    20432044                && rc != VINF_EM_OFF
  • trunk/src/VBox/VMM/VMMR3/IOM.cpp

    r45311 r45808  
    105105#include <VBox/vmm/pgm.h>
    106106#include <VBox/sup.h>
     107#include <VBox/vmm/hm.h>
    107108#include <VBox/vmm/mm.h>
    108109#include <VBox/vmm/stam.h>
     
    308309    RTAvlroGCPhysDoWithAll(&pVM->iom.s.pTreesR3->MMIOTree,     true, iomR3RelocateMMIOCallback,   &offDelta);
    309310
    310     if (pVM->iom.s.pfnMMIOHandlerRC)
     311    if (pVM->iom.s.pfnMMIOHandlerRC != NIL_RTRCPTR)
    311312        pVM->iom.s.pfnMMIOHandlerRC += offDelta;
    312313
     
    643644    LogFlow(("IOMR3IOPortRegisterRC: pDevIns=%p PortStart=%#x cPorts=%#x pvUser=%RRv pfnOutCallback=%RRv pfnInCallback=%RRv pfnOutStrCallback=%RRv pfnInStrCallback=%RRv pszDesc=%s\n",
    644645             pDevIns, PortStart, cPorts, pvUser, pfnOutCallback, pfnInCallback, pfnOutStrCallback, pfnInStrCallback, pszDesc));
     646    AssertReturn(!HMIsEnabled(pVM), VERR_IOM_HM_IPE);
    645647
    646648    /*
     
    13811383    if (pVM->iom.s.pfnMMIOHandlerR0 == NIL_RTR0PTR)
    13821384    {
    1383         rc = PDMR3LdrGetSymbolRC(pVM, NULL, "IOMMMIOHandler", &pVM->iom.s.pfnMMIOHandlerRC);
    1384         AssertLogRelRCReturn(rc, rc);
     1385        if (!HMIsEnabled(pVM))
     1386        {
     1387            rc = PDMR3LdrGetSymbolRC(pVM, NULL, "IOMMMIOHandler", &pVM->iom.s.pfnMMIOHandlerRC);
     1388            AssertLogRelRCReturn(rc, rc);
     1389        }
    13851390        rc = PDMR3LdrGetSymbolR0(pVM, NULL, "IOMMMIOHandler", &pVM->iom.s.pfnMMIOHandlerR0);
    13861391        AssertLogRelRCReturn(rc, rc);
     
    14791484    LogFlow(("IOMR3MmioRegisterRC: pDevIns=%p GCPhysStart=%RGp cbRange=%#x pvUser=%RGv pfnWriteCallback=%#x pfnReadCallback=%#x pfnFillCallback=%#x\n",
    14801485             pDevIns, GCPhysStart, cbRange, pvUser, pfnWriteCallback, pfnReadCallback, pfnFillCallback));
     1486    AssertReturn(!HMIsEnabled(pVM), VERR_IOM_HM_IPE);
    14811487
    14821488    /*
  • trunk/src/VBox/VMM/VMMR3/PDM.cpp

    r45152 r45808  
    256256#include <VBox/vmm/pgm.h>
    257257#include <VBox/vmm/ssm.h>
     258#include <VBox/vmm/hm.h>
    258259#include <VBox/vmm/vm.h>
    259260#include <VBox/vmm/uvm.h>
     
    515516     * Devices & Drivers.
    516517     */
    517     PCPDMDEVHLPRC pDevHlpRC;
    518     int rc = PDMR3LdrGetSymbolRC(pVM, NULL, "g_pdmRCDevHlp", &pDevHlpRC);
    519     AssertReleaseMsgRC(rc, ("rc=%Rrc when resolving g_pdmRCDevHlp\n", rc));
    520 
    521     PCPDMDRVHLPRC pDrvHlpRC;
    522     rc = PDMR3LdrGetSymbolRC(pVM, NULL, "g_pdmRCDevHlp", &pDrvHlpRC);
    523     AssertReleaseMsgRC(rc, ("rc=%Rrc when resolving g_pdmRCDevHlp\n", rc));
     518    int rc;
     519    PCPDMDEVHLPRC pDevHlpRC = NIL_RTRCPTR;
     520    if (!HMIsEnabled(pVM))
     521    {
     522        rc = PDMR3LdrGetSymbolRC(pVM, NULL, "g_pdmRCDevHlp", &pDevHlpRC);
     523        AssertReleaseMsgRC(rc, ("rc=%Rrc when resolving g_pdmRCDevHlp\n", rc));
     524    }
     525
     526    PCPDMDRVHLPRC pDrvHlpRC = NIL_RTRCPTR;
     527    if (!HMIsEnabled(pVM))
     528    {
     529        rc = PDMR3LdrGetSymbolRC(pVM, NULL, "g_pdmRCDevHlp", &pDrvHlpRC);
     530        AssertReleaseMsgRC(rc, ("rc=%Rrc when resolving g_pdmRCDevHlp\n", rc));
     531    }
    524532
    525533    for (PPDMDEVINS pDevIns = pVM->pdm.s.pDevInstances; pDevIns; pDevIns = pDevIns->Internal.s.pNextR3)
  • trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp

    r45749 r45808  
    2424#include <VBox/vmm/pdm.h>
    2525#include <VBox/vmm/mm.h>
     26#include <VBox/vmm/hm.h>
    2627#include <VBox/vmm/pgm.h>
    2728#include <VBox/vmm/iom.h>
     
    6566DECLINLINE(int) pdmR3DevGetSymbolRCLazy(PPDMDEVINS pDevIns, const char *pszSymbol, PRTRCPTR ppvValue)
    6667{
    67     return PDMR3LdrGetSymbolRCLazy(pDevIns->Internal.s.pVMR3,
     68    PVM pVM = pDevIns->Internal.s.pVMR3;
     69    if (HMIsEnabled(pVM))
     70    {
     71        *ppvValue = NIL_RTRCPTR;
     72        return VINF_SUCCESS;
     73    }
     74    return PDMR3LdrGetSymbolRCLazy(pVM,
    6875                                   pDevIns->Internal.s.pDevR3->pReg->szRCMod,
    6976                                   pDevIns->Internal.s.pDevR3->pszRCSearchPath,
     
    121128{
    122129    PDMDEV_ASSERT_DEVINS(pDevIns);
    123     VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3);
     130    PVM pVM = pDevIns->Internal.s.pVMR3;
     131    VM_ASSERT_EMT(pVM);
    124132    LogFlow(("pdmR3DevHlp_IOPortRegisterRC: caller='%s'/%d: Port=%#x cPorts=%#x pvUser=%p pszOut=%p:{%s} pszIn=%p:{%s} pszOutStr=%p:{%s} pszInStr=%p:{%s} pszDesc=%p:{%s}\n", pDevIns->pReg->szName, pDevIns->iInstance,
    125133             Port, cPorts, pvUser, pszOut, pszOut, pszIn, pszIn, pszOutStr, pszOutStr, pszInStr, pszInStr, pszDesc, pszDesc));
     
    129137     */
    130138    int rc = VINF_SUCCESS;
    131     if (    pDevIns->pReg->szRCMod[0]
    132         &&  (pDevIns->pReg->fFlags & PDM_DEVREG_FLAGS_RC))
     139    if (   pDevIns->pReg->szRCMod[0]
     140        && (pDevIns->pReg->fFlags & PDM_DEVREG_FLAGS_RC)
     141        && !HMIsEnabled(pVM))
    133142    {
    134143        RTRCPTR RCPtrIn = NIL_RTRCPTR;
     
    168177#endif
    169178
    170             rc = IOMR3IOPortRegisterRC(pDevIns->Internal.s.pVMR3, pDevIns, Port, cPorts, pvUser, RCPtrOut, RCPtrIn, RCPtrOutStr, RCPtrInStr, pszDesc);
    171         }
    172     }
    173     else
    174     {
    175         AssertMsgFailed(("No GC module for this driver!\n"));
     179            rc = IOMR3IOPortRegisterRC(pVM, pDevIns, Port, cPorts, pvUser, RCPtrOut, RCPtrIn, RCPtrOutStr, RCPtrInStr, pszDesc);
     180        }
     181    }
     182    else if (!HMIsEnabled(pVM))
     183    {
     184        AssertMsgFailed(("No RC module for this driver!\n"));
    176185        rc = VERR_INVALID_PARAMETER;
    177186    }
     
    295304{
    296305    PDMDEV_ASSERT_DEVINS(pDevIns);
    297     VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3);
     306    PVM pVM = pDevIns->Internal.s.pVMR3;
     307    VM_ASSERT_EMT(pVM);
    298308    LogFlow(("pdmR3DevHlp_MMIORegisterRC: caller='%s'/%d: GCPhysStart=%RGp cbRange=%#x pvUser=%p pszWrite=%p:{%s} pszRead=%p:{%s} pszFill=%p:{%s}\n",
    299309             pDevIns->pReg->szName, pDevIns->iInstance, GCPhysStart, cbRange, pvUser, pszWrite, pszWrite, pszRead, pszRead, pszFill, pszFill));
     
    305315     */
    306316    int rc = VINF_SUCCESS;
    307     if (    pDevIns->pReg->szRCMod[0]
    308         &&  (pDevIns->pReg->fFlags & PDM_DEVREG_FLAGS_RC))
     317    if (   pDevIns->pReg->szRCMod[0]
     318        && (pDevIns->pReg->fFlags & PDM_DEVREG_FLAGS_RC)
     319        && !HMIsEnabled(pVM))
    309320    {
    310321        RTRCPTR RCPtrWrite = NIL_RTRCPTR;
     
    323334
    324335        if (RT_SUCCESS(rc) && RT_SUCCESS(rc2) && RT_SUCCESS(rc3))
    325             rc = IOMR3MmioRegisterRC(pDevIns->Internal.s.pVMR3, pDevIns, GCPhysStart, cbRange, pvUser, RCPtrWrite, RCPtrRead, RCPtrFill);
     336            rc = IOMR3MmioRegisterRC(pVM, pDevIns, GCPhysStart, cbRange, pvUser, RCPtrWrite, RCPtrRead, RCPtrFill);
    326337        else
    327338        {
     
    335346        }
    336347    }
    337     else
    338     {
    339         AssertMsgFailed(("No GC module for this driver!\n"));
     348    else if (!HMIsEnabled(pVM))
     349    {
     350        AssertMsgFailed(("No RC module for this driver!\n"));
    340351        rc = VERR_INVALID_PARAMETER;
    341352    }
  • trunk/src/VBox/VMM/VMMR3/PDMDevMiscHlp.cpp

    r44528 r45808  
    2424#include <VBox/vmm/pdm.h>
    2525#include <VBox/vmm/pgm.h>
     26#include <VBox/vmm/hm.h>
    2627#ifdef VBOX_WITH_REM
    2728# include <VBox/vmm/rem.h>
     
    121122{
    122123    PDMDEV_ASSERT_DEVINS(pDevIns);
    123     VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3);
    124     RTRCPTR pRCHelpers = 0;
    125     int rc = PDMR3LdrGetSymbolRC(pDevIns->Internal.s.pVMR3, NULL, "g_pdmRCPicHlp", &pRCHelpers);
    126     AssertReleaseRC(rc);
    127     AssertRelease(pRCHelpers);
     124    PVM pVM = pDevIns->Internal.s.pVMR3;
     125    VM_ASSERT_EMT(pVM);
     126
     127    RTRCPTR pRCHelpers = NIL_RTRCPTR;
     128    if (!HMIsEnabled(pVM))
     129    {
     130        int rc = PDMR3LdrGetSymbolRC(pVM, NULL, "g_pdmRCPicHlp", &pRCHelpers);
     131        AssertReleaseRC(rc);
     132        AssertRelease(pRCHelpers);
     133    }
     134
    128135    LogFlow(("pdmR3PicHlp_GetRCHelpers: caller='%s'/%d: returns %RRv\n",
    129136             pDevIns->pReg->szName, pDevIns->iInstance, pRCHelpers));
     
    136143{
    137144    PDMDEV_ASSERT_DEVINS(pDevIns);
    138     VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3);
     145    PVM pVM = pDevIns->Internal.s.pVMR3;
     146    VM_ASSERT_EMT(pVM);
    139147    PCPDMPICHLPR0 pR0Helpers = 0;
    140     int rc = PDMR3LdrGetSymbolR0(pDevIns->Internal.s.pVMR3, NULL, "g_pdmR0PicHlp", &pR0Helpers);
     148    int rc = PDMR3LdrGetSymbolR0(pVM, NULL, "g_pdmR0PicHlp", &pR0Helpers);
    141149    AssertReleaseRC(rc);
    142150    AssertRelease(pR0Helpers);
     
    316324{
    317325    PDMDEV_ASSERT_DEVINS(pDevIns);
    318     VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3);
    319     RTRCPTR pRCHelpers = 0;
    320     int rc = PDMR3LdrGetSymbolRC(pDevIns->Internal.s.pVMR3, NULL, "g_pdmRCApicHlp", &pRCHelpers);
    321     AssertReleaseRC(rc);
    322     AssertRelease(pRCHelpers);
     326    PVM pVM = pDevIns->Internal.s.pVMR3;
     327    VM_ASSERT_EMT(pVM);
     328
     329    RTRCPTR pRCHelpers = NIL_RTRCPTR;
     330    if (!HMIsEnabled(pVM))
     331    {
     332        int rc = PDMR3LdrGetSymbolRC(pVM, NULL, "g_pdmRCApicHlp", &pRCHelpers);
     333        AssertReleaseRC(rc);
     334        AssertRelease(pRCHelpers);
     335    }
     336
    323337    LogFlow(("pdmR3ApicHlp_GetRCHelpers: caller='%s'/%d: returns %RRv\n",
    324338             pDevIns->pReg->szName, pDevIns->iInstance, pRCHelpers));
     
    331345{
    332346    PDMDEV_ASSERT_DEVINS(pDevIns);
    333     VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3);
     347    PVM pVM = pDevIns->Internal.s.pVMR3;
     348    VM_ASSERT_EMT(pVM);
    334349    PCPDMAPICHLPR0 pR0Helpers = 0;
    335     int rc = PDMR3LdrGetSymbolR0(pDevIns->Internal.s.pVMR3, NULL, "g_pdmR0ApicHlp", &pR0Helpers);
     350    int rc = PDMR3LdrGetSymbolR0(pVM, NULL, "g_pdmR0ApicHlp", &pR0Helpers);
    336351    AssertReleaseRC(rc);
    337352    AssertRelease(pR0Helpers);
     
    440455{
    441456    PDMDEV_ASSERT_DEVINS(pDevIns);
    442     VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3);
    443     RTRCPTR pRCHelpers = 0;
    444     int rc = PDMR3LdrGetSymbolRC(pDevIns->Internal.s.pVMR3, NULL, "g_pdmRCIoApicHlp", &pRCHelpers);
    445     AssertReleaseRC(rc);
    446     AssertRelease(pRCHelpers);
     457    PVM pVM = pDevIns->Internal.s.pVMR3;
     458    VM_ASSERT_EMT(pVM);
     459
     460    RTRCPTR pRCHelpers = NIL_RTRCPTR;
     461    if (!HMIsEnabled(pVM))
     462    {
     463        int rc = PDMR3LdrGetSymbolRC(pVM, NULL, "g_pdmRCIoApicHlp", &pRCHelpers);
     464        AssertReleaseRC(rc);
     465        AssertRelease(pRCHelpers);
     466    }
     467
    447468    LogFlow(("pdmR3IoApicHlp_GetRCHelpers: caller='%s'/%d: returns %RRv\n",
    448469             pDevIns->pReg->szName, pDevIns->iInstance, pRCHelpers));
     
    455476{
    456477    PDMDEV_ASSERT_DEVINS(pDevIns);
    457     VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3);
     478    PVM pVM = pDevIns->Internal.s.pVMR3;
     479    VM_ASSERT_EMT(pVM);
    458480    PCPDMIOAPICHLPR0 pR0Helpers = 0;
    459     int rc = PDMR3LdrGetSymbolR0(pDevIns->Internal.s.pVMR3, NULL, "g_pdmR0IoApicHlp", &pR0Helpers);
     481    int rc = PDMR3LdrGetSymbolR0(pVM, NULL, "g_pdmR0IoApicHlp", &pR0Helpers);
    460482    AssertReleaseRC(rc);
    461483    AssertRelease(pR0Helpers);
     
    547569{
    548570    PDMDEV_ASSERT_DEVINS(pDevIns);
    549     VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3);
    550     RTRCPTR pRCHelpers = 0;
    551     int rc = PDMR3LdrGetSymbolRC(pDevIns->Internal.s.pVMR3, NULL, "g_pdmRCPciHlp", &pRCHelpers);
    552     AssertReleaseRC(rc);
    553     AssertRelease(pRCHelpers);
     571    PVM pVM = pDevIns->Internal.s.pVMR3;
     572    VM_ASSERT_EMT(pVM);
     573
     574    RTRCPTR pRCHelpers = NIL_RTRCPTR;
     575    if (!HMIsEnabled(pVM))
     576    {
     577        int rc = PDMR3LdrGetSymbolRC(pVM, NULL, "g_pdmRCPciHlp", &pRCHelpers);
     578        AssertReleaseRC(rc);
     579        AssertRelease(pRCHelpers);
     580    }
     581
    554582    LogFlow(("pdmR3IoApicHlp_GetGCHelpers: caller='%s'/%d: returns %RRv\n",
    555583             pDevIns->pReg->szName, pDevIns->iInstance, pRCHelpers));
     
    562590{
    563591    PDMDEV_ASSERT_DEVINS(pDevIns);
    564     VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3);
     592    PVM pVM = pDevIns->Internal.s.pVMR3;
     593    VM_ASSERT_EMT(pVM);
    565594    PCPDMPCIHLPR0 pR0Helpers = 0;
    566     int rc = PDMR3LdrGetSymbolR0(pDevIns->Internal.s.pVMR3, NULL, "g_pdmR0PciHlp", &pR0Helpers);
     595    int rc = PDMR3LdrGetSymbolR0(pVM, NULL, "g_pdmR0PciHlp", &pR0Helpers);
    567596    AssertReleaseRC(rc);
    568597    AssertRelease(pR0Helpers);
     
    669698{
    670699    PDMDEV_ASSERT_DEVINS(pDevIns);
    671     VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3);
    672     RTRCPTR pRCHelpers = 0;
    673     int rc = PDMR3LdrGetSymbolRC(pDevIns->Internal.s.pVMR3, NULL, "g_pdmRCHpetHlp", &pRCHelpers);
    674     AssertReleaseRC(rc);
    675     AssertRelease(pRCHelpers);
     700    PVM pVM = pDevIns->Internal.s.pVMR3;
     701    VM_ASSERT_EMT(pVM);
     702
     703    RTRCPTR pRCHelpers = NIL_RTRCPTR;
     704    if (!HMIsEnabled(pVM))
     705    {
     706        int rc = PDMR3LdrGetSymbolRC(pVM, NULL, "g_pdmRCHpetHlp", &pRCHelpers);
     707        AssertReleaseRC(rc);
     708        AssertRelease(pRCHelpers);
     709    }
     710
    676711    LogFlow(("pdmR3HpetHlp_GetGCHelpers: caller='%s'/%d: returns %RRv\n",
    677712             pDevIns->pReg->szName, pDevIns->iInstance, pRCHelpers));
     
    684719{
    685720    PDMDEV_ASSERT_DEVINS(pDevIns);
    686     VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3);
     721    PVM pVM = pDevIns->Internal.s.pVMR3;
     722    VM_ASSERT_EMT(pVM);
    687723    PCPDMHPETHLPR0 pR0Helpers = 0;
    688     int rc = PDMR3LdrGetSymbolR0(pDevIns->Internal.s.pVMR3, NULL, "g_pdmR0HpetHlp", &pR0Helpers);
     724    int rc = PDMR3LdrGetSymbolR0(pVM, NULL, "g_pdmR0HpetHlp", &pR0Helpers);
    689725    AssertReleaseRC(rc);
    690726    AssertRelease(pR0Helpers);
     
    719755{
    720756    PDMDEV_ASSERT_DEVINS(pDevIns);
    721     VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3);
     757    PVM pVM = pDevIns->Internal.s.pVMR3;
     758    VM_ASSERT_EMT(pVM);
     759
    722760    RTRCPTR pRCHelpers = NIL_RTRCPTR;
    723     int rc = PDMR3LdrGetSymbolRC(pDevIns->Internal.s.pVMR3, NULL, "g_pdmRCPciRawHlp", &pRCHelpers);
    724     AssertReleaseRC(rc);
    725     AssertRelease(pRCHelpers);
     761    if (!HMIsEnabled(pVM))
     762    {
     763        int rc = PDMR3LdrGetSymbolRC(pVM, NULL, "g_pdmRCPciRawHlp", &pRCHelpers);
     764        AssertReleaseRC(rc);
     765        AssertRelease(pRCHelpers);
     766    }
     767
    726768    LogFlow(("pdmR3PciRawHlp_GetGCHelpers: caller='%s'/%d: returns %RRv\n",
    727769             pDevIns->pReg->szName, pDevIns->iInstance, pRCHelpers));
     
    734776{
    735777    PDMDEV_ASSERT_DEVINS(pDevIns);
    736     VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3);
     778    PVM pVM = pDevIns->Internal.s.pVMR3;
     779    VM_ASSERT_EMT(pVM);
    737780    PCPDMHPETHLPR0 pR0Helpers = NIL_RTR0PTR;
    738     int rc = PDMR3LdrGetSymbolR0(pDevIns->Internal.s.pVMR3, NULL, "g_pdmR0PciRawHlp", &pR0Helpers);
     781    int rc = PDMR3LdrGetSymbolR0(pVM, NULL, "g_pdmR0PciRawHlp", &pR0Helpers);
    739782    AssertReleaseRC(rc);
    740783    AssertRelease(pR0Helpers);
  • trunk/src/VBox/VMM/VMMR3/PDMDevice.cpp

    r44528 r45808  
    2626#include <VBox/vmm/pgm.h>
    2727#include <VBox/vmm/iom.h>
     28#include <VBox/vmm/hm.h>
    2829#include <VBox/vmm/cfgm.h>
    2930#ifdef VBOX_WITH_REM
     
    130131     * Get the RC & R0 devhlps and create the devhlp R3 task queue.
    131132     */
    132     PCPDMDEVHLPRC pHlpRC;
    133     rc = PDMR3LdrGetSymbolRC(pVM, NULL, "g_pdmRCDevHlp", &pHlpRC);
    134     AssertReleaseRCReturn(rc, rc);
     133    PCPDMDEVHLPRC pHlpRC = NIL_RTRCPTR;
     134    if (!HMIsEnabled(pVM))
     135    {
     136        rc = PDMR3LdrGetSymbolRC(pVM, NULL, "g_pdmRCDevHlp", &pHlpRC);
     137        AssertReleaseRCReturn(rc, rc);
     138    }
    135139
    136140    PCPDMDEVHLPR0 pHlpR0;
  • trunk/src/VBox/VMM/VMMR3/PDMDriver.cpp

    r45152 r45808  
    2525#include <VBox/vmm/mm.h>
    2626#include <VBox/vmm/cfgm.h>
     27#include <VBox/vmm/hm.h>
    2728#include <VBox/vmm/vmm.h>
    2829#include <VBox/sup.h>
     
    722723                        rc = PDMR3LdrGetSymbolR0(pVM, NULL, "g_pdmR0DrvHlp", &pNew->pHlpR0);
    723724                        AssertReleaseRCReturn(rc, rc);
    724 
    725725                    }
    726                     if (pDrv->pReg->fFlags & PDM_DRVREG_FLAGS_RC)
     726                    if (   (pDrv->pReg->fFlags & PDM_DRVREG_FLAGS_RC)
     727                        && !HMIsEnabled(pVM))
    727728                    {
    728729                        pNew->pvInstanceDataR0      = MMHyperR3ToRC(pVM, &pNew->achInstanceData[0]);
  • trunk/src/VBox/VMM/VMMR3/PDMLdr.cpp

    r44528 r45808  
    320320}
    321321
    322 
    323322#ifdef VBOX_WITH_RAW_MODE
     323
    324324/**
    325325 * Resolve an external symbol during RTLdrGetBits() of a RC module.
     
    609609    return rc;
    610610}
     611
    611612#endif /* VBOX_WITH_RAW_MODE */
    612 
    613613
    614614/**
     
    884884{
    885885#if defined(PDMLDR_FAKE_MODE) || !defined(VBOX_WITH_RAW_MODE)
     886    Assert(!HMIsEnabled(pVM));
    886887    *pRCPtrValue = 0xfeedf00d;
    887888    return VINF_SUCCESS;
     
    951952{
    952953#if defined(PDMLDR_FAKE_MODE) || !defined(VBOX_WITH_RAW_MODE)
     954    Assert(!HMIsEnabled(pVM));
    953955    *pRCPtrValue = 0xfeedf00d;
    954956    return VINF_SUCCESS;
  • trunk/src/VBox/VMM/VMMR3/PGMBth.h

    r45103 r45808  
    6565        int rc;
    6666
     67        if (!HMIsEnabled(pVM))
     68        {
    6769#if PGM_SHW_TYPE != PGM_TYPE_AMD64 && PGM_SHW_TYPE != PGM_TYPE_NESTED && PGM_SHW_TYPE != PGM_TYPE_EPT /* No AMD64 for traditional virtualization, only VT-x and AMD-V. */
    68         /* GC */
    69         rc = PDMR3LdrGetSymbolRC(pVM, NULL,       PGM_BTH_NAME_RC_STR(Trap0eHandler),       &pModeData->pfnRCBthTrap0eHandler);
    70         AssertMsgRCReturn(rc, ("%s -> rc=%Rrc\n", PGM_BTH_NAME_RC_STR(Trap0eHandler),  rc), rc);
    71         rc = PDMR3LdrGetSymbolRC(pVM, NULL,       PGM_BTH_NAME_RC_STR(InvalidatePage),      &pModeData->pfnRCBthInvalidatePage);
    72         AssertMsgRCReturn(rc, ("%s -> rc=%Rrc\n", PGM_BTH_NAME_RC_STR(InvalidatePage), rc), rc);
    73         rc = PDMR3LdrGetSymbolRC(pVM, NULL,       PGM_BTH_NAME_RC_STR(SyncCR3),             &pModeData->pfnRCBthSyncCR3);
    74         AssertMsgRCReturn(rc, ("%s -> rc=%Rrc\n", PGM_BTH_NAME_RC_STR(SyncCR3), rc), rc);
    75         rc = PDMR3LdrGetSymbolRC(pVM, NULL,       PGM_BTH_NAME_RC_STR(PrefetchPage),        &pModeData->pfnRCBthPrefetchPage);
    76         AssertMsgRCReturn(rc, ("%s -> rc=%Rrc\n", PGM_BTH_NAME_RC_STR(PrefetchPage), rc), rc);
    77         rc = PDMR3LdrGetSymbolRC(pVM, NULL,       PGM_BTH_NAME_RC_STR(VerifyAccessSyncPage),&pModeData->pfnRCBthVerifyAccessSyncPage);
    78         AssertMsgRCReturn(rc, ("%s -> rc=%Rrc\n", PGM_BTH_NAME_RC_STR(VerifyAccessSyncPage), rc), rc);
     70            /* RC */
     71            rc = PDMR3LdrGetSymbolRC(pVM, NULL,       PGM_BTH_NAME_RC_STR(Trap0eHandler),       &pModeData->pfnRCBthTrap0eHandler);
     72            AssertMsgRCReturn(rc, ("%s -> rc=%Rrc\n", PGM_BTH_NAME_RC_STR(Trap0eHandler),  rc), rc);
     73            rc = PDMR3LdrGetSymbolRC(pVM, NULL,       PGM_BTH_NAME_RC_STR(InvalidatePage),      &pModeData->pfnRCBthInvalidatePage);
     74            AssertMsgRCReturn(rc, ("%s -> rc=%Rrc\n", PGM_BTH_NAME_RC_STR(InvalidatePage), rc), rc);
     75            rc = PDMR3LdrGetSymbolRC(pVM, NULL,       PGM_BTH_NAME_RC_STR(SyncCR3),             &pModeData->pfnRCBthSyncCR3);
     76            AssertMsgRCReturn(rc, ("%s -> rc=%Rrc\n", PGM_BTH_NAME_RC_STR(SyncCR3), rc), rc);
     77            rc = PDMR3LdrGetSymbolRC(pVM, NULL,       PGM_BTH_NAME_RC_STR(PrefetchPage),        &pModeData->pfnRCBthPrefetchPage);
     78            AssertMsgRCReturn(rc, ("%s -> rc=%Rrc\n", PGM_BTH_NAME_RC_STR(PrefetchPage), rc), rc);
     79            rc = PDMR3LdrGetSymbolRC(pVM, NULL,       PGM_BTH_NAME_RC_STR(VerifyAccessSyncPage),&pModeData->pfnRCBthVerifyAccessSyncPage);
     80            AssertMsgRCReturn(rc, ("%s -> rc=%Rrc\n", PGM_BTH_NAME_RC_STR(VerifyAccessSyncPage), rc), rc);
    7981# ifdef VBOX_STRICT
    80         rc = PDMR3LdrGetSymbolRC(pVM, NULL,       PGM_BTH_NAME_RC_STR(AssertCR3),           &pModeData->pfnRCBthAssertCR3);
    81         AssertMsgRCReturn(rc, ("%s -> rc=%Rrc\n", PGM_BTH_NAME_RC_STR(AssertCR3), rc), rc);
     82            rc = PDMR3LdrGetSymbolRC(pVM, NULL,       PGM_BTH_NAME_RC_STR(AssertCR3),           &pModeData->pfnRCBthAssertCR3);
     83            AssertMsgRCReturn(rc, ("%s -> rc=%Rrc\n", PGM_BTH_NAME_RC_STR(AssertCR3), rc), rc);
    8284# endif
    83         rc = PDMR3LdrGetSymbolRC(pVM, NULL,       PGM_BTH_NAME_RC_STR(MapCR3),              &pModeData->pfnRCBthMapCR3);
    84         AssertMsgRCReturn(rc, ("%s -> rc=%Rrc\n", PGM_BTH_NAME_RC_STR(MapCR3), rc), rc);
    85         rc = PDMR3LdrGetSymbolRC(pVM, NULL,       PGM_BTH_NAME_RC_STR(UnmapCR3),            &pModeData->pfnRCBthUnmapCR3);
    86         AssertMsgRCReturn(rc, ("%s -> rc=%Rrc\n", PGM_BTH_NAME_RC_STR(UnmapCR3), rc), rc);
     85            rc = PDMR3LdrGetSymbolRC(pVM, NULL,       PGM_BTH_NAME_RC_STR(MapCR3),              &pModeData->pfnRCBthMapCR3);
     86            AssertMsgRCReturn(rc, ("%s -> rc=%Rrc\n", PGM_BTH_NAME_RC_STR(MapCR3), rc), rc);
     87            rc = PDMR3LdrGetSymbolRC(pVM, NULL,       PGM_BTH_NAME_RC_STR(UnmapCR3),            &pModeData->pfnRCBthUnmapCR3);
     88            AssertMsgRCReturn(rc, ("%s -> rc=%Rrc\n", PGM_BTH_NAME_RC_STR(UnmapCR3), rc), rc);
    8789#endif /* Not AMD64 shadow paging. */
     90        }
    8891
    8992        /* Ring 0 */
  • trunk/src/VBox/VMM/VMMR3/PGMGst.h

    r44528 r45808  
    5858        int rc;
    5959
     60        if (!HMIsEnabled(pVM))
     61        {
    6062#if PGM_SHW_TYPE != PGM_TYPE_AMD64 /* No AMD64 for traditional virtualization, only VT-x and AMD-V. */
    61         /* GC */
    62         rc = PDMR3LdrGetSymbolRC(pVM, NULL,       PGM_GST_NAME_RC_STR(GetPage),          &pModeData->pfnRCGstGetPage);
    63         AssertMsgRCReturn(rc, ("%s -> rc=%Rrc\n", PGM_GST_NAME_RC_STR(GetPage),  rc), rc);
    64         rc = PDMR3LdrGetSymbolRC(pVM, NULL,       PGM_GST_NAME_RC_STR(ModifyPage),       &pModeData->pfnRCGstModifyPage);
    65         AssertMsgRCReturn(rc, ("%s -> rc=%Rrc\n", PGM_GST_NAME_RC_STR(ModifyPage),  rc), rc);
    66         rc = PDMR3LdrGetSymbolRC(pVM, NULL,       PGM_GST_NAME_RC_STR(GetPDE),           &pModeData->pfnRCGstGetPDE);
    67         AssertMsgRCReturn(rc, ("%s -> rc=%Rrc\n", PGM_GST_NAME_RC_STR(GetPDE), rc), rc);
     63            /* RC */
     64            rc = PDMR3LdrGetSymbolRC(pVM, NULL,       PGM_GST_NAME_RC_STR(GetPage),          &pModeData->pfnRCGstGetPage);
     65            AssertMsgRCReturn(rc, ("%s -> rc=%Rrc\n", PGM_GST_NAME_RC_STR(GetPage),  rc), rc);
     66            rc = PDMR3LdrGetSymbolRC(pVM, NULL,       PGM_GST_NAME_RC_STR(ModifyPage),       &pModeData->pfnRCGstModifyPage);
     67            AssertMsgRCReturn(rc, ("%s -> rc=%Rrc\n", PGM_GST_NAME_RC_STR(ModifyPage),  rc), rc);
     68            rc = PDMR3LdrGetSymbolRC(pVM, NULL,       PGM_GST_NAME_RC_STR(GetPDE),           &pModeData->pfnRCGstGetPDE);
     69            AssertMsgRCReturn(rc, ("%s -> rc=%Rrc\n", PGM_GST_NAME_RC_STR(GetPDE), rc), rc);
    6870#endif /* Not AMD64 shadow paging. */
     71        }
    6972
    7073        /* Ring-0 */
  • trunk/src/VBox/VMM/VMMR3/PGMHandler.cpp

    r45276 r45808  
    120120         */
    121121        RTRCPTR pfnHandlerRC = NIL_RTRCPTR;
    122         rc = PDMR3LdrGetSymbolRCLazy(pVM, pszModRC, NULL /*pszSearchPath*/, pszHandlerRC, &pfnHandlerRC);
     122        if (!HMIsEnabled(pVM))
     123            rc = PDMR3LdrGetSymbolRCLazy(pVM, pszModRC, NULL /*pszSearchPath*/, pszHandlerRC, &pfnHandlerRC);
    123124        if (RT_SUCCESS(rc))
    124125            return PGMHandlerPhysicalRegisterEx(pVM, enmType, GCPhys, GCPhysLast, pfnHandlerR3, pvUserR3,
     
    260261    int rc = PDMR3LdrGetSymbolRCLazy(pVM, pszModRC, NULL /*pszSearchPath*/, pszHandlerRC, &pfnHandlerRC);
    261262    if (RT_SUCCESS(rc))
    262         return PGMR3HandlerVirtualRegisterEx(pVM, enmType, GCPtr, GCPtrLast, pfnInvalidateR3, pfnHandlerR3, pfnHandlerRC, pszDesc);
     263        return PGMR3HandlerVirtualRegisterEx(pVM, enmType, GCPtr, GCPtrLast, pfnInvalidateR3,
     264                                             pfnHandlerR3, pfnHandlerRC, pszDesc);
    263265
    264266    AssertMsgFailed(("Failed to resolve %s.%s, rc=%Rrc.\n", pszModRC, pszHandlerRC, rc));
  • trunk/src/VBox/VMM/VMMR3/PGMPool.cpp

    r45103 r45808  
    411411    pVM->pgm.s.pPoolR3->paUsersRC = MMHyperR3ToRC(pVM, pVM->pgm.s.pPoolR3->paUsersR3);
    412412    pVM->pgm.s.pPoolR3->paPhysExtsRC = MMHyperR3ToRC(pVM, pVM->pgm.s.pPoolR3->paPhysExtsR3);
    413     int rc = PDMR3LdrGetSymbolRC(pVM, NULL, "pgmPoolAccessHandler", &pVM->pgm.s.pPoolR3->pfnAccessHandlerRC);
    414     AssertReleaseRC(rc);
     413
     414    if (!HMIsEnabled(pVM))
     415    {
     416        int rc = PDMR3LdrGetSymbolRC(pVM, NULL, "pgmPoolAccessHandler", &pVM->pgm.s.pPoolR3->pfnAccessHandlerRC);
     417        AssertReleaseRC(rc);
     418    }
     419
    415420    /* init order hack. */
    416421    if (!pVM->pgm.s.pPoolR3->pfnAccessHandlerR0)
    417422    {
    418         rc = PDMR3LdrGetSymbolR0(pVM, NULL, "pgmPoolAccessHandler", &pVM->pgm.s.pPoolR3->pfnAccessHandlerR0);
     423        int rc = PDMR3LdrGetSymbolR0(pVM, NULL, "pgmPoolAccessHandler", &pVM->pgm.s.pPoolR3->pfnAccessHandlerR0);
    419424        AssertReleaseRC(rc);
    420425    }
  • trunk/src/VBox/VMM/VMMR3/PGMShw.h

    r45103 r45808  
    145145        int rc;
    146146
     147        if (!HMIsEnabled(pVM))
     148        {
    147149#if PGM_SHW_TYPE != PGM_TYPE_AMD64 && PGM_SHW_TYPE != PGM_TYPE_NESTED && PGM_SHW_TYPE != PGM_TYPE_EPT /* No AMD64 for traditional virtualization, only VT-x and AMD-V. */
    148         /* GC */
    149         rc = PDMR3LdrGetSymbolRC(pVM, NULL,       PGM_SHW_NAME_RC_STR(GetPage),    &pModeData->pfnRCShwGetPage);
    150         AssertMsgRCReturn(rc, ("%s -> rc=%Rrc\n", PGM_SHW_NAME_RC_STR(GetPage),  rc), rc);
    151         rc = PDMR3LdrGetSymbolRC(pVM, NULL,       PGM_SHW_NAME_RC_STR(ModifyPage), &pModeData->pfnRCShwModifyPage);
    152         AssertMsgRCReturn(rc, ("%s -> rc=%Rrc\n", PGM_SHW_NAME_RC_STR(ModifyPage), rc), rc);
     150            /* GC */
     151            rc = PDMR3LdrGetSymbolRC(pVM, NULL,       PGM_SHW_NAME_RC_STR(GetPage),    &pModeData->pfnRCShwGetPage);
     152            AssertMsgRCReturn(rc, ("%s -> rc=%Rrc\n", PGM_SHW_NAME_RC_STR(GetPage),  rc), rc);
     153            rc = PDMR3LdrGetSymbolRC(pVM, NULL,       PGM_SHW_NAME_RC_STR(ModifyPage), &pModeData->pfnRCShwModifyPage);
     154            AssertMsgRCReturn(rc, ("%s -> rc=%Rrc\n", PGM_SHW_NAME_RC_STR(ModifyPage), rc), rc);
    153155#endif /* Not AMD64 shadow paging. */
     156        }
    154157
    155158        /* Ring-0 */
  • trunk/src/VBox/VMM/VMMR3/TM.cpp

    r45436 r45808  
    125125#include <VBox/vmm/vmm.h>
    126126#include <VBox/vmm/mm.h>
     127#include <VBox/vmm/hm.h>
    127128#include <VBox/vmm/ssm.h>
    128129#include <VBox/vmm/dbgf.h>
     
    939940     * Resolve symbols.
    940941     */
    941     rc = PDMR3LdrGetSymbolRC(pVM, NULL, "tmVirtualNanoTSBad",          &pVM->tm.s.VirtualGetRawDataRC.pfnBad);
    942     AssertRCReturn(rc, rc);
    943     rc = PDMR3LdrGetSymbolRC(pVM, NULL, "tmVirtualNanoTSRediscover",   &pVM->tm.s.VirtualGetRawDataRC.pfnRediscover);
    944     AssertRCReturn(rc, rc);
    945     if (pVM->tm.s.pfnVirtualGetRawR3       == RTTimeNanoTSLFenceSync)
    946         rc = PDMR3LdrGetSymbolRC(pVM, NULL, "RTTimeNanoTSLFenceSync",  &pVM->tm.s.pfnVirtualGetRawRC);
    947     else if (pVM->tm.s.pfnVirtualGetRawR3  == RTTimeNanoTSLFenceAsync)
    948         rc = PDMR3LdrGetSymbolRC(pVM, NULL, "RTTimeNanoTSLFenceAsync", &pVM->tm.s.pfnVirtualGetRawRC);
    949     else if (pVM->tm.s.pfnVirtualGetRawR3  == RTTimeNanoTSLegacySync)
    950         rc = PDMR3LdrGetSymbolRC(pVM, NULL, "RTTimeNanoTSLegacySync",  &pVM->tm.s.pfnVirtualGetRawRC);
    951     else if (pVM->tm.s.pfnVirtualGetRawR3  == RTTimeNanoTSLegacyAsync)
    952         rc = PDMR3LdrGetSymbolRC(pVM, NULL, "RTTimeNanoTSLegacyAsync", &pVM->tm.s.pfnVirtualGetRawRC);
    953     else
    954         AssertFatalFailed();
    955     AssertRCReturn(rc, rc);
     942    if (!HMIsEnabled(pVM))
     943    {
     944        rc = PDMR3LdrGetSymbolRC(pVM, NULL, "tmVirtualNanoTSBad",          &pVM->tm.s.VirtualGetRawDataRC.pfnBad);
     945        AssertRCReturn(rc, rc);
     946        rc = PDMR3LdrGetSymbolRC(pVM, NULL, "tmVirtualNanoTSRediscover",   &pVM->tm.s.VirtualGetRawDataRC.pfnRediscover);
     947        AssertRCReturn(rc, rc);
     948        if (pVM->tm.s.pfnVirtualGetRawR3       == RTTimeNanoTSLFenceSync)
     949            rc = PDMR3LdrGetSymbolRC(pVM, NULL, "RTTimeNanoTSLFenceSync",  &pVM->tm.s.pfnVirtualGetRawRC);
     950        else if (pVM->tm.s.pfnVirtualGetRawR3  == RTTimeNanoTSLFenceAsync)
     951            rc = PDMR3LdrGetSymbolRC(pVM, NULL, "RTTimeNanoTSLFenceAsync", &pVM->tm.s.pfnVirtualGetRawRC);
     952        else if (pVM->tm.s.pfnVirtualGetRawR3  == RTTimeNanoTSLegacySync)
     953            rc = PDMR3LdrGetSymbolRC(pVM, NULL, "RTTimeNanoTSLegacySync",  &pVM->tm.s.pfnVirtualGetRawRC);
     954        else if (pVM->tm.s.pfnVirtualGetRawR3  == RTTimeNanoTSLegacyAsync)
     955            rc = PDMR3LdrGetSymbolRC(pVM, NULL, "RTTimeNanoTSLegacyAsync", &pVM->tm.s.pfnVirtualGetRawRC);
     956        else
     957            AssertFatalFailed();
     958        AssertRCReturn(rc, rc);
     959    }
    956960
    957961    rc = PDMR3LdrGetSymbolR0(pVM, NULL, "tmVirtualNanoTSBad",          &pVM->tm.s.VirtualGetRawDataR0.pfnBad);
     
    9991003    NOREF(offDelta);
    10001004
    1001     pVM->tm.s.pvGIPRC = MMHyperR3ToRC(pVM, pVM->tm.s.pvGIPR3);
    1002     pVM->tm.s.paTimerQueuesRC = MMHyperR3ToRC(pVM, pVM->tm.s.paTimerQueuesR3);
    10031005    pVM->tm.s.paTimerQueuesR0 = MMHyperR3ToR0(pVM, pVM->tm.s.paTimerQueuesR3);
    10041006
    1005     pVM->tm.s.VirtualGetRawDataRC.pu64Prev = MMHyperR3ToRC(pVM, (void *)&pVM->tm.s.u64VirtualRawPrev);
    1006     AssertFatal(pVM->tm.s.VirtualGetRawDataRC.pu64Prev);
    1007     rc = PDMR3LdrGetSymbolRC(pVM, NULL, "tmVirtualNanoTSBad",          &pVM->tm.s.VirtualGetRawDataRC.pfnBad);
    1008     AssertFatalRC(rc);
    1009     rc = PDMR3LdrGetSymbolRC(pVM, NULL, "tmVirtualNanoTSRediscover",   &pVM->tm.s.VirtualGetRawDataRC.pfnRediscover);
    1010     AssertFatalRC(rc);
    1011 
    1012     if (pVM->tm.s.pfnVirtualGetRawR3       == RTTimeNanoTSLFenceSync)
    1013         rc = PDMR3LdrGetSymbolRC(pVM, NULL, "RTTimeNanoTSLFenceSync",  &pVM->tm.s.pfnVirtualGetRawRC);
    1014     else if (pVM->tm.s.pfnVirtualGetRawR3  == RTTimeNanoTSLFenceAsync)
    1015         rc = PDMR3LdrGetSymbolRC(pVM, NULL, "RTTimeNanoTSLFenceAsync", &pVM->tm.s.pfnVirtualGetRawRC);
    1016     else if (pVM->tm.s.pfnVirtualGetRawR3  == RTTimeNanoTSLegacySync)
    1017         rc = PDMR3LdrGetSymbolRC(pVM, NULL, "RTTimeNanoTSLegacySync",  &pVM->tm.s.pfnVirtualGetRawRC);
    1018     else if (pVM->tm.s.pfnVirtualGetRawR3  == RTTimeNanoTSLegacyAsync)
    1019         rc = PDMR3LdrGetSymbolRC(pVM, NULL, "RTTimeNanoTSLegacyAsync", &pVM->tm.s.pfnVirtualGetRawRC);
    1020     else
    1021         AssertFatalFailed();
    1022     AssertFatalRC(rc);
     1007    if (!HMIsEnabled(pVM))
     1008    {
     1009        pVM->tm.s.pvGIPRC = MMHyperR3ToRC(pVM, pVM->tm.s.pvGIPR3);
     1010        pVM->tm.s.paTimerQueuesRC = MMHyperR3ToRC(pVM, pVM->tm.s.paTimerQueuesR3);
     1011        pVM->tm.s.VirtualGetRawDataRC.pu64Prev = MMHyperR3ToRC(pVM, (void *)&pVM->tm.s.u64VirtualRawPrev);
     1012        AssertFatal(pVM->tm.s.VirtualGetRawDataRC.pu64Prev);
     1013        rc = PDMR3LdrGetSymbolRC(pVM, NULL, "tmVirtualNanoTSBad",          &pVM->tm.s.VirtualGetRawDataRC.pfnBad);
     1014        AssertFatalRC(rc);
     1015        rc = PDMR3LdrGetSymbolRC(pVM, NULL, "tmVirtualNanoTSRediscover",   &pVM->tm.s.VirtualGetRawDataRC.pfnRediscover);
     1016        AssertFatalRC(rc);
     1017
     1018        if (pVM->tm.s.pfnVirtualGetRawR3       == RTTimeNanoTSLFenceSync)
     1019            rc = PDMR3LdrGetSymbolRC(pVM, NULL, "RTTimeNanoTSLFenceSync",  &pVM->tm.s.pfnVirtualGetRawRC);
     1020        else if (pVM->tm.s.pfnVirtualGetRawR3  == RTTimeNanoTSLFenceAsync)
     1021            rc = PDMR3LdrGetSymbolRC(pVM, NULL, "RTTimeNanoTSLFenceAsync", &pVM->tm.s.pfnVirtualGetRawRC);
     1022        else if (pVM->tm.s.pfnVirtualGetRawR3  == RTTimeNanoTSLegacySync)
     1023            rc = PDMR3LdrGetSymbolRC(pVM, NULL, "RTTimeNanoTSLegacySync",  &pVM->tm.s.pfnVirtualGetRawRC);
     1024        else if (pVM->tm.s.pfnVirtualGetRawR3  == RTTimeNanoTSLegacyAsync)
     1025            rc = PDMR3LdrGetSymbolRC(pVM, NULL, "RTTimeNanoTSLegacyAsync", &pVM->tm.s.pfnVirtualGetRawRC);
     1026        else
     1027            AssertFatalFailed();
     1028        AssertFatalRC(rc);
     1029    }
    10231030
    10241031    /*
  • trunk/src/VBox/VMM/VMMR3/TRPM.cpp

    r45728 r45808  
    11761176    /* Only applies to raw mode which supports only 1 VCPU. */
    11771177    PVMCPU pVCpu = &pVM->aCpus[0];
     1178    Assert(!HMIsEnabled(pVM));
    11781179
    11791180    /** @todo cleanup trpmR3ClearPassThroughHandler()! */
  • 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);
  • trunk/src/VBox/VMM/include/PGMInternal.h

    r45798 r45808  
    38943894RT_C_DECLS_BEGIN
    38953895
     3896#if defined(VBOX_STRICT) && defined(IN_RING3)
     3897int             pgmLockDebug(PVM pVM, RT_SRC_POS_DECL);
     3898# define pgmLock(a_pVM) pgmLockDebug(a_pVM, RT_SRC_POS)
     3899#else
    38963900int             pgmLock(PVM pVM);
     3901#endif
    38973902void            pgmUnlock(PVM pVM);
    38983903/**
Note: See TracChangeset for help on using the changeset viewer.

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