Changeset 20122 in vbox
- Timestamp:
- May 28, 2009 2:13:40 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/EM.cpp
r20072 r20122 511 511 static DECLCALLBACK(int) emR3Save(PVM pVM, PSSMHANDLE pSSM) 512 512 { 513 for ( unsigned i=0;i<pVM->cCPUs;i++)513 for (VMCPUID i = 0; i < pVM->cCPUs; i++) 514 514 { 515 515 PVMCPU pVCpu = &pVM->aCpus[i]; … … 552 552 * Load the saved state. 553 553 */ 554 for ( unsigned i=0;i<pVM->cCPUs;i++)554 for (VMCPUID i = 0; i < pVM->cCPUs; i++) 555 555 { 556 556 PVMCPU pVCpu = &pVM->aCpus[i]; … … 562 562 if (u32Version > EM_SAVED_STATE_VERSION_PRE_SMP) 563 563 { 564 EMSTATE enmState; 565 uint32_t u32; 566 rc = SSMR3GetU32(pSSM, &u32); 564 AssertCompile(sizeof(pVCpu->em.s.enmPrevState) == sizeof(uint32_t)); 565 rc = SSMR3GetU32(pSSM, (uint32_t *)&pVCpu->em.s.enmPrevState); 567 566 AssertRCReturn(rc, rc); 568 569 enmState = (EMSTATE)u32; 570 Assert(enmState != EMSTATE_SUSPENDED); 571 pVCpu->em.s.enmState = enmState; 572 pVCpu->em.s.enmPrevState = EMSTATE_NONE; 567 Assert(pVCpu->em.s.enmPrevState != EMSTATE_SUSPENDED); 568 569 pVCpu->em.s.enmState = EMSTATE_SUSPENDED; 573 570 } 574 571 Assert(!pVCpu->em.s.pCliStatTree); … … 3667 3664 pVCpu->em.s.enmState, EMR3GetStateName(pVCpu->em.s.enmState), pVCpu->em.s.fForceRAW)); 3668 3665 VM_ASSERT_EMT(pVM); 3669 Assert(pVCpu->em.s.enmState == EMSTATE_NONE || pVCpu->em.s.enmState == EMSTATE_WAIT_SIPI || pVCpu->em.s.enmState == EMSTATE_SUSPENDED || pVCpu->em.s.enmState == EMSTATE_HALTED); 3666 AssertMsg( pVCpu->em.s.enmState == EMSTATE_NONE 3667 || pVCpu->em.s.enmState == EMSTATE_WAIT_SIPI 3668 || pVCpu->em.s.enmState == EMSTATE_SUSPENDED, 3669 ("%s\n", EMR3GetStateName(pVCpu->em.s.enmState))); 3670 3670 3671 3671 int rc = setjmp(pVCpu->em.s.u.FatalLongJump); … … 3685 3685 rc = VINF_SUCCESS; 3686 3686 3687 /* If resuming after a pause or a state load, restore the previous 3688 state or else we'll start executing code. Else, just reschedule. */ 3687 3689 if ( pVCpu->em.s.enmState == EMSTATE_SUSPENDED 3688 3690 && ( pVCpu->em.s.enmPrevState == EMSTATE_WAIT_SIPI 3689 3691 || pVCpu->em.s.enmPrevState == EMSTATE_HALTED)) 3690 {3691 /* Pause->Resume: Restore the old wait state or else we'll start executing code. */3692 3692 pVCpu->em.s.enmState = pVCpu->em.s.enmPrevState; 3693 }3694 3693 else 3695 3694 pVCpu->em.s.enmState = emR3Reschedule(pVM, pVCpu, pVCpu->em.s.pCtx);
Note:
See TracChangeset
for help on using the changeset viewer.