VirtualBox

儲存庫 vbox 的更動 16907


忽略:
時間撮記:
2009-2-18 下午03:04:16 (16 年 以前)
作者:
vboxsync
訊息:

VBOX_WITH_PGMPOOL_PAGING_ONLY: changes for marking root pages as special.

位置:
trunk/src/VBox/VMM
檔案:
修改 7 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/VMM/PGM.cpp

    r16865 r16907  
    11571157    pVM->pgm.s.enmHostMode      = SUPPAGINGMODE_INVALID;
    11581158    pVM->pgm.s.GCPhysCR3        = NIL_RTGCPHYS;
    1159 #ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    11601159    pVM->pgm.s.GCPhysGstCR3Monitored = NIL_RTGCPHYS;
    1161 #endif
    11621160    pVM->pgm.s.fA20Enabled      = true;
    11631161    pVM->pgm.s.GCPhys4MBPSEMask = RT_BIT_64(32) - 1; /* default; checked later */
     
    30673065    pVM->pgm.s.pfnR3GstModifyPage           = pModeData->pfnR3GstModifyPage;
    30683066    pVM->pgm.s.pfnR3GstGetPDE               = pModeData->pfnR3GstGetPDE;
    3069 #ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    30703067    pVM->pgm.s.pfnR3GstMonitorCR3           = pModeData->pfnR3GstMonitorCR3;
    30713068    pVM->pgm.s.pfnR3GstUnmonitorCR3         = pModeData->pfnR3GstUnmonitorCR3;
    3072 #endif
    30733069#ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    30743070    pVM->pgm.s.pfnR3GstWriteHandlerCR3      = pModeData->pfnR3GstWriteHandlerCR3;
     
    30803076    pVM->pgm.s.pfnRCGstModifyPage           = pModeData->pfnRCGstModifyPage;
    30813077    pVM->pgm.s.pfnRCGstGetPDE               = pModeData->pfnRCGstGetPDE;
    3082 #ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    30833078    pVM->pgm.s.pfnRCGstMonitorCR3           = pModeData->pfnRCGstMonitorCR3;
    30843079    pVM->pgm.s.pfnRCGstUnmonitorCR3         = pModeData->pfnRCGstUnmonitorCR3;
    3085 #endif
    30863080#ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    30873081    pVM->pgm.s.pfnRCGstWriteHandlerCR3      = pModeData->pfnRCGstWriteHandlerCR3;
     
    30913085    pVM->pgm.s.pfnR0GstModifyPage           = pModeData->pfnR0GstModifyPage;
    30923086    pVM->pgm.s.pfnR0GstGetPDE               = pModeData->pfnR0GstGetPDE;
    3093 #ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    30943087    pVM->pgm.s.pfnR0GstMonitorCR3           = pModeData->pfnR0GstMonitorCR3;
    30953088    pVM->pgm.s.pfnR0GstUnmonitorCR3         = pModeData->pfnR0GstUnmonitorCR3;
    3096 #endif
    30973089#ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    30983090    pVM->pgm.s.pfnR0GstWriteHandlerCR3      = pModeData->pfnR0GstWriteHandlerCR3;
  • trunk/src/VBox/VMM/PGMGst.h

    r16619 r16907  
    119119PGM_GST_DECL(int, ModifyPage)(PVM pVM, RTGCPTR GCPtr, size_t cb, uint64_t fFlags, uint64_t fMask);
    120120PGM_GST_DECL(int, GetPDE)(PVM pVM, RTGCPTR GCPtr, PX86PDEPAE pPDE);
    121 #ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    122121PGM_GST_DECL(int, MonitorCR3)(PVM pVM, RTGCPHYS GCPhysCR3);
    123122PGM_GST_DECL(int, UnmonitorCR3)(PVM pVM);
    124 #endif
    125123__END_DECLS
    126124
     
    145143    pModeData->pfnR3GstGetPage            = PGM_GST_NAME(GetPage);
    146144    pModeData->pfnR3GstModifyPage         = PGM_GST_NAME(ModifyPage);
    147 #ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    148145    pModeData->pfnR3GstMonitorCR3         = PGM_GST_NAME(MonitorCR3);
    149146    pModeData->pfnR3GstUnmonitorCR3       = PGM_GST_NAME(UnmonitorCR3);
    150 #endif
    151147
    152148#ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
     
    176172        rc = PDMR3LdrGetSymbolRC(pVM, NULL,       PGM_GST_NAME_RC_STR(GetPDE),           &pModeData->pfnRCGstGetPDE);
    177173        AssertMsgRCReturn(rc, ("%s -> rc=%Rrc\n", PGM_GST_NAME_RC_STR(GetPDE), rc), rc);
    178 # ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    179174        rc = PDMR3LdrGetSymbolRC(pVM, NULL,       PGM_GST_NAME_RC_STR(MonitorCR3),       &pModeData->pfnRCGstMonitorCR3);
    180175        AssertMsgRCReturn(rc, ("%s -> rc=%Rrc\n", PGM_GST_NAME_RC_STR(MonitorCR3), rc), rc);
    181176        rc = PDMR3LdrGetSymbolRC(pVM, NULL,       PGM_GST_NAME_RC_STR(UnmonitorCR3),     &pModeData->pfnRCGstUnmonitorCR3);
    182177        AssertMsgRCReturn(rc, ("%s -> rc=%Rrc\n", PGM_GST_NAME_RC_STR(UnmonitorCR3), rc), rc);
    183 # endif
    184178# ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    185179#  if PGM_GST_TYPE == PGM_TYPE_32BIT || PGM_GST_TYPE == PGM_TYPE_PAE
     
    199193        rc = PDMR3LdrGetSymbolR0(pVM, NULL,       PGM_GST_NAME_R0_STR(GetPDE),           &pModeData->pfnR0GstGetPDE);
    200194        AssertMsgRCReturn(rc, ("%s -> rc=%Rrc\n", PGM_GST_NAME_R0_STR(GetPDE), rc), rc);
    201 #ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    202195        rc = PDMR3LdrGetSymbolR0(pVM, NULL,       PGM_GST_NAME_R0_STR(MonitorCR3),       &pModeData->pfnR0GstMonitorCR3);
    203196        AssertMsgRCReturn(rc, ("%s -> rc=%Rrc\n", PGM_GST_NAME_R0_STR(MonitorCR3), rc), rc);
    204197        rc = PDMR3LdrGetSymbolR0(pVM, NULL,       PGM_GST_NAME_R0_STR(UnmonitorCR3),     &pModeData->pfnR0GstUnmonitorCR3);
    205198        AssertMsgRCReturn(rc, ("%s -> rc=%Rrc\n", PGM_GST_NAME_R0_STR(UnmonitorCR3), rc), rc);
    206 #endif
    207199#ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    208200# if PGM_GST_TYPE == PGM_TYPE_32BIT || PGM_GST_TYPE == PGM_TYPE_PAE
     
    235227#else
    236228    int rc = PGM_BTH_NAME(MapCR3)(pVM, GCPhysCR3);
     229#endif
    237230    if (RT_SUCCESS(rc) && !pVM->pgm.s.fMappingsFixed)
    238231        rc = PGM_GST_NAME(MonitorCR3)(pVM, GCPhysCR3);
    239 #endif
    240232    return rc;
    241233}
     
    266258    int rc;
    267259
    268 #ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY
    269     rc = PGM_BTH_PFN(UnmapCR3, pVM)(pVM);
    270 #else
    271260    rc = PGM_GST_NAME(UnmonitorCR3)(pVM);
    272261    if (RT_SUCCESS(rc))
     262#ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY
     263        rc = PGM_BTH_PFN(UnmapCR3, pVM)(pVM);
     264#else
    273265        rc = PGM_BTH_NAME(UnmapCR3)(pVM);
    274266#endif
  • trunk/src/VBox/VMM/PGMInternal.h

    r16904 r16907  
    16351635     * It's a hack required because of REMR3NotifyHandlerPhysicalDeregister. */
    16361636    bool volatile       fReusedFlushPending;
    1637 #ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    16381637    /** Used to indicate that the guest is mapping the page is also used as a CR3.
    16391638     * In these cases the access handler acts differently and will check
     
    16431642     */
    16441643    bool                fCR3Mix;
    1645 #endif
    16461644} PGMPOOLPAGE, *PPGMPOOLPAGE, **PPPGMPOOLPAGE;
    16471645
     
    20502048    DECLR3CALLBACKMEMBER(int,       pfnR3GstModifyPage,(PVM pVM, RTGCPTR GCPtr, size_t cbPages, uint64_t fFlags, uint64_t fMask));
    20512049    DECLR3CALLBACKMEMBER(int,       pfnR3GstGetPDE,(PVM pVM, RTGCPTR GCPtr, PX86PDEPAE pPde));
    2052 #ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    20532050    DECLR3CALLBACKMEMBER(int,       pfnR3GstMonitorCR3,(PVM pVM, RTGCPHYS GCPhysCR3));
    20542051    DECLR3CALLBACKMEMBER(int,       pfnR3GstUnmonitorCR3,(PVM pVM));
    2055 #endif
    20562052#ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    20572053    R3PTRTYPE(PFNPGMR3PHYSHANDLER)  pfnR3GstWriteHandlerCR3;
     
    20632059    DECLRCCALLBACKMEMBER(int,       pfnRCGstModifyPage,(PVM pVM, RTGCPTR GCPtr, size_t cbPages, uint64_t fFlags, uint64_t fMask));
    20642060    DECLRCCALLBACKMEMBER(int,       pfnRCGstGetPDE,(PVM pVM, RTGCPTR GCPtr, PX86PDEPAE pPde));
    2065 #ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    20662061    DECLRCCALLBACKMEMBER(int,       pfnRCGstMonitorCR3,(PVM pVM, RTGCPHYS GCPhysCR3));
    20672062    DECLRCCALLBACKMEMBER(int,       pfnRCGstUnmonitorCR3,(PVM pVM));
    2068 #endif
    20692063#ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    20702064    RCPTRTYPE(PFNPGMRCPHYSHANDLER)  pfnRCGstWriteHandlerCR3;
     
    20742068    DECLR0CALLBACKMEMBER(int,       pfnR0GstModifyPage,(PVM pVM, RTGCPTR GCPtr, size_t cbPages, uint64_t fFlags, uint64_t fMask));
    20752069    DECLR0CALLBACKMEMBER(int,       pfnR0GstGetPDE,(PVM pVM, RTGCPTR GCPtr, PX86PDEPAE pPde));
    2076 #ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    20772070    DECLR0CALLBACKMEMBER(int,       pfnR0GstMonitorCR3,(PVM pVM, RTGCPHYS GCPhysCR3));
    20782071    DECLR0CALLBACKMEMBER(int,       pfnR0GstUnmonitorCR3,(PVM pVM));
    2079 #endif
    20802072#ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    20812073    R0PTRTYPE(PFNPGMRCPHYSHANDLER)  pfnR0GstWriteHandlerCR3;
     
    21772169    uint32_t                        u32Alignment;
    21782170#endif
    2179 #ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    21802171    /** The physical address of the currently monitored guest CR3 page.
    21812172     * When this value is NIL_RTGCPHYS no page is being monitored. */
    21822173    RTGCPHYS                        GCPhysGstCR3Monitored;
    2183 #endif
    21842174    /** @name 32-bit Guest Paging.
    21852175     * @{ */
     
    23452335    DECLR3CALLBACKMEMBER(int,       pfnR3GstModifyPage,(PVM pVM, RTGCPTR GCPtr, size_t cbPages, uint64_t fFlags, uint64_t fMask));
    23462336    DECLR3CALLBACKMEMBER(int,       pfnR3GstGetPDE,(PVM pVM, RTGCPTR GCPtr, PX86PDEPAE pPde));
    2347 #ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    23482337    DECLR3CALLBACKMEMBER(int,       pfnR3GstMonitorCR3,(PVM pVM, RTGCPHYS GCPhysCR3));
    23492338    DECLR3CALLBACKMEMBER(int,       pfnR3GstUnmonitorCR3,(PVM pVM));
    2350 #endif
    23512339#ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    23522340    R3PTRTYPE(PFNPGMR3PHYSHANDLER)  pfnR3GstWriteHandlerCR3;
     
    23582346    DECLRCCALLBACKMEMBER(int,       pfnRCGstModifyPage,(PVM pVM, RTGCPTR GCPtr, size_t cbPages, uint64_t fFlags, uint64_t fMask));
    23592347    DECLRCCALLBACKMEMBER(int,       pfnRCGstGetPDE,(PVM pVM, RTGCPTR GCPtr, PX86PDEPAE pPde));
    2360 #ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    23612348    DECLRCCALLBACKMEMBER(int,       pfnRCGstMonitorCR3,(PVM pVM, RTGCPHYS GCPhysCR3));
    23622349    DECLRCCALLBACKMEMBER(int,       pfnRCGstUnmonitorCR3,(PVM pVM));
    2363 #endif
    23642350#ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    23652351    RCPTRTYPE(PFNPGMRCPHYSHANDLER)  pfnRCGstWriteHandlerCR3;
     
    23732359    DECLR0CALLBACKMEMBER(int,       pfnR0GstModifyPage,(PVM pVM, RTGCPTR GCPtr, size_t cbPages, uint64_t fFlags, uint64_t fMask));
    23742360    DECLR0CALLBACKMEMBER(int,       pfnR0GstGetPDE,(PVM pVM, RTGCPTR GCPtr, PX86PDEPAE pPde));
    2375 #ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    23762361    DECLR0CALLBACKMEMBER(int,       pfnR0GstMonitorCR3,(PVM pVM, RTGCPHYS GCPhysCR3));
    23772362    DECLR0CALLBACKMEMBER(int,       pfnR0GstUnmonitorCR3,(PVM pVM));
    2378 #endif
    23792363#ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    23802364    R0PTRTYPE(PFNPGMRCPHYSHANDLER)  pfnR0GstWriteHandlerCR3;
     
    29772961void            pgmPoolMonitorModifiedInsert(PPGMPOOL pPool, PPGMPOOLPAGE pPage);
    29782962void            pgmPoolMonitorModifiedClearAll(PVM pVM);
     2963# ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY
     2964int             pgmPoolMonitorMonitorCR3(PPGMPOOL pPool, RTGCPHYS GCPhysCR3);
     2965int             pgmPoolMonitorUnmonitorCR3(PPGMPOOL pPool, RTGCPHYS GCPhysCR3);
     2966# else
    29792967int             pgmPoolMonitorMonitorCR3(PPGMPOOL pPool, uint16_t idxRoot, RTGCPHYS GCPhysCR3);
    29802968int             pgmPoolMonitorUnmonitorCR3(PPGMPOOL pPool, uint16_t idxRoot);
     2969# endif
    29812970#endif
    29822971
  • trunk/src/VBox/VMM/PGMPool.cpp

    r16904 r16907  
    586586    }
    587587    else if (    (   pPage->cModifications < 96 /* it's cheaper here. */
    588 #ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    589588                  || pPage->fCR3Mix
    590 #endif
    591589                  )
    592590             &&  cbBuf <= 4)
  • trunk/src/VBox/VMM/VMMAll/PGMAll.cpp

    r16882 r16907  
    719719        pVM->pgm.s.fSyncFlags &= ~PGM_SYNC_MONITOR_CR3;
    720720        Assert(!pVM->pgm.s.fMappingsFixed);
    721 #ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    722721        Assert(pVM->pgm.s.GCPhysCR3 == pVM->pgm.s.GCPhysGstCR3Monitored);
    723722        rc = PGM_GST_PFN(MonitorCR3, pVM)(pVM, pVM->pgm.s.GCPhysCR3);
    724 #endif
    725723    }
    726724
     
    16411639            {
    16421640                pVM->pgm.s.fSyncFlags &= ~PGM_SYNC_MONITOR_CR3;
    1643 #ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    16441641                rc = PGM_GST_PFN(MonitorCR3, pVM)(pVM, GCPhysCR3);
    1645 #endif
    16461642            }
    16471643        }
     
    16701666            pVM->pgm.s.fSyncFlags &= ~PGM_SYNC_MONITOR_CR3;
    16711667            Assert(!pVM->pgm.s.fMappingsFixed);
    1672 #ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    16731668            rc = PGM_GST_PFN(MonitorCR3, pVM)(pVM, GCPhysCR3);
    1674 #endif
    16751669        }
    16761670        if (fGlobal)
     
    18481842            pVM->pgm.s.fSyncFlags &= ~PGM_SYNC_MONITOR_CR3;
    18491843            Assert(!pVM->pgm.s.fMappingsFixed);
    1850 #ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    18511844            Assert(pVM->pgm.s.GCPhysCR3 == pVM->pgm.s.GCPhysGstCR3Monitored);
    18521845            rc = PGM_GST_PFN(MonitorCR3, pVM)(pVM, pVM->pgm.s.GCPhysCR3);
    1853 #endif
    18541846        }
    18551847    }
  • trunk/src/VBox/VMM/VMMAll/PGMAllGst.h

    r16317 r16907  
    129129PGM_GST_DECL(int, ModifyPage)(PVM pVM, RTGCPTR GCPtr, size_t cb, uint64_t fFlags, uint64_t fMask);
    130130PGM_GST_DECL(int, GetPDE)(PVM pVM, RTGCPTR GCPtr, PX86PDEPAE pPDE);
    131 #ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    132131PGM_GST_DECL(int, MonitorCR3)(PVM pVM, RTGCPHYS GCPhysCR3);
    133132PGM_GST_DECL(int, UnmonitorCR3)(PVM pVM);
    134 #endif
    135133PGM_GST_DECL(bool, HandlerVirtualUpdate)(PVM pVM, uint32_t cr4);
    136134#ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
     
    414412
    415413
    416 #ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    417 
    418414#undef LOG_GROUP
    419415#define LOG_GROUP LOG_GROUP_PGM_POOL
     
    438434     * Register/Modify write phys handler for guest's CR3 if it changed.
    439435     */
     436#ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY
     437
     438    if (pVM->pgm.s.GCPhysGstCR3Monitored != GCPhysCR3)
     439    {
     440        rc = pgmPoolMonitorMonitorCR3(pVM->pgm.s.CTX_SUFF(pPool), GCPhysCR3);
     441        if (RT_FAILURE(rc))
     442        {
     443            AssertMsgFailed(("PGMHandlerPhysicalModify/PGMR3HandlerPhysicalRegister failed, rc=%Rrc GCPhysGstCR3Monitored=%RGp GCPhysCR3=%RGp\n",
     444                             rc, pVM->pgm.s.GCPhysGstCR3Monitored, GCPhysCR3));
     445            return rc;
     446        }
     447        pVM->pgm.s.GCPhysGstCR3Monitored = GCPhysCR3;
     448    }
     449
     450#if PGM_GST_TYPE == PGM_TYPE_PAE
     451    /*
     452     * Do the 4 PDs.
     453     */
     454    PX86PDPT pGuestPDPT = pgmGstGetPaePDPTPtr(&pVM->pgm.s);
     455    for (unsigned i = 0; i < X86_PG_PAE_PDPE_ENTRIES; i++)
     456    {
     457        if (pGuestPDPT->a[i].n.u1Present)
     458        {
     459            RTGCPHYS GCPhys = pGuestPDPT->a[i].u & X86_PDPE_PG_MASK;
     460            if (pVM->pgm.s.aGCPhysGstPaePDsMonitored[i] != GCPhys)
     461            {
     462                Assert(pVM->pgm.s.enmShadowMode == PGMMODE_PAE || pVM->pgm.s.enmShadowMode == PGMMODE_PAE_NX);
     463
     464                rc = pgmPoolMonitorMonitorCR3(pVM->pgm.s.CTX_SUFF(pPool), GCPhys);
     465            }
     466
     467            if (RT_FAILURE(rc))
     468            {
     469                AssertMsgFailed(("PGMHandlerPhysicalModify/PGMR3HandlerPhysicalRegister failed, rc=%Rrc GCPhysGstCR3Monitored=%RGp GCPhysCR3=%RGp\n",
     470                                 rc, pVM->pgm.s.aGCPhysGstPaePDsMonitored[i], GCPhys));
     471                return rc;
     472            }
     473            pVM->pgm.s.aGCPhysGstPaePDsMonitored[i] = GCPhys;
     474        }
     475        else if (pVM->pgm.s.aGCPhysGstPaePDsMonitored[i] != NIL_RTGCPHYS)
     476        {
     477            rc = pgmPoolMonitorUnmonitorCR3(pVM->pgm.s.CTX_SUFF(pPool), pVM->pgm.s.aGCPhysGstPaePDsMonitored[i]);
     478            AssertRC(rc);
     479            pVM->pgm.s.aGCPhysGstPaePDsMonitored[i] = NIL_RTGCPHYS;
     480        }
     481    }
     482
     483#else
     484    /* prot/real/amd64 mode stub */
     485
     486#endif
     487
     488#else
    440489#if PGM_GST_TYPE == PGM_TYPE_32BIT
    441490
     
    525574
    526575#endif
     576#endif /* VBOX_WITH_PGMPOOL_PAGING_ONLY */
    527577    return rc;
    528578}
     
    544594     * before we enter GC again.
    545595     */
     596#ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY
     597
     598    /* Unmonitor the root. (pd or pdpt) */
     599    if (pVM->pgm.s.GCPhysGstCR3Monitored != NIL_RTGCPHYS)
     600    {
     601        rc = pgmPoolMonitorUnmonitorCR3(pVM->pgm.s.CTX_SUFF(pPool), pVM->pgm.s.GCPhysGstCR3Monitored);
     602        AssertRCReturn(rc, rc);
     603        pVM->pgm.s.GCPhysGstCR3Monitored = NIL_RTGCPHYS;
     604    }
     605
     606#if PGM_GST_TYPE == PGM_TYPE_PAE
     607    /* The 4 PDs. */
     608    for (unsigned i = 0; i < X86_PG_PAE_PDPE_ENTRIES; i++)
     609    {
     610        if (pVM->pgm.s.aGCPhysGstPaePDsMonitored[i] != NIL_RTGCPHYS)
     611        {
     612            Assert(pVM->pgm.s.enmShadowMode == PGMMODE_PAE || pVM->pgm.s.enmShadowMode == PGMMODE_PAE_NX);
     613            int rc2 = pgmPoolMonitorUnmonitorCR3(pVM->pgm.s.CTX_SUFF(pPool), pVM->pgm.s.aGCPhysGstPaePDsMonitored[i]);
     614            AssertRC(rc2);
     615            if (RT_FAILURE(rc2))
     616                rc = rc2;
     617            pVM->pgm.s.aGCPhysGstPaePDsMonitored[i] = NIL_RTGCPHYS;
     618        }
     619    }
     620#else
     621    /* prot/real/amd64 mode stub */
     622#endif
     623
     624#else
     625
    546626#if PGM_GST_TYPE == PGM_TYPE_32BIT
    547627    if (pVM->pgm.s.GCPhysGstCR3Monitored != NIL_RTGCPHYS)
     
    589669    /* prot/real/amd64 mode stub */
    590670#endif
     671#endif /* VBOX_WITH_PGMPOOL_PAGING_ONLY */
    591672    return rc;
    592673
     
    595676#undef LOG_GROUP
    596677#define LOG_GROUP LOG_GROUP_PGM
    597 
    598 #endif /* VBOX_WITH_PGMPOOL_PAGING_ONLY */
    599678
    600679
  • trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp

    r16904 r16907  
    12351235    bool fReused = false;
    12361236    if (    (   pPage->cModifications < 48   /** @todo #define */ /** @todo need to check that it's not mapping EIP. */ /** @todo adjust this! */
    1237 #ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    12381237             || pPage->fCR3Mix
    1239 #endif
    12401238            )
    12411239        &&  !(fReused = pgmPoolMonitorIsReused(pVM, pPage, pRegFrame, &Cpu, pvFault))
     
    19471945            PPGMPOOLPAGE pNewHead = &pPool->aPages[pPage->iMonitoredNext];
    19481946            pNewHead->iMonitoredPrev = NIL_PGMPOOL_IDX;
    1949 #ifndef VBOX_WITH_PGMPOOL_PAGING_ONLY
    19501947            pNewHead->fCR3Mix = pPage->fCR3Mix;
    1951 #endif
    19521948            rc = PGMHandlerPhysicalChangeCallbacks(pVM, pPage->GCPhys & ~(RTGCPHYS)(PAGE_SIZE - 1),
    19531949                                                   pPool->pfnAccessHandlerR3, MMHyperCCToR3(pVM, pNewHead),
     
    20312027 * @param   GCPhysCR3   The (new) CR3 value.
    20322028 */
     2029#ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY
     2030int pgmPoolMonitorMonitorCR3(PPGMPOOL pPool, RTGCPHYS GCPhysCR3)
     2031{
     2032    return VINF_SUCCESS;
     2033}
     2034#else
    20332035int pgmPoolMonitorMonitorCR3(PPGMPOOL pPool, uint16_t idxRoot, RTGCPHYS GCPhysCR3)
    20342036{
     
    20772079    return rc;
    20782080}
     2081#endif /* VBOX_WITH_PGMPOOL_PAGING_ONLY */
    20792082
    20802083
     
    20862089 * @param   idxRoot     The CR3 (root) page index.
    20872090 */
     2091#ifdef VBOX_WITH_PGMPOOL_PAGING_ONLY
     2092int pgmPoolMonitorUnmonitorCR3(PPGMPOOL pPool, RTGCPHYS GCPhysCR3)
     2093{
     2094    return VINF_SUCCESS;
     2095}
     2096#else
    20882097int pgmPoolMonitorUnmonitorCR3(PPGMPOOL pPool, uint16_t idxRoot)
    20892098{
     
    21072116    return rc;
    21082117}
     2118#endif /* VBOX_WITH_PGMPOOL_PAGING_ONLY */
    21092119
    21102120# endif /* PGMPOOL_WITH_MIXED_PT_CR3 */
     
    41154125        pPage->fCached   = false;
    41164126        pPage->fReusedFlushPending = false;
     4127        pPage->fCR3Mix = false;
    41174128#ifdef PGMPOOL_WITH_USER_TRACKING
    41184129        pPage->iUserHead = NIL_PGMPOOL_USER_INDEX;
    4119 #else
    4120         pPage->fCR3Mix = false;
    41214130#endif
    41224131#ifdef PGMPOOL_WITH_CACHE
     
    45024511    pPage->fCached = false;
    45034512    pPage->fReusedFlushPending = false;
     4513    pPage->fCR3Mix = false;
    45044514#ifdef PGMPOOL_WITH_MONITORING
    45054515    pPage->cModifications = 0;
    45064516    pPage->iModifiedNext = NIL_PGMPOOL_IDX;
    45074517    pPage->iModifiedPrev = NIL_PGMPOOL_IDX;
    4508 #else
    4509     pPage->fCR3Mix = false;
    45104518#endif
    45114519#ifdef PGMPOOL_WITH_USER_TRACKING
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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