VirtualBox

Ignore:
Timestamp:
Feb 3, 2022 11:27:27 AM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
149709
Message:

VMM/HM: Nested VMX: bugref:10092 Separate out VM-exit counters for each guest run-loop (normal, debug, nested).

File:
1 edited

Legend:

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

    r93557 r93574  
    5959        } while (0)
    6060
    61 # ifdef VBOX_WITH_NESTED_HWVIRT_SVM
    62 #  define HMSVM_NESTED_EXITCODE_STAM_COUNTER_INC(u64ExitCode) do { \
    63         STAM_COUNTER_INC(&pVCpu->hm.s.StatExitAll); \
     61# define HMSVM_DEBUG_EXITCODE_STAM_COUNTER_INC(u64ExitCode) do { \
     62        STAM_COUNTER_INC(&pVCpu->hm.s.StatDebugExitAll); \
     63        if ((u64ExitCode) == SVM_EXIT_NPF) \
     64            STAM_COUNTER_INC(&pVCpu->hm.s.StatExitReasonNpf); \
     65        else \
     66            STAM_COUNTER_INC(&pVCpu->hm.s.aStatExitReason[(u64ExitCode) & MASK_EXITREASON_STAT]); \
     67        } while (0)
     68
     69# define HMSVM_NESTED_EXITCODE_STAM_COUNTER_INC(u64ExitCode) do { \
    6470        STAM_COUNTER_INC(&pVCpu->hm.s.StatNestedExitAll); \
    6571        if ((u64ExitCode) == SVM_EXIT_NPF) \
     
    6874            STAM_COUNTER_INC(&pVCpu->hm.s.aStatNestedExitReason[(u64ExitCode) & MASK_EXITREASON_STAT]); \
    6975        } while (0)
    70 # endif
    7176#else
    7277# define HMSVM_EXITCODE_STAM_COUNTER_INC(u64ExitCode)           do { } while (0)
    73 # ifdef VBOX_WITH_NESTED_HWVIRT_SVM
    74 #  define HMSVM_NESTED_EXITCODE_STAM_COUNTER_INC(u64ExitCode)   do { } while (0)
    75 # endif
     78# define HMSVM_DEBUG_EXITCODE_STAM_COUNTER_INC(u64ExitCode)     do { } while (0)
     79# define HMSVM_NESTED_EXITCODE_STAM_COUNTER_INC(u64ExitCode)    do { } while (0)
    7680#endif /* !VBOX_WITH_STATISTICS */
    7781
     
    64406444
    64416445        /* Handle the #VMEXIT. */
    6442         HMSVM_EXITCODE_STAM_COUNTER_INC(SvmTransient.u64ExitCode);
     6446        HMSVM_DEBUG_EXITCODE_STAM_COUNTER_INC(SvmTransient.u64ExitCode);
    64436447        STAM_PROFILE_ADV_STOP_START(&pVCpu->hm.s.StatPreExit, &pVCpu->hm.s.StatExitHandling, x);
    64446448        VBOXVMM_R0_HMSVM_VMEXIT(pVCpu, pCtx, SvmTransient.u64ExitCode, pVCpu->hmr0.s.svm.pVmcb);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette