VirtualBox

Changeset 82866 in vbox for trunk/src/VBox/VMM/VMMR0


Ignore:
Timestamp:
Jan 27, 2020 10:18:00 AM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
135843
Message:

VMM/GMMR0: Allow large page in legacy allocation mode too. bugref:5324

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/GMMR0.cpp

    r82862 r82866  
    420420     *  mapping or freeing anything.  (Giant mtx.) */
    421421    uint8_t volatile    iChunkMtx;
    422     /** Flags field reserved for future use (like eliminating enmType).
    423      *  (Giant mtx.) */
     422    /** GMM_CHUNK_FLAGS_XXX. (Giant mtx.) */
    424423    uint8_t             fFlags;
    425424    /** The head of the list of free pages. UINT16_MAX is the NIL value.
     
    30703069        return rc;
    30713070
    3072     /* Not supported in legacy mode where we allocate the memory in ring 3 and lock it in ring 0. */
    3073     if (pGMM->fLegacyAllocationMode)
    3074         return VERR_NOT_SUPPORTED;
     3071    // /* Not supported in legacy mode where we allocate the memory in ring 3 and lock it in ring 0. */
     3072    // if (pGMM->fLegacyAllocationMode)
     3073    //     return VERR_NOT_SUPPORTED;
    30753074
    30763075    *pHCPhys = NIL_RTHCPHYS;
     
    31713170        return rc;
    31723171
    3173     /* Not supported in legacy mode where we allocate the memory in ring 3 and lock it in ring 0. */
    3174     if (pGMM->fLegacyAllocationMode)
    3175         return VERR_NOT_SUPPORTED;
     3172    // /* Not supported in legacy mode where we allocate the memory in ring 3 and lock it in ring 0. */
     3173    // if (pGMM->fLegacyAllocationMode)
     3174    //     return VERR_NOT_SUPPORTED;
    31763175
    31773176    gmmR0MutexAcquire(pGMM);
     
    32603259     */
    32613260    if (    pChunk->cMappingsX
    3262         &&  !pGMM->fLegacyAllocationMode
     3261        &&  (!pGMM->fLegacyAllocationMode || (pChunk->fFlags & GMM_CHUNK_FLAGS_LARGE_PAGE))
    32633262        &&  pGVM)
    32643263        gmmR0UnmapChunkLocked(pGMM, pGVM, pChunk);
     
    33913390                    && pChunk->pFreeNext
    33923391                    && pChunk->pFreePrev /** @todo this is probably misfiring, see reset... */
    3393                     && !pGMM->fLegacyAllocationMode))
     3392                    && (!pGMM->fLegacyAllocationMode || (pChunk->fFlags & GMM_CHUNK_FLAGS_LARGE_PAGE))))
    33943393        gmmR0FreeChunk(pGMM, NULL, pChunk, false);
    33953394
     
    39143913static int gmmR0UnmapChunkLocked(PGMM pGMM, PGVM pGVM, PGMMCHUNK pChunk)
    39153914{
    3916     Assert(!pGMM->fLegacyAllocationMode); NOREF(pGMM);
     3915    Assert(!pGMM->fLegacyAllocationMode || (pChunk->fFlags & GMM_CHUNK_FLAGS_LARGE_PAGE)); NOREF(pGMM);
    39173916
    39183917    /*
     
    39603959static int gmmR0UnmapChunk(PGMM pGMM, PGVM pGVM, PGMMCHUNK pChunk, bool fRelaxedSem)
    39613960{
    3962     if (!pGMM->fLegacyAllocationMode)
     3961    if (!pGMM->fLegacyAllocationMode || (pChunk->fFlags & GMM_CHUNK_FLAGS_LARGE_PAGE))
    39633962    {
    39643963        /*
     
    40003999     * If we're in legacy mode this is simple.
    40014000     */
    4002     if (pGMM->fLegacyAllocationMode)
     4001    if (pGMM->fLegacyAllocationMode && !(pChunk->fFlags & GMM_CHUNK_FLAGS_LARGE_PAGE))
    40034002    {
    40044003        if (pChunk->hGVM != pGVM->hSelf)
Note: See TracChangeset for help on using the changeset viewer.

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