Changeset 71770 in vbox
- Timestamp:
- Apr 9, 2018 2:22:03 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/MsixCommon.cpp
r71769 r71770 56 56 } 57 57 58 #ifdef IN_RING3 58 59 DECLINLINE(uint16_t) msixTableSize(PPDMPCIDEV pDev) 59 60 { 60 61 return (msixGetMessageControl(pDev) & 0x3ff) + 1; 61 62 } 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 65 DECLINLINE(uint8_t *) msixGetPageOffset(PPDMPCIDEV pDev, uint32_t off) 66 { 67 return (uint8_t *)pDev->Int.s.CTX_SUFF(pMsixPage) + off; 68 } 69 70 DECLINLINE(MsixTableRecord *) msixGetVectorRecord(PPDMPCIDEV pDev, uint32_t iVector) 71 { 72 return (MsixTableRecord *)msixGetPageOffset(pDev, iVector * VBOX_MSIX_ENTRY_SIZE); 71 73 } 72 74 73 75 DECLINLINE(RTGCPHYS) msixGetMsiAddress(PPDMPCIDEV pDev, uint32_t iVector) 74 76 { 75 MsixTableRecord *pRec = msixGetVectorRecord(pDev, iVector);77 MsixTableRecord *pRec = msixGetVectorRecord(pDev, iVector); 76 78 return RT_MAKE_U64(pRec->u32MsgAddressLo & ~UINT32_C(0x3), pRec->u32MsgAddressHi); 77 79 } … … 87 89 } 88 90 89 DECLINLINE(uint8_t *)msixPendingByte(PPDMPCIDEV pDev, uint32_t iVector)91 DECLINLINE(uint8_t *) msixPendingByte(PPDMPCIDEV pDev, uint32_t iVector) 90 92 { 91 93 return msixGetPageOffset(pDev, pDev->Int.s.offMsixPba + iVector / 8); … … 136 138 } 137 139 138 PDMBOTHCBDECL(int ) msixR3MMIOWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void const *pv, unsigned cb)140 PDMBOTHCBDECL(int,) msixR3MMIOWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void const *pv, unsigned cb) 139 141 { 140 142 LogFlowFunc(("\n")); … … 244 246 return VINF_SUCCESS; 245 247 } 246 #endif 248 249 #endif /* IN_RING3 */ 247 250 248 251 bool MsixIsEnabled(PPDMPCIDEV pDev)
Note:
See TracChangeset
for help on using the changeset viewer.