Changeset 107220 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Dec 3, 2024 9:46:18 AM (3 months ago)
- svn:sync-xref-src-repo-rev:
- 166224
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 5 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" -
trunk/src/VBox/VMM/include/CPUMInternal.h
r106061 r107220 355 355 uint32_t fHostUseFlags; 356 356 357 /** CR4 mask358 * @todo obsolete? */359 struct360 {361 uint32_t AndMask; /**< @todo Move these to the per-CPU structure and fix the switchers. Saves a register! */362 uint32_t OrMask;363 } CR4;364 365 357 /** The (more) portable CPUID level. */ 366 358 uint8_t u8PortableCpuIdLevel; … … 392 384 393 385 /** Align to 64-byte boundary. */ 394 uint8_t abPadding2[16 ];386 uint8_t abPadding2[16+8]; 395 387 396 388 /** Host CPU feature information. -
trunk/src/VBox/VMM/include/CPUMInternal.mac
r106061 r107220 81 81 .fHostUseFlags resd 1 82 82 83 ; CR4 masks84 .CR4.AndMask resd 185 .CR4.OrMask resd 186 83 .u8PortableCpuIdLevel resb 1 87 84 .fPendingRestore resb 1 -
trunk/src/VBox/VMM/testcase/tstVMStruct.h
r106061 r107220 38 38 GEN_CHECK_SIZE(CPUM); // has .mac 39 39 GEN_CHECK_OFF(CPUM, fHostUseFlags); 40 GEN_CHECK_OFF(CPUM, CR4);41 40 #ifndef VBOX_FOR_DTRACE_LIB 42 41 GEN_CHECK_OFF(CPUM, u8PortableCpuIdLevel);
Note:
See TracChangeset
for help on using the changeset viewer.