VirtualBox

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


Ignore:
Timestamp:
Feb 22, 2018 3:38:35 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
120973
Message:

Added speculation control settings to API, refined implementation.

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

Legend:

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

    r70948 r71108  
    17501750            pFeatures->fIbrs                = pFeatures->fIbpb;
    17511751            pFeatures->fStibp               = RT_BOOL(pSxfLeaf0->uEdx & X86_CPUID_STEXT_FEATURE_EDX_STIBP);
     1752#if 0   // Disabled until IA32_ARCH_CAPABILITIES support can be tested
    17521753            pFeatures->fArchCap             = RT_BOOL(pSxfLeaf0->uEdx & X86_CPUID_STEXT_FEATURE_EDX_ARCHCAP);
     1754#endif
    17531755        }
    17541756
     
    43144316
    43154317        /* Check if speculation control is enabled. */
    4316         rc = CFGMR3QueryBoolDef(CFGMR3GetRoot(pVM), "EnableSpecCtrl", &fEnable, false);
     4318        rc = CFGMR3QueryBoolDef(pCpumCfg, "SpecCtrl", &fEnable, false);
    43174319        AssertRCReturn(rc, rc);
    43184320        if (fEnable)
     
    46214623                {
    46224624                    pLeaf->uEdx |= X86_CPUID_STEXT_FEATURE_EDX_IBRS_IBPB;
     4625                    pVM->cpum.s.GuestFeatures.fIbrs = 1;
    46234626                    if (pVM->cpum.s.HostFeatures.fStibp)
     4627                    {
    46244628                        pLeaf->uEdx |= X86_CPUID_STEXT_FEATURE_EDX_STIBP;
     4629                        pVM->cpum.s.GuestFeatures.fStibp = 1;
     4630                    }
    46254631
    46264632                    /* Make sure we have the speculation control MSR... */
  • trunk/src/VBox/VMM/VMMR3/HM.cpp

    r71064 r71108  
    464464                              "|IBPBOnVMExit"
    465465                              "|IBPBOnVMEntry"
     466                              "|SpecCtrlByHost"
    466467                              "|TPRPatchingEnabled"
    467468                              "|64bitEnabled"
     
    649650     * Costly paranoia setting. */
    650651    rc = CFGMR3QueryBoolDef(pCfgHm, "IBPBOnVMEntry", &pVM->hm.s.fIbpbOnVmEntry, false);
     652    AssertLogRelRCReturn(rc, rc);
     653
     654    /** @cfgm{/HM/SpecCtrlByHost, bool}
     655     * Another expensive paranoia setting. */
     656    rc = CFGMR3QueryBoolDef(pCfgHm, "SpecCtrlByHost", &pVM->hm.s.fSpecCtrlByHost, false);
    651657    AssertLogRelRCReturn(rc, rc);
    652658
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