VirtualBox

Changeset 75968 in vbox for trunk/src


Ignore:
Timestamp:
Dec 5, 2018 11:23:05 AM (6 years ago)
Author:
vboxsync
Message:

VMM/IEM: Nested VMX: bugref:9180 Clear preemption timer FF when the VM-exit happens. Also setup MTF FF based on the pin-control during VM-entry and not just on explicit MTF event injection.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h

    r75940 r75968  
    37743774            /* Cause the VMX-preemption timer VM-exit. The VM-exit qualification MBZ. */
    37753775            iemVmxVmcsSetExitQual(pVCpu, 0);
     3776            VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_VMX_PREEMPT_TIMER);
    37763777            return iemVmxVmexit(pVCpu, VMX_EXIT_PREEMPT_TIMER);
    37773778        }
     
    70067007
    70077008/**
     7009 * Set up the monitor-trap flag (MTF).
     7010 *
     7011 * @param   pVCpu       The cross context virtual CPU structure.
     7012 * @param   pszInstr    The VMX instruction name (for logging purposes).
     7013 */
     7014IEM_STATIC void iemVmxVmentrySetupMtf(PVMCPU pVCpu, const char *pszInstr)
     7015{
     7016    PCVMXVVMCS pVmcs = pVCpu->cpum.GstCtx.hwvirt.vmx.CTX_SUFF(pVmcs);
     7017    Assert(pVmcs);
     7018    if (pVmcs->u32ProcCtls & VMX_PROC_CTLS_MONITOR_TRAP_FLAG)
     7019    {
     7020        VMCPU_FF_SET(pVCpu, VMCPU_FF_VMX_MTF);
     7021        Log(("%s: Monitor-trap flag set on VM-entry\n", pszInstr));
     7022    }
     7023    else
     7024        Assert(!VMCPU_FF_IS_SET(pVCpu, VMCPU_FF_VMX_MTF));
     7025    NOREF(pszInstr);
     7026}
     7027
     7028
     7029/**
    70087030 * Set up the VMX-preemption timer.
    70097031 *
     
    72817303                                iemVmxVmentrySetupPreemptTimer(pVCpu, pszInstr);
    72827304
     7305                                /* Setup monitor-trap flag. */
     7306                                iemVmxVmentrySetupMtf(pVCpu, pszInstr);
     7307
    72837308                                /* Now that we've switched page tables, we can inject events if any. */
    72847309                                iemVmxVmentryInjectEvent(pVCpu, pszInstr);
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