VirtualBox

Ignore:
Timestamp:
Jan 19, 2024 5:49:52 AM (11 months ago)
Author:
vboxsync
Message:

VMM/CPUM: bugref:10498 Fix incorrect assertion while mapping MTRRs and comment update.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/CPUM.cpp

    r102902 r102963  
    36813681
    36823682    /*
    3683      * Until the remainder of the memory fits within 4GB, map regions at
    3684      * incremental powers of two offsets and sizes.
     3683     * Map regions at incremental powers of two offsets and sizes.
     3684     * Note: We cannot map an 8GB region in a 4GB offset.
    36853685     */
    36863686    uint64_t cbLeft    = cb;
     
    37003700
    37013701    /*
    3702      * Optimally try and map any remaining memory smaller than 4GB.
     3702     * Optimally try and map any remaining memory that is smaller than
     3703     * the last power of two offset (size) above.
    37033704     */
    3704     Assert(pMtrrMap->cMtrrs - pMtrrMap->idxMtrr > 0);
    3705     Assert(cbLeft < _4G);
    3706     return cpumR3MapMtrrsOptimal(pVM, offRegion, cbLeft, pMtrrMap);
     3705    if (cbLeft > 0)
     3706    {
     3707        Assert(pMtrrMap->cMtrrs - pMtrrMap->idxMtrr > 0);
     3708        return cpumR3MapMtrrsOptimal(pVM, offRegion, cbLeft, pMtrrMap);
     3709    }
     3710    return VINF_SUCCESS;
    37073711}
    37083712
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