VirtualBox

Changeset 40561 in vbox for trunk


Ignore:
Timestamp:
Mar 21, 2012 11:57:10 AM (13 years ago)
Author:
vboxsync
Message:

Framework for handling VT-x MTF exits.

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

Legend:

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

    r40551 r40561  
    17161716        AssertRC(rc);
    17171717    }
     1718
     1719#if 0
     1720    /* Enable single stepping if requested and CPU supports it. */
     1721    if (pVM->hwaccm.s.vmx.msr.vmx_proc_ctls.n.allowed1 & VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_MONITOR_TRAP_FLAG)
     1722        if (DBGFIsStepping(pVCpu))
     1723        {
     1724            pVCpu->hwaccm.s.vmx.proc_ctls |= VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_MONITOR_TRAP_FLAG;
     1725            rc = VMXWriteVMCS(VMX_VMCS_CTRL_PROC_EXEC_CONTROLS, pVCpu->hwaccm.s.vmx.proc_ctls);
     1726            AssertRC(rc);
     1727        }
     1728#endif
    17181729
    17191730    if (pVCpu->hwaccm.s.fContextUseFlags & HWACCM_CHANGED_GUEST_CR3)
     
    41054116        AssertFailed(); /* can't happen. */
    41064117        rc = VERR_EM_INTERPRETER;
     4118        break;
     4119
     4120    case VMX_EXIT_MTF:                  /* 37 Exit due to Monitor Trap Flag. */
     4121        LogFlow(("VMX_EXIT_MTF at %RGv\n", (RTGCPTR)pCtx->rip));
     4122        pVCpu->hwaccm.s.vmx.proc_ctls &= ~VMX_VMCS_CTRL_PROC_EXEC_CONTROLS_MONITOR_TRAP_FLAG;
     4123        rc2 = VMXWriteVMCS(VMX_VMCS_CTRL_PROC_EXEC_CONTROLS, pVCpu->hwaccm.s.vmx.proc_ctls);
     4124        AssertRC(rc2);
     4125        STAM_COUNTER_INC(&pVCpu->hwaccm.s.StatExitMTF);
     4126#if 0
     4127        DBGFDoneStepping(pVCpu);
     4128#endif
     4129        rc = VINF_EM_DBG_STOP;
    41074130        break;
    41084131
  • trunk/src/VBox/VMM/VMMR3/HWACCM.cpp

    r40360 r40561  
    9696    EXIT_REASON_NIL(),
    9797    EXIT_REASON(VMX_EXIT_MWAIT              , 36, "Guest software executed MWAIT."),
    98     EXIT_REASON_NIL(),
     98    EXIT_REASON(VMX_EXIT_MTF                , 37, "Monitor Trap Flag."),
    9999    EXIT_REASON_NIL(),
    100100    EXIT_REASON(VMX_EXIT_MONITOR            , 39, "Guest software attempted to execute MONITOR."),
     
    527527        HWACCM_REG_COUNTER(&pVCpu->hwaccm.s.StatExitMaxResume,          "/HWACCM/CPU%d/Exit/MaxResume");
    528528        HWACCM_REG_COUNTER(&pVCpu->hwaccm.s.StatExitPreemptPending,     "/HWACCM/CPU%d/Exit/PreemptPending");
     529        HWACCM_REG_COUNTER(&pVCpu->hwaccm.s.StatExitMTF,                "/HWACCM/CPU%d/Exit/MonitorTrapFlag");
    529530
    530531        HWACCM_REG_COUNTER(&pVCpu->hwaccm.s.StatSwitchGuestIrq,         "/HWACCM/CPU%d/Switch/IrqPending");
  • trunk/src/VBox/VMM/include/HWACCMInternal.h

    r38683 r40561  
    838838    STAMCOUNTER             StatExitMaxResume;
    839839    STAMCOUNTER             StatExitPreemptPending;
     840    STAMCOUNTER             StatExitMTF;
    840841    STAMCOUNTER             StatIntReinject;
    841842    STAMCOUNTER             StatPendingHostIrq;
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