Re: [PATCH v2 10/11] xen/arm: introduce phys/dma translations in xen_dma_sync_for_*

2020-06-09 Thread Stefano Stabellini
On Mon, 8 Jun 2020, Christoph Hellwig wrote: > On Mon, Jun 08, 2020 at 10:38:02PM -0700, Christoph Hellwig wrote: > > On Mon, Jun 08, 2020 at 05:38:28PM -0700, Stefano Stabellini wrote: > > > Yeah, the pfn_valid check is a bit weird by definition because we are > > > using it to understand whether

Re: [PATCH v2 10/11] xen/arm: introduce phys/dma translations in xen_dma_sync_for_*

2020-06-08 Thread Christoph Hellwig
On Mon, Jun 08, 2020 at 10:38:02PM -0700, Christoph Hellwig wrote: > On Mon, Jun 08, 2020 at 05:38:28PM -0700, Stefano Stabellini wrote: > > Yeah, the pfn_valid check is a bit weird by definition because we are > > using it to understand whether the address belong to us or to another > > VM. To do

Re: [PATCH v2 10/11] xen/arm: introduce phys/dma translations in xen_dma_sync_for_*

2020-06-08 Thread Christoph Hellwig
On Mon, Jun 08, 2020 at 05:38:28PM -0700, Stefano Stabellini wrote: > Yeah, the pfn_valid check is a bit weird by definition because we are > using it to understand whether the address belong to us or to another > VM. To do the pfn_valid check we need to translate the dma address into > something t

Re: [PATCH v2 10/11] xen/arm: introduce phys/dma translations in xen_dma_sync_for_*

2020-06-08 Thread Stefano Stabellini
On Mon, 8 Jun 2020, Christoph Hellwig wrote: > On Wed, Jun 03, 2020 at 03:22:46PM -0700, Stefano Stabellini wrote: > > From: Stefano Stabellini > > > > xen_dma_sync_for_cpu, xen_dma_sync_for_device, xen_arch_need_swiotlb are > > getting called passing dma addresses. On some platforms dma addresse

Re: [PATCH v2 10/11] xen/arm: introduce phys/dma translations in xen_dma_sync_for_*

2020-06-08 Thread Christoph Hellwig
On Wed, Jun 03, 2020 at 03:22:46PM -0700, Stefano Stabellini wrote: > From: Stefano Stabellini > > xen_dma_sync_for_cpu, xen_dma_sync_for_device, xen_arch_need_swiotlb are > getting called passing dma addresses. On some platforms dma addresses > could be different from physical addresses. Before

[PATCH v2 10/11] xen/arm: introduce phys/dma translations in xen_dma_sync_for_*

2020-06-03 Thread Stefano Stabellini
From: Stefano Stabellini xen_dma_sync_for_cpu, xen_dma_sync_for_device, xen_arch_need_swiotlb are getting called passing dma addresses. On some platforms dma addresses could be different from physical addresses. Before doing any operations on these addresses we need to convert them back to physic