VirtualBox

Changeset 87550 in vbox for trunk/src/VBox/VMM/VMMR0


Ignore:
Timestamp:
Feb 3, 2021 9:54:10 AM (4 years ago)
Author:
vboxsync
Message:

VMM/HMVMX: Copied the fUsePreemptTimer member from HM::vmx to HMR0PERVM::vmx. bugref:9217

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

Legend:

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

    r87546 r87550  
    11611161    if (pVM->hm.s.vmx.fSupported)
    11621162    {
    1163         pVM->hm.s.vmx.fUsePreemptTimer     &= g_fHmVmxUsePreemptTimer; /* Can be overridden by CFGM in HMR3Init(). */
     1163        pVM->hmr0.s.vmx.fUsePreemptTimer    = pVM->hm.s.vmx.fUsePreemptTimerCfg && g_fHmVmxUsePreemptTimer;
     1164        pVM->hm.s.vmx.fUsePreemptTimerCfg   = pVM->hmr0.s.vmx.fUsePreemptTimer;
    11641165        pVM->hm.s.vmx.cPreemptTimerShift    = g_cHmVmxPreemptTimerShift;
    11651166        pVM->hm.s.vmx.u64HostCr4            = g_uHmVmxHostCr4;
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r87548 r87550  
    38143814
    38153815    /* Enable the VMX-preemption timer. */
    3816     if (pVM->hm.s.vmx.fUsePreemptTimer)
     3816    if (pVM->hmr0.s.vmx.fUsePreemptTimer)
    38173817    {
    38183818        Assert(g_HmMsrs.u.vmx.PinCtls.n.allowed1 & VMX_PIN_CTLS_PREEMPT_TIMER);
     
    51185118             * For nested-guests, currently not exposed/used.
    51195119             */
    5120             if (    pVM->hm.s.vmx.fUsePreemptTimer
    5121                 && (g_HmMsrs.u.vmx.ExitCtls.n.allowed1 & VMX_EXIT_CTLS_SAVE_PREEMPT_TIMER))
     5120            if (pVM->hmr0.s.vmx.fUsePreemptTimer)
     5121            {
     5122                Assert(g_HmMsrs.u.vmx.ExitCtls.n.allowed1 & VMX_EXIT_CTLS_SAVE_PREEMPT_TIMER);
    51225123                fVal |= VMX_EXIT_CTLS_SAVE_PREEMPT_TIMER;
     5124            }
    51235125
    51245126            /* Don't acknowledge external interrupts on VM-exit. We want to let the host do that. */
     
    71227124    PVMXVMCSINFO pVmcsInfo = hmGetVmxActiveVmcsInfo(pVCpu);
    71237125
    7124     if (pVM->hm.s.vmx.fUsePreemptTimer)
     7126    if (pVM->hmr0.s.vmx.fUsePreemptTimer)
    71257127    {
    71267128        uint64_t cTicksToDeadline = TMCpuTickGetDeadlineAndTscOffset(pVM, pVCpu, &uTscOffset, &fOffsettedTsc, &fParavirtTsc);
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