VirtualBox

Changeset 102676 in vbox for trunk/src/VBox/VMM/VMMR3


Ignore:
Timestamp:
Dec 21, 2023 12:27:31 PM (13 months ago)
Author:
vboxsync
Message:

VMM/CPUM: bugref:10498 MTRR mapping nits.

File:
1 edited

Legend:

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

    r102665 r102676  
    33703370        pMtrrMap->aMtrrs[pMtrrMap->idxMtrr].MtrrPhysBase = GCPhysFirst | fType;
    33713371        pMtrrMap->aMtrrs[pMtrrMap->idxMtrr].MtrrPhysMask = cpumR3GetVarMtrrMask(pVM, GCPhysFirst, GCPhysLast)
    3372                                                           | MSR_IA32_MTRR_PHYSMASK_VALID;
     3372                                                         | MSR_IA32_MTRR_PHYSMASK_VALID;
    33733373        ++pMtrrMap->idxMtrr;
    33743374
     
    34633463    uint64_t cbLeft    = cb;
    34643464    uint64_t offRegion = GCPhysRegionFirst;
    3465     int      rc        = VINF_SUCCESS;
    34663465    while (cbLeft > 0)
    34673466    {
     
    34693468
    34703469        Log3(("CPUM: MTRR: Add[%u]: %' Rhcb (%RU64 bytes)\n", pMtrrMap->idxMtrr, cbRegion, cbRegion));
    3471         rc = cpumR3MtrrMapAddRegion(pVM, pMtrrMap, offRegion, offRegion + cbRegion - 1, X86_MTRR_MT_WB);
     3470        int const rc = cpumR3MtrrMapAddRegion(pVM, pMtrrMap, offRegion, offRegion + cbRegion - 1, X86_MTRR_MT_WB);
    34723471        if (RT_FAILURE(rc))
    34733472            return rc;
     
    36343633    if (   RT_SUCCESS(rc)
    36353634        && pMtrrMapOptimal->cbMapped == pMtrrMapOptimal->cbToMap)
    3636         return rc;
     3635        return VINF_SUCCESS;
    36373636    return VERR_OUT_OF_RESOURCES;
    36383637}
     
    38203819        LogRel(("CPUM: WARNING! Could not map %' Rhcb (%RU64 bytes) of RAM using %u variable-range MTRRs\n", cbLost, cbLost,
    38213820                MtrrMap.cMtrrs));
    3822         rc = VINF_SUCCESS;
    38233821    }
    38243822
     
    38333831    }
    38343832
    3835     return rc;
     3833    return VINF_SUCCESS;
    38363834}
    38373835
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