Changeset 1056 in vbox
- Timestamp:
- Feb 23, 2007 8:34:40 PM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 18932
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/cpum.h
r770 r1056 743 743 #endif 744 744 745 /** 746 * API for controlling a few of the CPU features found in CR4. 747 * 748 * Currently only X86_CR4_TSD is accepted as input. 749 * 750 * @returns VBox status code. 751 * 752 * @param pVM The VM handle. 753 * @param fOr The CR4 OR mask. 754 * @param fAnd The CR4 AND mask. 755 */ 756 CPUMR3DECL(int) CPUMR3SetCR4Feature(PVM pVM, RTHCUINTREG fOr, RTHCUINTREG fAnd); 757 745 758 /** @} */ 746 759 #endif -
trunk/src/VBox/VMM/CPUM.cpp
r773 r1056 133 133 pVM->cpum.s.CR4.OrMask = X86_CR4_OSFSXR; 134 134 } 135 136 #ifdef CPUM_TRAP_RDTSC137 pVM->cpum.s.CR4.OrMask |= X86_CR4_TSD;138 #endif139 135 140 136 if (!pVM->cpum.s.CPUFeatures.edx.u1MMX) … … 815 811 pHlp->pfnPrintf(pHlp, "Hypervisor CPUM state: %s\n", pszComment); 816 812 cpumR3InfoOne(&pVM->cpum.s.Hyper, pVM->cpum.s.pHyperCoreHC, pHlp, enmType, "."); 813 pHlp->pfnPrintf(pHlp, "CR4OrMask=%#x CR4AndMask=%#x\n", pVM->cpum.s.CR4.OrMask, pVM->cpum.s.CR4.AndMask); 817 814 } 818 815 … … 1674 1671 } 1675 1672 #endif 1673 1674 1675 /** 1676 * API for controlling a few of the CPU features found in CR4. 1677 * 1678 * Currently only X86_CR4_TSD is accepted as input. 1679 * 1680 * @returns VBox status code. 1681 * 1682 * @param pVM The VM handle. 1683 * @param fOr The CR4 OR mask. 1684 * @param fAnd The CR4 AND mask. 1685 */ 1686 CPUMR3DECL(int) CPUMR3SetCR4Feature(PVM pVM, RTHCUINTREG fOr, RTHCUINTREG fAnd) 1687 { 1688 AssertMsgReturn(!(fOr & ~(X86_CR4_TSD)), ("%#x\n", fOr), VERR_INVALID_PARAMETER); 1689 AssertMsgReturn((fAnd & ~(X86_CR4_TSD)) == ~(X86_CR4_TSD), ("%#x\n", fAnd), VERR_INVALID_PARAMETER); 1690 1691 pVM->cpum.s.CR4.OrMask &= fAnd; 1692 pVM->cpum.s.CR4.OrMask |= fOr; 1693 1694 return VINF_SUCCESS; 1695 } 1696
Note:
See TracChangeset
for help on using the changeset viewer.