Changeset 94944 in vbox
- Timestamp:
- May 9, 2022 9:45:33 AM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 151352
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/vm.h
r94882 r94944 1248 1248 uint8_t abHidden0[64]; 1249 1249 /** Host CPU feature information. */ 1250 CPUMFEATURES HostFeatures ;1250 CPUMFEATURES HostFeaturesX; 1251 1251 /** Guest CPU feature information. */ 1252 1252 CPUMFEATURES GuestFeatures; -
trunk/src/VBox/VMM/VMMAll/VMXAllTemplate.cpp.h
r94930 r94944 792 792 */ 793 793 PCVMCC pVM = pVCpu->CTX_SUFF(pVM); 794 bool constfFsGsBase = pVM->cpum.ro.GuestFeatures.fFsGsBase;795 bool constfXSaveRstor = pVM->cpum.ro.GuestFeatures.fXSaveRstor;796 bool constfFxSaveRstor = pVM->cpum.ro.GuestFeatures.fFxSaveRstor;794 bool fFsGsBase = pVM->cpum.ro.GuestFeatures.fFsGsBase; 795 bool fXSaveRstor = pVM->cpum.ro.GuestFeatures.fXSaveRstor; 796 bool fFxSaveRstor = pVM->cpum.ro.GuestFeatures.fFxSaveRstor; 797 797 798 798 /* … … 800 800 * Ensure features exposed to the guest are present on the host. 801 801 */ 802 Assert (!fFsGsBase || pVM->cpum.ro.HostFeatures.fFsGsBase);803 Assert (!fXSaveRstor || pVM->cpum.ro.HostFeatures.fXSaveRstor);804 Assert (!fFxSaveRstor || pVM->cpum.ro.HostFeatures.fFxSaveRstor);802 AssertStmt(!fFsGsBase || g_CpumHostFeatures.s.fFsGsBase, fFsGsBase = 0); 803 AssertStmt(!fXSaveRstor || g_CpumHostFeatures.s.fXSaveRstor, fXSaveRstor = 0); 804 AssertStmt(!fFxSaveRstor || g_CpumHostFeatures.s.fFxSaveRstor, fFxSaveRstor = 0); 805 805 806 806 uint64_t const fGstMask = ( X86_CR4_PVI -
trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp
r94882 r94944 4290 4290 * This should be done -after- any RDTSCPs for obtaining the host timestamp (TM, STAM etc). 4291 4291 */ 4292 if ( pVM->cpum.ro.HostFeatures.fRdTscP4292 if ( g_CpumHostFeatures.s.fRdTscP 4293 4293 && !(pVmcb->ctrl.u64InterceptCtrl & SVM_CTRL_INTERCEPT_RDTSCP)) 4294 4294 { -
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r94882 r94944 2152 2152 * See Intel "Model-Specific Registers" spec. 2153 2153 */ 2154 uint32_t const uFamilyModel = ( pVM->cpum.ro.HostFeatures.uFamily << 8)2155 | pVM->cpum.ro.HostFeatures.uModel;2154 uint32_t const uFamilyModel = (g_CpumHostFeatures.s.uFamily << 8) 2155 | g_CpumHostFeatures.s.uModel; 2156 2156 switch (uFamilyModel) 2157 2157 { … … 3648 3648 { 3649 3649 /* Verify that the host is NX capable. */ 3650 Assert( pVCpu->CTX_SUFF(pVM)->cpum.ro.HostFeatures.fNoExecute);3650 Assert(g_CpumHostFeatures.s.fNoExecute); 3651 3651 return true; 3652 3652 } -
trunk/src/VBox/VMM/VMMR3/HM.cpp
r94882 r94944 730 730 * Check if L1D flush is needed/possible. 731 731 */ 732 if ( ! pVM->cpum.ro.HostFeatures.fFlushCmd733 || pVM->cpum.ro.HostFeatures.enmMicroarch < kCpumMicroarch_Intel_Core7_Nehalem734 || pVM->cpum.ro.HostFeatures.enmMicroarch >= kCpumMicroarch_Intel_Core7_End735 || pVM->cpum.ro.HostFeatures.fArchVmmNeedNotFlushL1d736 || pVM->cpum.ro.HostFeatures.fArchRdclNo)732 if ( !g_CpumHostFeatures.s.fFlushCmd 733 || g_CpumHostFeatures.s.enmMicroarch < kCpumMicroarch_Intel_Core7_Nehalem 734 || g_CpumHostFeatures.s.enmMicroarch >= kCpumMicroarch_Intel_Core7_End 735 || g_CpumHostFeatures.s.fArchVmmNeedNotFlushL1d 736 || g_CpumHostFeatures.s.fArchRdclNo) 737 737 pVM->hm.s.fL1dFlushOnSched = pVM->hm.s.fL1dFlushOnVmEntry = false; 738 738 … … 741 741 * On atoms and knight family CPUs, we will only allow clearing on scheduling. 742 742 */ 743 if ( ! pVM->cpum.ro.HostFeatures.fMdsClear744 || pVM->cpum.ro.HostFeatures.fArchMdsNo)743 if ( !g_CpumHostFeatures.s.fMdsClear 744 || g_CpumHostFeatures.s.fArchMdsNo) 745 745 pVM->hm.s.fMdsClearOnSched = pVM->hm.s.fMdsClearOnVmEntry = false; 746 else if ( ( pVM->cpum.ro.HostFeatures.enmMicroarch >= kCpumMicroarch_Intel_Atom_Airmount747 && pVM->cpum.ro.HostFeatures.enmMicroarch < kCpumMicroarch_Intel_Atom_End)748 || ( pVM->cpum.ro.HostFeatures.enmMicroarch >= kCpumMicroarch_Intel_Phi_KnightsLanding749 && pVM->cpum.ro.HostFeatures.enmMicroarch < kCpumMicroarch_Intel_Phi_End))746 else if ( ( g_CpumHostFeatures.s.enmMicroarch >= kCpumMicroarch_Intel_Atom_Airmount 747 && g_CpumHostFeatures.s.enmMicroarch < kCpumMicroarch_Intel_Atom_End) 748 || ( g_CpumHostFeatures.s.enmMicroarch >= kCpumMicroarch_Intel_Phi_KnightsLanding 749 && g_CpumHostFeatures.s.enmMicroarch < kCpumMicroarch_Intel_Phi_End)) 750 750 { 751 751 if (!pVM->hm.s.fMdsClearOnSched) … … 753 753 pVM->hm.s.fMdsClearOnVmEntry = false; 754 754 } 755 else if ( pVM->cpum.ro.HostFeatures.enmMicroarch < kCpumMicroarch_Intel_Core7_Nehalem756 || pVM->cpum.ro.HostFeatures.enmMicroarch >= kCpumMicroarch_Intel_Core7_End)755 else if ( g_CpumHostFeatures.s.enmMicroarch < kCpumMicroarch_Intel_Core7_Nehalem 756 || g_CpumHostFeatures.s.enmMicroarch >= kCpumMicroarch_Intel_Core7_End) 757 757 pVM->hm.s.fMdsClearOnSched = pVM->hm.s.fMdsClearOnVmEntry = false; 758 758
Note:
See TracChangeset
for help on using the changeset viewer.