On Thu, May 23, 2019 at 10:06:28AM +0000, Koenig, Christian wrote: > Ok, we certainly don't have a system which exercise this user case. > Could ask around if we have an ARM SOC with that properties somewhere. > > But asking the other way around: Where is the right place to start > fixing all this? dma_map_resource()? That is the the big gorrilla in the room. The offset applies to the device whos BARs/resources we map. The current dma_map_resource API does not even have the right information. So I think we need to enhance the API to pass a second struct device and we could fix it there and then in the next steps add a map_sg version of dma_map_resource and eventually also convert the PCIe P2P map_sg over to that.