VirtualBox

Changeset 64855 in vbox


Ignore:
Timestamp:
Dec 13, 2016 5:13:47 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
112255
Message:

VMM/HM: Added hmeventpending dbginfo command.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/HM.cpp

    r64854 r64855  
    380380static DECLCALLBACK(int)  hmR3Load(PVM pVM, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass);
    381381static DECLCALLBACK(void) hmR3InfoExitHistory(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs);
     382static DECLCALLBACK(void) hmR3InfoEventPending(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs);
    382383static int                hmR3InitCPU(PVM pVM);
    383384static int                hmR3InitFinalizeR0(PVM pVM);
     
    429430     */
    430431    rc = DBGFR3InfoRegisterInternalEx(pVM, "exithistory", "Dumps the HM VM-exit history.", hmR3InfoExitHistory,
     432                                      DBGFINFO_FLAGS_ALL_EMTS);
     433    AssertRCReturn(rc, rc);
     434
     435    rc = DBGFR3InfoRegisterInternalEx(pVM, "hmeventpending", "Dumps the pending HM event.", hmR3InfoEventPending,
    431436                                      DBGFINFO_FLAGS_ALL_EMTS);
    432437    AssertRCReturn(rc, rc);
     
    35593564}
    35603565
     3566
     3567/**
     3568 * Displays the HM pending event.
     3569 *
     3570 * @param   pVM         The cross context VM structure.
     3571 * @param   pHlp        The info helper functions.
     3572 * @param   pszArgs     Arguments, ignored.
     3573 */
     3574static DECLCALLBACK(void) hmR3InfoEventPending(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs)
     3575{
     3576    NOREF(pszArgs);
     3577    PVMCPU pVCpu = VMMGetCpu(pVM);
     3578    if (!pVCpu)
     3579        pVCpu = &pVM->aCpus[0];
     3580
     3581    if (HMIsEnabled(pVM))
     3582    {
     3583        pHlp->pfnPrintf(pHlp, "CPU[%u]: HM event (fPending=%RTbool)\n", pVCpu->idCpu, pVCpu->hm.s.Event.fPending);
     3584        if (pVCpu->hm.s.Event.fPending)
     3585        {
     3586            pHlp->pfnPrintf(pHlp, "  u64IntInfo        = %#RX64\n", pVCpu->hm.s.Event.u64IntInfo);
     3587            pHlp->pfnPrintf(pHlp, "  u32ErrCode        = %#RX64\n", pVCpu->hm.s.Event.u32ErrCode);
     3588            pHlp->pfnPrintf(pHlp, "  cbInstr           = %u bytes\n", pVCpu->hm.s.Event.cbInstr);
     3589            pHlp->pfnPrintf(pHlp, "  GCPtrFaultAddress = %#RGp\n", pVCpu->hm.s.Event.GCPtrFaultAddress);
     3590        }
     3591    }
     3592    else
     3593        pHlp->pfnPrintf(pHlp, "HM is not enabled for this VM!\n");
     3594}
     3595
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