VirtualBox

Changeset 4977 in vbox


Ignore:
Timestamp:
Sep 22, 2007 12:01:15 AM (17 years ago)
Author:
vboxsync
Message:

Backed out most of 24659.

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

Legend:

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

    r4917 r4977  
    180180{
    181181    PPGMPHYSHANDLER pCur = (PPGMPHYSHANDLER)pNode;
    182     unsigned        fFlags = pgmHandlerPhysicalCalcFlags((PVM)pvUser, pCur);
     182    unsigned        fFlags = pgmHandlerPhysicalCalcFlags(pCur);
    183183    PPGMRAMRANGE    pRamHint = NULL;
    184184    RTGCPHYS        GCPhys = pCur->Core.Key;
     
    434434        for (unsigned iPage = 0; iPage < pCur->cPages; iPage++)
    435435            if (pCur->aPhysToVirt[iPage].offNextAlias & PGMPHYS2VIRTHANDLER_IN_TREE)
    436                 pgmHandlerVirtualClearPage(pVM, pPGM, pCur, iPage);
     436                pgmHandlerVirtualClearPage(pPGM, pCur, iPage);
    437437
    438438        /*
  • trunk/src/VBox/VMM/VMMAll/PGMAllBth.h

    r4917 r4977  
    26732673                if (PdeDst.n.u1Present)
    26742674                {
    2675                     PPGMPOOLPAGE pShwPage = pgmPoolGetPage(pVM, pPool, PdeDst.u & SHW_PDE_PG_MASK);
     2675                    PPGMPOOLPAGE pShwPage = pgmPoolGetPage(pPool, PdeDst.u & SHW_PDE_PG_MASK);
    26762676                    RTGCPHYS     GCPhys;
    26772677                    if (    !PdeSrc.b.u1Size
     
    27532753                if (pPDEDst->n.u1Present)
    27542754                {
    2755                     pgmPoolFreeByPage(pPool, pgmPoolGetPage(pVM, pPool, pPDEDst->u & SHW_PDE_PG_MASK), SHW_POOL_ROOT_IDX, iPdShw);
     2755                    pgmPoolFreeByPage(pPool, pgmPoolGetPage(pPool, pPDEDst->u & SHW_PDE_PG_MASK), SHW_POOL_ROOT_IDX, iPdShw);
    27562756                    pPDEDst->u = 0;
    27572757                    MY_STAM_COUNTER_INC(&pVM->pgm.s.CTXMID(Stat,SyncCR3DstFreedSrcNP));
  • trunk/src/VBox/VMM/VMMAll/PGMAllGst.h

    r4917 r4977  
    609609    PPGMVIRTHANDLER pCur  = (PPGMVIRTHANDLER)pNode;
    610610    PPGMHVUSTATE    pState = (PPGMHVUSTATE)pvUser;
    611     PVM             pVM = pState->pVM;
    612611
    613612#if PGM_GST_TYPE == PGM_TYPE_32BIT
    614     PX86PD          pPDSrc = pVM->pgm.s.CTXSUFF(pGuestPD);
     613    PX86PD          pPDSrc = pState->pVM->pgm.s.CTXSUFF(pGuestPD);
    615614#endif
    616615
     
    668667                        {
    669668                            if (pCur->aPhysToVirt[iPage].Core.Key != NIL_RTGCPHYS)
    670                                 pgmHandlerVirtualClearPage(pState->pVM, &pState->pVM->pgm.s, pCur, iPage);
     669                                pgmHandlerVirtualClearPage(&pState->pVM->pgm.s, pCur, iPage);
    671670#ifdef VBOX_STRICT_PGM_HANDLER_VIRTUAL
    672671                            AssertReleaseMsg(!pCur->aPhysToVirt[iPage].offNextAlias,
     
    691690                        if (pCur->aPhysToVirt[iPage].Core.Key != NIL_RTGCPHYS)
    692691                        {
    693                             pgmHandlerVirtualClearPage(pState->pVM, &pState->pVM->pgm.s, pCur, iPage);
     692                            pgmHandlerVirtualClearPage(&pState->pVM->pgm.s, pCur, iPage);
    694693#ifdef VBOX_STRICT_PGM_HANDLER_VIRTUAL
    695694                            AssertReleaseMsg(!pCur->aPhysToVirt[iPage].offNextAlias,
     
    718717                    {
    719718                        if (pCur->aPhysToVirt[iPage].Core.Key != NIL_RTGCPHYS)
    720                             pgmHandlerVirtualClearPage(pState->pVM, &pState->pVM->pgm.s, pCur, iPage);
     719                            pgmHandlerVirtualClearPage(&pState->pVM->pgm.s, pCur, iPage);
    721720#ifdef VBOX_STRICT_PGM_HANDLER_VIRTUAL
    722721                        AssertReleaseMsg(!pCur->aPhysToVirt[iPage].offNextAlias,
     
    740739                if (pCur->aPhysToVirt[iPage].Core.Key != NIL_RTGCPHYS)
    741740                {
    742                     pgmHandlerVirtualClearPage(pState->pVM, &pState->pVM->pgm.s, pCur, iPage);
     741                    pgmHandlerVirtualClearPage(&pState->pVM->pgm.s, pCur, iPage);
    743742                    pCur->aPhysToVirt[iPage].Core.Key = NIL_RTGCPHYS;
    744743                    pState->fTodo |= PGM_SYNC_UPDATE_PAGE_BIT_VIRTUAL;
  • trunk/src/VBox/VMM/VMMAll/PGMAllHandler.cpp

    r4953 r4977  
    233233    const int       rc = VINF_PGM_GCPHYS_ALIASED;
    234234#endif
    235     const unsigned  fFlags = pgmHandlerPhysicalCalcFlags(pVM, pCur); Assert(!(fFlags & X86_PTE_PAE_PG_MASK));
     235    const unsigned  fFlags = pgmHandlerPhysicalCalcFlags(pCur); Assert(!(fFlags & X86_PTE_PAE_PG_MASK));
    236236    RTUINT          cPages = pCur->cPages;
    237237    RTUINT          i = (pCur->Core.Key - pRam->GCPhys) >> PAGE_SHIFT;
     
    377377     * Tell REM.
    378378     */
    379     const bool fRestoreAsRAM = pCur->pfnHandlerR3 
     379    const bool fRestoreAsRAM = pCur->pfnHandlerR3
    380380                            && pCur->enmType != PGMPHYSHANDLERTYPE_MMIO; /** @todo this isn't entirely correct. */
    381381#ifndef IN_RING3
     
    432432                ||  (pBelow->Core.KeyLast >> PAGE_SHIFT) != (pCur->Core.Key >> PAGE_SHIFT))
    433433                break;
    434             pgmRamFlagsSetByGCPhysWithHint(pPGM, GCPhys, pgmHandlerPhysicalCalcFlags(pVM, pCur), &pRamHint);
     434            pgmRamFlagsSetByGCPhysWithHint(pPGM, GCPhys, pgmHandlerPhysicalCalcFlags(pCur), &pRamHint);
    435435
    436436            /* next? */
     
    454454                ||  (pAbove->Core.Key >> PAGE_SHIFT) != (pCur->Core.KeyLast >> PAGE_SHIFT))
    455455                break;
    456             pgmRamFlagsSetByGCPhysWithHint(pPGM, GCPhys, pgmHandlerPhysicalCalcFlags(pVM, pCur), &pRamHint);
     456            pgmRamFlagsSetByGCPhysWithHint(pPGM, GCPhys, pgmHandlerPhysicalCalcFlags(pCur), &pRamHint);
    457457
    458458            /* next? */
  • trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp

    r4917 r4977  
    4343static void pgmPoolFlushAllInt(PPGMPOOL pPool);
    4444#ifdef PGMPOOL_WITH_USER_TRACKING
    45 DECLINLINE(unsigned) pgmPoolTrackGetShadowEntrySize(PVM pVM, PGMPOOLKIND enmKind);
    46 DECLINLINE(unsigned) pgmPoolTrackGetGuestEntrySize(PVM pVM, PGMPOOLKIND enmKind);
     45DECLINLINE(unsigned) pgmPoolTrackGetShadowEntrySize(PGMPOOLKIND enmKind);
     46DECLINLINE(unsigned) pgmPoolTrackGetGuestEntrySize(PGMPOOLKIND enmKind);
    4747static void pgmPoolTrackDeref(PPGMPOOL pPool, PPGMPOOLPAGE pPage);
    4848#endif
     
    186186/**
    187187 * Wrapper for getting the current context pointer to the entry being modified.
    188  * 
     188 *
    189189 * @returns Pointer to the current context mapping of the entry.
    190190 * @param   pPool       The pool.
     
    203203
    204204#elif defined(IN_RING0)
    205     PVM   pVM = pPool->CTXSUFF(pVM);
    206205    void *pvRet;
    207 
    208206    int rc = pgmRamGCPhys2HCPtr(&pPool->pVMHC->pgm.s, GCPhysFault & ~(RTGCPHYS)(cbEntry - 1), &pvRet);
    209207    AssertFatalRCSuccess(rc);
     
    238236#endif
    239237{
    240     const PVM pVM = pPool->CTXSUFF(pVM);
    241 
    242238    Assert(pPage->iMonitoredPrev == NIL_PGMPOOL_IDX);
    243239    const unsigned off = GCPhysFault & PAGE_OFFSET_MASK;
     
    252248            PX86PDPAE   pPDPae;
    253249        } uShw;
    254         uShw.pv = PGMPOOL_PAGE_2_PTR(pVM, pPage);
     250        uShw.pv = PGMPOOL_PAGE_2_PTR(pPool->CTXSUFF(pVM), pPage);
    255251
    256252        switch (pPage->enmKind)
     
    314310                if (uShw.pPD->a[iShw].u & PGM_PDFLAGS_MAPPING)
    315311                {
    316                     Assert(pgmMapAreMappingsEnabled(&pVM->pgm.s));
    317                     VM_FF_SET(pVM, VM_FF_PGM_SYNC_CR3);
     312                    Assert(pgmMapAreMappingsEnabled(&pPool->CTXSUFF(pVM)->pgm.s));
     313                    VM_FF_SET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3);
    318314                    LogFlow(("pgmPoolMonitorChainChanging: Detected conflict at iShw=%#x!\n", iShw));
    319315                }
     
    328324                        &&  uShw.pPD->a[iShw2].u & PGM_PDFLAGS_MAPPING)
    329325                    {
    330                         Assert(pgmMapAreMappingsEnabled(&pVM->pgm.s));
    331                         VM_FF_SET(pVM, VM_FF_PGM_SYNC_CR3);
     326                        Assert(pgmMapAreMappingsEnabled(&pPool->CTXSUFF(pVM)->pgm.s));
     327                        VM_FF_SET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3);
    332328                        LogFlow(("pgmPoolMonitorChainChanging: Detected conflict at iShw2=%#x!\n", iShw2));
    333329                    }
     
    335331#if 0 /* useful when running PGMAssertCR3(), a bit too troublesome for general use (TLBs). */
    336332                if (    uShw.pPD->a[iShw].n.u1Present
    337                     &&  !VM_FF_ISSET(pVM, VM_FF_PGM_SYNC_CR3))
     333                    &&  !VM_FF_ISSET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3))
    338334                {
    339335                    LogFlow(("pgmPoolMonitorChainChanging: iShw=%#x: %RX32 -> freeing it!\n", iShw, uShw.pPD->a[iShw].u));
     
    341337                    ASMProbeReadByte(pvAddress);
    342338# endif
    343                     pgmPoolFree(pVM, uShw.pPD->a[iShw].u & X86_PDE_PG_MASK, pPage->idx, iShw);
     339                    pgmPoolFree(pPool->CTXSUFF(pVM), uShw.pPD->a[iShw].u & X86_PDE_PG_MASK, pPage->idx, iShw);
    344340                    uShw.pPD->a[iShw].u = 0;
    345341                }
     
    355351                    if ((uShw.pPDPae->a[iShw].u & (PGM_PDFLAGS_MAPPING | X86_PDE_P)) == (PGM_PDFLAGS_MAPPING | X86_PDE_P))
    356352                    {
    357                         Assert(pgmMapAreMappingsEnabled(&pVM->pgm.s));
    358                         VM_FF_SET(pVM, VM_FF_PGM_SYNC_CR3);
     353                        Assert(pgmMapAreMappingsEnabled(&pPool->CTXSUFF(pVM)->pgm.s));
     354                        VM_FF_SET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3);
    359355                        LogFlow(("pgmPoolMonitorChainChanging: Detected conflict at iShw=%#x!\n", iShw));
    360356                    }
     
    368364                            &&  (uShw.pPDPae->a[iShw2].u & (PGM_PDFLAGS_MAPPING | X86_PDE_P)) == (PGM_PDFLAGS_MAPPING | X86_PDE_P))
    369365                        {
    370                             Assert(pgmMapAreMappingsEnabled(&pVM->pgm.s));
    371                             VM_FF_SET(pVM, VM_FF_PGM_SYNC_CR3);
     366                            Assert(pgmMapAreMappingsEnabled(&pPool->CTXSUFF(pVM)->pgm.s));
     367                            VM_FF_SET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3);
    372368                            LogFlow(("pgmPoolMonitorChainChanging: Detected conflict at iShw2=%#x!\n", iShw2));
    373369                        }
     
    375371#if 0 /* useful when running PGMAssertCR3(), a bit too troublesome for general use (TLBs). */
    376372                    if (    uShw.pPDPae->a[iShw].n.u1Present
    377                         &&  !VM_FF_ISSET(pVM, VM_FF_PGM_SYNC_CR3))
     373                        &&  !VM_FF_ISSET(pPool->CTXSUFF(pVM), VM_FF_PGM_SYNC_CR3))
    378374                    {
    379375                        LogFlow(("pgmPoolMonitorChainChanging: iShw=%#x: %RX64 -> freeing it!\n", iShw, uShw.pPDPae->a[iShw].u));
     
    381377                        ASMProbeReadByte(pvAddress);
    382378# endif
    383                         pgmPoolFree(pVM, uShw.pPDPae->a[iShw].u & X86_PDE_PAE_PG_MASK, pPage->idx, iShw);
     379                        pgmPoolFree(pPool->CTXSUFF(pVM), uShw.pPDPae->a[iShw].u & X86_PDE_PAE_PG_MASK, pPage->idx, iShw);
    384380                        uShw.pPDPae->a[iShw].u = 0;
    385381                    }
     
    785781DECLINLINE(void) pgmPoolHashRemove(PPGMPOOL pPool, PPGMPOOLPAGE pPage)
    786782{
    787     const PVM pVM = pPool->CTXSUFF(pVM);
    788 
    789783    uint16_t iHash = PGMPOOL_HASH(pPage->GCPhys);
    790784    if (pPool->aiHash[iHash] == pPage->idx)
     
    824818static int pgmPoolCacheFreeOne(PPGMPOOL pPool, uint16_t iUser)
    825819{
    826     const PVM pVM = pPool->CTXSUFF(pVM);
    827 
    828820    Assert(pPool->iAgeHead != pPool->iAgeTail); /* We shouldn't be here if there < 2 cached entries! */
    829821    STAM_COUNTER_INC(&pPool->StatCacheFreeUpOne);
     
    864856 * @returns true if reused and the cached page (enmKind1) should be flushed
    865857 * @returns false if not reused.
    866  * @param   pVM         The VM handle.
    867858 * @param   enmKind1    The kind of the cached page.
    868859 * @param   enmKind2    The kind of the requested page.
    869860 */
    870 static bool pgmPoolCacheReusedByKind(PVM pVM, PGMPOOLKIND enmKind1, PGMPOOLKIND enmKind2)
     861static bool pgmPoolCacheReusedByKind(PGMPOOLKIND enmKind1, PGMPOOLKIND enmKind2)
    871862{
    872863    switch (enmKind1)
     
    951942static int pgmPoolCacheAlloc(PPGMPOOL pPool, RTGCPHYS GCPhys, PGMPOOLKIND enmKind, uint16_t iUser, uint16_t iUserTable, PPPGMPOOLPAGE ppPage)
    952943{
    953     const PVM pVM = pPool->CTXSUFF(pVM);
    954 
    955944    /*
    956945     * Look up the GCPhys in the hash.
     
    982971                 * different way than the other kinds.
    983972                 */
    984                 if (pgmPoolCacheReusedByKind(pVM, (PGMPOOLKIND)pPage->enmKind, enmKind))
     973                if (pgmPoolCacheReusedByKind((PGMPOOLKIND)pPage->enmKind, enmKind))
    985974                {
    986975                    STAM_COUNTER_INC(&pPool->StatCacheKindMismatches);
     
    10911080{
    10921081#ifdef PGMPOOL_WITH_CACHE
    1093     const PVM pVM = pPool->CTXSUFF(pVM);
    1094 
    10951082    /*
    10961083     * Look up the GCPhys in the hash.
     
    11581145static int pgmPoolMonitorInsert(PPGMPOOL pPool, PPGMPOOLPAGE pPage)
    11591146{
    1160     const PVM pVM = pPool->CTXSUFF(pVM);
    1161 
    11621147    /*
    11631148     * Filter out the relevant kinds.
     
    12111196    {
    12121197        Assert(pPage->iMonitoredNext == NIL_PGMPOOL_IDX); Assert(pPage->iMonitoredPrev == NIL_PGMPOOL_IDX);
     1198        PVM pVM = pPool->CTXSUFF(pVM);
    12131199        const RTGCPHYS GCPhysPage = pPage->GCPhys & ~(RTGCPHYS)(PAGE_SIZE - 1);
    12141200        rc = PGMHandlerPhysicalRegisterEx(pVM, PGMPHYSHANDLERTYPE_PHYSICAL_WRITE,
     
    12401226static int pgmPoolMonitorFlush(PPGMPOOL pPool, PPGMPOOLPAGE pPage)
    12411227{
    1242     const PVM pVM = pPool->CTXSUFF(pVM);
    1243 
    12441228    /*
    12451229     * Filter out the relevant kinds.
     
    12771261     * Remove the page from the monitored list or uninstall it if last.
    12781262     */
     1263    const PVM pVM = pPool->CTXSUFF(pVM);
    12791264    int rc;
    12801265    if (    pPage->iMonitoredNext != NIL_PGMPOOL_IDX
     
    13691354int pgmPoolMonitorMonitorCR3(PPGMPOOL pPool, uint16_t idxRoot, RTGCPHYS GCPhysCR3)
    13701355{
    1371     const PVM pVM = pPool->CTXSUFF(pVM);
    1372 
    13731356    Assert(idxRoot != NIL_PGMPOOL_IDX && idxRoot < PGMPOOL_IDX_FIRST);
    13741357    PPGMPOOLPAGE pPage = &pPool->aPages[idxRoot];
     
    14261409int pgmPoolMonitorUnmonitorCR3(PPGMPOOL pPool, uint16_t idxRoot)
    14271410{
    1428     const PVM pVM = pPool->CTXSUFF(pVM);
    1429 
    14301411    Assert(idxRoot != NIL_PGMPOOL_IDX && idxRoot < PGMPOOL_IDX_FIRST);
    14311412    PPGMPOOLPAGE pPage = &pPool->aPages[idxRoot];
     
    18701851static void pgmPoolTrackFreeUser(PPGMPOOL pPool, PPGMPOOLPAGE pPage, uint16_t iUser, uint16_t iUserTable)
    18711852{
    1872     const PVM pVM = pPool->CTXSUFF(pVM);
    1873 
    18741853    /*
    18751854     * Unlink and free the specified user entry.
     
    19211900 * Gets the entry size of a shadow table.
    19221901 *
    1923  * @param   pVM         The VM handle.
    19241902 * @param   enmKind     The kind of page.
    19251903 *
     
    19281906 *          returned.
    19291907 */
    1930 DECLINLINE(unsigned) pgmPoolTrackGetShadowEntrySize(PVM pVM, PGMPOOLKIND enmKind)
     1908DECLINLINE(unsigned) pgmPoolTrackGetShadowEntrySize(PGMPOOLKIND enmKind)
    19311909{
    19321910    switch (enmKind)
     
    19601938 * Gets the entry size of a guest table.
    19611939 *
    1962  * @param   pVM         The VM handle.
    19631940 * @param   enmKind     The kind of page.
    19641941 *
     
    19671944 *          returned.
    19681945 */
    1969 DECLINLINE(unsigned) pgmPoolTrackGetGuestEntrySize(PVM pVM, PGMPOOLKIND enmKind)
     1946DECLINLINE(unsigned) pgmPoolTrackGetGuestEntrySize(PGMPOOLKIND enmKind)
    19701947{
    19711948    switch (enmKind)
     
    21122089 *
    21132090 * @param   pVM         The VM handle.
    2114  * @param   pPhysPage   The guest page in question. 
     2091 * @param   pPhysPage   The guest page in question.
    21152092 * @param   iPhysExt    The physical cross reference extent list to flush.
    21162093 */
     
    21602137 *
    21612138 * @param   pVM         The VM handle.
    2162  * @param   pPhysPage   The guest page in question. 
     2139 * @param   pPhysPage   The guest page in question.
    21632140 */
    21642141int pgmPoolTrackFlushGCPhysPTsSlow(PVM pVM, PPGMPAGE pPhysPage)
     
    21852162     * This is simple but not quite optimal solution.
    21862163     */
    2187     const uint64_t  u64   = PGM_PAGE_GET_HCPHYS(pPhysPage) | X86_PTE_P; 
     2164    const uint64_t  u64   = PGM_PAGE_GET_HCPHYS(pPhysPage) | X86_PTE_P;
    21882165    const uint32_t  u32   = u64;
    21892166    unsigned        cLeft = pPool->cUsedPages;
     
    22712248        uint32_t       *pau32;
    22722249    } u;
    2273     const PVM pVM = pPool->CTXSUFF(pVM);
    2274 
    2275     u.pau64 = (uint64_t *)PGMPOOL_PAGE_2_PTR(pVM, pUserPage);
     2250    u.pau64 = (uint64_t *)PGMPOOL_PAGE_2_PTR(pPool->CTXSUFF(pVM), pUserPage);
    22762251
    22772252#ifdef VBOX_STRICT
     
    25472522{
    25482523    const unsigned cRefs = pPhysPage->HCPhys >> MM_RAM_FLAGS_CREFS_SHIFT; /** @todo PAGE FLAGS */
    2549     const PVM pVM = pPool->CTXSUFF(pVM);
    2550 
    25512524    AssertFatalMsg(cRefs == MM_RAM_FLAGS_CREFS_PHYSEXT, ("cRefs=%d HCPhys=%RHp pPage=%p:{.idx=%d}\n", cRefs, pPhysPage->HCPhys, pPage, pPage->idx));
    25522525
     
    25772550
    25782551                    /* we can free the node. */
     2552                    PVM pVM = pPool->CTXSUFF(pVM);
    25792553                    const uint16_t iPhysExtNext = paPhysExts[iPhysExt].iNext;
    25802554                    if (    iPhysExtPrev == NIL_PGMPOOL_PHYSEXT_INDEX
     
    26342608static void pgmPoolTracDerefGCPhys(PPGMPOOL pPool, PPGMPOOLPAGE pPage, RTHCPHYS HCPhys, RTGCPHYS GCPhys)
    26352609{
    2636     const PVM pVM = pPool->CTXSUFF(pVM);
    26372610    /*
    26382611     * Walk range list.
    26392612     */
    2640     PPGMRAMRANGE pRam = pVM->pgm.s.CTXSUFF(pRamRanges);
     2613    PPGMRAMRANGE pRam = pPool->CTXSUFF(pVM)->pgm.s.CTXSUFF(pRamRanges);
    26412614    while (pRam)
    26422615    {
     
    26702643static void pgmPoolTracDerefGCPhysHint(PPGMPOOL pPool, PPGMPOOLPAGE pPage, RTHCPHYS HCPhys, RTGCPHYS GCPhysHint)
    26712644{
    2672     const PVM pVM = pPool->CTXSUFF(pVM);
    26732645    /*
    26742646     * Walk range list.
    26752647     */
    2676     PPGMRAMRANGE pRam = pVM->pgm.s.CTXSUFF(pRamRanges);
     2648    PPGMRAMRANGE pRam = pPool->CTXSUFF(pVM)->pgm.s.CTXSUFF(pRamRanges);
    26772649    while (pRam)
    26782650    {
     
    26972669     */
    26982670    STAM_COUNTER_INC(&pPool->StatTrackLinearRamSearches);
    2699     pRam = pVM->pgm.s.CTXSUFF(pRamRanges);
     2671    pRam = pPool->CTXSUFF(pVM)->pgm.s.CTXSUFF(pRamRanges);
    27002672    while (pRam)
    27012673    {
     
    28302802DECLINLINE(void) pgmPoolTrackDerefPDPae(PPGMPOOL pPool, PPGMPOOLPAGE pPage, PX86PDPAE pShwPD)
    28312803{
    2832     const PVM pVM = pPool->CTXSUFF(pVM);
    2833 
    28342804    for (unsigned i = 0; i < ELEMENTS(pShwPD->a); i++)
    28352805    {
     
    28562826DECLINLINE(void) pgmPoolTrackDerefPDPTR64Bit(PPGMPOOL pPool, PPGMPOOLPAGE pPage, PX86PDPTR pShwPdPtr)
    28572827{
    2858     const PVM pVM = pPool->CTXSUFF(pVM);
    2859 
    28602828    for (unsigned i = 0; i < ELEMENTS(pShwPdPtr->a); i++)
    28612829    {
     
    28832851static void pgmPoolTrackDeref(PPGMPOOL pPool, PPGMPOOLPAGE pPage)
    28842852{
    2885     const PVM pVM = pPool->CTXSUFF(pVM);
    2886 
    28872853    /*
    28882854     * Map the shadow page and take action according to the page kind.
     
    31753141        if (pPage->fMonitored)
    31763142        {
    3177             const PVM pVM = pPool->CTXSUFF(pVM);
     3143            PVM pVM = pPool->CTXSUFF(pVM);
    31783144            int rc = PGMHandlerPhysicalChangeCallbacks(pVM, pPage->GCPhys & ~(RTGCPHYS)(PAGE_SIZE - 1),
    31793145                                                       pPool->pfnAccessHandlerR3, MMHyperCCToR3(pVM, pPage),
     
    34953461    LogFlow(("pgmPoolFree: HCPhys=%VHp iUser=%#x iUserTable=%#x\n", HCPhys, iUser, iUserTable));
    34963462    PPGMPOOL pPool = pVM->pgm.s.CTXSUFF(pPool);
    3497     pgmPoolFreeByPage(pPool, pgmPoolGetPage(pVM, pPool, HCPhys), iUser, iUserTable);
     3463    pgmPoolFreeByPage(pPool, pgmPoolGetPage(pPool, HCPhys), iUser, iUserTable);
    34983464}
    34993465
     
    35113477    /** @todo profile this! */
    35123478    PPGMPOOL pPool = pVM->pgm.s.CTXSUFF(pPool);
    3513     PPGMPOOLPAGE pPage = pgmPoolGetPage(pVM, pPool, HCPhys);
     3479    PPGMPOOLPAGE pPage = pgmPoolGetPage(pPool, HCPhys);
    35143480    Log3(("pgmPoolGetPageByHCPhys: HCPhys=%VHp -> %p:{.idx=%d .GCPhys=%VGp .enmKind=%d}\n",
    35153481          HCPhys, pPage, pPage->idx, pPage->GCPhys, pPage->enmKind));
  • trunk/src/VBox/VMM/VMMAll/TMAll.cpp

    r4917 r4977  
    157157    const uint64_t u64Now = TMVirtualGet(pVM);
    158158
    159     /* 
     159    /*
    160160     * TMCLOCK_VIRTUAL
    161161     */
     
    173173    }
    174174
    175     /* 
     175    /*
    176176     * TMCLOCK_VIRTUAL_SYNC
    177      * This isn't quite as stright forward if in a catch-up, not only do 
     177     * This isn't quite as stright forward if in a catch-up, not only do
    178178     * we have to adjust the 'now' but when have to adjust the delta as well.
    179179     */
     
    696696TMDECL(uint64_t) TMTimerToNano(PTMTIMER pTimer, uint64_t u64Ticks)
    697697{
    698     PVM pVM = pTimer->CTXALLSUFF(pVM);  NOREF(pVM);
    699 
    700698    switch (pTimer->enmClock)
    701699    {
     
    731729TMDECL(uint64_t) TMTimerToMicro(PTMTIMER pTimer, uint64_t u64Ticks)
    732730{
    733     PVM pVM = pTimer->CTXALLSUFF(pVM);  NOREF(pVM);
    734 
    735731    switch (pTimer->enmClock)
    736732    {
     
    766762TMDECL(uint64_t) TMTimerToMilli(PTMTIMER pTimer, uint64_t u64Ticks)
    767763{
    768     PVM pVM = pTimer->CTXALLSUFF(pVM);  NOREF(pVM);
    769 
    770764    switch (pTimer->enmClock)
    771765    {
     
    800794TMDECL(uint64_t) TMTimerFromNano(PTMTIMER pTimer, uint64_t u64NanoTS)
    801795{
    802     PVM pVM = pTimer->CTXALLSUFF(pVM);  NOREF(pVM);
    803 
    804796    switch (pTimer->enmClock)
    805797    {
     
    834826TMDECL(uint64_t) TMTimerFromMicro(PTMTIMER pTimer, uint64_t u64MicroTS)
    835827{
    836     PVM pVM = pTimer->CTXALLSUFF(pVM);  NOREF(pVM);
    837 
    838828    switch (pTimer->enmClock)
    839829    {
     
    868858TMDECL(uint64_t) TMTimerFromMilli(PTMTIMER pTimer, uint64_t u64MilliTS)
    869859{
    870     PVM pVM = pTimer->CTXALLSUFF(pVM);  NOREF(pVM);
    871 
    872860    switch (pTimer->enmClock)
    873861    {
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