VirtualBox

儲存庫 vbox 的更動 39738


忽略:
時間撮記:
2012-1-10 下午03:26:53 (13 年 以前)
作者:
vboxsync
訊息:

PGMPool.cpp: When using EPT we should be able to use any kind of memory for the extended page tables. This should help with #6018.

檔案:
修改 1 筆資料

圖例:

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

    r39402 r39738  
    461461    AssertReturn(pPool->cCurPages < pPool->cMaxPages, VERR_PGM_POOL_MAXED_OUT_ALREADY);
    462462
     463    /* With 32-bit guests and no EPT, the CR3 limits the root pages to low
     464       (below 4 GB) memory. */
     465    /** @todo change the pool to handle ROOT page allocations specially when
     466     *        required. */
     467    bool fCanUseHighMemory = HWACCMIsNestedPagingActive(pVM)
     468                          && HWACCMGetShwPagingMode(pVM) == PGMMODE_EPT;
     469
    463470    pgmLock(pVM);
    464471
     
    468475    uint32_t cPages = pPool->cMaxPages - pPool->cCurPages;
    469476    cPages = RT_MIN(PGMPOOL_CFG_MAX_GROW, cPages);
    470     LogFlow(("PGMR3PoolGrow: Growing the pool by %d (%#x) pages.\n", cPages, cPages));
     477    LogFlow(("PGMR3PoolGrow: Growing the pool by %d (%#x) pages. fCanUseHighMemory=%RTbool\n", cPages, cPages, fCanUseHighMemory));
    471478
    472479    for (unsigned i = pPool->cCurPages; cPages-- > 0; i++)
     
    474481        PPGMPOOLPAGE pPage = &pPool->aPages[i];
    475482
    476         /* Allocate all pages in low (below 4 GB) memory as 32 bits guests need a page table root in low memory. */
    477         pPage->pvPageR3 = MMR3PageAllocLow(pVM);
     483        if (fCanUseHighMemory)
     484            pPage->pvPageR3 = MMR3PageAlloc(pVM);
     485        else
     486            pPage->pvPageR3 = MMR3PageAllocLow(pVM);
    478487        if (!pPage->pvPageR3)
    479488        {
    480             Log(("We're out of memory!! i=%d\n", i));
     489            Log(("We're out of memory!! i=%d fCanUseHighMemory=%RTbool\n", i, fCanUseHighMemory));
    481490            pgmUnlock(pVM);
    482491            return i ? VINF_SUCCESS : VERR_NO_PAGE_MEMORY;
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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