VirtualBox

Changeset 23191 in vbox for trunk


Ignore:
Timestamp:
Sep 21, 2009 2:22:37 PM (15 years ago)
Author:
vboxsync
Message:

VMM: Hacked EM to quit processing forced actions on VINF_EM_SUSPEND, VINF_EM_RESET and VINF_EM_OFF. When going from the live to the suspended step in VMR3Save/VMR3Migrate it frequently happened that the vmR3LiveDoStep2 VMREQ was processed right after the VMR3EmtRendezvous that suspended the VM. TM gets very upset if this happens.

Location:
trunk/src/VBox/VMM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/EM.cpp

    r23145 r23191  
    12611261            rc2 = VMMR3EmtRendezvousFF(pVM, pVCpu);
    12621262            UPDATE_RC();
     1263            /** @todo HACK ALERT! The following test is to make sure EM+TM things the VM is
     1264             * stopped/reset before the next VM state change is made. We need a better
     1265             * solution for this, or at least make it possible to do: (rc >= VINF_EM_FIRST
     1266             * && rc >= VINF_EM_SUSPEND). */
     1267            if (RT_UNLIKELY(rc == VINF_EM_SUSPEND || rc == VINF_EM_RESET || rc == VINF_EM_OFF))
     1268            {
     1269                Log2(("emR3ForcedActions: returns %Rrc\n", rc));
     1270                STAM_REL_PROFILE_STOP(&pVCpu->em.s.StatForcedActions, a);
     1271                return rc;
     1272            }
    12631273        }
    12641274
     
    13471357            rc2 = VMMR3EmtRendezvousFF(pVM, pVCpu);
    13481358            UPDATE_RC();
     1359            /** @todo HACK ALERT! The following test is to make sure EM+TM things the VM is
     1360             * stopped/reset before the next VM state change is made. We need a better
     1361             * solution for this, or at least make it possible to do: (rc >= VINF_EM_FIRST
     1362             * && rc >= VINF_EM_SUSPEND). */
     1363            if (RT_UNLIKELY(rc == VINF_EM_SUSPEND || rc == VINF_EM_RESET || rc == VINF_EM_OFF))
     1364            {
     1365                Log2(("emR3ForcedActions: returns %Rrc\n", rc));
     1366                STAM_REL_PROFILE_STOP(&pVCpu->em.s.StatForcedActions, a);
     1367                return rc;
     1368            }
    13491369        }
    13501370
     
    13621382            }
    13631383            UPDATE_RC();
     1384            /** @todo HACK ALERT! The following test is to make sure EM+TM things the VM is
     1385             * stopped/reset before the next VM state change is made. We need a better
     1386             * solution for this, or at least make it possible to do: (rc >= VINF_EM_FIRST
     1387             * && rc >= VINF_EM_SUSPEND). */
     1388            if (RT_UNLIKELY(rc == VINF_EM_SUSPEND || rc == VINF_EM_RESET || rc == VINF_EM_OFF))
     1389            {
     1390                Log2(("emR3ForcedActions: returns %Rrc\n", rc));
     1391                STAM_REL_PROFILE_STOP(&pVCpu->em.s.StatForcedActions, a);
     1392                return rc;
     1393            }
    13641394        }
    13651395
     
    14031433            }
    14041434            UPDATE_RC();
     1435            /** @todo HACK ALERT! The following test is to make sure EM+TM things the VM is
     1436             * stopped/reset before the next VM state change is made. We need a better
     1437             * solution for this, or at least make it possible to do: (rc >= VINF_EM_FIRST
     1438             * && rc >= VINF_EM_SUSPEND). */
     1439            if (RT_UNLIKELY(rc == VINF_EM_SUSPEND || rc == VINF_EM_RESET || rc == VINF_EM_OFF))
     1440            {
     1441                Log2(("emR3ForcedActions: returns %Rrc\n", rc));
     1442                STAM_REL_PROFILE_STOP(&pVCpu->em.s.StatForcedActions, a);
     1443                return rc;
     1444            }
    14051445        }
    14061446
     
    15011541            rc2 = VMMR3EmtRendezvousFF(pVM, pVCpu);
    15021542            UPDATE_RC();
     1543            /** @todo HACK ALERT! The following test is to make sure EM+TM things the VM is
     1544             * stopped/reset before the next VM state change is made. We need a better
     1545             * solution for this, or at least make it possible to do: (rc >= VINF_EM_FIRST
     1546             * && rc >= VINF_EM_SUSPEND). */
     1547            if (RT_UNLIKELY(rc == VINF_EM_SUSPEND || rc == VINF_EM_RESET || rc == VINF_EM_OFF))
     1548            {
     1549                Log2(("emR3ForcedActions: returns %Rrc\n", rc));
     1550                STAM_REL_PROFILE_STOP(&pVCpu->em.s.StatForcedActions, a);
     1551                return rc;
     1552            }
    15031553        }
    15041554
  • trunk/src/VBox/VMM/VMReq.cpp

    r23080 r23191  
    10561056                     || rc2 < rc) )
    10571057                rc = rc2;
     1058            /** @todo may have to abort processing to propagate EM scheduling status codes
     1059             *        up to the caller... See the ugly hacks after VMMR3EmtRendezvousFF
     1060             *        and VMR3ReqProcessU in EM.cpp. */
    10581061        }
    10591062    }
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