Re: [PATCH v2 0/3] iommu: Remove OMAP IOVMM driver

2014-07-24 Thread Tony Lindgren
* Laurent Pinchart laurent.pinch...@ideasonboard.com [140723 07:02]: Hi Joerg, On Wednesday 23 July 2014 15:52:17 Joerg Roedel wrote: On Mon, Jul 21, 2014 at 11:19:29PM -0700, Tony Lindgren wrote: Tony, is there still time to get this (and especially patch 2/3, which touches arch/

Re: [PATCH v2 1/1] iommu-api: Add map_range/unmap_range functions

2014-07-24 Thread Joerg Roedel
On Wed, Jul 23, 2014 at 10:49:55AM -0700, Olav Haugan wrote: Joerg, can you comment on what you envisioned when you suggested that we add the fallback? The problem is that we already have tons of IOMMU drivers in the tree which don't provide these call-backs. So adding this API extension

Re: [PATCH v2 1/1] iommu-api: Add map_range/unmap_range functions

2014-07-24 Thread Thierry Reding
On Thu, Jul 24, 2014 at 11:34:27AM +0200, Joerg Roedel wrote: On Wed, Jul 23, 2014 at 10:49:55AM -0700, Olav Haugan wrote: Joerg, can you comment on what you envisioned when you suggested that we add the fallback? The problem is that we already have tons of IOMMU drivers in the tree

[PATCH 3/3] mmu_notifier: Add the call-back for mmu_notifier_invalidate_range()

2014-07-24 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Now that the mmu_notifier_invalidate_range() calls are in place, add the call-back to allow subsystems to register against it. Signed-off-by: Joerg Roedel jroe...@suse.de --- include/linux/mmu_notifier.h | 28 ++-- mm/mmu_notifier.c

[PATCH 1/3] mmu_notifier: Add mmu_notifier_invalidate_range()

2014-07-24 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de This notifier closes an important gap with the current invalidate_range_start()/end() notifiers. The _start() part is called when all pages are still mapped while the _end() notifier is called when all pages are potentially unmapped and already freed. This does

[PATCH 0/3] mmu_notifier: Allow to manage CPU external TLBs

2014-07-24 Thread Joerg Roedel
Hi, here is a patch-set to extend the mmu_notifiers in the Linux kernel to allow managing CPU external TLBs. Those TLBs may be implemented in IOMMUs or any other external device, e.g. ATS/PRI capable PCI devices. The problem with managing these TLBs are the semantics of the

[PATCH 2/3] mmu_notifier: Call mmu_notifier_invalidate_range() from VMM

2014-07-24 Thread Joerg Roedel
From: Joerg Roedel jroe...@suse.de Add calls to the new mmu_notifier_invalidate_range() function to all places if the VMM that need it. Signed-off-by: Joerg Roedel jroe...@suse.de --- include/linux/mmu_notifier.h | 28 kernel/events/uprobes.c | 2 +-

Re: [PATCH 0/3] mmu_notifier: Allow to manage CPU external TLBs

2014-07-24 Thread Andrea Arcangeli
On Thu, Jul 24, 2014 at 04:35:38PM +0200, Joerg Roedel wrote: To solve this situation I wrote a patch-set to introduce a new notifier call-back: mmu_notifer_invalidate_range(). This notifier lifts the strict requirements that no new references are taken in the range between _start() and

[PATCH 1/3] iommu/ipmmu-vmsa: Cleanup failures of ARM mapping creation or attachment

2014-07-24 Thread Laurent Pinchart
The ARM IOMMU mapping needs to be released when attaching the device fails. Add arm_iommu_release_mapping() to the error code path. This is safe to call with a NULL mapping, so no specific check is needed. Cleanup is also missing when failing to create a mapping. Jump to the error code path in

[PATCH 2/3] iommu/ipmmu-vmsa: Flush P[UM]D entry before freeing the child page table

2014-07-24 Thread Laurent Pinchart
When clearing PUD or PMD entries the child page table (if any) is freed and the PUD or PMD entry is then cleared. This result in a small race condition window during which a free page table could be accessed by the IPMMU. Fix it by clearing and flushing the PUD or PMD entry before freeing the

[PATCH 0/3] Renesas IPMMU-VMSA fixes

2014-07-24 Thread Laurent Pinchart
Hello, This series fixes small issues with the ipmmu-vmsa driver. Please see individual patches for details. If not too late, I'd like these fixes to be merged in v3.17 (after proper review of course, or, in the worst case, after lack of review). Laurent Pinchart (3): iommu/ipmmu-vmsa:

[PATCH 3/3] iommu/ipmmu-vmsa: Invalidate TLB after unmapping

2014-07-24 Thread Laurent Pinchart
The TLB must be invalidated after unmapping memory to remove stale TLB entries. this was supposed to be performed already, but a bug in the driver prevented the TLB invalidate function from being called. Fix it. Signed-off-by: Laurent Pinchart laurent.pinchart+rene...@ideasonboard.com ---

Re: [PATCH 0/3] mmu_notifier: Allow to manage CPU external TLBs

2014-07-24 Thread Andrew Morton
On Thu, 24 Jul 2014 16:35:38 +0200 Joerg Roedel j...@8bytes.org wrote: here is a patch-set to extend the mmu_notifiers in the Linux kernel to allow managing CPU external TLBs. Those TLBs may be implemented in IOMMUs or any other external device, e.g. ATS/PRI capable PCI devices. The