[Openib-windows] [RFC] Async kernel verbs: Memory Registration

Fab Tillier ftillier at silverstorm.com
Tue Sep 20 10:31:45 PDT 2005


> From: Tillier, Fabian
> Sent: Tuesday, September 20, 2005 10:12 AM
> 
> IbRegScatterGatherMr: Registers a SCATTER_GATHER_LIST, which are used by
> DMA-enabled kernel drivers.  NDIS and the StorPort port drivers provide these
> to their miniports.  They are also available through the DMA_OPERATIONS
> structure for a DMA_ADAPTER (IoGetDmaAdapter).  This facilitates physical
> registration by removing the need to convert OS-provided SGLs into an
> intermediate format.
> 
> IbGetDmaMr: Returns a MR representing all of physical memory.

Note that neither of the physical registration calls allow the user to specify
an I/O virtual address.  For IbGetDmaMr, the MR maps all of memory so IOVAs
*are* bus relative physical addresses.  For IbRegScatterGatherMr, the I/O
virtual address is 0-based, aligned down to the page boundary of the first
element in the list.  So a SGL with a first entry offset into a page by X bytes
would have IOVA of zero X bytes before the region starts (aligned with the lower
bound of the first page).  DMA to the first byte in the region would use IOVA of
X.  This does not prevent the HCA from enforcing byte-granularity protection, as
it could treat any access to IOVA < X as a protection error.

Does anyone see any issues with this?

Thanks,

- Fab




More information about the ofw mailing list