Re: [PATCH - v7] of: Move of_dma_configure() to device.c to help re-use

2015-03-03 Thread Bjorn Helgaas
[+cc linux-pci] On Tue, Mar 3, 2015 at 11:55 AM, Murali Karicheri wrote: > On 03/02/2015 10:43 PM, Bjorn Helgaas wrote: >> >> On Mon, Mar 2, 2015 at 3:59 PM, Murali Karicheri >> wrote: >>> >>> Move of_dma_configure() to device.c so it can be re-use

Re: [PATCH - v7] of: Move of_dma_configure() to device.c to help re-use

2015-03-19 Thread Bjorn Helgaas
On Tue, Mar 03, 2015 at 05:54:25PM -0500, Murali Karicheri wrote: > On 03/03/2015 03:53 PM, Bjorn Helgaas wrote: > >[+cc linux-pci] > > > >On Tue, Mar 3, 2015 at 11:55 AM, Murali Karicheri > >wrote: > >>On 03/02/2015 10:43 PM, Bjorn Helgaas wrote: >

Re: [PATCH v5 4/7] PCI/ATS: Add PRI support for PCIe VF devices

2019-08-15 Thread Bjorn Helgaas
[+cc Joerg, David, iommu list: because IOMMU drivers are the only callers of pci_enable_pri() and pci_enable_pasid()] On Thu, Aug 01, 2019 at 05:06:01PM -0700, sathyanarayanan.kuppusw...@linux.intel.com wrote: > From: Kuppuswamy Sathyanarayanan > > When IOMMU tries to enable Page Request Interf

Re: [PATCH v5 4/7] PCI/ATS: Add PRI support for PCIe VF devices

2019-08-19 Thread Bjorn Helgaas
On Thu, Aug 15, 2019 at 03:39:03PM -0700, Kuppuswamy Sathyanarayanan wrote: > On 8/15/19 3:20 PM, Bjorn Helgaas wrote: > > [+cc Joerg, David, iommu list: because IOMMU drivers are the only > > callers of pci_enable_pri() and pci_enable_pasid()] > > > > On Thu, Aug 0

Re: [PATCH v5 4/7] PCI/ATS: Add PRI support for PCIe VF devices

2019-08-19 Thread Bjorn Helgaas
On Mon, Aug 19, 2019 at 03:53:31PM -0700, Kuppuswamy Sathyanarayanan wrote: > On Mon, Aug 19, 2019 at 09:15:00AM -0500, Bjorn Helgaas wrote: > > On Thu, Aug 15, 2019 at 03:39:03PM -0700, Kuppuswamy Sathyanarayanan wrote: > > > On 8/15/19 3:20 PM, Bjorn Helgaas wrote: > &g

Re: [PATCH v5 4/7] PCI/ATS: Add PRI support for PCIe VF devices

2019-08-28 Thread Bjorn Helgaas
On Wed, Aug 28, 2019 at 11:21:53AM -0700, Kuppuswamy Sathyanarayanan wrote: > On Mon, Aug 19, 2019 at 06:19:25PM -0500, Bjorn Helgaas wrote: > > On Mon, Aug 19, 2019 at 03:53:31PM -0700, Kuppuswamy Sathyanarayanan wrote: > > > On Mon, Aug 19, 2019 at 09:15:00AM -0500, B

Re: [PATCH] PCI: Move ATS declarations to linux/pci.h

2019-09-02 Thread Bjorn Helgaas
On Fri, Aug 30, 2019 at 09:18:40AM -0700, Christoph Hellwig wrote: > On Fri, Aug 30, 2019 at 05:07:56PM +0200, Krzysztof Wilczynski wrote: > > Move ATS function prototypes from include/linux/pci-ats.h to > > include/linux/pci.h so users only need to include : > > Why is that so important? Very fe

Re: [PATCH] PCI: Move ATS declarations to linux/pci.h

2019-09-02 Thread Bjorn Helgaas
[+cc Kelsey] On Mon, Sep 02, 2019 at 04:11:00PM -0500, Bjorn Helgaas wrote: > On Fri, Aug 30, 2019 at 09:18:40AM -0700, Christoph Hellwig wrote: > > On Fri, Aug 30, 2019 at 05:07:56PM +0200, Krzysztof Wilczynski wrote: > > > Move ATS function prototypes from include/

Re: [PATCH v2] PCI: Remove unused includes and superfluous struct declaration

2019-10-01 Thread Bjorn Helgaas
On Tue, Sep 03, 2019 at 01:30:59PM +0200, Krzysztof Wilczynski wrote: > Remove and from being included > directly as part of the include/linux/of_pci.h, and remove > superfluous declaration of struct of_phandle_args. > > Move users of include to include > and directly rather than rely on both

[PATCH 0/2] iommu/vt-d: Select PCI_PRI for INTEL_IOMMU_SVM

2019-10-09 Thread Bjorn Helgaas
From: Bjorn Helgaas I think intel-iommu.c depends on CONFIG_AMD_IOMMU in an undesirable way: When CONFIG_INTEL_IOMMU_SVM=y, iommu_enable_dev_iotlb() calls PRI interfaces (pci_reset_pri() and pci_enable_pri()), but those are only implemented when CONFIG_PCI_PRI is enabled. If CONFIG_PCI_PRI is

[PATCH 1/2] iommu/vt-d: Select PCI_PRI for INTEL_IOMMU_SVM

2019-10-09 Thread Bjorn Helgaas
From: Bjorn Helgaas When CONFIG_INTEL_IOMMU_SVM=y, iommu_enable_dev_iotlb() calls PRI interfaces (pci_reset_pri() and pci_enable_pri()), but those are only implemented when CONFIG_PCI_PRI is enabled. Previously INTEL_IOMMU_SVM selected PCI_PASID but not PCI_PRI, so the state of PCI_PRI depended

[PATCH 2/2] PCI/ATS: Move pci_prg_resp_pasid_required() to CONFIG_PCI_PRI

