Changeset 38612 in vbox for trunk/src/VBox/VMM/VMMR3
- Timestamp:
- Sep 2, 2011 12:31:33 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/EM.cpp
r38378 r38612 1360 1360 rc2 = VMMR3EmtRendezvousFF(pVM, pVCpu); 1361 1361 UPDATE_RC(); 1362 /** @todo HACK ALERT! The following test is to make sure EM+TM things the VM is 1363 * stopped/reset before the next VM state change is made. We need a better 1364 * solution for this, or at least make it possible to do: (rc >= VINF_EM_FIRST 1365 * && rc >= VINF_EM_SUSPEND). */ 1362 /** @todo HACK ALERT! The following test is to make sure EM+TM 1363 * thinks the VM is stopped/reset before the next VM state change 1364 * is made. We need a better solution for this, or at least make it 1365 * possible to do: (rc >= VINF_EM_FIRST && rc <= 1366 * VINF_EM_SUSPEND). */ 1366 1367 if (RT_UNLIKELY(rc == VINF_EM_SUSPEND || rc == VINF_EM_RESET || rc == VINF_EM_OFF)) 1367 1368 { … … 1470 1471 rc2 = VMMR3EmtRendezvousFF(pVM, pVCpu); 1471 1472 UPDATE_RC(); 1472 /** @todo HACK ALERT! The following test is to make sure EM+TM things the VM is 1473 * stopped/reset before the next VM state change is made. We need a better 1474 * solution for this, or at least make it possible to do: (rc >= VINF_EM_FIRST 1475 * && rc >= VINF_EM_SUSPEND). */ 1473 /** @todo HACK ALERT! The following test is to make sure EM+TM 1474 * thinks the VM is stopped/reset before the next VM state change 1475 * is made. We need a better solution for this, or at least make it 1476 * possible to do: (rc >= VINF_EM_FIRST && rc <= 1477 * VINF_EM_SUSPEND). */ 1476 1478 if (RT_UNLIKELY(rc == VINF_EM_SUSPEND || rc == VINF_EM_RESET || rc == VINF_EM_OFF)) 1477 1479 { … … 1495 1497 } 1496 1498 UPDATE_RC(); 1497 /** @todo HACK ALERT! The following test is to make sure EM+TM things the VM is 1498 * stopped/reset before the next VM state change is made. We need a better 1499 * solution for this, or at least make it possible to do: (rc >= VINF_EM_FIRST 1500 * && rc >= VINF_EM_SUSPEND). */ 1499 /** @todo HACK ALERT! The following test is to make sure EM+TM 1500 * thinks the VM is stopped/reset before the next VM state change 1501 * is made. We need a better solution for this, or at least make it 1502 * possible to do: (rc >= VINF_EM_FIRST && rc <= 1503 * VINF_EM_SUSPEND). */ 1501 1504 if (RT_UNLIKELY(rc == VINF_EM_SUSPEND || rc == VINF_EM_RESET || rc == VINF_EM_OFF)) 1502 1505 { … … 1546 1549 } 1547 1550 UPDATE_RC(); 1548 /** @todo HACK ALERT! The following test is to make sure EM+TM things the VM is 1549 * stopped/reset before the next VM state change is made. We need a better 1550 * solution for this, or at least make it possible to do: (rc >= VINF_EM_FIRST 1551 * && rc >= VINF_EM_SUSPEND). */ 1551 /** @todo HACK ALERT! The following test is to make sure EM+TM 1552 * thinks the VM is stopped/reset before the next VM state change 1553 * is made. We need a better solution for this, or at least make it 1554 * possible to do: (rc >= VINF_EM_FIRST && rc <= 1555 * VINF_EM_SUSPEND). */ 1552 1556 if (RT_UNLIKELY(rc == VINF_EM_SUSPEND || rc == VINF_EM_RESET || rc == VINF_EM_OFF)) 1553 1557 { … … 1578 1582 /* 1579 1583 * The instruction following an emulated STI should *always* be executed! 1580 * 1584 * 1581 1585 * Note! We intentionally don't clear VM_FF_INHIBIT_INTERRUPTS here if 1582 1586 * the eip is the same as the inhibited instr address. Before we … … 1591 1595 && !VM_FF_ISPENDING(pVM, VM_FF_PGM_NO_MEMORY)) 1592 1596 { 1593 Log(("VMCPU_FF_INHIBIT_INTERRUPTS at %RGv successor %RGv\n", (RTGCPTR)CPUMGetGuestRIP(pVCpu), EMGetInhibitInterruptsPC(pVCpu)));1594 1597 if (CPUMGetGuestRIP(pVCpu) != EMGetInhibitInterruptsPC(pVCpu)) 1598 { 1599 Log(("Clearing VMCPU_FF_INHIBIT_INTERRUPTS at %RGv - successor %RGv\n", (RTGCPTR)CPUMGetGuestRIP(pVCpu), EMGetInhibitInterruptsPC(pVCpu))); 1595 1600 VMCPU_FF_CLEAR(pVCpu, VMCPU_FF_INHIBIT_INTERRUPTS); 1596 1597 if (EMIsSupervisorCodeRecompiled(pVM)) 1598 rc2 = VINF_EM_RESCHEDULE_REM; 1599 else if (HWACCMR3IsActive(pVCpu)) 1600 rc2 = VINF_EM_RESCHEDULE_HWACC; 1601 } 1601 1602 else 1602 rc2 = PATMAreInterruptsEnabled(pVM) ? VINF_EM_RESCHEDULE_RAW : VINF_EM_RESCHEDULE_REM; 1603 1604 UPDATE_RC(); 1603 Log(("Leaving VMCPU_FF_INHIBIT_INTERRUPTS set at %RGv\n", (RTGCPTR)CPUMGetGuestRIP(pVCpu))); 1605 1604 } 1606 1605 … … 1900 1899 if ( pVCpu->em.s.enmPrevState == EMSTATE_WAIT_SIPI 1901 1900 || pVCpu->em.s.enmPrevState == EMSTATE_HALTED) 1901 { 1902 pVCpu->em.s.enmState = pVCpu->em.s.enmPrevState; 1902 1903 break; 1904 } 1903 1905 /* fall through and get scheduled. */ 1904 1906 … … 1937 1939 case VINF_EM_SUSPEND: 1938 1940 Log2(("EMR3ExecuteVM: VINF_EM_SUSPEND: %d -> %d\n", pVCpu->em.s.enmState, EMSTATE_SUSPENDED)); 1941 Assert(pVCpu->em.s.enmState != EMSTATE_SUSPENDED); 1939 1942 pVCpu->em.s.enmPrevState = pVCpu->em.s.enmState; 1940 1943 pVCpu->em.s.enmState = EMSTATE_SUSPENDED; … … 1988 1991 case VINF_EM_NO_MEMORY: 1989 1992 Log2(("EMR3ExecuteVM: VINF_EM_NO_MEMORY: %d -> %d\n", pVCpu->em.s.enmState, EMSTATE_SUSPENDED)); 1993 Assert(pVCpu->em.s.enmState != EMSTATE_SUSPENDED); 1990 1994 pVCpu->em.s.enmPrevState = pVCpu->em.s.enmState; 1991 1995 pVCpu->em.s.enmState = EMSTATE_SUSPENDED;
Note:
See TracChangeset
for help on using the changeset viewer.