On Tue, Sep 29, 2020 at 07:15:21PM +0100, Christoph Hellwig wrote: > On Tue, Sep 29, 2020 at 03:13:25PM -0300, Jason Gunthorpe wrote: > > My eventual hope is to be able to send this DMA page list to the HW > > without having to parse and copy it like is done today. We already > > have it in a linear array that can be DMA'd from. > > > > However, the HW knows 0 means need-fault (the flag bits are zero), it > > doesn't know what to do with DMA_MAPPING_ERROR.. > > I think you are falling into the same traps as the original hmm > code. The above might be true for mlx5 hardware, but this is generic > infrastructure. Making any assumptions about being able to directly > pass it on to hardware is just futile. Nevermind such pesky things > as endianess conversions. I was thinking to avoid that - the DMA related code would be pulled into the driver, and the core code would just do the hmm_range_fault() for the umem. The driver should be the owner of the DMA list and it should be kept in the driver specific format. Jason