VirtualBox

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


Ignore:
Timestamp:
Sep 10, 2013 2:22:51 PM (11 years ago)
Author:
vboxsync
Message:

IOMMMIOPhysHandler: Don't sit on the IOM lock.

File:
1 edited

Legend:

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

    r48018 r48410  
    17591759VMMDECL(VBOXSTRICTRC) IOMMMIOPhysHandler(PVM pVM, PVMCPU pVCpu, RTGCUINT uErrorCode, PCPUMCTXCORE pCtxCore, RTGCPHYS GCPhysFault)
    17601760{
     1761    /*
     1762     * We don't have a range here, so look it up before calling the common function.
     1763     */
    17611764    int rc2 = IOM_LOCK_SHARED(pVM); NOREF(rc2);
    17621765#ifndef IN_RING3
     
    17641767        return VINF_IOM_R3_MMIO_READ_WRITE;
    17651768#endif
    1766     VBOXSTRICTRC rcStrict = iomMMIOHandler(pVM, pVCpu, (uint32_t)uErrorCode, pCtxCore, GCPhysFault,
    1767                                            iomMmioGetRange(pVM, pVCpu, GCPhysFault));
     1769    PIOMMMIORANGE pRange = iomMmioGetRange(pVM, pVCpu, GCPhysFault);
     1770    if (RT_UNLIKELY(!pRange))
     1771    {
     1772        IOM_UNLOCK_SHARED(pVM);
     1773        return VERR_IOM_MMIO_RANGE_NOT_FOUND;
     1774    }
     1775    iomMmioRetainRange(pRange);
    17681776    IOM_UNLOCK_SHARED(pVM);
     1777
     1778    VBOXSTRICTRC rcStrict = iomMMIOHandler(pVM, pVCpu, (uint32_t)uErrorCode, pCtxCore, GCPhysFault, pRange);
     1779
     1780    iomMmioReleaseRange(pVM, pRange);
    17691781    return VBOXSTRICTRC_VAL(rcStrict);
    17701782}
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