VirtualBox

Changeset 54153 in vbox for trunk


Ignore:
Timestamp:
Feb 11, 2015 5:24:15 PM (10 years ago)
Author:
vboxsync
Message:

VMM/HM: Fix VMX-preemption timer override from CFGM, renamed CFGM key to be more accurate.
Added release logging of use of periodic-preemption timers on AMD-V hosts.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HMR0.cpp

    r52192 r54153  
    12351235 * @returns VBox status code.
    12361236 * @param   pVM         Pointer to the VM.
     1237 *
     1238 * @remarks This is called after HMR3Init(), see vmR3CreateU() and
     1239 *          vmR3InitRing3().
    12371240 */
    12381241VMMR0_INT_DECL(int) HMR0InitVM(PVM pVM)
     
    12541257    pVM->hm.s.svm.fSupported            = g_HvmR0.svm.fSupported;
    12551258
    1256     pVM->hm.s.vmx.fUsePreemptTimer      = g_HvmR0.vmx.fUsePreemptTimer;
     1259    pVM->hm.s.vmx.fUsePreemptTimer     &= g_HvmR0.vmx.fUsePreemptTimer;     /* Can be overridden by CFGM. See HMR3Init(). */
    12571260    pVM->hm.s.vmx.cPreemptTimerShift    = g_HvmR0.vmx.cPreemptTimerShift;
    12581261    pVM->hm.s.vmx.u64HostCr4            = g_HvmR0.vmx.u64HostCr4;
  • trunk/src/VBox/VMM/VMMR3/HM.cpp

    r54065 r54153  
    349349
    350350    /*
    351      * Misc initialisation.
    352      */
    353 #if 0
    354     pVM->hm.s.vmx.fSupported = false;
    355     pVM->hm.s.svm.fSupported = false;
    356     pVM->hm.s.vmx.fEnabled   = false;
    357     pVM->hm.s.svm.fEnabled   = false;
    358     pVM->hm.s.fNestedPaging  = false;
    359 #endif
    360 
    361     /*
    362351     * Read configuration.
    363352     */
     
    445434     * determines the default value. */
    446435    rc = CFGMR3QueryU32Def(pCfgHM, "MaxResumeLoops", &pVM->hm.s.cMaxResumeLoops, 0 /* set by R0 later */);
     436    AssertLogRelRCReturn(rc, rc);
     437
     438    /** @cfgm{/HM/UseVmxPreemptTimer, bool}
     439     * Whether to make use of the VMX-preemption timer feature of the CPU if it's
     440     * available. */
     441    rc = CFGMR3QueryBoolDef(pCfgHM, "UseVmxPreemptTimer", &pVM->hm.s.vmx.fUsePreemptTimer, true);
    447442    AssertLogRelRCReturn(rc, rc);
    448443
     
    13371332        LogRel(("HM: Ignoring VPID capabilities of CPU\n"));
    13381333
    1339     /*
    1340      * Check for preemption timer config override and log the state of it.
    1341      */
    1342     if (pVM->hm.s.vmx.fUsePreemptTimer)
    1343     {
    1344         PCFGMNODE pCfgHm = CFGMR3GetChild(CFGMR3GetRoot(pVM), "HM");
    1345         rc = CFGMR3QueryBoolDef(pCfgHm, "UsePreemptTimer", &pVM->hm.s.vmx.fUsePreemptTimer, true);
    1346         AssertLogRelRCReturn(rc, rc);
    1347     }
    13481334    if (pVM->hm.s.vmx.fUsePreemptTimer)
    13491335        LogRel(("HM: VMX-preemption timer enabled (cPreemptTimerShift=%u)\n", pVM->hm.s.vmx.cPreemptTimerShift));
     
    13781364    LogRel(("HM: AMD-V max ASID                    = %RU32\n",  pVM->hm.s.uMaxAsid));
    13791365    LogRel(("HM: AMD-V features                    = %#x\n",    pVM->hm.s.svm.u32Features));
     1366    LogRel(("HM: Max resume loops                  = %u\n",     pVM->hm.s.cMaxResumeLoops));
    13801367
    13811368    /*
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