From mboxrd@z Thu Jan 1 00:00:00 1970 From: Will Deacon Subject: Re: [PATCH 3/5] iommu/arm-smmu: Invalidate TLBs properly Date: Mon, 7 Dec 2015 11:09:39 +0000 Message-ID: <20151207110939.GB23430@arm.com> References: <2acaea8656f14a4421d7d466dd242fe5a3d0f6f6.1449246988.git.robin.murphy@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <2acaea8656f14a4421d7d466dd242fe5a3d0f6f6.1449246988.git.robin.murphy-5wv7dgnIgG8@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Robin Murphy Cc: laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, brian.starkey-5wv7dgnIgG8@public.gmane.org List-Id: iommu@lists.linux-foundation.org On Fri, Dec 04, 2015 at 05:53:00PM +0000, Robin Murphy wrote: > When invalidating an IOVA range potentially spanning multiple pages, > such as when removing an entire intermediate-level table, we currently > only issue an invalidation for the first IOVA of that range. Since the > architecture specifies that address-based TLB maintenance operations > target a single entry, an SMMU could feasibly retain live entries for > subsequent pages within that unmapped range, which is not good. > > Make sure we hit every possible entry by iterating over the whole range > at the granularity provided by the pagetable implementation. > > Signed-off-by: Robin Murphy > --- > drivers/iommu/arm-smmu.c | 19 ++++++++++++++++--- > 1 file changed, 16 insertions(+), 3 deletions(-) Can you do something similar for arm-smmu-v3.c as well, please? Will From mboxrd@z Thu Jan 1 00:00:00 1970 From: will.deacon@arm.com (Will Deacon) Date: Mon, 7 Dec 2015 11:09:39 +0000 Subject: [PATCH 3/5] iommu/arm-smmu: Invalidate TLBs properly In-Reply-To: <2acaea8656f14a4421d7d466dd242fe5a3d0f6f6.1449246988.git.robin.murphy@arm.com> References: <2acaea8656f14a4421d7d466dd242fe5a3d0f6f6.1449246988.git.robin.murphy@arm.com> Message-ID: <20151207110939.GB23430@arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Fri, Dec 04, 2015 at 05:53:00PM +0000, Robin Murphy wrote: > When invalidating an IOVA range potentially spanning multiple pages, > such as when removing an entire intermediate-level table, we currently > only issue an invalidation for the first IOVA of that range. Since the > architecture specifies that address-based TLB maintenance operations > target a single entry, an SMMU could feasibly retain live entries for > subsequent pages within that unmapped range, which is not good. > > Make sure we hit every possible entry by iterating over the whole range > at the granularity provided by the pagetable implementation. > > Signed-off-by: Robin Murphy > --- > drivers/iommu/arm-smmu.c | 19 ++++++++++++++++--- > 1 file changed, 16 insertions(+), 3 deletions(-) Can you do something similar for arm-smmu-v3.c as well, please? Will