VirtualBox

Changeset 105409 in vbox


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

Location:
trunk/src/VBox/VMM
Files:
2 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}
  • trunk/src/VBox/VMM/include/DBGFInternal.h

    r105168 r105409  
    11671167    struct
    11681168    {
    1169         /** Whether to power off VM on BSOD.   */
     1169        /** Whether to power off the VM on BSOD.   */
    11701170        bool                    fCfgPowerOffOnBsod;
     1171        /** Whether to suspend the VM on BSOD.   */
     1172        bool                    fCfgSuspendOnBsod;
    11711173        /** Explicit padding. */
    1172         bool                    afReserved[3];
     1174        bool                    afReserved[2];
    11731175
    11741176        /** The ID of the CPU reporting it. */
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