VirtualBox

Ignore:
Timestamp:
Sep 15, 2021 10:26:50 PM (3 years ago)
Author:
vboxsync
Message:

VMM/CPUM: Moved CPUIDs and MSRs from the hyper heap and into the VM structure (might not be such a great idea for MSRs actually). bugref:10093

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/CPUMAllMsrs.cpp

    r85183 r91266  
    55175517     * Binary lookup.
    55185518     */
    5519     uint32_t        cRanges   = pVM->cpum.s.GuestInfo.cMsrRanges;
     5519    uint32_t        cRanges   = RT_MIN(pVM->cpum.s.GuestInfo.cMsrRanges, RT_ELEMENTS(pVM->cpum.s.GuestInfo.aMsrRanges));
    55205520    if (!cRanges)
    55215521        return NULL;
    5522     PCPUMMSRRANGE   paRanges  = pVM->cpum.s.GuestInfo.CTX_SUFF(paMsrRanges);
     5522    PCPUMMSRRANGE   paRanges  = pVM->cpum.s.GuestInfo.aMsrRanges;
    55235523    for (;;)
    55245524    {
     
    55505550     * Linear lookup to verify the above binary search.
    55515551     */
    5552     uint32_t        cLeft = pVM->cpum.s.GuestInfo.cMsrRanges;
    5553     PCPUMMSRRANGE   pCur  = pVM->cpum.s.GuestInfo.CTX_SUFF(paMsrRanges);
     5552    uint32_t        cLeft = RT_MIN(pVM->cpum.s.GuestInfo.cMsrRanges, RT_ELEMENTS(pVM->cpum.s.GuestInfo.aMsrRanges));
     5553    PCPUMMSRRANGE   pCur  = pVM->cpum.s.GuestInfo.aMsrRanges;
    55545554    while (cLeft-- > 0)
    55555555    {
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