VirtualBox

Changeset 13062 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Oct 8, 2008 8:06:56 AM (16 years ago)
Author:
vboxsync
Message:

#1865: More PGM changes.

Location:
trunk/src/VBox/VMM/VMMAll
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/PGMAllBth.h

    r13060 r13062  
    277277                 * Check if the fault address is in a virtual page access handler range.
    278278                 */
    279                 PPGMVIRTHANDLER pCur = (PPGMVIRTHANDLER)RTAvlroGCPtrRangeGet(&CTXSUFF(pVM->pgm.s.pTrees)->HyperVirtHandlers, pvFault);
     279                PPGMVIRTHANDLER pCur = (PPGMVIRTHANDLER)RTAvlroGCPtrRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->HyperVirtHandlers, pvFault);
    280280                if (    pCur
    281281                    &&  (RTGCUINTPTR)pvFault - (RTGCUINTPTR)pCur->Core.Key < pCur->cb
     
    366366                         */
    367367                        const RTGCPHYS  GCPhysFault = GCPhys | ((RTGCUINTPTR)pvFault & PAGE_OFFSET_MASK);
    368                         PPGMPHYSHANDLER pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&CTXSUFF(pVM->pgm.s.pTrees)->PhysHandlers, GCPhysFault);
     368                        PPGMPHYSHANDLER pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhysFault);
    369369                        if (pCur)
    370370                        {
     
    449449                          *              page was changed without us noticing it (not-present -> present without invlpg or mov cr3, xxx)
    450450                          */
    451                         PPGMVIRTHANDLER pCur = (PPGMVIRTHANDLER)RTAvlroGCPtrRangeGet(&CTXSUFF(pVM->pgm.s.pTrees)->VirtHandlers, pvFault);
     451                        PPGMVIRTHANDLER pCur = (PPGMVIRTHANDLER)RTAvlroGCPtrRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->VirtHandlers, pvFault);
    452452                        if (pCur)
    453453                        {
     
    556556                     * we should correct both the shadow page table and physical memory flags, and not only check for
    557557                     * accesses within the handler region but for access to pages with virtual handlers. */
    558                     PPGMVIRTHANDLER pCur = (PPGMVIRTHANDLER)RTAvlroGCPtrRangeGet(&CTXSUFF(pVM->pgm.s.pTrees)->VirtHandlers, pvFault);
     558                    PPGMVIRTHANDLER pCur = (PPGMVIRTHANDLER)RTAvlroGCPtrRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->VirtHandlers, pvFault);
    559559                    if (pCur)
    560560                    {
  • trunk/src/VBox/VMM/VMMAll/PGMAllGst.h

    r13060 r13062  
    513513                    goto try_again;
    514514                }
    515                 pVM->pgm.s.pHCPaePML4    = (PX86PML4)PGMPOOL_PAGE_2_PTR(pPool->CTXSUFF(pVM), pVM->pgm.s.pHCShwAmd64CR3);
     515                pVM->pgm.s.pHCPaePML4    = (PX86PML4)PGMPOOL_PAGE_2_PTR(pPool->CTX_SUFF(pVM), pVM->pgm.s.pHCShwAmd64CR3);
    516516                pVM->pgm.s.HCPhysPaePML4 = pVM->pgm.s.pHCShwAmd64CR3->Core.Key;
    517517            }
     
    940940    State.fTodo = pVM->pgm.s.fSyncFlags;
    941941    State.cr4   = cr4;
    942     RTAvlroGCPtrDoWithAll(&pVM->pgm.s.CTXSUFF(pTrees)->VirtHandlers, true, PGM_GST_NAME(VirtHandlerUpdateOne), &State);
     942    RTAvlroGCPtrDoWithAll(&pVM->pgm.s.CTX_SUFF(pTrees)->VirtHandlers, true, PGM_GST_NAME(VirtHandlerUpdateOne), &State);
    943943    STAM_PROFILE_STOP(&pVM->pgm.s.CTXMID(Stat,SyncCR3HandlerVirtualUpdate), a);
    944944
     
    951951        STAM_PROFILE_START(&pVM->pgm.s.CTXMID(Stat,SyncCR3HandlerVirtualReset), b);
    952952        Log(("pgmR3VirtualHandlersUpdate: resets bits\n"));
    953         RTAvlroGCPtrDoWithAll(&pVM->pgm.s.CTXSUFF(pTrees)->VirtHandlers, true, pgmHandlerVirtualResetOne, pVM);
     953        RTAvlroGCPtrDoWithAll(&pVM->pgm.s.CTX_SUFF(pTrees)->VirtHandlers, true, pgmHandlerVirtualResetOne, pVM);
    954954        pVM->pgm.s.fSyncFlags &= ~PGM_SYNC_UPDATE_PAGE_BIT_VIRTUAL;
    955955        STAM_PROFILE_STOP(&pVM->pgm.s.CTXMID(Stat,SyncCR3HandlerVirtualReset), b);
  • trunk/src/VBox/VMM/VMMAll/PGMAllHandler.cpp

    r13046 r13062  
    158158     * Try insert into list.
    159159     */
    160     if (RTAvlroGCPhysInsert(&pVM->pgm.s.CTXSUFF(pTrees)->PhysHandlers, &pNew->Core))
     160    if (RTAvlroGCPhysInsert(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, &pNew->Core))
    161161    {
    162162        rc = pgmHandlerPhysicalSetRamFlagsAndFlushShadowPTs(pVM, pNew, pRam);
     
    291291     */
    292292    pgmLock(pVM);
    293     PPGMPHYSHANDLER pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysRemove(&pVM->pgm.s.CTXSUFF(pTrees)->PhysHandlers, GCPhys);
     293    PPGMPHYSHANDLER pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysRemove(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhys);
    294294    if (pCur)
    295295    {
     
    394394    for (;;)
    395395    {
    396         PPGMPHYSHANDLER pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysGetBestFit(&pPGM->CTXSUFF(pTrees)->PhysHandlers, GCPhys, fAbove);
     396        PPGMPHYSHANDLER pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysGetBestFit(&pPGM->CTX_SUFF(pTrees)->PhysHandlers, GCPhys, fAbove);
    397397        if (    !pCur
    398398            ||  ((fAbove ? pCur->Core.Key : pCur->Core.KeyLast) >> PAGE_SHIFT) != (GCPhys >> PAGE_SHIFT))
     
    493493    int rc;
    494494    pgmLock(pVM);
    495     PPGMPHYSHANDLER pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysRemove(&pVM->pgm.s.CTXSUFF(pTrees)->PhysHandlers, GCPhysCurrent);
     495    PPGMPHYSHANDLER pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysRemove(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhysCurrent);
    496496    if (pCur)
    497497    {
     
    523523                pCur->cPages        = (GCPhysLast - (GCPhys & X86_PTE_PAE_PG_MASK) + 1) >> PAGE_SHIFT;
    524524
    525                 if (RTAvlroGCPhysInsert(&pVM->pgm.s.CTXSUFF(pTrees)->PhysHandlers, &pCur->Core))
     525                if (RTAvlroGCPhysInsert(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, &pCur->Core))
    526526                {
    527527                    /*
     
    609609    int rc = VINF_SUCCESS;
    610610    pgmLock(pVM);
    611     PPGMPHYSHANDLER pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysGet(&pVM->pgm.s.CTXSUFF(pTrees)->PhysHandlers, GCPhys);
     611    PPGMPHYSHANDLER pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhys);
    612612    if (pCur)
    613613    {
     
    658658     */
    659659    pgmLock(pVM);
    660     PPGMPHYSHANDLER pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysGet(&pVM->pgm.s.CTXSUFF(pTrees)->PhysHandlers, GCPhys);
     660    PPGMPHYSHANDLER pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhys);
    661661    if (pCur)
    662662    {
     
    673673            pCur->cPages        = (pCur->Core.KeyLast - (pCur->Core.Key & X86_PTE_PAE_PG_MASK) + PAGE_SIZE) >> PAGE_SHIFT;
    674674
    675             if (RTAvlroGCPhysInsert(&pVM->pgm.s.CTXSUFF(pTrees)->PhysHandlers, &pNew->Core))
     675            if (RTAvlroGCPhysInsert(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, &pNew->Core))
    676676            {
    677677                LogFlow(("PGMHandlerPhysicalSplit: %VGp-%VGp and %VGp-%VGp\n",
     
    715715    int rc;
    716716    pgmLock(pVM);
    717     PPGMPHYSHANDLER pCur1 = (PPGMPHYSHANDLER)RTAvlroGCPhysGet(&pVM->pgm.s.CTXSUFF(pTrees)->PhysHandlers, GCPhys1);
     717    PPGMPHYSHANDLER pCur1 = (PPGMPHYSHANDLER)RTAvlroGCPhysGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhys1);
    718718    if (pCur1)
    719719    {
    720         PPGMPHYSHANDLER pCur2 = (PPGMPHYSHANDLER)RTAvlroGCPhysGet(&pVM->pgm.s.CTXSUFF(pTrees)->PhysHandlers, GCPhys2);
     720        PPGMPHYSHANDLER pCur2 = (PPGMPHYSHANDLER)RTAvlroGCPhysGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhys2);
    721721        if (pCur2)
    722722        {
     
    730730                    &&  pCur1->pfnHandlerR3 == pCur2->pfnHandlerR3)
    731731                {
    732                     PPGMPHYSHANDLER pCur3 = (PPGMPHYSHANDLER)RTAvlroGCPhysRemove(&pVM->pgm.s.CTXSUFF(pTrees)->PhysHandlers, GCPhys2);
     732                    PPGMPHYSHANDLER pCur3 = (PPGMPHYSHANDLER)RTAvlroGCPhysRemove(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhys2);
    733733                    if (pCur3 == pCur2)
    734734                    {
     
    793793     */
    794794    int rc;
    795     PPGMPHYSHANDLER pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysGet(&pVM->pgm.s.CTXSUFF(pTrees)->PhysHandlers, GCPhys);
     795    PPGMPHYSHANDLER pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhys);
    796796    if (pCur)
    797797    {
     
    870870     * Validate the range.
    871871     */
    872     PPGMPHYSHANDLER pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysGet(&pVM->pgm.s.CTXSUFF(pTrees)->PhysHandlers, GCPhys);
     872    PPGMPHYSHANDLER pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhys);
    873873    if (pCur)
    874874    {
     
    924924     * Validate the range.
    925925     */
    926     PPGMPHYSHANDLER pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysGet(&pVM->pgm.s.CTXSUFF(pTrees)->PhysHandlers, GCPhys);
     926    PPGMPHYSHANDLER pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhys);
    927927    if (pCur)
    928928    {
     
    969969     * Find the handler.
    970970     */
    971     PPGMPHYSHANDLER pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.CTXSUFF(pTrees)->PhysHandlers, GCPhys);
     971    PPGMPHYSHANDLER pCur = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysHandlers, GCPhys);
    972972    if (pCur)
    973973    {
     
    10011001
    10021002    PPGMPHYS2VIRTHANDLER pCur;
    1003     pCur = (PPGMPHYS2VIRTHANDLER)RTAvlroGCPhysRangeGet(&CTXSUFF(pVM->pgm.s.pTrees)->PhysToVirtHandlers, GCPhys);
     1003    pCur = (PPGMPHYS2VIRTHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysToVirtHandlers, GCPhys);
    10041004    if (pCur)
    10051005    {
     
    10391039    /** @todo check if the current head node covers the ground we do. This is highly unlikely
    10401040     * and I'm too lazy to implement this now as it will require sorting the list and stuff like that. */
    1041     PPGMPHYS2VIRTHANDLER pHead = (PPGMPHYS2VIRTHANDLER)RTAvlroGCPhysGet(&pVM->pgm.s.CTXSUFF(pTrees)->PhysToVirtHandlers, pPhys2Virt->Core.Key);
     1041    PPGMPHYS2VIRTHANDLER pHead = (PPGMPHYS2VIRTHANDLER)RTAvlroGCPhysGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysToVirtHandlers, pPhys2Virt->Core.Key);
    10421042#ifdef VBOX_STRICT_PGM_HANDLER_VIRTUAL
    10431043    AssertReleaseMsg(pHead != pPhys2Virt, ("%VGp-%VGp offVirtHandler=%#RX32\n",
     
    11241124                pPhys2Virt->Core.KeyLast = pPhys2Virt->Core.Key + cbPhys - 1; /* inclusive */
    11251125                pPhys2Virt->offNextAlias = PGMPHYS2VIRTHANDLER_IS_HEAD | PGMPHYS2VIRTHANDLER_IN_TREE;
    1126                 if (!RTAvlroGCPhysInsert(&pVM->pgm.s.CTXSUFF(pTrees)->PhysToVirtHandlers, &pPhys2Virt->Core))
     1126                if (!RTAvlroGCPhysInsert(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysToVirtHandlers, &pPhys2Virt->Core))
    11271127                    pgmHandlerVirtualInsertAliased(pVM, pPhys2Virt);
    11281128#ifdef VBOX_STRICT_PGM_HANDLER_VIRTUAL
    11291129                else
    1130                     AssertReleaseMsg(RTAvlroGCPhysGet(&pVM->pgm.s.CTXSUFF(pTrees)->PhysToVirtHandlers, pPhys2Virt->Core.Key) == &pPhys2Virt->Core,
     1130                    AssertReleaseMsg(RTAvlroGCPhysGet(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysToVirtHandlers, pPhys2Virt->Core.Key) == &pPhys2Virt->Core,
    11311131                                     ("%VGp-%VGp offNextAlias=%#RX32\n",
    11321132                                      pPhys2Virt->Core.Key, pPhys2Virt->Core.KeyLast, pPhys2Virt->offNextAlias));
     
    11691169void pgmHandlerVirtualDumpPhysPages(PVM pVM)
    11701170{
    1171     RTAvlroGCPhysDoWithAll(CTXSUFF(&pVM->pgm.s.pTrees)->PhysToVirtHandlers, true /* from left */,
     1171    RTAvlroGCPhysDoWithAll(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysToVirtHandlers, true /* from left */,
    11721172                           pgmHandlerVirtualDumpPhysPagesCallback, 0);
    11731173}
     
    13661366                {
    13671367                    /* the first */
    1368                     PPGMPHYSHANDLER pPhys = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pPGM->CTXSUFF(pTrees)->PhysHandlers, State.GCPhys);
     1368                    PPGMPHYSHANDLER pPhys = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pPGM->CTX_SUFF(pTrees)->PhysHandlers, State.GCPhys);
    13691369                    if (!pPhys)
    13701370                    {
    1371                         pPhys = (PPGMPHYSHANDLER)RTAvlroGCPhysGetBestFit(&pPGM->CTXSUFF(pTrees)->PhysHandlers, State.GCPhys, true);
     1371                        pPhys = (PPGMPHYSHANDLER)RTAvlroGCPhysGetBestFit(&pPGM->CTX_SUFF(pTrees)->PhysHandlers, State.GCPhys, true);
    13721372                        if (    pPhys
    13731373                            &&  pPhys->Core.Key > (State.GCPhys + PAGE_SIZE - 1))
     
    13821382                        while (pPhys->Core.KeyLast < (State.GCPhys | PAGE_OFFSET_MASK))
    13831383                        {
    1384                             PPGMPHYSHANDLER pPhys2 = (PPGMPHYSHANDLER)RTAvlroGCPhysGetBestFit(&pPGM->CTXSUFF(pTrees)->PhysHandlers,
     1384                            PPGMPHYSHANDLER pPhys2 = (PPGMPHYSHANDLER)RTAvlroGCPhysGetBestFit(&pPGM->CTX_SUFF(pTrees)->PhysHandlers,
    13851385                                                                                              pPhys->Core.KeyLast + 1, true);
    13861386                            if (    !pPhys2
     
    14321432                    for (;;)
    14331433                    {
    1434                         PPGMPHYS2VIRTHANDLER pPhys2Virt = (PPGMPHYS2VIRTHANDLER)RTAvlroGCPhysGetBestFit(&CTXSUFF(pVM->pgm.s.pTrees)->PhysToVirtHandlers,
     1434                        PPGMPHYS2VIRTHANDLER pPhys2Virt = (PPGMPHYS2VIRTHANDLER)RTAvlroGCPhysGetBestFit(&pVM->pgm.s.CTX_SUFF(pTrees)->PhysToVirtHandlers,
    14351435                                                                                                        GCPhysKey, true /* above-or-equal */);
    14361436                        if (    !pPhys2Virt
     
    14591459#else
    14601460                    /* very slow */
    1461                     RTAvlroGCPtrDoWithAll(CTXSUFF(&pVM->pgm.s.pTrees)->VirtHandlers, true, pgmHandlerVirtualVerifyOneByPhysAddr, &State);
     1461                    RTAvlroGCPtrDoWithAll(&pVM->pgm.s.CTX_SUFF(pTrees)->VirtHandlers, true, pgmHandlerVirtualVerifyOneByPhysAddr, &State);
    14621462#endif
    14631463                    if (State.uVirtState != State.uVirtStateFound)
     
    14761476     * and that they are otherwise sane.
    14771477     */
    1478     RTAvlroGCPtrDoWithAll(CTXSUFF(&pVM->pgm.s.pTrees)->VirtHandlers, true, pgmHandlerVirtualVerifyOne, &State);
     1478    RTAvlroGCPtrDoWithAll(&pVM->pgm.s.CTX_SUFF(pTrees)->VirtHandlers, true, pgmHandlerVirtualVerifyOne, &State);
    14791479
    14801480    /*
  • trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp

    r13060 r13062  
    12031203#ifdef IN_RING3 /** @todo deal with this in GC and R0! */
    12041204                    /* find and call the handler */
    1205                     PPGMPHYSHANDLER pNode = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.pTreesHC->PhysHandlers, GCPhys);
     1205                    PPGMPHYSHANDLER pNode = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.pTreesR3->PhysHandlers, GCPhys);
    12061206                    if (pNode && pNode->pfnHandlerR3)
    12071207                    {
     
    14781478#ifdef IN_RING3 /** @todo deal with this in GC and R0! */
    14791479                        /* 1. The physical handler */
    1480                         PPGMPHYSHANDLER pPhysNode = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.pTreesHC->PhysHandlers, GCPhys);
     1480                        PPGMPHYSHANDLER pPhysNode = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.pTreesR3->PhysHandlers, GCPhys);
    14811481                        if (pPhysNode && pPhysNode->pfnHandlerR3)
    14821482                        {
     
    15911591#ifdef IN_RING3 /** @todo deal with this in GC and R0! */
    15921592                    /* find and call the handler */
    1593                     PPGMPHYSHANDLER pNode = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.pTreesHC->PhysHandlers, GCPhys);
     1593                    PPGMPHYSHANDLER pNode = (PPGMPHYSHANDLER)RTAvlroGCPhysRangeGet(&pVM->pgm.s.pTreesR3->PhysHandlers, GCPhys);
    15941594                    if (pNode && pNode->pfnHandlerR3)
    15951595                    {
  • trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp

    r13060 r13062  
    250250#elif defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0)
    251251    void *pvRet;
    252     int rc = PGMDynMapGCPageOff(pPool->pVMHC, GCPhysFault & ~(RTGCPHYS)(cbEntry - 1), &pvRet);
     252    int rc = PGMDynMapGCPageOff(pPool->pVMR0, GCPhysFault & ~(RTGCPHYS)(cbEntry - 1), &pvRet);
    253253    AssertFatalRCSuccess(rc);
    254254    return pvRet;
     
    256256#elif defined(IN_RING0)
    257257    void *pvRet;
    258     int rc = pgmRamGCPhys2HCPtr(&pPool->pVMHC->pgm.s, GCPhysFault & ~(RTGCPHYS)(cbEntry - 1), &pvRet);
     258    int rc = pgmRamGCPhys2HCPtr(&pPool->pVMR0->pgm.s, GCPhysFault & ~(RTGCPHYS)(cbEntry - 1), &pvRet);
    259259    AssertFatalRCSuccess(rc);
    260260    return pvRet;
     
    306306            PX86PML4    pPML4;
    307307        } uShw;
    308         uShw.pv = PGMPOOL_PAGE_2_PTR(pPool->CTXSUFF(pVM), pPage);
     308        uShw.pv = PGMPOOL_PAGE_2_PTR(pPool->CTX_SUFF(pVM), pPage);
    309309
    310310        switch (pPage->enmKind)
     
    390390                if (uShw.pPD->a[iShw].u & PGM_PDFLAGS_MAPPING)
    391391                {
    392                     Assert(pgmMapAreMappingsEnabled(&pPool->CTXSUFF(pVM)->pgm.s));
    393                     VM_FF_SET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3);
     392                    Assert(pgmMapAreMappingsEnabled(&pPool->CTX_SUFF(pVM)->pgm.s));
     393                    VM_FF_SET(pPool->CTX_SUFF(pVM), VM_FF_PGM_SYNC_CR3);
    394394                    LogFlow(("pgmPoolMonitorChainChanging: Detected conflict at iShw=%#x!\n", iShw));
    395395                }
     
    404404                        &&  uShw.pPD->a[iShw2].u & PGM_PDFLAGS_MAPPING)
    405405                    {
    406                         Assert(pgmMapAreMappingsEnabled(&pPool->CTXSUFF(pVM)->pgm.s));
    407                         VM_FF_SET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3);
     406                        Assert(pgmMapAreMappingsEnabled(&pPool->CTX_SUFF(pVM)->pgm.s));
     407                        VM_FF_SET(pPool->CTX_SUFF(pVM), VM_FF_PGM_SYNC_CR3);
    408408                        LogFlow(("pgmPoolMonitorChainChanging: Detected conflict at iShw2=%#x!\n", iShw2));
    409409                    }
     
    411411#if 0 /* useful when running PGMAssertCR3(), a bit too troublesome for general use (TLBs). */
    412412                if (    uShw.pPD->a[iShw].n.u1Present
    413                     &&  !VM_FF_ISSET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3))
     413                    &&  !VM_FF_ISSET(pPool->CTX_SUFF(pVM), VM_FF_PGM_SYNC_CR3))
    414414                {
    415415                    LogFlow(("pgmPoolMonitorChainChanging: iShw=%#x: %RX32 -> freeing it!\n", iShw, uShw.pPD->a[iShw].u));
     
    417417                    ASMProbeReadByte(pvAddress);
    418418# endif
    419                     pgmPoolFree(pPool->CTXSUFF(pVM), uShw.pPD->a[iShw].u & X86_PDE_PG_MASK, pPage->idx, iShw);
     419                    pgmPoolFree(pPool->CTX_SUFF(pVM), uShw.pPD->a[iShw].u & X86_PDE_PG_MASK, pPage->idx, iShw);
    420420                    uShw.pPD->a[iShw].u = 0;
    421421                }
     
    431431                    if ((uShw.pPDPae->a[iShw].u & (PGM_PDFLAGS_MAPPING | X86_PDE_P)) == (PGM_PDFLAGS_MAPPING | X86_PDE_P))
    432432                    {
    433                         Assert(pgmMapAreMappingsEnabled(&pPool->CTXSUFF(pVM)->pgm.s));
    434                         VM_FF_SET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3);
     433                        Assert(pgmMapAreMappingsEnabled(&pPool->CTX_SUFF(pVM)->pgm.s));
     434                        VM_FF_SET(pPool->CTX_SUFF(pVM), VM_FF_PGM_SYNC_CR3);
    435435                        LogFlow(("pgmPoolMonitorChainChanging: Detected conflict at iShw=%#x!\n", iShw));
    436436                    }
     
    444444                            &&  (uShw.pPDPae->a[iShw2].u & (PGM_PDFLAGS_MAPPING | X86_PDE_P)) == (PGM_PDFLAGS_MAPPING | X86_PDE_P))
    445445                        {
    446                             Assert(pgmMapAreMappingsEnabled(&pPool->CTXSUFF(pVM)->pgm.s));
    447                             VM_FF_SET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3);
     446                            Assert(pgmMapAreMappingsEnabled(&pPool->CTX_SUFF(pVM)->pgm.s));
     447                            VM_FF_SET(pPool->CTX_SUFF(pVM), VM_FF_PGM_SYNC_CR3);
    448448                            LogFlow(("pgmPoolMonitorChainChanging: Detected conflict at iShw2=%#x!\n", iShw2));
    449449                        }
     
    451451#if 0 /* useful when running PGMAssertCR3(), a bit too troublesome for general use (TLBs). */
    452452                    if (    uShw.pPDPae->a[iShw].n.u1Present
    453                         &&  !VM_FF_ISSET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3))
     453                        &&  !VM_FF_ISSET(pPool->CTX_SUFF(pVM), VM_FF_PGM_SYNC_CR3))
    454454                    {
    455455                        LogFlow(("pgmPoolMonitorChainChanging: iShw=%#x: %RX64 -> freeing it!\n", iShw, uShw.pPDPae->a[iShw].u));
     
    457457                        ASMProbeReadByte(pvAddress);
    458458# endif
    459                         pgmPoolFree(pPool->CTXSUFF(pVM), uShw.pPDPae->a[iShw].u & X86_PDE_PAE_PG_MASK, pPage->idx, iShw);
     459                        pgmPoolFree(pPool->CTX_SUFF(pVM), uShw.pPDPae->a[iShw].u & X86_PDE_PAE_PG_MASK, pPage->idx, iShw);
    460460                        uShw.pPDPae->a[iShw].u = 0;
    461461                    }
     
    470470                if (uShw.pPDPae->a[iShw].u & PGM_PDFLAGS_MAPPING)
    471471                {
    472                     Assert(pgmMapAreMappingsEnabled(&pPool->CTXSUFF(pVM)->pgm.s));
    473                     VM_FF_SET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3);
     472                    Assert(pgmMapAreMappingsEnabled(&pPool->CTX_SUFF(pVM)->pgm.s));
     473                    VM_FF_SET(pPool->CTX_SUFF(pVM), VM_FF_PGM_SYNC_CR3);
    474474                    LogFlow(("pgmPoolMonitorChainChanging: Detected conflict at iShw=%#x!\n", iShw));
    475475                }
     
    484484                    {
    485485                        LogFlow(("pgmPoolMonitorChainChanging: pae pd iShw=%#x: %RX64 -> freeing it!\n", iShw, uShw.pPDPae->a[iShw].u));
    486                         pgmPoolFree(pPool->CTXSUFF(pVM),
     486                        pgmPoolFree(pPool->CTX_SUFF(pVM),
    487487                                    uShw.pPDPae->a[iShw].u & X86_PDE_PAE_PG_MASK,
    488488                                    /* Note: hardcoded PAE implementation dependency */
     
    504504                        &&  uShw.pPDPae->a[iShw2].u & PGM_PDFLAGS_MAPPING)
    505505                    {
    506                         Assert(pgmMapAreMappingsEnabled(&pPool->CTXSUFF(pVM)->pgm.s));
    507                         VM_FF_SET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3);
     506                        Assert(pgmMapAreMappingsEnabled(&pPool->CTX_SUFF(pVM)->pgm.s));
     507                        VM_FF_SET(pPool->CTX_SUFF(pVM), VM_FF_PGM_SYNC_CR3);
    508508                        LogFlow(("pgmPoolMonitorChainChanging: Detected conflict at iShw2=%#x!\n", iShw2));
    509509                    }
     
    513513                    {
    514514                        LogFlow(("pgmPoolMonitorChainChanging: pae pd iShw2=%#x: %RX64 -> freeing it!\n", iShw2, uShw.pPDPae->a[iShw2].u));
    515                         pgmPoolFree(pPool->CTXSUFF(pVM),
     515                        pgmPoolFree(pPool->CTX_SUFF(pVM),
    516516                                    uShw.pPDPae->a[iShw2].u & X86_PDE_PAE_PG_MASK,
    517517                                    /* Note: hardcoded PAE implementation dependency */
     
    536536                    if (uShw.pPDPT->a[iShw].u & PGM_PLXFLAGS_MAPPING)
    537537                    {
    538                         Assert(pgmMapAreMappingsEnabled(&pPool->CTXSUFF(pVM)->pgm.s));
    539                         VM_FF_SET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3);
     538                        Assert(pgmMapAreMappingsEnabled(&pPool->CTX_SUFF(pVM)->pgm.s));
     539                        VM_FF_SET(pPool->CTX_SUFF(pVM), VM_FF_PGM_SYNC_CR3);
    540540                        LogFlow(("pgmPoolMonitorChainChanging: Detected conflict at iShw=%#x!\n", iShw));
    541541                    }
     
    550550                            &&  uShw.pPDPT->a[iShw2].u & PGM_PLXFLAGS_MAPPING)
    551551                        {
    552                             Assert(pgmMapAreMappingsEnabled(&pPool->CTXSUFF(pVM)->pgm.s));
    553                             VM_FF_SET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3);
     552                            Assert(pgmMapAreMappingsEnabled(&pPool->CTX_SUFF(pVM)->pgm.s));
     553                            VM_FF_SET(pPool->CTX_SUFF(pVM), VM_FF_PGM_SYNC_CR3);
    554554                            LogFlow(("pgmPoolMonitorChainChanging: Detected conflict at iShw2=%#x!\n", iShw2));
    555555                        }
     
    567567                if (uShw.pPDPae->a[iShw].u & PGM_PDFLAGS_MAPPING)
    568568                {
    569                     Assert(pgmMapAreMappingsEnabled(&pPool->CTXSUFF(pVM)->pgm.s));
    570                     VM_FF_SET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3);
     569                    Assert(pgmMapAreMappingsEnabled(&pPool->CTX_SUFF(pVM)->pgm.s));
     570                    VM_FF_SET(pPool->CTX_SUFF(pVM), VM_FF_PGM_SYNC_CR3);
    571571                    LogFlow(("pgmPoolMonitorChainChanging: Detected conflict at iShw=%#x!\n", iShw));
    572572                }
     
    576576                    {
    577577                        LogFlow(("pgmPoolMonitorChainChanging: pae pd iShw=%#x: %RX64 -> freeing it!\n", iShw, uShw.pPDPae->a[iShw].u));
    578                         pgmPoolFree(pPool->CTXSUFF(pVM),
     578                        pgmPoolFree(pPool->CTX_SUFF(pVM),
    579579                                    uShw.pPDPae->a[iShw].u & X86_PDE_PAE_PG_MASK,
    580580                                    pPage->idx,
     
    594594                        &&  uShw.pPDPae->a[iShw2].u & PGM_PDFLAGS_MAPPING)
    595595                    {
    596                         Assert(pgmMapAreMappingsEnabled(&pPool->CTXSUFF(pVM)->pgm.s));
    597                         VM_FF_SET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3);
     596                        Assert(pgmMapAreMappingsEnabled(&pPool->CTX_SUFF(pVM)->pgm.s));
     597                        VM_FF_SET(pPool->CTX_SUFF(pVM), VM_FF_PGM_SYNC_CR3);
    598598                        LogFlow(("pgmPoolMonitorChainChanging: Detected conflict at iShw2=%#x!\n", iShw2));
    599599                    }
     
    602602                    {
    603603                        LogFlow(("pgmPoolMonitorChainChanging: pae pd iShw2=%#x: %RX64 -> freeing it!\n", iShw2, uShw.pPDPae->a[iShw2].u));
    604                         pgmPoolFree(pPool->CTXSUFF(pVM),
     604                        pgmPoolFree(pPool->CTX_SUFF(pVM),
    605605                                    uShw.pPDPae->a[iShw2].u & X86_PDE_PAE_PG_MASK,
    606606                                    pPage->idx,
     
    617617                 * - messing with the bits of pd pointers without changing the physical address
    618618                 */
    619                 if (!VM_FF_ISSET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3))
     619                if (!VM_FF_ISSET(pPool->CTX_SUFF(pVM), VM_FF_PGM_SYNC_CR3))
    620620                {
    621621                    const unsigned iShw = off / sizeof(X86PDPE);
     
    623623                    {
    624624                        LogFlow(("pgmPoolMonitorChainChanging: pdpt iShw=%#x: %RX64 -> freeing it!\n", iShw, uShw.pPDPT->a[iShw].u));
    625                         pgmPoolFree(pPool->CTXSUFF(pVM), uShw.pPDPT->a[iShw].u & X86_PDPE_PG_MASK, pPage->idx, iShw);
     625                        pgmPoolFree(pPool->CTX_SUFF(pVM), uShw.pPDPT->a[iShw].u & X86_PDPE_PG_MASK, pPage->idx, iShw);
    626626                        uShw.pPDPT->a[iShw].u = 0;
    627627                    }
     
    635635                        {
    636636                            LogFlow(("pgmPoolMonitorChainChanging: pdpt iShw2=%#x: %RX64 -> freeing it!\n", iShw2, uShw.pPDPT->a[iShw2].u));
    637                             pgmPoolFree(pPool->CTXSUFF(pVM), uShw.pPDPT->a[iShw2].u & X86_PDPE_PG_MASK, pPage->idx, iShw2);
     637                            pgmPoolFree(pPool->CTX_SUFF(pVM), uShw.pPDPT->a[iShw2].u & X86_PDPE_PG_MASK, pPage->idx, iShw2);
    638638                            uShw.pPDPT->a[iShw2].u = 0;
    639639                        }
     
    648648                 * - messing with the bits of pd pointers without changing the physical address
    649649                 */
    650                 if (!VM_FF_ISSET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3))
     650                if (!VM_FF_ISSET(pPool->CTX_SUFF(pVM), VM_FF_PGM_SYNC_CR3))
    651651                {
    652652                    const unsigned iShw = off / sizeof(X86PDPE);
     
    654654                    {
    655655                        LogFlow(("pgmPoolMonitorChainChanging: pml4 iShw=%#x: %RX64 -> freeing it!\n", iShw, uShw.pPML4->a[iShw].u));
    656                         pgmPoolFree(pPool->CTXSUFF(pVM), uShw.pPML4->a[iShw].u & X86_PML4E_PG_MASK, pPage->idx, iShw);
     656                        pgmPoolFree(pPool->CTX_SUFF(pVM), uShw.pPML4->a[iShw].u & X86_PML4E_PG_MASK, pPage->idx, iShw);
    657657                        uShw.pPML4->a[iShw].u = 0;
    658658                    }
     
    666666                        {
    667667                            LogFlow(("pgmPoolMonitorChainChanging: pml4 iShw2=%#x: %RX64 -> freeing it!\n", iShw2, uShw.pPML4->a[iShw2].u));
    668                             pgmPoolFree(pPool->CTXSUFF(pVM), uShw.pPML4->a[iShw2].u & X86_PML4E_PG_MASK, pPage->idx, iShw2);
     668                            pgmPoolFree(pPool->CTX_SUFF(pVM), uShw.pPML4->a[iShw2].u & X86_PML4E_PG_MASK, pPage->idx, iShw2);
    669669                            uShw.pPML4->a[iShw2].u = 0;
    670670                        }
     
    11391139{
    11401140#ifndef IN_GC
    1141     const PVM pVM = pPool->CTXSUFF(pVM);
     1141    const PVM pVM = pPool->CTX_SUFF(pVM);
    11421142#endif
    11431143    Assert(pPool->iAgeHead != pPool->iAgeTail); /* We shouldn't be here if there < 2 cached entries! */
     
    12851285{
    12861286#ifndef IN_GC
    1287     const PVM pVM = pPool->CTXSUFF(pVM);
     1287    const PVM pVM = pPool->CTX_SUFF(pVM);
    12881288#endif
    12891289    /*
     
    15611561    {
    15621562        Assert(pPage->iMonitoredNext == NIL_PGMPOOL_IDX); Assert(pPage->iMonitoredPrev == NIL_PGMPOOL_IDX);
    1563         PVM pVM = pPool->CTXSUFF(pVM);
     1563        PVM pVM = pPool->CTX_SUFF(pVM);
    15641564        const RTGCPHYS GCPhysPage = pPage->GCPhys & ~(RTGCPHYS)(PAGE_SIZE - 1);
    15651565        rc = PGMHandlerPhysicalRegisterEx(pVM, PGMPHYSHANDLERTYPE_PHYSICAL_WRITE,
     
    16331633     * Remove the page from the monitored list or uninstall it if last.
    16341634     */
    1635     const PVM pVM = pPool->CTXSUFF(pVM);
     1635    const PVM pVM = pPool->CTX_SUFF(pVM);
    16361636    int rc;
    16371637    if (    pPage->iMonitoredNext != NIL_PGMPOOL_IDX
     
    19391939#endif
    19401940                    {
    1941                         void *pvShw = PGMPOOL_PAGE_2_PTR(pPool->CTXSUFF(pVM), pPage);
     1941                        void *pvShw = PGMPOOL_PAGE_2_PTR(pPool->CTX_SUFF(pVM), pPage);
    19421942                        STAM_PROFILE_START(&pPool->StatZeroPage, z);
    19431943                        ASMMemZeroPage(pvShw);
     
    19911991     * Clear all the GCPhys links and rebuild the phys ext free list.
    19921992     */
    1993     for (PPGMRAMRANGE pRam = pPool->CTXSUFF(pVM)->pgm.s.CTX_SUFF(pRamRanges);
     1993    for (PPGMRAMRANGE pRam = pPool->CTX_SUFF(pVM)->pgm.s.CTX_SUFF(pRamRanges);
    19941994         pRam;
    19951995         pRam = pRam->CTX_SUFF(pNext))
     
    20012001
    20022002    pPool->iPhysExtFreeHead = 0;
    2003     PPGMPOOLPHYSEXT paPhysExts = pPool->CTXSUFF(paPhysExts);
     2003    PPGMPOOLPHYSEXT paPhysExts = pPool->CTX_SUFF(paPhysExts);
    20042004    const unsigned cMaxPhysExts = pPool->cMaxPhysExts;
    20052005    for (unsigned i = 0; i < cMaxPhysExts; i++)
     
    21102110{
    21112111    int rc = VINF_SUCCESS;
    2112     PPGMPOOLUSER pUser = pPool->CTXSUFF(paUsers);
     2112    PPGMPOOLUSER pUser = pPool->CTX_SUFF(paUsers);
    21132113
    21142114    LogFlow(("pgmPoolTrackInsert iUser %d iUserTable %d\n", iUser, iUserTable));
     
    21522152    const bool fCanBeMonitored = true;
    21532153# else
    2154     bool fCanBeMonitored = pPool->CTXSUFF(pVM)->pgm.s.GCPhysGstCR3Monitored == NIL_RTGCPHYS
    2155                          || (GCPhys & X86_PTE_PAE_PG_MASK) != (pPool->CTXSUFF(pVM)->pgm.s.GCPhysGstCR3Monitored & X86_PTE_PAE_PG_MASK)
     2154    bool fCanBeMonitored = pPool->CTX_SUFF(pVM)->pgm.s.GCPhysGstCR3Monitored == NIL_RTGCPHYS
     2155                         || (GCPhys & X86_PTE_PAE_PG_MASK) != (pPool->CTX_SUFF(pVM)->pgm.s.GCPhysGstCR3Monitored & X86_PTE_PAE_PG_MASK)
    21562156                         || pgmPoolIsBigPage((PGMPOOLKIND)pPage->enmKind);
    21572157# endif
     
    21992199static int pgmPoolTrackAddUser(PPGMPOOL pPool, PPGMPOOLPAGE pPage, uint16_t iUser, uint32_t iUserTable)
    22002200{
    2201     PPGMPOOLUSER paUsers = pPool->CTXSUFF(paUsers);
     2201    PPGMPOOLUSER paUsers = pPool->CTX_SUFF(paUsers);
    22022202
    22032203    LogFlow(("pgmPoolTrackAddUser iUser %d iUserTable %d\n", iUser, iUserTable));
     
    22662266     * Unlink and free the specified user entry.
    22672267     */
    2268     PPGMPOOLUSER paUsers = pPool->CTXSUFF(paUsers);
     2268    PPGMPOOLUSER paUsers = pPool->CTX_SUFF(paUsers);
    22692269
    22702270    /* Special: For PAE and 32-bit paging, there is usually no more than one user. */
     
    25302530    {
    25312531        Assert(iPhysExt < pPool->cMaxPhysExts);
    2532         pPhysExt = &pPool->CTXSUFF(paPhysExts)[iPhysExt];
     2532        pPhysExt = &pPool->CTX_SUFF(paPhysExts)[iPhysExt];
    25332533        for (unsigned i = 0; i < RT_ELEMENTS(pPhysExt->aidx); i++)
    25342534            if (pPhysExt->aidx[i] != NIL_PGMPOOL_IDX)
     
    26752675        uint32_t       *pau32;
    26762676    } u;
    2677     u.pau64 = (uint64_t *)PGMPOOL_PAGE_2_PTR(pPool->CTXSUFF(pVM), pUserPage);
     2677    u.pau64 = (uint64_t *)PGMPOOL_PAGE_2_PTR(pPool->CTX_SUFF(pVM), pUserPage);
    26782678
    26792679    /* Safety precaution in case we change the paging for other modes too in the future. */
    2680     Assert(PGMGetHyperCR3(CTXSUFF(pPool->pVM)) != pPage->Core.Key);
     2680    Assert(PGMGetHyperCR3(pPool->CTX_SUFF(pVM)) != pPage->Core.Key);
    26812681
    26822682#ifdef VBOX_STRICT
     
    27742774     * Free all the user records.
    27752775     */
    2776     PPGMPOOLUSER paUsers = pPool->CTXSUFF(paUsers);
     2776    PPGMPOOLUSER paUsers = pPool->CTX_SUFF(paUsers);
    27772777    uint16_t i = pPage->iUserHead;
    27782778    while (i != NIL_PGMPOOL_USER_INDEX)
     
    28112811        return NULL;
    28122812    }
    2813     PPGMPOOLPHYSEXT pPhysExt = &pPool->CTXSUFF(paPhysExts)[iPhysExt];
     2813    PPGMPOOLPHYSEXT pPhysExt = &pPool->CTX_SUFF(paPhysExts)[iPhysExt];
    28142814    pPool->iPhysExtFreeHead = pPhysExt->iNext;
    28152815    pPhysExt->iNext = NIL_PGMPOOL_PHYSEXT_INDEX;
     
    28292829    PPGMPOOL pPool = pVM->pgm.s.CTX_SUFF(pPool);
    28302830    Assert(iPhysExt < pPool->cMaxPhysExts);
    2831     PPGMPOOLPHYSEXT pPhysExt = &pPool->CTXSUFF(paPhysExts)[iPhysExt];
     2831    PPGMPOOLPHYSEXT pPhysExt = &pPool->CTX_SUFF(paPhysExts)[iPhysExt];
    28322832    for (unsigned i = 0; i < RT_ELEMENTS(pPhysExt->aidx); i++)
    28332833        pPhysExt->aidx[i] = NIL_PGMPOOL_IDX;
     
    28522852    {
    28532853        Assert(iPhysExt < pPool->cMaxPhysExts);
    2854         pPhysExt = &pPool->CTXSUFF(paPhysExts)[iPhysExt];
     2854        pPhysExt = &pPool->CTX_SUFF(paPhysExts)[iPhysExt];
    28552855        for (unsigned i = 0; i < RT_ELEMENTS(pPhysExt->aidx); i++)
    28562856            pPhysExt->aidx[i] = NIL_PGMPOOL_IDX;
     
    28772877{
    28782878    PPGMPOOL        pPool = pVM->pgm.s.CTX_SUFF(pPool);
    2879     PPGMPOOLPHYSEXT paPhysExts = pPool->CTXSUFF(paPhysExts);
     2879    PPGMPOOLPHYSEXT paPhysExts = pPool->CTX_SUFF(paPhysExts);
    28802880
    28812881    /* special common case. */
     
    29852985    {
    29862986        uint16_t        iPhysExtPrev = NIL_PGMPOOL_PHYSEXT_INDEX;
    2987         PPGMPOOLPHYSEXT paPhysExts = pPool->CTXSUFF(paPhysExts);
     2987        PPGMPOOLPHYSEXT paPhysExts = pPool->CTX_SUFF(paPhysExts);
    29882988        do
    29892989        {
     
    30073007
    30083008                    /* we can free the node. */
    3009                     PVM pVM = pPool->CTXSUFF(pVM);
     3009                    PVM pVM = pPool->CTX_SUFF(pVM);
    30103010                    const uint16_t iPhysExtNext = paPhysExts[iPhysExt].iNext;
    30113011                    if (    iPhysExtPrev == NIL_PGMPOOL_PHYSEXT_INDEX
     
    30683068     * Walk range list.
    30693069     */
    3070     PPGMRAMRANGE pRam = pPool->CTXSUFF(pVM)->pgm.s.CTX_SUFF(pRamRanges);
     3070    PPGMRAMRANGE pRam = pPool->CTX_SUFF(pVM)->pgm.s.CTX_SUFF(pRamRanges);
    30713071    while (pRam)
    30723072    {
     
    31053105     * Walk range list.
    31063106     */
    3107     PPGMRAMRANGE pRam = pPool->CTXSUFF(pVM)->pgm.s.CTX_SUFF(pRamRanges);
     3107    PPGMRAMRANGE pRam = pPool->CTX_SUFF(pVM)->pgm.s.CTX_SUFF(pRamRanges);
    31083108    while (pRam)
    31093109    {
     
    31283128     */
    31293129    STAM_COUNTER_INC(&pPool->StatTrackLinearRamSearches);
    3130     pRam = pPool->CTXSUFF(pVM)->pgm.s.CTX_SUFF(pRamRanges);
     3130    pRam = pPool->CTX_SUFF(pVM)->pgm.s.CTX_SUFF(pRamRanges);
    31313131    while (pRam)
    31323132    {
     
    34003400     * Map the shadow page and take action according to the page kind.
    34013401     */
    3402     void *pvShw = PGMPOOL_PAGE_2_PTR(pPool->CTXSUFF(pVM), pPage);
     3402    void *pvShw = PGMPOOL_PAGE_2_PTR(pPool->CTX_SUFF(pVM), pPage);
    34033403    switch (pPage->enmKind)
    34043404    {
     
    34083408            STAM_PROFILE_START(&pPool->StatTrackDerefGCPhys, g);
    34093409            void *pvGst;
    3410             int rc = PGM_GCPHYS_2_PTR(pPool->CTXSUFF(pVM), pPage->GCPhys, &pvGst); AssertReleaseRC(rc);
     3410            int rc = PGM_GCPHYS_2_PTR(pPool->CTX_SUFF(pVM), pPage->GCPhys, &pvGst); AssertReleaseRC(rc);
    34113411            pgmPoolTrackDerefPT32Bit32Bit(pPool, pPage, (PX86PT)pvShw, (PCX86PT)pvGst);
    34123412            STAM_PROFILE_STOP(&pPool->StatTrackDerefGCPhys, g);
     
    34183418            STAM_PROFILE_START(&pPool->StatTrackDerefGCPhys, g);
    34193419            void *pvGst;
    3420             int rc = PGM_GCPHYS_2_PTR_EX(pPool->CTXSUFF(pVM), pPage->GCPhys, &pvGst); AssertReleaseRC(rc);
     3420            int rc = PGM_GCPHYS_2_PTR_EX(pPool->CTX_SUFF(pVM), pPage->GCPhys, &pvGst); AssertReleaseRC(rc);
    34213421            pgmPoolTrackDerefPTPae32Bit(pPool, pPage, (PX86PTPAE)pvShw, (PCX86PT)pvGst);
    34223422            STAM_PROFILE_STOP(&pPool->StatTrackDerefGCPhys, g);
     
    34283428            STAM_PROFILE_START(&pPool->StatTrackDerefGCPhys, g);
    34293429            void *pvGst;
    3430             int rc = PGM_GCPHYS_2_PTR(pPool->CTXSUFF(pVM), pPage->GCPhys, &pvGst); AssertReleaseRC(rc);
     3430            int rc = PGM_GCPHYS_2_PTR(pPool->CTX_SUFF(pVM), pPage->GCPhys, &pvGst); AssertReleaseRC(rc);
    34313431            pgmPoolTrackDerefPTPaePae(pPool, pPage, (PX86PTPAE)pvShw, (PCX86PTPAE)pvGst);
    34323432            STAM_PROFILE_STOP(&pPool->StatTrackDerefGCPhys, g);
     
    35283528            uint32_t *pau32;
    35293529        } u;
    3530         u.pau64 = (uint64_t *)PGMPOOL_PAGE_2_PTR(pPool->CTXSUFF(pVM), pPage);
     3530        u.pau64 = (uint64_t *)PGMPOOL_PAGE_2_PTR(pPool->CTX_SUFF(pVM), pPage);
    35313531
    35323532        /*
     
    35603560     * Paranoia (to be removed), flag a global CR3 sync.
    35613561     */
    3562     VM_FF_SET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3);
     3562    VM_FF_SET(pPool->CTX_SUFF(pVM), VM_FF_PGM_SYNC_CR3);
    35633563}
    35643564
     
    35943594
    35953595#ifdef IN_RING3
    3596         Assert(pPage->Core.Key == MMPage2Phys(pPool->pVMHC, pPage->pvPageHC));
     3596        Assert(pPage->Core.Key == MMPage2Phys(pPool->pVMR3, pPage->pvPageR3));
    35973597#endif
    35983598#ifdef PGMPOOL_WITH_MONITORING
     
    36333633    pPool->cPresent = 0;
    36343634    pPool->iUserFreeHead = 0;
    3635     PPGMPOOLUSER paUsers = pPool->CTXSUFF(paUsers);
     3635    PPGMPOOLUSER paUsers = pPool->CTX_SUFF(paUsers);
    36363636    const unsigned cMaxUsers = pPool->cMaxUsers;
    36373637    for (unsigned i = 0; i < cMaxUsers; i++)
     
    36483648     * Clear all the GCPhys links and rebuild the phys ext free list.
    36493649     */
    3650     for (PPGMRAMRANGE pRam = pPool->CTXSUFF(pVM)->pgm.s.CTX_SUFF(pRamRanges);
     3650    for (PPGMRAMRANGE pRam = pPool->CTX_SUFF(pVM)->pgm.s.CTX_SUFF(pRamRanges);
    36513651         pRam;
    36523652         pRam = pRam->CTX_SUFF(pNext))
     
    36583658
    36593659    pPool->iPhysExtFreeHead = 0;
    3660     PPGMPOOLPHYSEXT paPhysExts = pPool->CTXSUFF(paPhysExts);
     3660    PPGMPOOLPHYSEXT paPhysExts = pPool->CTX_SUFF(paPhysExts);
    36613661    const unsigned cMaxPhysExts = pPool->cMaxPhysExts;
    36623662    for (unsigned i = 0; i < cMaxPhysExts; i++)
     
    37063706        if (pPage->fMonitored)
    37073707        {
    3708             PVM pVM = pPool->CTXSUFF(pVM);
     3708            PVM pVM = pPool->CTX_SUFF(pVM);
    37093709            int rc = PGMHandlerPhysicalChangeCallbacks(pVM, pPage->GCPhys & ~(RTGCPHYS)(PAGE_SIZE - 1),
    37103710                                                       pPool->pfnAccessHandlerR3, MMHyperCCToR3(pVM, pPage),
     
    37623762     * Quietly reject any attempts at flushing the currently active shadow CR3 mapping
    37633763     */
    3764     if (PGMGetHyperCR3(CTXSUFF(pPool->pVM)) == pPage->Core.Key)
    3765     {
    3766         AssertMsg(pPage->enmKind == PGMPOOLKIND_64BIT_PML4_FOR_64BIT_PML4, ("Can't free the shadow CR3! (%VGp vs %VGp kind=%d\n", PGMGetHyperCR3(CTXSUFF(pPool->pVM)), pPage->Core.Key, pPage->enmKind));
     3764    if (PGMGetHyperCR3(pPool->CTX_SUFF(pVM)) == pPage->Core.Key)
     3765    {
     3766        AssertMsg(pPage->enmKind == PGMPOOLKIND_64BIT_PML4_FOR_64BIT_PML4, ("Can't free the shadow CR3! (%VGp vs %VGp kind=%d\n", PGMGetHyperCR3(pPool->CTX_SUFF(pVM)), pPage->Core.Key, pPage->enmKind));
    37673767        Log(("pgmPoolFlushPage: current active shadow CR3, rejected. enmKind=%d idx=%d\n", pPage->enmKind, pPage->idx));
    37683768        return VINF_SUCCESS;
     
    38643864        STAM_PROFILE_ADV_SUSPEND(&pPool->StatAlloc, a);
    38653865#ifdef IN_RING3
    3866         int rc = PGMR3PoolGrow(pPool->pVMHC);
     3866        int rc = PGMR3PoolGrow(pPool->pVMR3);
    38673867#else
    3868         int rc = CTXALLMID(VMM, CallHost)(pPool->CTXSUFF(pVM), VMMCALLHOST_PGM_POOL_GROW, 0);
     3868        int rc = CTXALLMID(VMM, CallHost)(pPool->CTX_SUFF(pVM), VMMCALLHOST_PGM_POOL_GROW, 0);
    38693869#endif
    38703870        if (VBOX_FAILURE(rc))
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