Re: [PATCH 02/13] mm/rmap: update to new mmu_notifier semantic

2017-08-30 Thread Jerome Glisse
On Wed, Aug 30, 2017 at 04:25:54PM -0700, Nadav Amit wrote: > [cc’ing IOMMU people, which for some reason are not cc’d] > > Andrea Arcangeli wrote: > > > On Wed, Aug 30, 2017 at 11:00:32AM -0700, Nadav Amit wrote: > >> It is not trivial to flush TLBs (primary or secondary) without holding the >

Re: [PATCH 02/13] mm/rmap: update to new mmu_notifier semantic

2017-08-30 Thread Nadav Amit
[cc’ing IOMMU people, which for some reason are not cc’d] Andrea Arcangeli wrote: > On Wed, Aug 30, 2017 at 11:00:32AM -0700, Nadav Amit wrote: >> It is not trivial to flush TLBs (primary or secondary) without holding the >> page-table lock, and as we recently encountered this resulted in severa

Re: [PATCH v3] iommu: Prevent VMD child devices from being remapping targets

2017-08-30 Thread Bjorn Helgaas
On Wed, Aug 30, 2017 at 03:05:59PM -0600, Jon Derrick wrote: > VMD child devices must use the VMD endpoint's ID as the requester. > Because of this, there needs to be a way to link the parent VMD > endpoint's iommu group and associated mappings to the VMD child devices > such that attaching and det

[PATCH v3] iommu: Prevent VMD child devices from being remapping targets

2017-08-30 Thread Jon Derrick
VMD child devices must use the VMD endpoint's ID as the requester. Because of this, there needs to be a way to link the parent VMD endpoint's iommu group and associated mappings to the VMD child devices such that attaching and detaching child devices modify the endpoint's mappings, while preventing

Re: [PATCH v2 0/4] VMD fixups

2017-08-30 Thread Bjorn Helgaas
[+cc Joerg] On Thu, Aug 17, 2017 at 12:10:10PM -0600, Jon Derrick wrote: > Mostly just cleanup in this revision, eg, trying to limit scope of vmd code to > x86 > > Previous: > https://patchwork.kernel.org/patch/9886095/ > https://patchwork.kernel.org/patch/9886097/ > https://patchwork.kernel.org/

Re: [PATCH 1/2] iommu/tegra: Add support for struct iommu_device

2017-08-30 Thread Jon Hunter
On 30/08/17 16:30, Joerg Roedel wrote: > Hi Jon, > > On Wed, Aug 30, 2017 at 03:22:05PM +0100, Jon Hunter wrote: >> Yes I can confirm that this fixes the crash. I assume that you will fix >> the error path for bus_set_iommu() above as I believe now it needs to >> call iommu_device_sysfs_remove().

Re: [PATCH] intel-iommu: Don't be too aggressive when clearing one context entry

2017-08-30 Thread Jacob Pan
On Mon, 28 Aug 2017 16:16:29 +0200 Filippo Sironi via iommu wrote: > Previously, we were invalidating context cache and IOTLB globally when > clearing one context entry. This is a tad too aggressive. > Invalidate the context cache and IOTLB for the interested device only. > > Signed-off-by: Fil

Re: [PATCH 00/13] mmu_notifier kill invalidate_page callback

2017-08-30 Thread Adam Borowski
On Tue, Aug 29, 2017 at 08:56:15PM -0400, Jerome Glisse wrote: > I will wait for people to test and for result of my own test before > reposting if need be, otherwise i will post as separate patch. > > > But from a _very_ quick read-through this looks fine. But it obviously > > needs testing. > >

Re: [PATCH 1/2] iommu/tegra: Add support for struct iommu_device

2017-08-30 Thread Joerg Roedel
Hi Jon, On Wed, Aug 30, 2017 at 03:22:05PM +0100, Jon Hunter wrote: > Yes I can confirm that this fixes the crash. I assume that you will fix > the error path for bus_set_iommu() above as I believe now it needs to > call iommu_device_sysfs_remove(). Thanks for testing the patch. I updated the err

Re: [PATCH 1/2] iommu/tegra: Add support for struct iommu_device

2017-08-30 Thread Jon Hunter
Hi Joerg, On 30/08/17 13:09, Joerg Roedel wrote: > Hi Jon, > > On Wed, Aug 30, 2017 at 12:04:38PM +0100, Jon Hunter wrote: >> With next-20170829 I am seeing several Tegra boards crashing [0][1] on >> boot in tegra_smmu_probe() and the bisect is point to this commit. Looks >> like there maybe a se

