VirtualBox

Ignore:
Timestamp:
Jul 19, 2024 12:27:32 AM (4 months ago)
Author:
vboxsync
Message:

VMM/DBGF: Added a /DBGF/SuspendOnBsod boolean option (default false). bugref:10727

File:
1 edited

Legend:

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

    r105169 r105409  
    6262    PCFGMNODE const pCfgNode = CFGMR3GetChild(CFGMR3GetRoot(pVM), "DBGF/");
    6363
     64    /** @cfgm{/DBGF/SuspendOnBsod, boolean, false}
     65     * Enables suspending (pausing) of the VM on a BSOD.
     66     */
     67    int rc = CFGMR3QueryBoolDef(pCfgNode, "SuspendOnBsod", &pVM->dbgf.s.BugCheck.fCfgSuspendOnBsod, false);
     68    AssertLogRelRCReturn(rc, rc);
     69
    6470    /** @cfgm{/DBGF/PowerOffOnBsod, boolean, false}
    6571     * Enables powering off the VM automatically on a BSOD.
    6672     */
    67     pVM->dbgf.s.BugCheck.fCfgPowerOffOnBsod;
    68     int rc = CFGMR3QueryBoolDef(pCfgNode, "PowerOffOnBsod", &pVM->dbgf.s.BugCheck.fCfgPowerOffOnBsod, false);
     73    rc = CFGMR3QueryBoolDef(pCfgNode, "PowerOffOnBsod", &pVM->dbgf.s.BugCheck.fCfgPowerOffOnBsod, false);
    6974    AssertLogRelRCReturn(rc, rc);
    7075
     
    889894        VMR3ReqCallNoWaitU(pUVM, VMCPUID_ANY_QUEUE, (PFNRT)VMR3PowerOff, 1, pUVM);
    890895    }
     896    else if (pVM->dbgf.s.BugCheck.fCfgSuspendOnBsod)
     897    {
     898        RTMsgError("Suspending - guest BSOD: %s\n", szDetails);
     899        PUVM const pUVM = pVM->pUVM;
     900        VMR3ReqCallNoWaitU(pUVM, VMCPUID_ANY_QUEUE, (PFNRT)VMR3Suspend, 2, pUVM, VMSUSPENDREASON_RUNTIME_ERROR);
     901    }
    891902    return rc;
    892903}
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