2019-10-09 Thread Bjorn Helgaas
From: Bjorn Helgaas pci_prg_resp_pasid_required() returns the value of the "PRG Response PASID Required" bit from the PRI capability, but the interface was previously defined under #ifdef CONFIG_PCI_PASID. Move it from CONFIG_PCI_PASID to CONFIG_PCI_PRI so it's with the other PRI

[PATCH 0/3] PCI/ATS: Clean up unnecessary stubs and exports

2019-10-09 Thread Bjorn Helgaas
From: Bjorn Helgaas Most of the ATS/PRI/PASID interfaces are only used by IOMMU drivers that can only be built statically, not as modules. A couple are only used by the PCI core and don't need to be visible outside at all. These are intended to be cleanup only, but let me know if they

[PATCH 2/3] PCI/ATS: Remove unnecessary EXPORT_SYMBOL_GPL()

2019-10-09 Thread Bjorn Helgaas
From: Bjorn Helgaas The following functions are only used by the PCI core or by IOMMU drivers that cannot be modular, so there's no need to export them at all: pci_enable_ats() pci_disable_ats() pci_restore_ats_state() pci_ats_queue_depth() pci_ats_page_aligned() pci_enabl

[PATCH 3/3] PCI/ATS: Make pci_restore_pri_state(), pci_restore_pasid_state() private

2019-10-09 Thread Bjorn Helgaas
From: Bjorn Helgaas These interfaces: void pci_restore_pri_state(struct pci_dev *pdev); void pci_restore_pasid_state(struct pci_dev *pdev); are only used in drivers/pci and do not need to be seen by the rest of the kernel. Most them to drivers/pci/pci.h so they're private to th

[PATCH 1/3] PCI/ATS: Remove unused PRI and PASID stubs

2019-10-09 Thread Bjorn Helgaas
From: Bjorn Helgaas The following functions are only used by amd_iommu.c and intel-iommu.c (when CONFIG_INTEL_IOMMU_SVM is enabled). CONFIG_PCI_PRI and CONFIG_PCI_PASID are always defined in those cases, so there's no need for the stubs. pci_enable_pri() pci_disable_pri() pci_rese

Re: [PATCH 0/3] PCI/ATS: Clean up unnecessary stubs and exports

2019-10-15 Thread Bjorn Helgaas
On Wed, Oct 09, 2019 at 05:53:51PM -0500, Bjorn Helgaas wrote: > From: Bjorn Helgaas > > Most of the ATS/PRI/PASID interfaces are only used by IOMMU drivers that > can only be built statically, not as modules. A couple are only used by > the PCI core and don't need to be vi

Re: [PATCH 0/2] iommu/vt-d: Select PCI_PRI for INTEL_IOMMU_SVM

2019-10-15 Thread Bjorn Helgaas
[+cc Jerry] On Wed, Oct 09, 2019 at 05:45:49PM -0500, Bjorn Helgaas wrote: > From: Bjorn Helgaas > > I think intel-iommu.c depends on CONFIG_AMD_IOMMU in an undesirable way: > > When CONFIG_INTEL_IOMMU_SVM=y, iommu_enable_dev_iotlb() calls PRI > interfaces (pci_reset_pri()

Re: [PATCH 1/2] iommu/dmar: collect fault statistics

2019-10-16 Thread Bjorn Helgaas
Hi Yuri, On Tue, Oct 15, 2019 at 05:11:11PM +0200, Yuri Volchkov wrote: > Currently dmar_fault handler only prints a message in the dmesg. This > commit introduces counters - how many faults have happened, and > exposes them via sysfs. Each pci device will have an entry > 'dmar_faults' reading fro

Re: [PATCH 3/7] PCI: Export pci_ats_disabled() as a GPL symbol to modules

2019-10-30 Thread Bjorn Helgaas
On Wed, Oct 30, 2019 at 02:51:08PM +, Will Deacon wrote: > Building drivers for ATS-aware IOMMUs as modules requires access to > pci_ats_disabled(). Export it as a GPL symbol to get things working. > > Signed-off-by: Will Deacon Acked-by: Bjorn Helgaas > --- > dri

Re: [PATCH] Ensure pci transactions coming from PLX NTB are handled when IOMMU is turned on

2019-11-20 Thread Bjorn Helgaas
[+cc Alex] Hi James, Thanks for the patch, and thanks, Dmitry for the cc! "scripts/get_maintainer.pl -f drivers/pci/quirks.c" will give you a list of relevant email addresses to post patches. It was a good idea to augment that list with related addresses, e.g., Logan and the iommu list. Follow

Re: [PATCH] Ensure pci transactions coming from PLX NTB are handled when IOMMU is turned on

2019-11-20 Thread Bjorn Helgaas
On Wed, Nov 20, 2019 at 12:30:48PM -0700, Logan Gunthorpe wrote: > On 2019-11-20 10:48 a.m., Dmitry Safonov wrote: > > On 11/5/19 12:17 PM, James Sewart wrote: > >> > >>> On 24 Oct 2019, at 13:52, James Sewart wrote: > >>> > >>> The PLX PEX NTB forwards DMA transactions using Requester ID's that d

Re: [PATCH v3 0/7] Raspberry Pi 4 PCIe support

2019-11-26 Thread Bjorn Helgaas
On Tue, Nov 26, 2019 at 10:19:38AM +0100, Nicolas Saenz Julienne wrote: > This series aims at providing support for Raspberry Pi 4's PCIe > controller, which is also shared with the Broadcom STB family of > devices. > Jim Quinlan (3): > dt-bindings: PCI: Add bindings for brcmstb's PCIe device >

Re: [PATCH v4 8/8] linux/log2.h: Use roundup/dow_pow_two() on 64bit calculations

2019-12-05 Thread Bjorn Helgaas
e relevant. Please include the function names ("roundup_pow_of_two()", "rounddown_pow_of_two()") in the changelog so it is self-contained and doesn't depend on the subject. > Signed-off-by: Nicolas Saenz Julienne With the nits above and below addressed, Ac

Re: [PATCH v4 7/8] linux/log2.h: Fix 64bit calculations in roundup/down_pow_two()

2019-12-05 Thread Bjorn Helgaas
You got the "n" on "down" in the subject, but still missing "of" ;) On Tue, Dec 03, 2019 at 12:47:40PM +0100, Nicolas Saenz Julienne wrote: > Some users need to make sure their rounding function accepts and returns > 64bit long variables regardless of the architecture. Sadly > roundup/rounddown_po

Re: [PATCH v3 12/13] PCI/ATS: Add PASID stubs

2019-12-10 Thread Bjorn Helgaas
ID stubs, and avoid > adding more #ifdefs to the SMMU driver. > > Signed-off-by: Jean-Philippe Brucker Acked-by: Bjorn Helgaas > --- > include/linux/pci-ats.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/include/linux/pci-ats.h b/include/linux/pci-ats.h > i

Re: [PATCH v6 1/3] PCI: Fix off by one in dma_alias_mask allocation size

2019-12-10 Thread Bjorn Helgaas
[+cc Joerg] On Tue, Dec 03, 2019 at 03:43:22PM +, James Sewart wrote: > The number of possible devfns is 256, add def and correct uses. > > Reviewed-by: Logan Gunthorpe > Signed-off-by: James Sewart I applied these three patches to pci/virtualization for v5.6, thanks! I moved the MAX_NR_D

Re: [PATCH v6 2/3] PCI: Add parameter nr_devfns to pci_add_dma_alias

2019-12-10 Thread Bjorn Helgaas
[+cc Joerg] On Tue, Dec 03, 2019 at 03:43:53PM +, James Sewart wrote: > pci_add_dma_alias can now be used to create a dma alias for a range of > devfns. > > Reviewed-by: Logan Gunthorpe > Signed-off-by: James Sewart > --- > drivers/pci/pci.c| 22 +- > drivers/pci/qu

Re: [PATCH v6 2/3] PCI: Add parameter nr_devfns to pci_add_dma_alias

2019-12-11 Thread Bjorn Helgaas
On Wed, Dec 11, 2019 at 03:37:30PM +, James Sewart wrote: > > On 10 Dec 2019, at 22:37, Bjorn Helgaas wrote: > >> -void pci_add_dma_alias(struct pci_dev *dev, u8 devfn) > >> +void pci_add_dma_alias(struct pci_dev *dev, u8 devfn_from, unsigned > >> nr_de

Re: [PATCH v4 03/16] PCI/ATS: Restore EXPORT_SYMBOL_GPL() for pci_{enable,disable}_ats()

2019-12-20 Thread Bjorn Helgaas
le, otherwise we get a build > > failure as follows: > > > > | ERROR: "pci_enable_ats" [drivers/iommu/arm-smmu-v3.ko] undefined! > > | ERROR: "pci_disable_ats" [drivers/iommu/arm-smmu-v3.ko] undefined! > > > > Re-export these two functions

Re: [PATCH v2 3/5] PCI: Introduce direct dma alias

2020-01-09 Thread Bjorn Helgaas
In subject: s/Introduce direct dma alias/Add pci_direct_dma_alias()/ On Thu, Jan 09, 2020 at 07:30:54AM -0700, Jon Derrick wrote: > The current dma alias implementation requires the aliased device be on > the same bus as the dma parent. This introduces an arch-specific > mechanism to point to an a

Re: [PATCH v3 1/5] x86/pci: Add a to_pci_sysdata helper

2020-01-13 Thread Bjorn Helgaas
On Fri, Jan 10, 2020 at 10:21:09AM -0700, Jon Derrick wrote: > From: Christoph Hellwig > > Various helpers need the pci_sysdata just to dereference a single field > in it. Add a little helper that returns the properly typed sysdata > pointer to require a little less boilerplate code. > > Signed

Re: [PATCH v3 0/5] Clean up VMD DMA Map Ops

2020-01-13 Thread Bjorn Helgaas
On Mon, Jan 13, 2020 at 05:13:38PM +, Derrick, Jonathan wrote: > On Mon, 2020-01-13 at 12:08 +, Lorenzo Pieralisi wrote: > > On Fri, Jan 10, 2020 at 10:21:08AM -0700, Jon Derrick wrote: > > > v2 Set: > > > https://lore.kernel.org/linux-iommu/1578580256-3483-1-git-send-email-jonathan.derr..

Re: [RFC PATCH 2/4] PCI: Add "pci=iommu_passthrough=" parameter for iommu passthrough

2020-01-17 Thread Bjorn Helgaas
On Wed, Jan 01, 2020 at 01:26:46PM +0800, Lu Baolu wrote: > The new parameter takes a list of devices separated by a semicolon. > Each device specified will have its iommu_passthrough bit in struct > device set. This is very similar to the existing 'disable_acs_redir' > parameter. > > Signed-off-b

Re: [RFC PATCH 2/4] PCI: Add "pci=iommu_passthrough=" parameter for iommu passthrough

2020-01-21 Thread Bjorn Helgaas
[+cc linux-pci, thread at https://lore.kernel.org/r/20200101052648.14295-1-baolu...@linux.intel.com] On Wed, Jan 01, 2020 at 01:26:46PM +0800, Lu Baolu wrote: > The new parameter takes a list of devices separated by a semicolon. > Each device specified will have its iommu_passthrough bit in struc

Re: [PATCH v5 3/7] PCI: Introduce pci_real_dma_dev()

2020-01-22 Thread Bjorn Helgaas
alias search. The default case returns the actual device. > > CC: Christoph Hellwig > Signed-off-by: Jon Derrick Acked-by: Bjorn Helgaas Looks like a nice cleanup to me. Lorenzo, let me know if you want me to take this. > --- > arch/x86/pci/common.c | 10 ++ &g

Re: [PATCH v5 0/7] Clean up VMD DMA Map Ops

2020-01-24 Thread Bjorn Helgaas
On Tue, Jan 21, 2020 at 06:37:44AM -0700, Jon Derrick wrote: > v4 Set: > https://lore.kernel.org/linux-pci/20200120110220.gb17...@e121166-lin.cambridge.arm.com/T/#t > v3 Set: > https://lore.kernel.org/linux-iommu/20200113181742.ga27...@e121166-lin.cambridge.arm.com/T/#t > v2 Set: > https://lore.

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_alia

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

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

2016-04-11 Thread Bjorn Helgaas
On Wed, Feb 24, 2016 at 01:43:32PM -0600, Bjorn Helgaas wrote: > 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 reviewab

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

2016-04-12 Thread Bjorn Helgaas
On Mon, Apr 11, 2016 at 11:38:28PM -0500, Bjorn Helgaas wrote: > On Wed, Feb 24, 2016 at 01:43:32PM -0600, Bjorn Helgaas wrote: > > This is a revision of Jacek's v3 posting: > > http://lkml.kernel.org/r/1454152012-46337-1-git-send-email-jacek.lawrynow...@intel.com > > &

Re: [RFC PATCH 09/11] drivers: acpi: implement acpi_dma_configure

2016-04-15 Thread Bjorn Helgaas
to use the newly introduced > acpi_dma_configure function, providing the same functionality > as of_dma_configure on ARM systems and leaving behaviour unchanged > for all other arches. > > Signed-off-by: Lorenzo Pieralisi > Cc: Bjorn Helgaas > Cc: Robin Murphy > Cc: Tomasz Nowick

Re: [PATCH 1/5] PCI: Add a new PCI_BUS_FLAGS_MSI_REMAP flag

2016-05-24 Thread Bjorn Helgaas
On Wed, Apr 27, 2016 at 08:43:26PM +0800, Yongji Xie wrote: > We introduce a new pci_bus_flags, PCI_BUS_FLAGS_MSI_REMAP > which indicates all devices on the bus are protected by the > hardware which supports IRQ remapping(intel naming). This changelog is ambiguous. It's possible that there is har

Re: [PATCH 3/5] PCI: Set PCI_BUS_FLAGS_MSI_REMAP if MSI controller supports IRQ remapping

2016-05-24 Thread Bjorn Helgaas
On Wed, Apr 27, 2016 at 08:43:28PM +0800, Yongji Xie wrote: > On ARM HW the capability of IRQ remapping is abstracted on > MSI controller side. MSI_FLAG_IRQ_REMAPPING is used to advertise > this [1]. > > To have a universal flag to test this capability for different > archs on PCI side, we set PCI

Re: [PATCH 2/5] iommu: Set PCI_BUS_FLAGS_MSI_REMAP if IOMMU have capability of IRQ remapping

2016-05-24 Thread Bjorn Helgaas
On Wed, Apr 27, 2016 at 08:43:27PM +0800, Yongji Xie wrote: > The capability of IRQ remapping is abstracted on IOMMU side on > some archs. There is a existing flag IOMMU_CAP_INTR_REMAP for this. > > To have a universal flag to test this capability for different > archs on PCI side, we set PCI_BUS_

Re: [PATCH 2/5] iommu: Set PCI_BUS_FLAGS_MSI_REMAP if IOMMU have capability of IRQ remapping

2016-05-25 Thread Bjorn Helgaas
On Wed, May 25, 2016 at 01:54:23PM +0800, Yongji Xie wrote: > On 2016/5/25 5:11, Bjorn Helgaas wrote: > >On Wed, Apr 27, 2016 at 08:43:27PM +0800, Yongji Xie wrote: > >>The capability of IRQ remapping is abstracted on IOMMU side on > >>some archs. There is a existing fl

Re: [RFC PATCH v2 12/15] drivers: acpi: implement acpi_dma_configure

2016-06-10 Thread Bjorn Helgaas
> > Signed-off-by: Lorenzo Pieralisi > Cc: Bjorn Helgaas > Cc: Robin Murphy > Cc: Tomasz Nowicki > Cc: Joerg Roedel > Cc: "Rafael J. Wysocki" Acked-by: Bjorn Helgaas I assume this will be merged by somebody else along with the rest of the s

Re: [PATCH v2 2/2] PCI: Handle Broadcom Vulcan DMA alias calculation quirk

2016-06-11 Thread Bjorn Helgaas
On Sun, May 08, 2016 at 03:03:21PM +0530, Jayachandran C wrote: > The Broadcom Vulcan PCI topology is slightly unusual, for a multi-node > system, it looks like: > > [bus 0] > | > +--[node 0 PCI bridge 0.0.0] > | | > |[bus 1] > | +---[SoC PCI d

Re: [PATCH v2 1/2] PCI: Add PCI device flag PCI_DEV_FLAGS_DMA_ALIAS_ROOT

2016-06-23 Thread Bjorn Helgaas
On Thu, Jun 23, 2016 at 01:04:01PM +0100, Robin Murphy wrote: > On 23/06/16 06:01, Jon Masters wrote: > >On 05/11/2016 10:26 AM, Robin Murphy wrote: > >>(I have no actual objection to this patch, though, and at this point > >>I'm just chucking ideas about). > > > >Can I ask what the next steps are

Re: [PATCH 4/5] iommu: Move REQ_ACS_FLAGS out to header and rename

2016-11-11 Thread Bjorn Helgaas
On Thu, Nov 10, 2016 at 01:27:13PM +0100, Joerg Roedel wrote: > On Wed, Oct 26, 2016 at 12:01:34PM -0600, Alex Williamson wrote: > > Allow other parts of the kernel to see which PCI ACS flags the IOMMU > > layer considers necessary for isolation. > > > > Signed-off-by: Alex Williamson > > Cc: Joe

Re: [PATCH 1/5] PCI: Make pci_std_enable_acs() non-static

2016-11-14 Thread Bjorn Helgaas
On Wed, Oct 26, 2016 at 12:01:16PM -0600, Alex Williamson wrote: > For use by quirks. > > Signed-off-by: Alex Williamson > --- > drivers/pci/pci.c |2 +- > include/linux/pci.h |1 + > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/pci/pci.c b/drivers/pci/pci.

Re: [PATCH 2/5] PCI: Extract link speed & width retrieval from pcie_get_minimum_link()

2016-11-14 Thread Bjorn Helgaas
On Wed, Oct 26, 2016 at 12:01:22PM -0600, Alex Williamson wrote: > Signed-off-by: Alex Williamson > --- > drivers/pci/pci.c | 26 -- > include/linux/pci.h |2 ++ > 2 files changed, 22 insertions(+), 6 deletions(-) > > diff --git a/drivers/pci/pci.c b/drivers/pci/p

Re: [PATCH 5/5] PCI: Balance ports to avoid ACS errata on Pericom switches

2016-11-14 Thread Bjorn Helgaas
On Wed, Oct 26, 2016 at 12:01:40PM -0600, Alex Williamson wrote: > As described in the included code comment, this quirk is intended to > work around an errata in a variety of Pericom 4-lane, 3 and 4 port > PCIe 2.0 switches. The switches advertise ACS capabilities, but the > P2P Request Redirecti

Re: [PATCH 2/3] pci: Generalize is_vmd behavior

2017-08-11 Thread Bjorn Helgaas
On Mon, Aug 07, 2017 at 01:57:12PM -0600, Jon Derrick wrote: > Generalize is_vmd behavior to remove dependency on domain number > checking in pci quirks. > > Signed-off-by: Jon Derrick > --- > arch/x86/include/asm/pci.h | 8 +++- > arch/x86/pci/common.c | 2 +- > drivers/pci/quirks.c

Re: [PATCH 3/3] iommu: prevent VMD child devices from being remapping targets

2017-08-11 Thread Bjorn Helgaas
On Mon, Aug 07, 2017 at 01:57:13PM -0600, Jon Derrick wrote: > VMD child devices must use the VMD endpoint's ID as the DMA source. > Because of this, there needs to be a way to link the parent VMD > endpoint's DMAR domain to the VMD child devices' DMAR domain such that > attaching and detaching chi

Re: [PATCH 1/3] MAINTAINERS: Add Jonathan Derrick as VMD maintainer

2017-08-11 Thread Bjorn Helgaas
On Mon, Aug 07, 2017 at 01:57:11PM -0600, Jon Derrick wrote: > Add myself as VMD maintainer > > Signed-off-by: Jon Derrick Keith, I'm looking for an ack from you since you're currently listed in MAINTAINERS. > --- > MAINTAINERS | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/MAINTAIN

Re: [PATCH v2 4/4] iommu: Prevent VMD child devices from being remapping targets

2017-08-18 Thread Bjorn Helgaas
[+cc Robin] This series looks fine to me as far as PCI is concerned, and I'd be happy to take it via my tree given an ack from David for this IOMMU piece. Alternatively, you can add my Acked-by: Bjorn Helgaas to the other patches if you want to take it via another tree. Robin rai

Re: [PATCH v2 4/4] iommu: Prevent VMD child devices from being remapping targets

2017-08-24 Thread Bjorn Helgaas
On Fri, Aug 18, 2017 at 11:04:33AM -0500, Bjorn Helgaas wrote: > [+cc Robin] > > This series looks fine to me as far as PCI is concerned, and I'd be > happy to take it via my tree given an ack from David for this IOMMU > piece. Alternatively, you can add my > > Acked-

Re: [PATCH v2 0/4] VMD fixups

2017-08-30 Thread Bjorn Helgaas
[+cc Joerg] On Thu, Aug 17, 2017 at 12:10:10PM -0600, Jon Derrick wrote: > Mostly just cleanup in this revision, eg, trying to limit scope of vmd code to > x86 > > Previous: > https://patchwork.kernel.org/patch/9886095/ > https://patchwork.kernel.org/patch/9886097/ > https://patchwork.kernel.org/

Re: [PATCH v3] iommu: Prevent VMD child devices from being remapping targets

2017-08-30 Thread Bjorn Helgaas
On Wed, Aug 30, 2017 at 03:05:59PM -0600, Jon Derrick wrote: > VMD child devices must use the VMD endpoint's ID as the requester. > Because of this, there needs to be a way to link the parent VMD > endpoint's iommu group and associated mappings to the VMD child devices > such that attaching and det

Re: [PATCH] pci: Add dummy for pci_acs_enabled() if CONFIG_PCI=n to fix iommmu build

2017-09-22 Thread Bjorn Helgaas
get_pci_function_alias_group() inline would fix > the build, this would inflate the code for the CONFIG_PCI=y case, as > get_pci_function_alias_group() is a not-so-small function called from > two places. > > Hence fix the issue by introducing a dummy for pci_acs_enabled() > instead

Re: [PATCH] pci: Add dummy for pci_acs_enabled() if CONFIG_PCI=n to fix iommmu build

2017-09-25 Thread Bjorn Helgaas
On Fri, Sep 22, 2017 at 08:12:46PM +0200, Geert Uytterhoeven wrote: > Hi Björn, > > On Fri, Sep 22, 2017 at 5:56 PM, Bjorn Helgaas wrote: > > On Mon, Sep 11, 2017 at 02:29:15PM +0200, Geert Uytterhoeven wrote: > >> If CONFIG_PCI=n, and gcc (e.g. 4.1.

Re: [RFCv2 PATCH 34/36] PCI: Make "PRG Response PASID Required" handling common

2017-10-06 Thread Bjorn Helgaas
from amd_iommu into the PCI subsystem, > renaming it to be consistent with the current spec (PRPR - PRG Response > PASID Required). > > Signed-off-by: Jean-Philippe Brucker Acked-by: Bjorn Helgaas I assume this will be merged with the rest of the series, probably via an IOMMU tr

Re: [PATCH v9 4/4] PCI: hisi: blacklist hip06/hip07 controllers behind SMMUv3

2017-10-09 Thread Bjorn Helgaas
Please change subject line: - PCI: hisi: blacklist hip06/hip07 controllers behind SMMUv3 + PCI: hisi: Blacklist hip06/hip07 controllers behind SMMUv3 On Fri, Oct 06, 2017 at 03:04:50PM +0100, Shameer Kolothum wrote: > The HiSilicon erratum 161010801 describes the limitation of > HiSilicon platf

Re: [PATCH v9 4/4] PCI: hisi: blacklist hip06/hip07 controllers behind SMMUv3

2017-10-09 Thread Bjorn Helgaas
On Mon, Oct 09, 2017 at 06:54:52PM -0500, Bjorn Helgaas wrote: > Please change subject line: > > - PCI: hisi: blacklist hip06/hip07 controllers behind SMMUv3 > + PCI: hisi: Blacklist hip06/hip07 controllers behind SMMUv3 > > On Fri, Oct 06, 2017 at 03:04:50PM +0100, Sham

Re: [PATCH v9 4/4] PCI: hisi: blacklist hip06/hip07 controllers behind SMMUv3

2017-10-10 Thread Bjorn Helgaas
rk is currently missing for DT based systems and therefore > we need to blacklist the hip06/hip07 PCIe controllers. > > Signed-off-by: Shameer Kolothum Acked-by: Bjorn Helgaas > --- > drivers/pci/dwc/pcie-hisi.c | 12 > 1 file changed, 12 insertions(+) > >

Re: RFC on Kdump and PCIe on ARM64

2018-03-01 Thread Bjorn Helgaas
[+cc Joerg, David, iommu list] On Thu, Mar 01, 2018 at 12:44:26PM -0500, Sinan Kaya wrote: > Hi, > > We are seeing IOMMU faults when booting the kdump kernel on ARM64. > > [7.220162] arm-smmu-v3 arm-smmu-v3.0.auto: event 0x02 received: > [7.226123] arm-smmu-v3 arm-smmu-v3.0.auto:

Re: RFC on Kdump and PCIe on ARM64

2018-03-01 Thread Bjorn Helgaas
On Thu, Mar 01, 2018 at 02:19:09PM -0500, Sinan Kaya wrote: > On 3/1/2018 2:05 PM, Bjorn Helgaas wrote: > > On Thu, Mar 01, 2018 at 12:44:26PM -0500, Sinan Kaya wrote: > >> Hi, > >> > >> We are seeing IOMMU faults when booting the kdump kernel on ARM64. >

Re: [PATCH v3 1/2] dma-mapping: move dma configuration to bus infrastructure

2018-04-10 Thread Bjorn Helgaas
sistently above. > Suggested-by: Christoph Hellwig > Signed-off-by: Nipun Gupta > Reviewed-by: Greg Kroah-Hartman Acked-by: Bjorn Helgaas # PCI parts I assume you'll merge this via some non-PCI tree. Let me know if you need anything else from me. > --- > - The patches

Re: [PATCH v3 2/2] drivers: remove force dma flag from buses

2018-04-10 Thread Bjorn Helgaas
ch specifies if implicit DMA > configuration is required even when it is not described by the > firmware. > > Signed-off-by: Nipun Gupta Acked-by: Bjorn Helgaas # PCI parts > --- > Changes in v2: > - This is a new change suggested by Robin and Christoph > and is add

Re: [PATCH v4 0/3] PCIe Host request to reserve IOVA

2019-04-12 Thread Bjorn Helgaas
On Fri, Apr 12, 2019 at 08:43:32AM +0530, Srinath Mannam wrote: > Few SOCs have limitation that their PCIe host can't allow few inbound > address ranges. Allowed inbound address ranges are listed in dma-ranges > DT property and this address ranges are required to do IOVA mapping. > Remaining addres

Re: [PATCH v3 1/9] PCI: Move ATS declarations outside of CONFIG_PCI

2019-04-17 Thread Bjorn Helgaas
uct pci_dev declaration) that depend on config settings that aren't obvious in the caller. Acked-by: Bjorn Helgaas > --- > include/linux/pci.h | 30 +++--- > 1 file changed, 15 insertions(+), 15 deletions(-) > > diff --git a/include/linux/pci.h b/inc

Re: [PATCH v3 2/9] PCI: Add a stub for pci_ats_disabled()

2019-04-17 Thread Bjorn Helgaas
definition of > pci_ats_disabled() for !CONFIG_PCI. > > Signed-off-by: Jean-Philippe Brucker Acked-by: Bjorn Helgaas > --- > include/linux/pci.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/linux/pci.h b/include/linux/pci.h > index 169c6a18d0b0..61d7cd888bad 1

Re: [PATCH v4 0/3] PCIe Host request to reserve IOVA

2019-04-18 Thread Bjorn Helgaas
On Tue, Apr 16, 2019 at 05:28:36PM +0530, Srinath Mannam wrote: > On Sat, Apr 13, 2019 at 4:04 AM Bjorn Helgaas wrote: > > On Fri, Apr 12, 2019 at 08:43:32AM +0530, Srinath Mannam wrote: > > > Few SOCs have limitation that their PCIe host can't allow few inbound > &

Re: [PATCH v4 0/3] PCIe Host request to reserve IOVA

2019-04-18 Thread Bjorn Helgaas
[+cc Scott] On Fri, Apr 12, 2019 at 08:43:32AM +0530, Srinath Mannam wrote: > Few SOCs have limitation that their PCIe host can't allow few inbound > address ranges. Allowed inbound address ranges are listed in dma-ranges > DT property and this address ranges are required to do IOVA mapping. > Rem

Re: [PATCH v4 1/3] PCI: Add dma_ranges window list

2019-04-18 Thread Bjorn Helgaas
ed to that host bridge > This list of resources will be processed and IOVAs for the address holes > will be reserved. s/bridge This list/bridge, this list/ > Signed-off-by: Srinath Mannam > Based-on-patch-by: Oza Pawandeep > Reviewed-by: Oza Pawandeep Acked-by: Bjorn Helgaas &g

Re: [PATCH v2 0/9] PCI: add help pci_dev_id

2019-04-29 Thread Bjorn Helgaas
On Wed, Apr 24, 2019 at 09:10:21PM +0200, Heiner Kallweit wrote: > In several places in the kernel we find PCI_DEVID used like this: > PCI_DEVID(dev->bus->number, dev->devfn) Therefore create a helper > for it. > > v2: > - apply the change to all affected places in the kernel > > Heiner Kallweit

Re: [PATCH v4 0/3] PCIe Host request to reserve IOVA

2019-05-01 Thread Bjorn Helgaas
On Wed, May 01, 2019 at 12:30:38PM +0100, Lorenzo Pieralisi wrote: > On Fri, Apr 12, 2019 at 08:43:32AM +0530, Srinath Mannam wrote: > > Few SOCs have limitation that their PCIe host can't allow few inbound > > address ranges. Allowed inbound address ranges are listed in dma-ranges > > DT property

Re: [PATCH v6 3/3] PCI: iproc: Add sorted dma ranges resource entries to host bridge

2019-05-06 Thread Bjorn Helgaas
On Fri, May 03, 2019 at 07:35:34PM +0530, Srinath Mannam wrote: > The IPROC host controller allows only a subset of physical address space > as target of inbound PCI memory transactions addresses. > > PCIe devices memory transactions targeting memory regions that > are not allowed for inbound tran

Re: [RFC/PATCH 2/4] PCI: Export PCI ACS and DMA searching functions to modules

2019-05-22 Thread Bjorn Helgaas
On Fri, May 17, 2019 at 11:47:35AM -0700, Isaac J. Manjarres wrote: > IOMMU drivers that can be compiled as modules may > want to use pci_for_each_dma_alias() and pci_request_acs(), > so export those functions. > > Signed-off-by: Isaac J. Manjarres Acked-by: Bjorn Helgaas >

Re: [PATCH 0/2] Introduce PCI_FIXUP_IOMMU

2020-06-23 Thread Bjorn Helgaas
On Fri, Jun 19, 2020 at 10:26:54AM +0800, Zhangfei Gao wrote: > Have studied _DSM method, two issues we met comparing using quirk. > > 1. Need change definition of either pci_host_bridge or pci_dev, like adding > member can_stall, > while pci system does not know stall now. > > a, pci devices do

Re: [PATCH 1/2] pci: Add pci device even if the driver failed to attach

2020-06-26 Thread Bjorn Helgaas
Nit: when you update these patches, can you run "git log --oneline drivers/pci/bus.c" and make your subject lines match the convention? E.g., PCI: Add device even if driver attach failed On Thu, Jun 25, 2020 at 05:27:09PM -0700, Rajat Jain wrote: > device_attach() returning failure indicates a

Re: [PATCH v2 1/7] PCI: Keep the ACS capability offset in device

2020-07-06 Thread Bjorn Helgaas
On Mon, Jun 29, 2020 at 09:49:37PM -0700, Rajat Jain wrote: > Currently this is being looked up at a number of places. Read and store it > once at bootup so that it can be used by all later. Write the commit log so it is complete even without the subject. Right now, you have to read the subject to

Re: [PATCH v2 2/7] PCI: Set "untrusted" flag for truly external devices only

2020-07-06 Thread Bjorn Helgaas
On Mon, Jun 29, 2020 at 09:49:38PM -0700, Rajat Jain wrote: > The "ExternalFacing" devices (root ports) are still internal devices that > sit on the internal system fabric and thus trusted. Currently they were > being marked untrusted. > > This patch uses the platform flag to identify the external

Re: [PATCH v2 2/7] PCI: Set "untrusted" flag for truly external devices only

2020-07-06 Thread Bjorn Helgaas
On Tue, Jun 30, 2020 at 09:55:54AM +0200, Greg Kroah-Hartman wrote: > On Mon, Jun 29, 2020 at 09:49:38PM -0700, Rajat Jain wrote: > > The "ExternalFacing" devices (root ports) are still internal devices that > > sit on the internal system fabric and thus trusted. Currently they were > > being marke

Re: [PATCH v2 3/7] PCI/ACS: Enable PCI_ACS_TB for untrusted/external-facing devices

2020-07-06 Thread Bjorn Helgaas
On Mon, Jun 29, 2020 at 09:49:39PM -0700, Rajat Jain wrote: > When enabling ACS, enable translation blocking for external facing ports > and untrusted devices. > > Signed-off-by: Rajat Jain > --- > v2: Commit log change > > drivers/pci/pci.c| 4 > drivers/pci/quirks.c | 11 ++

Re: [PATCH v2 3/7] PCI/ACS: Enable PCI_ACS_TB for untrusted/external-facing devices

2020-07-06 Thread Bjorn Helgaas
On Mon, Jun 29, 2020 at 09:49:39PM -0700, Rajat Jain wrote: > When enabling ACS, enable translation blocking for external facing ports > and untrusted devices. > > Signed-off-by: Rajat Jain > --- > v2: Commit log change > > drivers/pci/pci.c| 4 > drivers/pci/quirks.c | 11 ++

Re: [PATCH v2 1/7] PCI: Keep the ACS capability offset in device

2020-07-06 Thread Bjorn Helgaas
On Mon, Jul 06, 2020 at 03:16:42PM -0700, Rajat Jain wrote: > On Mon, Jul 6, 2020 at 8:58 AM Bjorn Helgaas wrote: > > On Mon, Jun 29, 2020 at 09:49:37PM -0700, Rajat Jain wrote: > > > +static void pci_enable_acs(struct pci_dev *dev); > > > > I don't think we n

Re: [PATCH v2 2/7] PCI: Set "untrusted" flag for truly external devices only

2020-07-06 Thread Bjorn Helgaas
On Mon, Jul 06, 2020 at 03:31:47PM -0700, Rajat Jain wrote: > On Mon, Jul 6, 2020 at 9:38 AM Bjorn Helgaas wrote: > > On Mon, Jun 29, 2020 at 09:49:38PM -0700, Rajat Jain wrote: > > > -static void pci_acpi_set_untrusted(struct pci_dev *dev) > > > +static void pci_acpi

Re: [PATCH RESEND v2] PCI: Add device even if driver attach failed

2020-07-07 Thread Bjorn Helgaas
On Mon, Jul 06, 2020 at 04:32:40PM -0700, Rajat Jain wrote: > device_attach() returning failure indicates a driver error while trying to > probe the device. In such a scenario, the PCI device should still be added > in the system and be visible to the user. > > This patch partially reverts: > comm

Re: [PATCH v4 4/4] PCI/ACS: Enable PCI_ACS_TB for untrusted/external-facing devices

2020-07-10 Thread Bjorn Helgaas
On Tue, Jul 07, 2020 at 03:46:04PM -0700, Rajat Jain wrote: > When enabling ACS, enable translation blocking for external facing ports > and untrusted devices. > > Signed-off-by: Rajat Jain > --- > v4: Add braces to avoid warning from kernel robot > print warning for only external-facing devi

Re: [PATCH v4 1/4] PCI: Move pci_enable_acs() and its dependencies up in pci.c

2020-07-10 Thread Bjorn Helgaas
On Tue, Jul 07, 2020 at 03:46:01PM -0700, Rajat Jain wrote: > Move pci_enable_acs() and the functions it depends on, further up in the > source code to avoid having to forward declare it when we make it static > in near future (next patch). > > No functional changes intended. > > Signed-off-by: R

Re: [PATCH v4 4/4] PCI/ACS: Enable PCI_ACS_TB for untrusted/external-facing devices

2020-07-10 Thread Bjorn Helgaas
On Fri, Jul 10, 2020 at 03:53:59PM -0700, Rajat Jain wrote: > On Fri, Jul 10, 2020 at 2:29 PM Raj, Ashok wrote: > > On Fri, Jul 10, 2020 at 03:29:22PM -0500, Bjorn Helgaas wrote: > > > On Tue, Jul 07, 2020 at 03:46:04PM -0700, Rajat Jain wrote: > > > > When en

Re: [PATCH v4 4/4] PCI/ACS: Enable PCI_ACS_TB for untrusted/external-facing devices

2020-07-11 Thread Bjorn Helgaas
On Fri, Jul 10, 2020 at 03:53:59PM -0700, Rajat Jain wrote: > On Fri, Jul 10, 2020 at 2:29 PM Raj, Ashok wrote: > > On Fri, Jul 10, 2020 at 03:29:22PM -0500, Bjorn Helgaas wrote: > > > On Tue, Jul 07, 2020 at 03:46:04PM -0700, Rajat Jain wrote: > > > > When en

Re: [PATCH v4 4/4] PCI/ACS: Enable PCI_ACS_TB for untrusted/external-facing devices

2020-07-11 Thread Bjorn Helgaas
On Sat, Jul 11, 2020 at 05:08:51PM -0700, Rajat Jain wrote: > On Sat, Jul 11, 2020 at 12:53 PM Bjorn Helgaas wrote: > > On Fri, Jul 10, 2020 at 03:53:59PM -0700, Rajat Jain wrote: > > > On Fri, Jul 10, 2020 at 2:29 PM Raj, Ashok wrote: > > > > On Fri, Jul 10, 2

Re: [PATCH] PCI/ATS: PASID and PRI are only enumerated in PF devices.

2020-07-21 Thread Bjorn Helgaas
. Does this fix a regression? Is it associated with a commit that we could add as a "Fixes:" tag so we know how far back to try to apply to stable kernels? > To: Bjorn Helgaas > To: Joerg Roedel > To: Lu Baolu > Cc: sta...@vger.kernel.org > Cc: linux-...@vger.kernel.

Re: [PATCH v2 03/12] ACPI/IORT: Make iort_msi_map_rid() PCI agnostic

2020-07-21 Thread Bjorn Helgaas
> Cc: Will Deacon > Cc: Hanjun Guo > Cc: Bjorn Helgaas > Cc: Sudeep Holla > Cc: Catalin Marinas > Cc: Robin Murphy > Cc: "Rafael J. Wysocki" Acked-by: Bjorn Helgaas Sorry I missed this! > --- > drivers/acpi/arm64/iort.c | 12 ++-- > drivers/p

Re: [PATCH] PCI/ATS: PASID and PRI are only enumerated in PF devices.

2020-07-23 Thread Bjorn Helgaas
On Thu, Jul 23, 2020 at 10:38:19AM -0700, Raj, Ashok wrote: > Hi Bjorn > > On Tue, Jul 21, 2020 at 09:54:01AM -0500, Bjorn Helgaas wrote: > > On Mon, Jul 20, 2020 at 09:43:00AM -0700, Ashok Raj wrote: > > > PASID and PRI capabilities are only enumerated in PF devices.

Re: [PATCH v3 1/1] PCI/ATS: Check PRI supported on the PF device when SRIOV is enabled

2020-07-23 Thread Bjorn Helgaas
s > PASID feature discovery (pci_pasid_features) for PRI. > > Fixes: b16d0cb9e2fc ("iommu/vt-d: Always enable PASID/PRI PCI capabilities > before ATS") > Signed-off-by: Ashok Raj This looks right to me, but I would like Joerg's ack before applying it. > To: Bjorn H

Re: [PATCH v3 1/1] PCI/ATS: Check PRI supported on the PF device when SRIOV is enabled

2020-07-24 Thread Bjorn Helgaas
s > PASID feature discovery (pci_pasid_features) for PRI. > > Fixes: b16d0cb9e2fc ("iommu/vt-d: Always enable PASID/PRI PCI capabilities > before ATS") > Signed-off-by: Ashok Raj Applied with Baolu's reviewed-by and Joerg's ack to pci/virtualization for v5.9, than

<    1   2   3   4   5   >