Changeset 102386 in vbox for trunk/src/VBox/VMM/VMMR3
- Timestamp:
- Nov 29, 2023 10:16:05 PM (16 months ago)
- svn:sync-xref-src-repo-rev:
- 160522
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/CPUMR3CpuId.cpp
r102371 r102386 3303 3303 } 3304 3304 3305 /* Setup MTRR capability based on what the hostsupports. */3305 /* Setup MTRR capability based on what the guest CPU profile (typically host) supports. */ 3306 3306 Assert(!pVM->cpum.s.fMtrrWrite || pVM->cpum.s.fMtrrRead); 3307 3307 if (pVM->cpum.s.fMtrrRead) 3308 3308 { 3309 #ifdef RT_ARCH_AMD64 3309 3310 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. */ 3312 3313 PCCPUMMSRRANGE pMtrrCapRange = cpumLookupMsrRange(pVM, MSR_IA32_MTRR_CAP); 3313 3314 AssertLogRelReturn(pMtrrCapRange, VERR_CPUM_IPE_2); 3314 uint8_t const c HostVarRangeRegs = pMtrrCapRange->uValue & MSR_IA32_MTRR_CAP_VCNT_MASK;3315 uint8_t const cProfileVarRangeRegs = pMtrrCapRange->uValue & MSR_IA32_MTRR_CAP_VCNT_MASK; 3315 3316 3316 3317 /* Construct guest MTRR support capabilities. */ 3317 uint8_t const cGuestVarRangeRegs = RT_MIN(c HostVarRangeRegs, CPUMCTX_MAX_MTRRVAR_COUNT);3318 uint8_t const cGuestVarRangeRegs = RT_MIN(cProfileVarRangeRegs, CPUMCTX_MAX_MTRRVAR_COUNT); 3318 3319 uint64_t const uGstMtrrCap = cGuestVarRangeRegs 3319 3320 | MSR_IA32_MTRR_CAP_FIX
Note:
See TracChangeset
for help on using the changeset viewer.