Changeset 107220 in vbox for trunk/src/VBox/VMM/VMMR3
- Timestamp:
- Dec 3, 2024 9:46:18 AM (5 months ago)
- svn:sync-xref-src-repo-rev:
- 166224
- Location:
- trunk/src/VBox/VMM/VMMR3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/CPUM.cpp
r107113 r107220 2307 2307 return VMSetError(pVM, VERR_UNSUPPORTED_CPU, RT_SRC_POS, "Host CPU does not support RDTSC."); 2308 2308 #endif 2309 2310 /*2311 * Setup the CR4 AND and OR masks used in the raw-mode switcher.2312 */2313 pVM->cpum.s.CR4.AndMask = X86_CR4_OSXMMEEXCPT | X86_CR4_PVI | X86_CR4_VME;2314 pVM->cpum.s.CR4.OrMask = X86_CR4_OSFXSR;2315 2309 2316 2310 /* … … 5051 5045 pVCpu->cpum.s.Hyper.dr[0], pVCpu->cpum.s.Hyper.dr[1], pVCpu->cpum.s.Hyper.dr[2], pVCpu->cpum.s.Hyper.dr[3], 5052 5046 pVCpu->cpum.s.Hyper.dr[4], pVCpu->cpum.s.Hyper.dr[5], pVCpu->cpum.s.Hyper.dr[6], pVCpu->cpum.s.Hyper.dr[7]); 5053 pHlp->pfnPrintf(pHlp, "CR4OrMask=%#x CR4AndMask=%#x\n", pVM->cpum.s.CR4.OrMask, pVM->cpum.s.CR4.AndMask);5054 5047 } 5055 5048 … … 5306 5299 5307 5300 5308 5309 /**5310 * API for controlling a few of the CPU features found in CR4.5311 *5312 * Currently only X86_CR4_TSD is accepted as input.5313 *5314 * @returns VBox status code.5315 *5316 * @param pVM The cross context VM structure.5317 * @param fOr The CR4 OR mask.5318 * @param fAnd The CR4 AND mask.5319 */5320 VMMR3DECL(int) CPUMR3SetCR4Feature(PVM pVM, RTHCUINTREG fOr, RTHCUINTREG fAnd)5321 {5322 AssertMsgReturn(!(fOr & ~(X86_CR4_TSD)), ("%#x\n", fOr), VERR_INVALID_PARAMETER);5323 AssertMsgReturn((fAnd & ~(X86_CR4_TSD)) == ~(X86_CR4_TSD), ("%#x\n", fAnd), VERR_INVALID_PARAMETER);5324 5325 pVM->cpum.s.CR4.OrMask &= fAnd;5326 pVM->cpum.s.CR4.OrMask |= fOr;5327 5328 return VINF_SUCCESS;5329 }5330 5331 5332 5301 /** 5333 5302 * Called when the ring-3 init phase completes. -
trunk/src/VBox/VMM/VMMR3/TM.cpp
r107194 r107220 657 657 */ 658 658 pVM->tm.s.enmOriginalTSCMode = pVM->tm.s.enmTSCMode; 659 #if !defined(VBOX_VMM_TARGET_ARMV8)660 CPUMR3SetCR4Feature(pVM, X86_CR4_TSD, ~X86_CR4_TSD);661 #endif662 659 LogRel(("TM: cTSCTicksPerSecond=%'RU64 (%#RX64) enmTSCMode=%d (%s) TSCMultiplier=%u\n" 663 660 "TM: cTSCTicksPerSecondHost=%'RU64 (%#RX64)\n"
Note:
See TracChangeset
for help on using the changeset viewer.