Re: [PATCH] intel-iommu: Don't be too aggressive when clearing one context entry

2017-08-30 Thread Joerg Roedel
Hi Filippo, please change the subject to: iommu/vt-d: Don't be too aggressive when clearing one context entry to follow the convention used in the iommu-tree. Another comment below. On Mon, Aug 28, 2017 at 04:16:29PM +0200, Filippo Sironi wrote: > static void domain_context_clear_one(s

Re: [PATCH 3/3] iommu: s390: constify iommu_ops

2017-08-30 Thread Joerg Roedel
On Mon, Aug 28, 2017 at 05:42:50PM +0530, Arvind Yadav wrote: > iommu_ops are not supposed to change at runtime. > Functions 'bus_set_iommu' working with const iommu_ops provided > by . So mark the non-const structs as const. > > Signed-off-by: Arvind Yadav > --- > drivers/iommu/s390-iommu.c | 2

Re: [PATCH 2/3] iommu: mtk: constify iommu_ops

2017-08-30 Thread Joerg Roedel
On Mon, Aug 28, 2017 at 05:42:26PM +0530, Arvind Yadav wrote: > iommu_ops are not supposed to change at runtime. > Functions 'iommu_device_set_ops' and 'bus_set_iommu' working with > const iommu_ops provided by . So mark the non-const > structs as const. > > Signed-off-by: Arvind Yadav > --- > d

Re: [PATCH 1/3] iommu: exynos: constify iommu_ops

2017-08-30 Thread Joerg Roedel
On Mon, Aug 28, 2017 at 05:42:05PM +0530, Arvind Yadav wrote: > iommu_ops are not supposed to change at runtime. > Functions 'iommu_device_set_ops' and 'bus_set_iommu' working with > const iommu_ops provided by . So mark the non-const > structs as const. > > Signed-off-by: Arvind Yadav > --- > d

Re: [PATCH] iommu/ipmmu-vmsa: make ipmmu_gather_ops const

2017-08-30 Thread Joerg Roedel
On Mon, Aug 28, 2017 at 11:47:27PM +0530, Bhumika Goyal wrote: > Make these const as they are not modified anywhere. > > Signed-off-by: Bhumika Goyal > --- > drivers/iommu/ipmmu-vmsa.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied, thanks.

Re: [PATCH v2] iommu/ipmmu-vmsa: Rereserving a free context before setting up a pagetable

2017-08-30 Thread Joerg Roedel
On Wed, Aug 23, 2017 at 05:31:42PM +0300, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko > > Reserving a free context is both quicker and more likely to fail > (due to limited hardware resources) than setting up a pagetable. > What is more the pagetable init/cleanup code could require >

Re: [PATCH v3 0/4] Optimise 64-bit IOVA allocations

2017-08-30 Thread Joerg Roedel
Hey Robin, Nate, On Fri, Aug 25, 2017 at 02:52:41PM -0400, Nate Watterson wrote: > Tested-by: Nate Watterson If nobody has objections here anymore I would merge these patches when v4.14-rc1 is released. Given that these changes are a bit more intrusive and the code is shared between a couple of

Re: [PATCH 1/2] iommu/tegra: Add support for struct iommu_device

2017-08-30 Thread Joerg Roedel
Hi Jon, On Wed, Aug 30, 2017 at 12:04:38PM +0100, Jon Hunter wrote: > With next-20170829 I am seeing several Tegra boards crashing [0][1] on > boot in tegra_smmu_probe() and the bisect is point to this commit. Looks > like there maybe a sequence problem between calls to bus_set_iommu() and > iommu

Re: [PATCH 1/2] iommu/tegra: Add support for struct iommu_device

2017-08-30 Thread Jon Hunter
On 09/08/17 23:29, Joerg Roedel wrote: > From: Joerg Roedel > > Add a struct iommu_device to each tegra-smmu and register it > with the iommu-core. Also link devices added to the driver > to their respective hardware iommus. > > Signed-off-by: Joerg Roedel > --- > drivers/iommu/tegra-smmu.c |

Re: [PATCH 00/13] mmu_notifier kill invalidate_page callback

2017-08-30 Thread Mike Galbraith
On Tue, 2017-08-29 at 20:56 -0400, Jerome Glisse wrote: > On Tue, Aug 29, 2017 at 05:11:24PM -0700, Linus Torvalds wrote: > > > People - *especially* the people who saw issues under KVM - can you > > try out Jérôme's patch-series? I aded some people to the cc, the full > > series is on lkml. Jérôm