VirtualBox

Changeset 95243 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Jun 9, 2022 1:18:05 PM (3 years ago)
Author:
vboxsync
Message:

VMM/vmR3SetRuntimeErrorCommon: Don't call VMR3Suspend unless the VM is running. bugref:10111

File:
1 edited

Legend:

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

    r94882 r95243  
    11811181     * something was racing us in one way or the other, there will be no more
    11821182     * calls and thus the state assertion below is not going to annoy anyone.
     1183     *
     1184     * Note! Changes to the state transition here needs to be reflected in the
     1185     *       checks in vmR3SetRuntimeErrorCommon!
    11831186     */
    11841187    if (pVCpu->idCpu == pVM->cCpus - 1)
     
    40184021                                vmR3SetRuntimeErrorChangeState, NULL);
    40194022    else if (fFlags & VMSETRTERR_FLAGS_SUSPEND)
    4020         rc = VMR3Suspend(pUVM, VMSUSPENDREASON_RUNTIME_ERROR);
     4023    {
     4024        /* Make sure we don't call VMR3Suspend when we shouldn't.  As seen in
     4025           @bugref{10111} multiple runtime error may be flagged when we run out
     4026           of disk space or similar, so don't freak out VMR3Suspend by calling
     4027           it in an invalid VM state. */
     4028        VMSTATE enmStateCur = pVM->enmVMState;
     4029        if (enmStateCur == VMSTATE_RUNNING || enmStateCur == VMSTATE_RUNNING_LS)
     4030            rc = VMR3Suspend(pUVM, VMSUSPENDREASON_RUNTIME_ERROR);
     4031    }
    40214032    else
    40224033        rc = VINF_SUCCESS;
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