Changeset 18652 in vbox for trunk/src/VBox
- Timestamp:
- Apr 2, 2009 4:27:49 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/EM.cpp
r18618 r18652 2302 2302 case VINF_PGM_CHANGE_MODE: 2303 2303 rc = PGMChangeMode(pVM, pCtx->cr0, pCtx->cr4, pCtx->msrEFER); 2304 if ( RT_SUCCESS(rc))2304 if (rc == VINF_SUCCESS) 2305 2305 rc = VINF_EM_RESCHEDULE; 2306 AssertMsg(RT_FAILURE(rc) || (rc >= VINF_EM_FIRST && rc <= VINF_EM_LAST), ("%Rrc\n", rc)); 2306 2307 break; 2307 2308 … … 3576 3577 */ 3577 3578 case VINF_EM_NO_MEMORY: 3578 /** @todo Take the out of memory fun from here and up. May have to add another3579 * VM state, but hope not for 2.2 ... */3580 3579 Log2(("EMR3ExecuteVM: VINF_EM_NO_MEMORY: %d -> %d\n", pVM->em.s.enmState, EMSTATE_SUSPENDED)); 3581 3580 pVM->em.s.enmState = EMSTATE_SUSPENDED; 3582 break; 3581 TMVirtualPause(pVM); 3582 TMCpuTickPause(pVM); 3583 VMMR3Unlock(pVM); 3584 STAM_REL_PROFILE_ADV_STOP(&pVM->em.s.StatTotal, x); 3585 3586 rc = VMSetRuntimeError(pVM, VMSETRTERR_FLAGS_SUSPEND, "HostMemoryLow", 3587 N_("Unable to allocate and lock memory. The virtual machine will be paused. Please close applications to free up memory or close the VM")); 3588 if (rc != VINF_EM_SUSPEND) 3589 { 3590 if (RT_SUCCESS_NP(rc)) 3591 { 3592 AssertLogRelMsgFailed(("%Rrc\n", rc)); 3593 rc = VERR_EM_INTERNAL_ERROR; 3594 } 3595 pVM->em.s.enmState = EMSTATE_GURU_MEDITATION; 3596 } 3597 return rc; 3583 3598 3584 3599 /* … … 3628 3643 */ 3629 3644 default: 3630 if (RT_SUCCESS (rc))3645 if (RT_SUCCESS_NP(rc)) 3631 3646 { 3632 3647 AssertMsgFailed(("Unexpected warning or informational status code %Rra!\n", rc));
Note:
See TracChangeset
for help on using the changeset viewer.