Re: [PATCH] iommu/dma: Fix calculation overflow in __finalise_sg()

2019-07-01 Thread Nicolin Chen
Hi Robin, On Mon, Jul 01, 2019 at 01:39:55PM +0100, Robin Murphy wrote: > > > The max_len is a u32 type variable so the calculation on the > > > left hand of the last if-condition will potentially overflow > > > when a cur_len gets closer to UINT_MAX -- note that there're > > > drivers setting

Re: DMA-API attr - DMA_ATTR_NO_KERNEL_MAPPING

2019-07-01 Thread Pankaj Suryawanshi
On Mon, Jul 1, 2019 at 11:17 PM Pankaj Suryawanshi wrote: > > > > > On Mon, Jul 1, 2019 at 7:39 PM Robin Murphy wrote: >> >> On 28/06/2019 17:29, Pankaj Suryawanshi wrote: >> > On Wed, Jun 26, 2019 at 11:21 PM Christoph Hellwig >> > wrote: >> >> >> >> On Wed, Jun 26, 2019 at 10:12:45PM +0530,

Re: DMA-API attr - DMA_ATTR_NO_KERNEL_MAPPING

2019-07-01 Thread Pankaj Suryawanshi
On Mon, Jul 1, 2019 at 11:24 PM Robin Murphy wrote: > > On 01/07/2019 18:47, Pankaj Suryawanshi wrote: > >> If you want a kernel mapping, *don't* explicitly request not to have a > >> kernel mapping in the first place. It's that simple. > >> > > > > Do you mean do not use dma-api ? because if i

Is IOMMU a generic name for Intel VT-d and AMD IOV?

2019-07-01 Thread Turritopsis Dohrnii Teo En Ming
Good morning from Singapore, Is IOMMU a generic name for Intel VT-d and AMD IOV? Thank you. -BEGIN EMAIL SIGNATURE- The Gospel for all Targeted Individuals (TIs): [The New York Times] Microwave Weapons Are Prime Suspect in Ills of U.S. Embassy Workers Link:

Re: DMA-API attr - DMA_ATTR_NO_KERNEL_MAPPING

2019-07-01 Thread Robin Murphy
On 01/07/2019 18:47, Pankaj Suryawanshi wrote: If you want a kernel mapping, *don't* explicitly request not to have a kernel mapping in the first place. It's that simple. Do you mean do not use dma-api ? because if i used dma-api it will give you mapped virtual address. or i have to use

Re: DMA-API attr - DMA_ATTR_NO_KERNEL_MAPPING

2019-07-01 Thread Pankaj Suryawanshi
[CC: pankaj.suryawan...@einfochips.com] On Mon, Jul 1, 2019 at 11:17 PM Pankaj Suryawanshi < pankajssuryawan...@gmail.com> wrote: > > > > > On Mon, Jul 1, 2019 at 7:39 PM Robin Murphy wrote: >> >> On 28/06/2019 17:29, Pankaj Suryawanshi wrote: >> > On Wed, Jun 26, 2019 at 11:21 PM Christoph

Re: DMA-API attr - DMA_ATTR_NO_KERNEL_MAPPING

2019-07-01 Thread Pankaj Suryawanshi
On Mon, Jul 1, 2019 at 7:39 PM Robin Murphy wrote: > On 28/06/2019 17:29, Pankaj Suryawanshi wrote: > > On Wed, Jun 26, 2019 at 11:21 PM Christoph Hellwig > wrote: > >> > >> On Wed, Jun 26, 2019 at 10:12:45PM +0530, Pankaj Suryawanshi wrote: > >>> [CC: linux kernel and Vlastimil Babka] > >> >

Re: [PATCH v3 8/9] iommu/arm-smmu-v3: Add support for PCI ATS

2019-07-01 Thread Robin Murphy
Hi Jean-Philippe, I realise it's a bit late for a "review", but digging up the original patch seemed as good a place as any to raise this... On 17/04/2019 19:24, Jean-Philippe Brucker wrote: [...] @@ -1740,6 +1906,9 @@ static void arm_smmu_detach_dev(struct arm_smmu_master *master)

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-07-01 Thread Michael S. Tsirkin
On Thu, Jun 27, 2019 at 10:58:40PM -0300, Thiago Jung Bauermann wrote: > > Michael S. Tsirkin writes: > > > On Mon, Jun 03, 2019 at 10:13:59PM -0300, Thiago Jung Bauermann wrote: > >> > >> > >> Michael S. Tsirkin writes: > >> > >> > On Wed, Apr 17, 2019 at 06:42:00PM -0300, Thiago Jung

Re: DMA-API attr - DMA_ATTR_NO_KERNEL_MAPPING

2019-07-01 Thread Robin Murphy
On 28/06/2019 17:29, Pankaj Suryawanshi wrote: On Wed, Jun 26, 2019 at 11:21 PM Christoph Hellwig wrote: On Wed, Jun 26, 2019 at 10:12:45PM +0530, Pankaj Suryawanshi wrote: [CC: linux kernel and Vlastimil Babka] The right list is the list for the DMA mapping subsystem, which is

Re: [PATCH] iommu/dma: Fix calculation overflow in __finalise_sg()

