[PATCH v2] iommu/io-pgtable-arm: Fix table descriptor paddr formatting

2021-11-19 Thread Hector Martin
Table descriptors were being installed without properly formatting the address using paddr_to_iopte, which does not match up with the iopte_deref in __arm_lpae_map. This is incorrect for the LPAE pte format, as it does not handle the high bits properly. This was found on Apple T6000 DARTs, which

Re: [PATCH 01/11] iommu: Add device dma ownership set/release interfaces

2021-11-19 Thread Jason Gunthorpe via iommu
On Fri, Nov 19, 2021 at 04:06:12PM +0100, Jörg Rödel wrote: > This change came to be because the iommu_attach/detach_device() > interface doesn't fit well into a world with iommu-groups. Devices > within a group are by definition not isolated between each other, so > they must all be in the same

Re: [RFC PATCH 0/3] Use pageblock_order for cma and alloc_contig_range alignment.

2021-11-19 Thread Zi Yan via iommu
On 19 Nov 2021, at 7:33, Vlastimil Babka wrote: > On 11/15/21 20:37, Zi Yan wrote: >> From: Zi Yan >> >> Hi David, >> >> You suggested to make alloc_contig_range() deal with pageblock_order instead >> of >> MAX_ORDER - 1 and get rid of MAX_ORDER - 1 dependency in virtio_mem[1]. This >> patchset

Re: [PATCH 01/11] iommu: Add device dma ownership set/release interfaces

2021-11-19 Thread Jörg Rödel
On Fri, Nov 19, 2021 at 07:14:10PM +0800, Lu Baolu wrote: > The singleton group requirement for iommu_attach/detach_device() was > added by below commit: > > commit 426a273834eae65abcfc7132a21a85b3151e0bce > Author: Joerg Roedel > Date: Thu May 28 18:41:30 2015 +0200 > > iommu: Limit

Re: [PATCH 3/5] hyperv/IOMMU: Enable swiotlb bounce buffer for Isolation VM

2021-11-19 Thread Tianyu Lan
On 11/17/2021 10:00 PM, Tianyu Lan wrote: On 11/17/2021 6:01 PM, Christoph Hellwig wrote: This doesn't really have much to do with normal DMA mapping, so why does this direct through the dma ops? According to the previous discussion, dma_alloc_noncontigous() and dma_vmap_noncontiguous() may

Re: [PATCH 01/11] iommu: Add device dma ownership set/release interfaces

2021-11-19 Thread Jason Gunthorpe via iommu
On Fri, Nov 19, 2021 at 05:44:35AM +, Tian, Kevin wrote: > Well, the difference is just in literal. I don't know the background > why the existing iommu_attach_device() users want to do it this > way. But given the condition in iommu_attach_device() it could > in theory imply some unknown

Re: [RFC PATCH 0/3] Use pageblock_order for cma and alloc_contig_range alignment.

2021-11-19 Thread Vlastimil Babka
On 11/15/21 20:37, Zi Yan wrote: > From: Zi Yan > > Hi David, > > You suggested to make alloc_contig_range() deal with pageblock_order instead > of > MAX_ORDER - 1 and get rid of MAX_ORDER - 1 dependency in virtio_mem[1]. This > patchset is my attempt to achieve that. Please take a look and

Re: [PATCH 01/11] iommu: Add device dma ownership set/release interfaces

2021-11-19 Thread Lu Baolu
On 2021/11/19 13:44, Tian, Kevin wrote: From: Jason Gunthorpe Sent: Thursday, November 18, 2021 9:33 PM In concept a singleton group is different from a multi-devices group which has only one device bound to driver... Really? Why? I don't see it that way.. A singleton group is just a