On 19/04/17 01:31 PM, Jason Gunthorpe wrote: > Try it with VT-D turned on. It shouldn't work or there is a notable > security hole in your platform.. Ah, ok. >>> const struct dma_map_ops *comp_ops = get_dma_ops(completer); >>> const struct dma_map_ops *init_ops = get_dma_ops(initiator); >> >> So, in this case, what device does the completer point to? The PCI >> device or a more specific GPU device? If it's the former, who's >> responsible for setting the new dma_ops? Typically the dma_ops are arch >> specific but now you'd be adding ones that are tied to hmm or the gpu. > > Donno, that is for GPU folks to figure out :) > > But.. it could point to a GPU and the GPU struct device could have a > proxy dma_ops like Dan pointed out. Seems a bit awkward to me that in order for the intended use case, you have to proxy the dma_ops. I'd probably still suggest throwing a couple ops for things like this in the dev_pagemap. >> It appears to me like it's calculating the DMA address, and the check is >> just a side requirement. It reads as though it's only doing the check. > > pci_p2p_same_segment_get_pa() then? Ok, I think that's a bit clearer. Logan -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html