Re: [RFT v2] iommu/amd: use subsys_initcall() on amdv2 iommu

2016-04-08 Thread Luis R. Rodriguez
On Tue, Mar 29, 2016 at 10:41 AM, Luis R. Rodriguez wrote: > We need to ensure amd iommu v2 initializes before > driver uses such as drivers/gpu/drm/amd/amdkfd/kfd_module.c, > to do this make its init routine a subsys_initcall() which > ensures its load init is called first than modules when > bui

Re: [PATCH v4 6/6] PCI: Squash pci_dev_flags to remove holes

2016-04-08 Thread Alex Williamson
On Wed, 24 Feb 2016 13:44:31 -0600 Bjorn Helgaas wrote: > From: Jacek Lawrynowicz > > After removing PCI_DEV_FLAGS_DMA_ALIAS_DEVFN, the (1 << 4) value was > unused. Squash the other values so all the bits are adjacent. No > functional change intended. > > (I'm not sure this is worth doing.

Re: [PATCH v4 1/6] PCI: Add pci_add_dma_alias() to abstract implementation

2016-04-08 Thread Alex Williamson
On Wed, 24 Feb 2016 13:43:45 -0600 Bjorn Helgaas wrote: > From: Jacek Lawrynowicz > > Add a pci_add_dma_alias() interface to encapsulate the details of adding an > alias. No functional change intended. > --- > drivers/pci/pci.c| 14 ++ > drivers/pci/pci.h|2 ++ > dri

Re: [PATCH v4 2/6] PCI: Move informational printk to pci_add_dma_alias()

2016-04-08 Thread Alex Williamson
On Wed, 24 Feb 2016 13:43:54 -0600 Bjorn Helgaas wrote: > From: Jacek Lawrynowicz > > One of the quirks that adds DMA aliases logs an informational message in > dmesg. Move that to pci_add_dma_alias() so all users log the message > consistently. No functional change intended (except extra mes

Re: [PATCH v5 5/6] PCI: Add DMA alias quirk for mic_x200_dma

2016-04-08 Thread Alex Williamson
On Thu, 3 Mar 2016 15:53:20 +0100 Jacek Lawrynowicz wrote: > MIC x200 NTB forwards PCIe traffic using multiple alien RID. They have to > be added as aliases to the DMA device in order to allow buffer access > when IOMMU is enabled. > > Signed-off-by: Jacek Lawrynowicz > Acked-by: David Woodhou

Re: [PATCH v4 4/6] PCI: Rename dma_alias_is_enabled() to pci_devs_are_dma_aliases()

2016-04-08 Thread Alex Williamson
On Wed, 24 Feb 2016 13:44:15 -0600 Bjorn Helgaas wrote: > This should be folded into the previous patch. I left it separate to show > the interface difference more clearly. > > Also, pci_devs_are_dma_aliases() uses PCI internals (dma_alias_mask), so I > think it should be in PCI code instead of

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

2016-04-08 Thread Alex Williamson
On Thu, 3 Mar 2016 15:38:02 +0100 Jacek Lawrynowicz wrote: > This patch solves IOMMU support issues with PCIe non-transparent bridges > that use Requester ID look-up tables (RID-LUT), e.g. PEX8733. > > The NTB connects devices in two independent PCI domains. Devices > separated by the NTB are n

Re: AMD-Vi regression with PCIe/PCI bridges in 4.4

2016-04-08 Thread Tomasz Golinski
>> > Can you >> > guys please test if the attached patch fixes the issues for you as it >> > did for me? Tested, works as expected. Thanks. Attaching dmesg from patched kernel in case you need it. dmesg-patch.log.gz Description: application/gunzip ___

Re: AMD-Vi regression with PCIe/PCI bridges in 4.4

2016-04-08 Thread Joerg Roedel
On Fri, Apr 08, 2016 at 05:39:41PM +0200, Tomasz Golinski wrote: > > Okay, with this card I was able to reproduce the problem myself. Can you > > guys please test if the attached patch fixes the issues for you as it > > did for me? > > Sorry for asking (maybe) stupid question. This patch doesn't a

Re: [PATCH v2 1/2] dma/iommu: Add pgsize_bitmap confirmation in __iommu_dma_alloc_pages

2016-04-08 Thread Doug Anderson
Hi, On Fri, Apr 8, 2016 at 10:30 AM, Will Deacon wrote: >> > Am I barking up the wrong tree? >> >> I don't think min_order can be negative. Certainly we could enter the >> loop with order == 0 and min_order == 0, though. > > ... and in that case, PageCompound will be false, and we'll call split_

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

2016-04-08 Thread Alex Williamson
On Fri, 8 Apr 2016 11:06:32 -0500 Bjorn Helgaas wrote: > On Tue, Mar 15, 2016 at 07:48:17PM -0500, Bjorn Helgaas wrote: > > On Mon, Mar 14, 2016 at 10:43:40PM +, David Woodhouse wrote: > > > On Thu, 2016-02-25 at 08:38 -0600, Bjorn Helgaas wrote: > > > > > > > > >  /* > > > > > - * Loo

Re: [PATCH v2 1/2] dma/iommu: Add pgsize_bitmap confirmation in __iommu_dma_alloc_pages

2016-04-08 Thread Will Deacon
On Fri, Apr 08, 2016 at 09:50:43AM -0700, Doug Anderson wrote: > On Fri, Apr 8, 2016 at 6:07 AM, Will Deacon wrote: > > On Tue, Apr 05, 2016 at 10:03:32AM -0700, Doug Anderson wrote: > >> On Tue, Mar 29, 2016 at 10:02 AM, Will Deacon wrote: > >> > On Mon, Mar 28, 2016 at 02:32:11PM +0800, Yong Wu

Re: [PATCH v6 2/5] vfio: allow the user to register reserved iova range for MSI mapping

2016-04-08 Thread Eric Auger
Hi Alex, On 04/08/2016 06:41 PM, Alex Williamson wrote: > On Fri, 8 Apr 2016 17:48:01 +0200 > Eric Auger wrote: > > Hi Eric, > >> Hi Alex, >> On 04/07/2016 08:29 PM, Alex Williamson wrote: >>> On Thu, 7 Apr 2016 15:43:29 +0200 >>> Eric Auger wrote: >>> Hi Alex, On 04/07/2016 12:07

Re: [PATCH v2 1/2] dma/iommu: Add pgsize_bitmap confirmation in __iommu_dma_alloc_pages

2016-04-08 Thread Doug Anderson
Will, On Fri, Apr 8, 2016 at 6:07 AM, Will Deacon wrote: > On Tue, Apr 05, 2016 at 10:03:32AM -0700, Doug Anderson wrote: >> On Tue, Mar 29, 2016 at 10:02 AM, Will Deacon wrote: >> > On Mon, Mar 28, 2016 at 02:32:11PM +0800, Yong Wu wrote: >> >> @@ -213,13 +215,16 @@ static struct page >> >> **

Re: [PATCH v6 2/5] vfio: allow the user to register reserved iova range for MSI mapping

2016-04-08 Thread Alex Williamson
On Fri, 8 Apr 2016 17:48:01 +0200 Eric Auger wrote: Hi Eric, > Hi Alex, > On 04/07/2016 08:29 PM, Alex Williamson wrote: > > On Thu, 7 Apr 2016 15:43:29 +0200 > > Eric Auger wrote: > > > >> Hi Alex, > >> On 04/07/2016 12:07 AM, Alex Williamson wrote: > >>> On Mon, 4 Apr 2016 08:30:08 +000

Re: [PATCH 4/5] iommu/dma: Finish optimising higher-order allocations

2016-04-08 Thread Robin Murphy
On 08/04/16 06:32, Yong Wu wrote: On Thu, 2016-04-07 at 18:42 +0100, Robin Murphy wrote: /* @@ -215,8 +221,9 @@ static struct page **__iommu_dma_alloc_pages(unsigned int count, gfp_t gfp) * than a necessity, hence using __GFP_NORETRY until * fal

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

2016-04-08 Thread David Woodhouse
On Fri, 2016-04-08 at 11:06 -0500, Bjorn Helgaas wrote: > > I think I'm confused because I don't really understand IOMMU > > groups. ,,, > Ping? I think this ended up being more of a Alex question... -- dwmw2 smime.p7s Description: S/MIME cryptographic signature _

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

2016-04-08 Thread Bjorn Helgaas
On Tue, Mar 15, 2016 at 07:48:17PM -0500, Bjorn Helgaas wrote: > 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.  > > > > T

Re: [PATCH v6 2/5] vfio: allow the user to register reserved iova range for MSI mapping

2016-04-08 Thread Eric Auger
Hi Alex, On 04/07/2016 08:29 PM, Alex Williamson wrote: > On Thu, 7 Apr 2016 15:43:29 +0200 > Eric Auger wrote: > >> Hi Alex, >> On 04/07/2016 12:07 AM, Alex Williamson wrote: >>> On Mon, 4 Apr 2016 08:30:08 + >>> Eric Auger wrote: >>> The user is allowed to [un]register a reserved

Re: AMD-Vi regression with PCIe/PCI bridges in 4.4

2016-04-08 Thread Tomasz Golinski
> Okay, with this card I was able to reproduce the problem myself. Can you > guys please test if the attached patch fixes the issues for you as it > did for me? Sorry for asking (maybe) stupid question. This patch doesn't apply against 4.5 kernel. Should I apply it against current git head or mayb

[git pull] IOMMU Fixes for Linux v4.6-rc2

2016-04-08 Thread Joerg Roedel
Hi Linus, The following changes since commit 9735a22799b9214d17d3c231fe377fc852f042e9: Linux 4.6-rc2 (2016-04-03 09:09:40 -0500) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git tags/iommu-fixes-v4.6-rc2 for you to fetch changes up to 0b

Re: [PATCH v6 0/7] KVM PCIe/MSI passthrough on ARM/ARM64: kernel part 1/3: iommu changes

2016-04-08 Thread Eric Auger
Hi Alex, On 04/07/2016 07:50 PM, Alex Williamson wrote: > On Thu, 7 Apr 2016 14:28:59 +0200 > Eric Auger wrote: > >> Hi Alex, >> On 04/07/2016 01:15 AM, Alex Williamson wrote: >>> On Mon, 4 Apr 2016 08:06:55 + >>> Eric Auger wrote: >>> This series introduces the dma-reserved-iommu a

Re: AMD-Vi regression with PCIe/PCI bridges in 4.4

2016-04-08 Thread Joerg Roedel
On Wed, Apr 06, 2016 at 05:52:57PM +0200, Tomasz Golinski wrote: > I'm using Asus Xonar DX card: https://www.asus.com/Sound-Cards/Xonar_DX/ Okay, with this card I was able to reproduce the problem myself. Can you guys please test if the attached patch fixes the issues for you as it did for me? T

Re: [PATCH v2 1/2] dma/iommu: Add pgsize_bitmap confirmation in __iommu_dma_alloc_pages

2016-04-08 Thread Will Deacon
On Tue, Apr 05, 2016 at 10:03:32AM -0700, Doug Anderson wrote: > On Tue, Mar 29, 2016 at 10:02 AM, Will Deacon wrote: > > On Mon, Mar 28, 2016 at 02:32:11PM +0800, Yong Wu wrote: > >> @@ -213,13 +215,16 @@ static struct page > >> **__iommu_dma_alloc_pages(unsigned int count, gfp_t gfp) > >>