Re: [PATCH v2] dma-mapping: use vmalloc_to_page for vmalloc addresses

2021-07-21 Thread Roman Skakun
> Fine with. I've queued up the modified patch. Good. Thanks! > > On Sat, Jul 17, 2021 at 11:39:21AM +0300, Roman Skakun wrote: > > > We can merge this patch and create a new one for > > > xen_swiotlb_free_coherent() later. > > > Yeah, no worries, I didn't know that exposing

Re: [PATCH v2] dma-mapping: use vmalloc_to_page for vmalloc addresses

2021-07-19 Thread Christoph Hellwig
On Sat, Jul 17, 2021 at 11:39:21AM +0300, Roman Skakun wrote: > > We can merge this patch and create a new one for > > xen_swiotlb_free_coherent() later. > > Yeah, no worries, I didn't know that exposing dma_common_vaddr_to_page > > was problematic. > > > > This patch is fine by me. > > Good. I'm

Re: [PATCH v2] dma-mapping: use vmalloc_to_page for vmalloc addresses

2021-07-17 Thread Roman Skakun
> We can merge this patch and create a new one for > xen_swiotlb_free_coherent() later. > Yeah, no worries, I didn't know that exposing dma_common_vaddr_to_page > was problematic. > > This patch is fine by me. Good. I'm agreed too. Waiting for Christoph. пт, 16 июл. 2021 г. в 18:29, Stefano

Re: [PATCH v2] dma-mapping: use vmalloc_to_page for vmalloc addresses

2021-07-16 Thread Stefano Stabellini
On Fri, 16 Jul 2021, Roman Skakun wrote: > > Technically this looks good. But given that exposing a helper > > that does either vmalloc_to_page or virt_to_page is one of the > > never ending MM discussions I don't want to get into that discussion > > and just keep it local in the DMA code. > > >

Re: [PATCH v2] dma-mapping: use vmalloc_to_page for vmalloc addresses

2021-07-16 Thread Roman Skakun
> Technically this looks good. But given that exposing a helper > that does either vmalloc_to_page or virt_to_page is one of the > never ending MM discussions I don't want to get into that discussion > and just keep it local in the DMA code. > > Are you fine with me applying this version? Looks

Re: [PATCH v2] dma-mapping: use vmalloc_to_page for vmalloc addresses

2021-07-16 Thread Christoph Hellwig
Technically this looks good. But given that exposing a helper that does either vmalloc_to_page or virt_to_page is one of the never ending MM discussions I don't want to get into that discussion and just keep it local in the DMA code. Are you fine with me applying this version? --- >From

[PATCH v2] dma-mapping: use vmalloc_to_page for vmalloc addresses

2021-07-16 Thread Roman Skakun
From: Roman Skakun This commit is dedicated to fix incorrect conversion from cpu_addr to page address in cases when we get virtual address which allocated in the vmalloc range. As the result, virt_to_page() cannot convert this address properly and return incorrect page address. Need to detect

Re: [PATCH v2] dma-mapping: use vmalloc_to_page for vmalloc addresses

2021-07-15 Thread Christoph Hellwig
On Thu, Jul 15, 2021 at 12:58:53PM -0400, Boris Ostrovsky wrote: > > On 7/15/21 3:39 AM, Roman Skakun wrote: > >> This looks like it wasn't picked up? Should it go in rc1? > > Hi, Konrad! > > > > This looks like an unambiguous bug, and should be in rc1. > > > Looks like you didn't copy

Re: [PATCH v2] dma-mapping: use vmalloc_to_page for vmalloc addresses

2021-07-15 Thread Boris Ostrovsky
On 7/15/21 3:39 AM, Roman Skakun wrote: >> This looks like it wasn't picked up? Should it go in rc1? > Hi, Konrad! > > This looks like an unambiguous bug, and should be in rc1. Looks like you didn't copy Christoph which could be part of the problem. Adding him. -boris > > Cheers! > > ср,

Re: [PATCH v2] dma-mapping: use vmalloc_to_page for vmalloc addresses

2021-07-15 Thread Roman Skakun
> This looks like it wasn't picked up? Should it go in rc1? Hi, Konrad! This looks like an unambiguous bug, and should be in rc1. Cheers! ср, 14 июл. 2021 г. в 03:15, Konrad Rzeszutek Wilk : > > On Tue, Jun 22, 2021 at 04:34:14PM +0300, Roman Skakun wrote: > > This commit is dedicated to fix

Re: [PATCH v2] dma-mapping: use vmalloc_to_page for vmalloc addresses

2021-07-15 Thread Roman Skakun
Hi, Stefano! > We have the same thing in xen_swiotlb_free_coherent. Can we find a way > to call cpu_addr_to_page() from xen_swiotlb_free_coherent? > Maybe we can make cpu_addr_to_page non-static? Yes, right, If we want to reuse this helper instead of the same code block in

Re: [PATCH v2] dma-mapping: use vmalloc_to_page for vmalloc addresses

2021-07-13 Thread Stefano Stabellini
On Tue, 22 Jun 2021, Roman Skakun wrote: > This commit is dedicated to fix incorrect conversion from > cpu_addr to page address in cases when we get virtual > address which allocated in the vmalloc range. > As the result, virt_to_page() cannot convert this address > properly and return incorrect

Re: [PATCH v2] dma-mapping: use vmalloc_to_page for vmalloc addresses

2021-07-13 Thread Konrad Rzeszutek Wilk
On Tue, Jun 22, 2021 at 04:34:14PM +0300, Roman Skakun wrote: > This commit is dedicated to fix incorrect conversion from > cpu_addr to page address in cases when we get virtual > address which allocated in the vmalloc range. > As the result, virt_to_page() cannot convert this address > properly

[PATCH v2] dma-mapping: use vmalloc_to_page for vmalloc addresses

2021-06-22 Thread Roman Skakun
This commit is dedicated to fix incorrect conversion from cpu_addr to page address in cases when we get virtual address which allocated in the vmalloc range. As the result, virt_to_page() cannot convert this address properly and return incorrect page address. Need to detect such cases and obtains