Re: [PATCH v4 3/6] PCI: Add support for multiple DMA aliases

2016-03-15 Thread Bjorn Helgaas
On Mon, Mar 14, 2016 at 10:43:40PM +, David Woodhouse wrote: > On Thu, 2016-02-25 at 08:38 -0600, Bjorn Helgaas wrote: > > > > >  /* > > > - * Look for aliases to or from the given device for exisiting groups.  > > > The > > > - * dma_alias_devfn only supports aliases on the same bus,

Re: [PATCH] iommu/vt-d: Ratelimit fault handler

2016-03-15 Thread Joe Perches
On Tue, 2016-03-15 at 10:35 -0600, Alex Williamson wrote: > Fault rates can easily overwhelm the console and make the system > unresponsive.  Ratelimit to allow an opportunity for maintenance. A few suggestions: o Use a single ratelimit state. o The multiple lines output are unnecessary and hard

Re: [PATCH] iommu/vt-d: Ratelimit fault handler

2016-03-15 Thread David Woodhouse
On Tue, 2016-03-15 at 10:35 -0600, Alex Williamson wrote: > Fault rates can easily overwhelm the console and make the system > unresponsive.  Ratelimit to allow an opportunity for maintenance. > > Signed-off-by: Alex Williamson Rather than just rate-limiting the

Re: [PATCH 0/7] Intel IOMMU scalability improvements

2016-03-15 Thread Ben Serebrin via iommu
There are nice. Thanks very much for doing this work! We have some preliminary results, looking at scaling to high core counts. We tested the patches on a 2-socket high core count SNB-EP server with a Broadcomm NIC. Our benchmark uses 200 threads of TCP_RR. We see similar performance for

Re: [PATCH] iommu/vt-d: Ratelimit fault handler

2016-03-15 Thread Joe Perches
On Tue, 2016-03-15 at 10:10 -0700, Joe Perches wrote: > o Use a single ratelimit state. [] > diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c [] > + if (__ratelimit()) > + return 0; That of course should be: if (!__ratelimit()) return 0;

[PATCH 01/04] iommu/ipmmu-vmsa: 32-bit ARM may have CONFIG_IOMMU_DMA=y

2016-03-15 Thread Magnus Damm
From: Magnus Damm Instead of assuming that CONFIG_ARM=y also means CONFIG_IOMMU_DMA=n, convert the #ifdefs to take CONFIG_IOMMU_DMA into consideration so 32-bit ARM can make use of CONFIG_IOMMU_DMA=y as well once those bits are in place. Signed-off-by: Magnus Damm

[PATCH 04/04] iommu/ipmmu-vmsa: Add new IOMMU_DOMAIN_DMA ops

2016-03-15 Thread Magnus Damm
From: Magnus Damm Introduce a new set of iommu_ops suitable for 64-bit ARM as well as 32-bit ARM when CONFIG_IOMMU_DMA=y. The ->of_xlate() callback is needed by the code exported by of_iommu.h and it is wrapped in #ifdefs to also compile of x86_64. Signed-off-by:

[PATCH 02/04] iommu/ipmmu-vmsa: Break out utlb parsing code

2016-03-15 Thread Magnus Damm
From: Magnus Damm Break out the utlb parsing code and dev_data allocation into a separate function. This is preparation for future code sharing. Signed-off-by: Magnus Damm --- drivers/iommu/ipmmu-vmsa.c | 125

[PATCH 00/04] iommu/ipmmu-vmsa: IPMMU CONFIG_IOMMU_DMA update

2016-03-15 Thread Magnus Damm
in this series based on code earlier included in the series below but has been reworked to also fit on 32-bit ARM: [PATCH/RFC 00/10] iommu/ipmmu-vmsa: Experimental r8a7795 support Signed-off-by: Magnus Damm <damm+rene...@opensource.se> --- Built on top of next-20160315 Depends on [PATCH v2

[PATCH] iommu/vt-d: Ratelimit fault handler

2016-03-15 Thread Alex Williamson
Fault rates can easily overwhelm the console and make the system unresponsive. Ratelimit to allow an opportunity for maintenance. Signed-off-by: Alex Williamson --- drivers/iommu/dmar.c | 28 +++- 1 file changed, 15 insertions(+), 13

Re: [RFC 3/3] iommu: dma-iommu: use common implementation also on ARM architecture

2016-03-15 Thread Robin Murphy
Hi Marek, Arnd, On 19/02/16 10:30, Arnd Bergmann wrote: On Friday 19 February 2016 09:22:44 Marek Szyprowski wrote: This patch replaces ARM-specific IOMMU-based DMA-mapping implementation with generic IOMMU DMA-mapping code shared with ARM64 architecture. The side-effect of this change is a

Re: [RFC 3/3] iommu: dma-iommu: use common implementation also on ARM architecture

2016-03-15 Thread Marek Szyprowski
Hello, On 2016-03-15 12:18, Magnus Damm wrote: Hi Marek, On Fri, Feb 19, 2016 at 5:22 PM, Marek Szyprowski wrote: This patch replaces ARM-specific IOMMU-based DMA-mapping implementation with generic IOMMU DMA-mapping code shared with ARM64 architecture. The

Re: [RFC 3/3] iommu: dma-iommu: use common implementation also on ARM architecture

2016-03-15 Thread Robin Murphy
Hi Magnus, On 15/03/16 11:18, Magnus Damm wrote: Hi Marek, On Fri, Feb 19, 2016 at 5:22 PM, Marek Szyprowski wrote: This patch replaces ARM-specific IOMMU-based DMA-mapping implementation with generic IOMMU DMA-mapping code shared with ARM64 architecture. The

Re: [RFC 3/3] iommu: dma-iommu: use common implementation also on ARM architecture

2016-03-15 Thread Magnus Damm
Hi Marek, On Fri, Feb 19, 2016 at 5:22 PM, Marek Szyprowski wrote: > This patch replaces ARM-specific IOMMU-based DMA-mapping implementation > with generic IOMMU DMA-mapping code shared with ARM64 architecture. The > side-effect of this change is a switch from

Re: [PATCH V5 02/10] perf/amd/iommu: Consolidate and move perf_event_amd_iommu header

2016-03-15 Thread Peter Zijlstra
On Tue, Mar 15, 2016 at 11:40:17AM +0100, Borislav Petkov wrote: > On Tue, Mar 15, 2016 at 07:39:31AM +0700, Suravee Suthikulpanit wrote: > > What if I just merge the newly introduced arch/x86/include/perf/amd/iommu.h > > into the include/linux/amd-iommu.h? I do not see the point of having to > >

Re: [PATCH V5 02/10] perf/amd/iommu: Consolidate and move perf_event_amd_iommu header

2016-03-15 Thread Borislav Petkov
On Tue, Mar 15, 2016 at 07:39:31AM +0700, Suravee Suthikulpanit wrote: > What if I just merge the newly introduced arch/x86/include/perf/amd/iommu.h > into the include/linux/amd-iommu.h? I do not see the point of having to > separate things out into two files. Except that this header has

Re: [PATCH v5 3/9] dma-mapping: add dma_{map,unmap}_resource

2016-03-15 Thread Christoph Hellwig
On Fri, Mar 11, 2016 at 01:58:46PM +0100, Niklas S?derlund wrote: > Without an IOMMU this is easy since the phys_addr_t and dma_addr_t are > the same and no special care is needed. However if you have a IOMMU you > need to map the DMA slave phys_addr_t to a dma_addr_t using something > like

Re: [PATCH V5 02/10] perf/amd/iommu: Consolidate and move perf_event_amd_iommu header

2016-03-15 Thread Peter Zijlstra
On Tue, Mar 15, 2016 at 07:39:31AM +0700, Suravee Suthikulpanit wrote: > What if I just merge the newly introduced arch/x86/include/perf/amd/iommu.h > into the include/linux/amd-iommu.h? I do not see the point of having to > separate things out into two files. > Works for me. Thanks!