Re: [PATCH 2/2] swiotlb-xen: override common mmap and get_sgtable dma ops

From: Christoph Hellwig
Date: Wed Jun 16 2021 - 10:21:53 EST


On Wed, Jun 16, 2021 at 10:12:55AM -0400, Boris Ostrovsky wrote:
> I wonder now whether we could avoid code duplication between here and dma_common_mmap()/dma_common_get_sgtable() and use your helper there.
>
>
> Christoph, would that work?  I.e. something like

You should not duplicate the code at all, and just make the common
helpers work with vmalloc addresses.