2019-07-01 Thread Robin Murphy
On 01/07/2019 13:21, Joerg Roedel wrote: On Fri, Jun 21, 2019 at 09:38:14PM -0700, Nicolin Chen wrote: The max_len is a u32 type variable so the calculation on the left hand of the last if-condition will potentially overflow when a cur_len gets closer to UINT_MAX -- note that there're drivers

Re: [PATCH] iommu: io-pgtable: Support non-coherent page tables

2019-07-01 Thread Robin Murphy
On 25/06/2019 12:56, Will Deacon wrote: On Mon, Jun 24, 2019 at 12:53:49PM +0100, Will Deacon wrote: On Tue, Jun 18, 2019 at 06:39:33PM +0100, Will Deacon wrote: On Wed, May 15, 2019 at 04:32:34PM -0700, Bjorn Andersson wrote: Describe the memory related to page table walks as non-cachable

Re: [PATCH] irq_remapping/vt-d: cleanup unused variable

2019-07-01 Thread Joerg Roedel
On Mon, Jun 24, 2019 at 01:17:42PM -0700, Jacob Pan wrote: > drivers/iommu/intel_irq_remapping.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Applied, thanks. ___ iommu mailing list iommu@lists.linux-foundation.org

Re: [PATCH] iommu/dma: Fix calculation overflow in __finalise_sg()

2019-07-01 Thread Joerg Roedel
On Fri, Jun 21, 2019 at 09:38:14PM -0700, Nicolin Chen wrote: > The max_len is a u32 type variable so the calculation on the > left hand of the last if-condition will potentially overflow > when a cur_len gets closer to UINT_MAX -- note that there're > drivers setting max_seg_size to UINT_MAX: >

Re: [PATCH v4 0/5] iommu/amd: Convert the AMD iommu driver to the dma-iommu api

2019-07-01 Thread Joerg Roedel
Hi, On Sun, Jun 23, 2019 at 11:19:45PM -0700, Christoph Hellwig wrote: > Joerg, any chance you could review this? Toms patches to convert the > AMD and Intel IOMMU drivers to the dma-iommu code are going to make my > life in DMA land significantly easier, so I have a vested interest > in

Re: [PATCH v3] iommu/amd: Flush not present cache in iommu_map_page

2019-07-01 Thread Joerg Roedel
On Thu, Jun 13, 2019 at 11:04:55PM +0100, Tom Murphy wrote: > drivers/iommu/amd_iommu.c | 20 > 1 file changed, 16 insertions(+), 4 deletions(-) Applied, thanks.

Re: [PATCH 0/3] handle init errors more gracefully in amd_iommu

2019-07-01 Thread Joerg Roedel
Hi Kevin, On Wed, Jun 12, 2019 at 02:52:01PM -0700, Kevin Mitchell wrote: > I have tested this series on a variety of AMD CPUs with firmware > exhibiting the issue. I have additionally tested on platforms where the > firmware has been fixed. I tried both with and without amd_iommu=off. I > have

Re: [GIT PULL] iommu/arm-smmu: Updates for 5.3

2019-07-01 Thread Joerg Roedel
On Fri, Jun 28, 2019 at 12:04:40PM +0100, Will Deacon wrote: > git://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git > for-joerg/arm-smmu/updates Pulled, thanks Will. ___ iommu mailing list iommu@lists.linux-foundation.org

Re: [PATCH 1/2] m68k: use the generic dma coherent remap allocator

2019-07-01 Thread Geert Uytterhoeven
Hi Christoph, On Tue, Jun 25, 2019 at 11:01 AM Christoph Hellwig wrote: > This switche to using common code for the DMA allocations, including switches m68k > potential use of the CMA allocator if configure. Also add a configured > comment where the existing behavior seems to be lacking. >

Re: Device specific pass through in host systems - discuss user interface

2019-07-01 Thread jroe...@suse.de
On Tue, Jun 11, 2019 at 05:27:15PM +, Prakhya, Sai Praneeth wrote: > 1. Since we already have "type" file, which is "read-only", we could make it > R/W. > > The present value shows the existing type of default domain. > If user wants to change it (Eg: from DMA to IDENTITY or vice versa), he

Re: use exact allocation for dma coherent memory

2019-07-01 Thread Christoph Hellwig
On Fri, Jun 14, 2019 at 03:47:10PM +0200, Christoph Hellwig wrote: > Switching to a slightly cleaned up alloc_pages_exact is pretty easy, > but it turns out that because we didn't filter valid gfp_t flags > on the DMA allocator, a bunch of drivers were passing __GFP_COMP > to it, which is rather

Re: [RFC PATCH v7 0/5] treewide: improve R-Car SDHI performance

2019-07-01 Thread Christoph Hellwig
Any comments from the block, iommu and mmc maintainers? I'd be happy to queue this up in the dma-mapping tree, but I'll need some ACKs for that fast. Alternatively I can just queue up the DMA API bits, leaving the rest for the next merge window, but would drag things out far too long IMHO.

RE: Re: CMA in AMD IOMMU driver

2019-07-01 Thread Sathyavathi M
Hi Christoph,   Im able to reserve CMA memory during boot up in AMD. But how can i use/allocate that memory in my driver.   I dont know if this is the right forum to ask such question. Any help will be appriciated.   Thanks and regards, Sathya     - Original Message