VirtualBox

Changeset 89066 in vbox


Ignore:
Timestamp:
May 17, 2021 5:41:08 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
144406
Message:

Intel IOMMU: bugref:9967 DevIoApic: Add macros for checking PDM lock ownership and asserts to helper function pointers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DevIoApic.cpp

    r89064 r89066  
    206206# define IOAPIC_LOCK(a_pDevIns, a_pThis, a_pThisCC, rcBusy)  (a_pThisCC)->pIoApicHlp->pfnLock((a_pDevIns), (rcBusy))
    207207# define IOAPIC_UNLOCK(a_pDevIns, a_pThis, a_pThisCC)        (a_pThisCC)->pIoApicHlp->pfnUnlock((a_pDevIns))
     208# define IOAPIC_LOCK_IS_OWNER(a_pDevIns, a_pThis, a_pThisCC) (a_pThisCC)->pIoApicHlp->pfnLockIsOwner((a_pDevIns))
    208209#else
    209210# define IOAPIC_LOCK(a_pDevIns, a_pThis, a_pThisCC, rcBusy)  PDMDevHlpCritSectEnter((a_pDevIns), &(a_pThis)->CritSect, (rcBusy))
    210211# define IOAPIC_UNLOCK(a_pDevIns, a_pThis, a_pThisCC)        PDMDevHlpCritSectLeave((a_pDevIns), &(a_pThis)->CritSect)
     212# define IOAPIC_LOCK_IS_OWNER(a_pDevIns, a_pThis, a_pThisCC) PDMDevHlpCritSectIsOwner((a_pDevIns), &(a_pThis)->CritSect)
    211213#endif
    212214
     
    16061608    rc = PDMDevHlpIoApicRegister(pDevIns, &IoApicReg, &pThisCC->pIoApicHlp);
    16071609    AssertRCReturn(rc, rc);
     1610    AssertPtr(pThisCC->pIoApicHlp->pfnApicBusDeliver);
     1611    AssertPtr(pThisCC->pIoApicHlp->pfnLock);
     1612    AssertPtr(pThisCC->pIoApicHlp->pfnUnlock);
     1613    AssertPtr(pThisCC->pIoApicHlp->pfnIsLockOwner);
     1614    AssertPtr(pThisCC->pIoApicHlp->pfnIommuMsiRemap);
    16081615
    16091616    /*
     
    16961703    rc = PDMDevHlpIoApicSetUpContext(pDevIns, &IoApicReg, &pThisCC->pIoApicHlp);
    16971704    AssertRCReturn(rc, rc);
     1705    AssertPtr(pThisCC->pIoApicHlp->pfnApicBusDeliver);
     1706    AssertPtr(pThisCC->pIoApicHlp->pfnLock);
     1707    AssertPtr(pThisCC->pIoApicHlp->pfnUnlock);
     1708    AssertPtr(pThisCC->pIoApicHlp->pfnIsLockOwner);
     1709    AssertPtr(pThisCC->pIoApicHlp->pfnIommuMsiRemap);
    16981710
    16991711    rc = PDMDevHlpMmioSetUpContext(pDevIns, pThis->hMmio, ioapicMmioWrite, ioapicMmioRead, NULL /*pvUser*/);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette