VirtualBox

Changeset 50032 in vbox for trunk/src/VBox/Devices/Storage


Ignore:
Timestamp:
Jan 8, 2014 12:34:28 PM (11 years ago)
Author:
vboxsync
Message:

AHCI: Fix possible problem with suspending a VM if there was a non fatal error like a full disk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DevAHCI.cpp

    r50031 r50032  
    480480    /** Bitmap for new queued tasks (Guest -> R3). */
    481481    volatile uint32_t               u32TasksNew;
     482    /** Bitmap of tasks which must be redone because of a non fatal error. */
     483    volatile uint32_t               u32TasksRedo;
    482484
    483485    /** Current command slot processed.
     
    486488    volatile uint32_t               u32CurrentCommandSlot;
    487489
    488 #if HC_ARCH_BITS == 32
     490#if HC_ARCH_BITS == 64
    489491    uint32_t                        u32Alignment2;
    490492#endif
     
    19731975
    19741976    pAhciPort->u32TasksNew = 0;
     1977    pAhciPort->u32TasksRedo = 0;
    19751978    pAhciPort->u32TasksFinished = 0;
    19761979    pAhciPort->u32QueuedTasksFinished = 0;
     
    59185921            }
    59195922            else
    5920                 ASMAtomicOrU32(&pAhciPort->u32TasksNew, RT_BIT_32(pAhciReq->uTag));
     5923                ASMAtomicOrU32(&pAhciPort->u32TasksRedo, RT_BIT_32(pAhciReq->uTag));
    59215924        }
    59225925        else
     
    74997502        PAHCIPort pAhciPort = &pAhci->ahciPort[i];
    75007503
    7501         if (pAhciPort->u32TasksNew)
     7504        if (pAhciPort->u32TasksRedo)
    75027505        {
    75037506            PDEVPORTNOTIFIERQUEUEITEM pItem = (PDEVPORTNOTIFIERQUEUEITEM)PDMQueueAlloc(pAhci->CTX_SUFF(pNotifierQueue));
    75047507            AssertMsg(pItem, ("Allocating item for queue failed\n"));
     7508
     7509            pAhciPort->u32TasksNew |= pAhciPort->u32TasksRedo;
     7510            pAhciPort->u32TasksRedo = 0;
    75057511
    75067512            Assert(pAhciPort->fRedo);
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