VirtualBox

Changeset 20747 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Jun 21, 2009 8:23:22 PM (16 years ago)
Author:
vboxsync
Message:

REM: Don't drop handler reply records. More handler replay paranoia and massaging.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/REMAll.cpp

    r20746 r20747  
    9393static void remNotifyHandlerInsert(PVM pVM, PREMHANDLERNOTIFICATION pRec)
    9494{
    95     uint32_t idxFree;
    96     uint32_t idxNext;
     95    /*
     96     * Fetch a free record.
     97     */
     98    uint32_t                cFlushes = 0;
     99    uint32_t                idxFree;
    97100    PREMHANDLERNOTIFICATION pFree;
    98 
    99     /* Fetch a free record. */
    100101    do
    101102    {
     
    103104        if (idxFree == (uint32_t)-1)
    104105        {
    105             pFree = NULL;
    106             break;
     106            do
     107            {
     108                Assert(cFlushes++ != 128);
     109                AssertFatal(cFlushes < _1M);
     110                remFlushHandlerNotifications(pVM);
     111                idxFree = ASMAtomicUoReadU32(&pVM->rem.s.idxFreeList);
     112            } while (idxFree == (uint32_t)-1);
    107113        }
    108114        pFree = &pVM->rem.s.aHandlerNotifications[idxFree];
    109115    } while (!ASMAtomicCmpXchgU32(&pVM->rem.s.idxFreeList, pFree->idxNext, idxFree));
    110116
    111     if (!pFree)
    112     {
    113         remFlushHandlerNotifications(pVM);
    114         /** @todo why are we dropping the pReq here without a fight? If we can drop
    115          *        one, we can drop all... */
    116         return;
    117     }
    118 
    119     /* Copy the record. */
    120     *pFree = *pRec;
    121     pFree->idxSelf = idxFree; /* was trashed */
    122 
    123     /* Insert it into the pending list. */
     117    /*
     118     * Copy the record.
     119     */
     120    pFree->enmKind = pRec->enmKind;
     121    pFree->u = pRec->u;
     122
     123    /*
     124     * Insert it into the pending list.
     125     */
     126    uint32_t idxNext;
    124127    do
    125128    {
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