VirtualBox

Changeset 71770 in vbox


Ignore:
Timestamp:
Apr 9, 2018 2:22:03 PM (7 years ago)
Author:
vboxsync
Message:

Msi: Some R3 prefixes and some clenaup. [build fix]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Bus/MsixCommon.cpp

    r71769 r71770  
    5656}
    5757
     58#ifdef IN_RING3
    5859DECLINLINE(uint16_t)  msixTableSize(PPDMPCIDEV pDev)
    5960{
    6061    return (msixGetMessageControl(pDev) & 0x3ff) + 1;
    6162}
    62 
    63 DECLINLINE(uint8_t*)  msixGetPageOffset(PPDMPCIDEV pDev, uint32_t off)
    64 {
    65     return (uint8_t*)pDev->Int.s.CTX_SUFF(pMsixPage) + off;
    66 }
    67 
    68 DECLINLINE(MsixTableRecord*) msixGetVectorRecord(PPDMPCIDEV pDev, uint32_t iVector)
    69 {
    70     return (MsixTableRecord*)msixGetPageOffset(pDev, iVector * VBOX_MSIX_ENTRY_SIZE);
     63#endif
     64
     65DECLINLINE(uint8_t *) msixGetPageOffset(PPDMPCIDEV pDev, uint32_t off)
     66{
     67    return (uint8_t *)pDev->Int.s.CTX_SUFF(pMsixPage) + off;
     68}
     69
     70DECLINLINE(MsixTableRecord *) msixGetVectorRecord(PPDMPCIDEV pDev, uint32_t iVector)
     71{
     72    return (MsixTableRecord *)msixGetPageOffset(pDev, iVector * VBOX_MSIX_ENTRY_SIZE);
    7173}
    7274
    7375DECLINLINE(RTGCPHYS)  msixGetMsiAddress(PPDMPCIDEV pDev, uint32_t iVector)
    7476{
    75     MsixTableRecord* pRec = msixGetVectorRecord(pDev, iVector);
     77    MsixTableRecord *pRec = msixGetVectorRecord(pDev, iVector);
    7678    return RT_MAKE_U64(pRec->u32MsgAddressLo & ~UINT32_C(0x3), pRec->u32MsgAddressHi);
    7779}
     
    8789}
    8890
    89 DECLINLINE(uint8_t*) msixPendingByte(PPDMPCIDEV pDev, uint32_t iVector)
     91DECLINLINE(uint8_t *) msixPendingByte(PPDMPCIDEV pDev, uint32_t iVector)
    9092{
    9193    return msixGetPageOffset(pDev, pDev->Int.s.offMsixPba + iVector / 8);
     
    136138}
    137139
    138 PDMBOTHCBDECL(int) msixR3MMIOWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void const *pv, unsigned cb)
     140PDMBOTHCBDECL(int,) msixR3MMIOWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void const *pv, unsigned cb)
    139141{
    140142    LogFlowFunc(("\n"));
     
    244246    return VINF_SUCCESS;
    245247}
    246 #endif
     248
     249#endif /* IN_RING3 */
    247250
    248251bool MsixIsEnabled(PPDMPCIDEV pDev)
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