VirtualBox

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


Ignore:
Timestamp:
Feb 7, 2020 6:00:45 PM (5 years ago)
Author:
vboxsync
Message:

VMM/HM: Separate interrupt and exception injected stats.

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

Legend:

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

    r82968 r83025  
    33003300    Assert(!pVmcb->ctrl.EventInject.n.u1Valid);
    33013301    pVmcb->ctrl.EventInject.u = pEvent->u;
    3302     STAM_COUNTER_INC(&pVCpu->hm.s.paStatInjectedIrqsR0[pEvent->n.u8Vector & MASK_INJECT_IRQ_STAT]);
     3302    if (   pVmcb->ctrl.EventInject.n.u3Type == SVM_EVENT_EXCEPTION
     3303        || pVmcb->ctrl.EventInject.n.u3Type == SVM_EVENT_NMI)
     3304    {
     3305        Assert(pEvent->n.u8Vector <= X86_XCPT_LAST);
     3306        STAM_COUNTER_INC(&pVCpu->hm.s.paStatInjectedXcptsR0[pEvent->n.u8Vector]);
     3307    }
     3308    else
     3309        STAM_COUNTER_INC(&pVCpu->hm.s.paStatInjectedIrqsR0[pEvent->n.u8Vector & MASK_INJECT_IRQ_STAT]);
    33033310    RT_NOREF(pVCpu);
    33043311
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r82968 r83025  
    86528652#endif
    86538653
    8654     STAM_COUNTER_INC(&pVCpu->hm.s.paStatInjectedIrqsR0[uVector & MASK_INJECT_IRQ_STAT]);
     8654    if (   uIntType == VMX_EXIT_INT_INFO_TYPE_HW_XCPT
     8655        || uIntType == VMX_EXIT_INT_INFO_TYPE_NMI
     8656        || uIntType == VMX_EXIT_INT_INFO_TYPE_PRIV_SW_XCPT
     8657        || uIntType == VMX_EXIT_INT_INFO_TYPE_SW_XCPT)
     8658    {
     8659        Assert(uVector <= X86_XCPT_LAST);
     8660        Assert(uIntType != VMX_EXIT_INT_INFO_TYPE_NMI          || uVector == X86_XCPT_NMI);
     8661        Assert(uIntType != VMX_EXIT_INT_INFO_TYPE_PRIV_SW_XCPT || uVector == X86_XCPT_DB);
     8662        STAM_COUNTER_INC(&pVCpu->hm.s.paStatInjectedXcptsR0[uVector]);
     8663    }
     8664    else
     8665        STAM_COUNTER_INC(&pVCpu->hm.s.paStatInjectedIrqsR0[uVector & MASK_INJECT_IRQ_STAT]);
    86558666
    86568667    /*
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