[Patch v2 06/10] iommu: using dev_get_drvdata directly

2019-07-03 Thread Fuqian Huang
Several drivers cast a struct device pointer to a struct platform_device pointer only to then call platform_get_drvdata(). To improve readability, these constructs can be simplified by using dev_get_drvdata() directly. Signed-off-by: Fuqian Huang --- Changes in v2: - Make the commit message

Re: [PATCH v7 2/6] vfio/type1: Check reserve region conflict and update iova list

2019-07-03 Thread Alex Williamson
On Wed, 26 Jun 2019 16:12:44 +0100 Shameer Kolothum wrote: > This retrieves the reserved regions associated with dev group and > checks for conflicts with any existing dma mappings. Also update > the iova list excluding the reserved regions. > > Reserved regions with type

Re: [PATCH v7 3/6] vfio/type1: Update iova list on detach

2019-07-03 Thread Alex Williamson
On Wed, 26 Jun 2019 16:12:45 +0100 Shameer Kolothum wrote: > Get a copy of iova list on _group_detach and try to update the list. > On success replace the current one with the copy. Leave the list as > it is if update fails. > > Signed-off-by: Shameer Kolothum > --- >

Re: [PATCH v7 1/6] vfio/type1: Introduce iova list and add iommu aperture validity check

2019-07-03 Thread Alex Williamson
Welcome back Shameer ;) On Wed, 26 Jun 2019 16:12:43 +0100 Shameer Kolothum wrote: > This introduces an iova list that is valid for dma mappings. Make > sure the new iommu aperture window doesn't conflict with the current > one or with any existing dma mappings during attach. > >

Re: [PATCH] iommu/arm-smmu-v3: Invalidate ATC when detaching a device

2019-07-03 Thread Will Deacon
On Wed, Jul 03, 2019 at 12:19:20PM +0100, Jean-Philippe Brucker wrote: > We make the invalid assumption in arm_smmu_detach_dev() that the ATC is > clear after calling pci_disable_ats(). For one thing, only enabling the > PCIe ATS capability constitutes an implicit invalidation event, so the >

Re: [PATCH 1/2] iommu: add support for drivers that manage iommu explicitly

2019-07-03 Thread Rob Clark
On Wed, Jul 3, 2019 at 5:42 AM Robin Murphy wrote: > > On 02/07/2019 21:26, Rob Clark wrote: > > From: Rob Clark > > > > Avoid attaching any non-driver managed domain if the driver indicates > > that it manages the iommu directly. > > > > This solves a couple problems that drm/msm + arm-smmu has

Re: [PATCH] MIPS: only select ARCH_HAS_UNCACHED_SEGMENT for non-coherent platforms

2019-07-03 Thread Paul Burton
Hi Christoph, On Sun, Jun 30, 2019 at 06:48:05PM +0200, Christoph Hellwig wrote: > While mips might architecturally have the uncached segment all the time, > the infrastructure to use it is only need on platforms where DMA is > at least partially incoherent. Only select it for those

Re: [PATCH 1/2] iommu: add support for drivers that manage iommu explicitly

2019-07-03 Thread Robin Murphy
On 02/07/2019 21:26, Rob Clark wrote: From: Rob Clark Avoid attaching any non-driver managed domain if the driver indicates that it manages the iommu directly. This solves a couple problems that drm/msm + arm-smmu has with the iommu framework: 1) In some cases the bootloader takes the iommu

Re: [PATCH 5/7 v2] MIPS: use the generic uncached segment support in dma-direct

2019-07-03 Thread Christoph Hellwig
On Wed, Jul 03, 2019 at 10:54:05AM +0200, Arnd Bergmann wrote: > I think this is the cause of some kernelci failures in current > linux-next builds: Yes, Guenther reported this already and I sent a fix. I've been waiting for an ACK from the mips maintaines, but given the breakage I might as well

[PATCH] iommu/arm-smmu-v3: Invalidate ATC when detaching a device

2019-07-03 Thread Jean-Philippe Brucker
We make the invalid assumption in arm_smmu_detach_dev() that the ATC is clear after calling pci_disable_ats(). For one thing, only enabling the PCIe ATS capability constitutes an implicit invalidation event, so the comment was wrong. More importantly, the ATS capability isn't necessarily disabled

Re: [PATCH 5/7 v2] MIPS: use the generic uncached segment support in dma-direct

2019-07-03 Thread Arnd Bergmann
On Mon, Jun 3, 2019 at 8:50 AM Christoph Hellwig wrote: > > On Wed, May 01, 2019 at 05:13:57PM +, Paul Burton wrote: > > Hi Christoph, > > > > On Wed, May 01, 2019 at 03:13:39PM +0200, Christoph Hellwig wrote: > > > Stop providing our arch alloc/free hooks and just expose the segment > > >