Re: xen-swiotlb vs phys_to_dma

2020-10-07 Thread Stefano Stabellini
On Wed, 7 Oct 2020, Christoph Hellwig wrote: > On Tue, Oct 06, 2020 at 01:46:12PM -0700, Stefano Stabellini wrote: > > OK, this makes a lot of sense, and I like the patch because it makes the > > swiotlb interface clearer. > > > > Just one comment below. > > > > > > +phys_addr_t swiotlb_tbl_map_

Re: xen-swiotlb vs phys_to_dma

2020-10-06 Thread Christoph Hellwig
On Tue, Oct 06, 2020 at 01:46:12PM -0700, Stefano Stabellini wrote: > OK, this makes a lot of sense, and I like the patch because it makes the > swiotlb interface clearer. > > Just one comment below. > > > +phys_addr_t swiotlb_tbl_map_single(struct device *hwdev, phys_addr_t > > orig_addr, > >

Re: xen-swiotlb vs phys_to_dma

2020-10-06 Thread Stefano Stabellini
On Tue, 6 Oct 2020, Christoph Hellwig wrote: > On Fri, Oct 02, 2020 at 01:21:25PM -0700, Stefano Stabellini wrote: > > On Fri, 2 Oct 2020, Christoph Hellwig wrote: > > > Hi Stefano, > > > > > > I've looked over xen-swiotlb in linux-next, that is with your recent > > > changes to take dma offsets i

Re: xen-swiotlb vs phys_to_dma

2020-10-06 Thread Christoph Hellwig
On Fri, Oct 02, 2020 at 01:21:25PM -0700, Stefano Stabellini wrote: > On Fri, 2 Oct 2020, Christoph Hellwig wrote: > > Hi Stefano, > > > > I've looked over xen-swiotlb in linux-next, that is with your recent > > changes to take dma offsets into account. One thing that puzzles me > > is that xen_s

Re: xen-swiotlb vs phys_to_dma

2020-10-02 Thread Stefano Stabellini
On Fri, 2 Oct 2020, Christoph Hellwig wrote: > Hi Stefano, > > I've looked over xen-swiotlb in linux-next, that is with your recent > changes to take dma offsets into account. One thing that puzzles me > is that xen_swiotlb_map_page passes virt_to_phys(xen_io_tlb_start) as > the tbl_dma_addr argu

xen-swiotlb vs phys_to_dma

2020-10-02 Thread Christoph Hellwig
Hi Stefano, I've looked over xen-swiotlb in linux-next, that is with your recent changes to take dma offsets into account. One thing that puzzles me is that xen_swiotlb_map_page passes virt_to_phys(xen_io_tlb_start) as the tbl_dma_addr argument to swiotlb_tbl_map_single, despite the fact that the