Changeset 107570 in vbox for trunk/src/VBox
- Timestamp:
- Jan 9, 2025 9:23:18 AM (10 days ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/CPUMAllMsrs.cpp
r107569 r107570 284 284 RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); 285 285 /** @todo fake microcode update. */ 286 *puValue = pRange->uValue; 286 PVM const pVM = pVCpu->CTX_SUFF(pVM); 287 if (pVM->cpum.s.GuestInfo.uMicrocodeRevision != UINT32_MAX) 288 *puValue = RT_MAKE_U64(RT_LO_U32(pRange->uValue), pVM->cpum.s.GuestInfo.uMicrocodeRevision); 289 else 290 *puValue = pRange->uValue; 287 291 return VINF_SUCCESS; 288 292 } … … 4379 4383 RT_NOREF_PV(pVCpu); RT_NOREF_PV(idMsr); 4380 4384 /** @todo Fake AMD microcode patching. */ 4381 *puValue = pRange->uValue; 4385 PVM const pVM = pVCpu->CTX_SUFF(pVM); 4386 if (pVM->cpum.s.GuestInfo.uMicrocodeRevision != UINT32_MAX) 4387 *puValue = RT_MAKE_U64(pVM->cpum.s.GuestInfo.uMicrocodeRevision, RT_HI_U32(pRange->uValue)); 4388 else 4389 *puValue = pRange->uValue; 4382 4390 return VINF_SUCCESS; 4383 4391 } -
trunk/src/VBox/VMM/VMMR3/CPUMR3CpuId.cpp
r106574 r107570 3396 3396 #endif 3397 3397 3398 /** @cfgm{/CPUM/GuestMicrocodeRev,32-bit} 3399 * CPU microcode revision number to use. If UINT32_MAX we use the host 3400 * revision of the host CPU for the host-cpu profile and the database entry if a 3401 * specific one is selected (amd64 host only). */ 3402 rc = CFGMR3QueryU32Def(pCpumCfg, "GuestMicrocodeRevision", &pCpum->GuestInfo.uMicrocodeRevision, UINT32_MAX); 3403 AssertLogRelRCReturn(rc, rc); 3404 #if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86) 3405 if ( pCpum->GuestInfo.uMicrocodeRevision == UINT32_MAX 3406 && strcmp(Config.szCpuName, "host") == 0) 3407 { 3408 rc = SUPR3QueryMicrocodeRev(&pCpum->GuestInfo.uMicrocodeRevision); 3409 if (RT_FAILURE(rc)) 3410 pCpum->GuestInfo.uMicrocodeRevision = UINT32_MAX; 3411 } 3412 #endif 3413 3398 3414 /** @cfgm{/CPUM/MSRs/[Name]/[First|Last|Type|Value|...],} 3399 3415 * Overrides the guest MSRs. -
trunk/src/VBox/VMM/include/CPUMInternal.h
r107220 r107570 106 106 * @{ */ 107 107 /** The current saved state version. 108 * @todo When bumping to next version, add CPUMCTX::enmHwVirt to the saved109 * state. */108 * @todo When bumping to next version, add CPUMCTX::enmHwVirt and 109 * uMicrocodeRevision to the saved state. */ 110 110 #define CPUM_SAVED_STATE_VERSION CPUM_SAVED_STATE_VERSION_HWVIRT_VMX_4 111 111 /** The saved state version with u32RestoreProcCtls2 for Nested Microsoft … … 190 190 uint64_t uScalableBusFreq; 191 191 192 /** The microcode revision. 193 * UINT32_MAX if the one from the CPU database entry is to be used. 194 * @see /CPUM/GuestMicrocodeRevision in CFGM. */ 195 uint32_t uMicrocodeRevision; 196 uint32_t uPadding; 197 192 198 /** Pointer to the MSR ranges (for compatibility with old hyper heap code). */ 193 199 R3PTRTYPE(PCPUMMSRRANGE) paMsrRangesR3;
Note:
See TracChangeset
for help on using the changeset viewer.