VirtualBox

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


Ignore:
Timestamp:
May 9, 2022 9:45:33 AM (3 years ago)
Author:
vboxsync
Message:

VMM/HM: Use g_CpumHostFeatures instead of the copy in the VM structure. bugref:10093

File:
1 edited

Legend:

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

    r94882 r94944  
    730730     * Check if L1D flush is needed/possible.
    731731     */
    732     if (   !pVM->cpum.ro.HostFeatures.fFlushCmd
    733         || pVM->cpum.ro.HostFeatures.enmMicroarch <  kCpumMicroarch_Intel_Core7_Nehalem
    734         || pVM->cpum.ro.HostFeatures.enmMicroarch >= kCpumMicroarch_Intel_Core7_End
    735         || pVM->cpum.ro.HostFeatures.fArchVmmNeedNotFlushL1d
    736         || 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)
    737737        pVM->hm.s.fL1dFlushOnSched = pVM->hm.s.fL1dFlushOnVmEntry = false;
    738738
     
    741741     * On atoms and knight family CPUs, we will only allow clearing on scheduling.
    742742     */
    743     if (   !pVM->cpum.ro.HostFeatures.fMdsClear
    744         || pVM->cpum.ro.HostFeatures.fArchMdsNo)
     743    if (   !g_CpumHostFeatures.s.fMdsClear
     744        || g_CpumHostFeatures.s.fArchMdsNo)
    745745        pVM->hm.s.fMdsClearOnSched = pVM->hm.s.fMdsClearOnVmEntry = false;
    746     else if (   (   pVM->cpum.ro.HostFeatures.enmMicroarch >=  kCpumMicroarch_Intel_Atom_Airmount
    747                  && pVM->cpum.ro.HostFeatures.enmMicroarch <   kCpumMicroarch_Intel_Atom_End)
    748              || (   pVM->cpum.ro.HostFeatures.enmMicroarch >=  kCpumMicroarch_Intel_Phi_KnightsLanding
    749                  && 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))
    750750    {
    751751        if (!pVM->hm.s.fMdsClearOnSched)
     
    753753        pVM->hm.s.fMdsClearOnVmEntry = false;
    754754    }
    755     else if (   pVM->cpum.ro.HostFeatures.enmMicroarch <  kCpumMicroarch_Intel_Core7_Nehalem
    756              || 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)
    757757        pVM->hm.s.fMdsClearOnSched = pVM->hm.s.fMdsClearOnVmEntry = false;
    758758
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette