Re: [PATCH kernel v4 4/6] iommu: Set PCI_BUS_FLAGS_MSI_REMAP on iommu driver initialization

2017-07-10 Thread Bjorn Helgaas via iommu
[+cc Joerg, iommu] On Fri, Jun 30, 2017 at 12:24 AM, Alexey Kardashevskiy wrote: > From: Yongji Xie > > Some iommu drivers would be initialized after PCI device > enumeration. So PCI_BUS_FLAGS_MSI_REMAP would not be set > when probing PCI devices although IOMMU enables capability > of IRQ remapp

Re: [PATCH v7 2/3] PCI: Add support for PCI inbound windows resources

2017-06-01 Thread Bjorn Helgaas via iommu
On Wed, May 31, 2017 at 11:17 AM, Oza Oza wrote: > On Wed, May 31, 2017 at 4:12 AM, Bjorn Helgaas wrote: >> On Mon, May 22, 2017 at 11:39 AM, Oza Pawandeep wrote: >>> This patch adds support for inbound memory window >>> for PCI RC drivers. >>> >>> It defines new function pci_create_root_bus2 wh

Re: [PATCH v7 2/3] PCI: Add support for PCI inbound windows resources

2017-05-30 Thread Bjorn Helgaas via iommu
On Mon, May 22, 2017 at 11:39 AM, Oza Pawandeep wrote: > This patch adds support for inbound memory window > for PCI RC drivers. > > It defines new function pci_create_root_bus2 which > takes inbound resources as an argument and fills in the > memory resource to PCI internal host bridge structure

Re: [PATCH v1] ACPI: Switch to use generic UUID API

2017-05-04 Thread Bjorn Helgaas via iommu
On Thu, May 4, 2017 at 4:21 AM, Andy Shevchenko wrote: > acpi_evaluate_dsm() and friends take a pointer to a raw buffer of 16 > bytes. Instead we convert them to use uuid_le type. At the same time we > convert current users. > > acpi_str_to_uuid() becomes useless after the conversion and it's safe

Re: [PATCH v5 2/2] PCI: quirks: Fix ThunderX2 dma alias handling

2017-04-25 Thread Bjorn Helgaas via iommu
On Tue, Apr 25, 2017 at 8:03 AM, Jayachandran C wrote: > On Fri, Apr 21, 2017 at 12:57:05PM -0500, Bjorn Helgaas wrote: >> I did notice that all the Root Port devices claim to *not* be connected to >> slots, which doesn't seem right. For example, >> >> 12:00.0 PCI bridge: Broadcom Corporation

Re: [PATCH v5 2/2] PCI: quirks: Fix ThunderX2 dma alias handling

2017-04-21 Thread Bjorn Helgaas via iommu
On Mon, Apr 17, 2017 at 12:47 PM, Jayachandran C wrote: > On Fri, Apr 14, 2017 at 09:00:06PM -0500, Bjorn Helgaas wrote: >> On Fri, Apr 14, 2017 at 4:06 PM, Jayachandran C >> wrote: >> > On Thu, Apr 13, 2017 at 07:19:11PM -0500, Bjorn Helgaas wrote: >> >> I tentatively applied both patches to pci

Re: [PATCH v5 2/2] PCI: quirks: Fix ThunderX2 dma alias handling

2017-04-20 Thread Bjorn Helgaas via iommu
On Wed, Apr 19, 2017 at 7:25 PM, Jon Masters wrote: > One additional footnote. I spent a bunch of time recently on my personal > Xeon systems walking through the PCIe topology and aligning on how to > advise the ARM server community proceed going forward. If you look at > how Intel vs AMD handle t

Re: [PATCH v5 2/2] PCI: quirks: Fix ThunderX2 dma alias handling

2017-04-17 Thread Bjorn Helgaas via iommu
On Mon, Apr 17, 2017 at 12:47 PM, Jayachandran C wrote: > On Fri, Apr 14, 2017 at 09:00:06PM -0500, Bjorn Helgaas wrote: >> On Fri, Apr 14, 2017 at 4:06 PM, Jayachandran C >> wrote: >> > On Thu, Apr 13, 2017 at 07:19:11PM -0500, Bjorn Helgaas wrote: >> >> I tentatively applied both patches to pci

Re: [PATCH v5 2/2] PCI: quirks: Fix ThunderX2 dma alias handling

2017-04-14 Thread Bjorn Helgaas via iommu
On Fri, Apr 14, 2017 at 4:06 PM, Jayachandran C wrote: > On Thu, Apr 13, 2017 at 07:19:11PM -0500, Bjorn Helgaas wrote: >> I tentatively applied both patches to pci/host-thunder for v4.12. >> >> However, I am concerned about the topology here: >> >> On Thu, Apr 13, 2017 at 08:30:45PM +, Jayach

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

2016-02-24 Thread Bjorn Helgaas via iommu
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. We have 16 flag bits and we're not even close to exhausting them. But i

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

2016-02-24 Thread Bjorn Helgaas via iommu
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 in IOMMU code. That would mean both it and pci_add_dma_alias() sho

[PATCH v4 5/6] pci: Add DMA alias quirk for mic_x200_dma

2016-02-24 Thread Bjorn Helgaas via iommu
From: Jacek Lawrynowicz 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 Woodhouse --- drivers/pci/quirks.c | 13 +++

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

2016-02-24 Thread Bjorn Helgaas via iommu
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 ++ drivers/pci/quirks.c | 19 +++ 3 files changed, 23 insertio

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

2016-02-24 Thread Bjorn Helgaas via iommu
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 message). --- drivers/pci/pci.c|2 ++ drivers/pci/quirks.c |

[PATCH v4 0/6] PCI: Support multiple DMA aliases

2016-02-24 Thread Bjorn Helgaas via iommu
This is a revision of Jacek's v3 posting: http://lkml.kernel.org/r/1454152012-46337-1-git-send-email-jacek.lawrynow...@intel.com The changes from v3 are: - Split into smaller patches for reviewability - Move printk when adding DMA alias - Change dma_alias_is_enabled() interface to take two

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

2016-02-24 Thread Bjorn Helgaas via iommu
From: Jacek Lawrynowicz --- drivers/iommu/iommu.c | 17 ++--- drivers/pci/pci.c | 11 +-- drivers/pci/probe.c |1 + drivers/pci/search.c | 14 +- include/linux/pci.h |4 +--- 5 files changed, 30 insertions(+), 17 deletions(-) diff --git a/

Re: [PATCH] iommu/vt-d: Add support for multiple DMA aliases

2016-01-15 Thread Bjorn Helgaas via iommu
On Wed, Jan 13, 2016 at 1:28 PM, David Woodhouse wrote: > On Mon, 2016-01-11 at 14:20 +0100, Jacek Lawrynowicz wrote: >> This patch solves IOMMU support issues with PCIe non-transparent bridges >> that use Requester ID look-up tables (LUT), e.g. PEX8733. Before exiting >> the bridge, packet's RID

Re: [PATCH] iommu/vt-d: Add support for multiple DMA aliases

2016-01-14 Thread Bjorn Helgaas via iommu
On Thu, Jan 14, 2016 at 4:03 AM, Joerg Roedel wrote: > On Wed, Jan 13, 2016 at 09:28:25PM +, David Woodhouse wrote: >> Acked-by: David Woodhouse >> >> Strictly speaking, this is more in PCI code than IOMMU code. And it >> doesn't actually touch the Intel VT-d code at all; the subject is a bit