VirtualBox

儲存庫 vbox 的更動 16419


忽略:
時間撮記:
2009-1-30 下午03:00:20 (16 年 以前)
作者:
vboxsync
訊息:

Store the iUser & iUserTable of the root shadow page table in PGM.

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

圖例:

未更動
新增
刪除
  • trunk/src/VBox/VMM/PGMBth.h

    r16418 r16419  
    159159#  endif
    160160            pVM->pgm.s.HCPhysShwCR3  = 0;
     161            pVM->pgm.s.iShwUser      = 0;
     162            pVM->pgm.s.iShwUserTable = 0;
    161163        }
    162164
     
    167169        RTGCPHYS GCPhysCR3 = RT_BIT_64(63) | RT_BIT_64(62);
    168170#  endif
    169         int rc = pgmPoolAlloc(pVM, GCPhysCR3, BTH_PGMPOOLKIND_ROOT, SHW_POOL_ROOT_IDX, GCPhysCR3 >> PAGE_SHIFT, &pVM->pgm.s.CTX_SUFF(pShwPageCR3));
     171        pVM->pgm.s.iShwUser      = SHW_POOL_ROOT_IDX;
     172        pVM->pgm.s.iShwUserTable = GCPhysCR3 >> PAGE_SHIFT;
     173        int rc = pgmPoolAlloc(pVM, GCPhysCR3, BTH_PGMPOOLKIND_ROOT, pVM->pgm.s.iShwUser, pVM->pgm.s.iShwUserTable, &pVM->pgm.s.CTX_SUFF(pShwPageCR3));
    170174        if (rc == VERR_PGM_POOL_FLUSHED)
    171175        {
  • trunk/src/VBox/VMM/PGMInternal.h

    r16412 r16419  
    16231623    uint16_t            iAgePrev;
    16241624#endif /* PGMPOOL_WITH_CACHE */
    1625     /* The shadow page pool index of the user table as specified during allocation; useful for freeing root pages */
    1626     uint16_t            iUser;
    1627     /* The index into the user table (shadowed) as specified during allocation; useful for freeing root pages. */
    1628     uint32_t            iUserTable;
    16291625    /** Used to indicate that the page is zeroed. */
    16301626    bool                fZeroed;
     
    22562252    /** Pointer to the page of the current active CR3 - RC Ptr. */
    22572253    RCPTRTYPE(PPGMPOOLPAGE)         pShwPageCR3RC;
     2254    /* The shadow page pool index of the user table as specified during allocation; useful for freeing root pages */
     2255    uint32_t                        iShwUser;
     2256    /* The index into the user table (shadowed) as specified during allocation; useful for freeing root pages. */
     2257    uint32_t                        iShwUserTable;
    22582258# if HC_ARCH_BITS == 64
    22592259    RTRCPTR                         alignment6; /**< structure size alignment. */
  • trunk/src/VBox/VMM/VMMAll/PGMAllBth.h

    r16407 r16419  
    45794579        /** @todo Coordinate this better with the pool. */
    45804580        if (pVM->pgm.s.CTX_SUFF(pShwPageCR3)->enmKind != PGMPOOLKIND_FREE)
    4581             pgmPoolFreeByPage(pPool, pVM->pgm.s.CTX_SUFF(pShwPageCR3), pVM->pgm.s.CTX_SUFF(pShwPageCR3)->iUser, pVM->pgm.s.CTX_SUFF(pShwPageCR3)->iUserTable);
     4581            pgmPoolFreeByPage(pPool, pVM->pgm.s.CTX_SUFF(pShwPageCR3), pVM->pgm.s.iShwUser, pVM->pgm.s.iShwUserTable);
    45824582        pVM->pgm.s.pShwPageCR3R3 = 0;
    45834583        pVM->pgm.s.pShwPageCR3R0 = 0;
     
    45874587#  endif
    45884588        pVM->pgm.s.HCPhysShwCR3  = 0;
     4589        pVM->pgm.s.iShwUser      = 0;
     4590        pVM->pgm.s.iShwUserTable = 0;
    45894591    }
    45904592
    45914593    Assert(!(GCPhysCR3 >> (PAGE_SHIFT + 32)));
    4592     rc = pgmPoolAlloc(pVM, GCPhysCR3, BTH_PGMPOOLKIND_ROOT, SHW_POOL_ROOT_IDX, GCPhysCR3 >> PAGE_SHIFT, &pVM->pgm.s.CTX_SUFF(pShwPageCR3));
     4594    pVM->pgm.s.iShwUser      = SHW_POOL_ROOT_IDX;
     4595    pVM->pgm.s.iShwUserTable = GCPhysCR3 >> PAGE_SHIFT;
     4596    rc = pgmPoolAlloc(pVM, GCPhysCR3, BTH_PGMPOOLKIND_ROOT, pVM->pgm.s.iShwUser, pVM->pgm.s.iShwUserTable, &pVM->pgm.s.CTX_SUFF(pShwPageCR3));
    45934597    if (rc == VERR_PGM_POOL_FLUSHED)
    45944598    {
     
    47014705    {
    47024706        PPGMPOOL pPool = pVM->pgm.s.CTX_SUFF(pPool);
    4703         pgmPoolFreeByPage(pPool, pVM->pgm.s.CTX_SUFF(pShwPageCR3), pVM->pgm.s.CTX_SUFF(pShwPageCR3)->iUser, pVM->pgm.s.CTX_SUFF(pShwPageCR3)->iUserTable);
     4707        pgmPoolFreeByPage(pPool, pVM->pgm.s.CTX_SUFF(pShwPageCR3), pVM->pgm.s.iShwUser, pVM->pgm.s.iShwUserTable);
    47044708        pVM->pgm.s.pShwPageCR3R3 = 0;
    47054709        pVM->pgm.s.pShwPageCR3R0 = 0;
     4710        pVM->pgm.s.iShwUser      = 0;
     4711        pVM->pgm.s.iShwUserTable = 0;
    47064712    }
    47074713# endif
  • trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp

    r16376 r16419  
    42444244    pPage->fReusedFlushPending = false;
    42454245    pPage->fCR3Mix = false;
    4246     pPage->iUser = iUser;
    4247     pPage->iUserTable = iUserTable;
    42484246#ifdef PGMPOOL_WITH_MONITORING
    42494247    pPage->cModifications = 0;
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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