VirtualBox

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


Ignore:
Timestamp:
Dec 3, 2024 9:46:18 AM (5 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
166224
Message:

VMM/CPUM,TM: Removed obsolete raw-mode CR4 masks. jiraref:VBP-1466

Location:
trunk/src/VBox/VMM/VMMR3
Files:
2 edited

Legend:

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

    r107113 r107220  
    23072307        return VMSetError(pVM, VERR_UNSUPPORTED_CPU, RT_SRC_POS, "Host CPU does not support RDTSC.");
    23082308#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;
    23152309
    23162310    /*
     
    50515045                    pVCpu->cpum.s.Hyper.dr[0], pVCpu->cpum.s.Hyper.dr[1], pVCpu->cpum.s.Hyper.dr[2], pVCpu->cpum.s.Hyper.dr[3],
    50525046                    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);
    50545047}
    50555048
     
    53065299
    53075300
    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 
    53325301/**
    53335302 * Called when the ring-3 init phase completes.
  • trunk/src/VBox/VMM/VMMR3/TM.cpp

    r107194 r107220  
    657657     */
    658658    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 #endif
    662659    LogRel(("TM:     cTSCTicksPerSecond=%'RU64 (%#RX64) enmTSCMode=%d (%s) TSCMultiplier=%u\n"
    663660            "TM: cTSCTicksPerSecondHost=%'RU64 (%#RX64)\n"
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