VirtualBox

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


Ignore:
Timestamp:
Nov 29, 2023 10:16:05 PM (16 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
160522
Message:

VMM/CPUMR3CpuId.cpp: Don't assert for HostFeatures.fMtrr on non-x86 hosts; correct confusing comments about host when it meant CPU profile. bugref:10318

File:
1 edited

Legend:

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

    r102371 r102386  
    33033303            }
    33043304
    3305             /* Setup MTRR capability based on what the host supports. */
     3305            /* Setup MTRR capability based on what the guest CPU profile (typically host) supports. */
    33063306            Assert(!pVM->cpum.s.fMtrrWrite || pVM->cpum.s.fMtrrRead);
    33073307            if (pVM->cpum.s.fMtrrRead)
    33083308            {
     3309#ifdef RT_ARCH_AMD64
    33093310                Assert(pVM->cpum.s.HostFeatures.fMtrr);
    3310 
    3311                 /* Lookup the number of variable-range MTRRs supported on the host. */
     3311#endif
     3312                /* Lookup the number of variable-range MTRRs supported by the CPU profile. */
    33123313                PCCPUMMSRRANGE pMtrrCapRange = cpumLookupMsrRange(pVM, MSR_IA32_MTRR_CAP);
    33133314                AssertLogRelReturn(pMtrrCapRange, VERR_CPUM_IPE_2);
    3314                 uint8_t const cHostVarRangeRegs = pMtrrCapRange->uValue & MSR_IA32_MTRR_CAP_VCNT_MASK;
     3315                uint8_t const cProfileVarRangeRegs = pMtrrCapRange->uValue & MSR_IA32_MTRR_CAP_VCNT_MASK;
    33153316
    33163317                /* Construct guest MTRR support capabilities. */
    3317                 uint8_t const  cGuestVarRangeRegs = RT_MIN(cHostVarRangeRegs, CPUMCTX_MAX_MTRRVAR_COUNT);
     3318                uint8_t const  cGuestVarRangeRegs = RT_MIN(cProfileVarRangeRegs, CPUMCTX_MAX_MTRRVAR_COUNT);
    33183319                uint64_t const uGstMtrrCap        = cGuestVarRangeRegs
    33193320                                                  | MSR_IA32_MTRR_CAP_FIX
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