OSDN Git Service

PCI: Add "pci=disable_acs_redir=" parameter for peer-to-peer support
authorLogan Gunthorpe <logang@deltatee.com>
Mon, 30 Jul 2018 16:18:40 +0000 (10:18 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 9 Aug 2018 22:37:19 +0000 (17:37 -0500)
commitaaca43fda742223e4f62bd73e13055f5364e9a9b
tree9d7cd8930c6e3bdff06a51f3f1c327f99082d61a
parent45db33709ccc7330c55fc6751c96468de407f2ac
PCI: Add "pci=disable_acs_redir=" parameter for peer-to-peer support

To support peer-to-peer traffic on a segment of the PCI hierarchy, we must
disable the ACS redirect bits for select PCI bridges.  The bridges must be
selected before the devices are discovered by the kernel and the IOMMU
groups created.  Therefore, add a kernel command line parameter to specify
devices which must have their ACS bits disabled.

The new parameter takes a list of devices separated by a semicolon.  Each
device specified will have its ACS redirect bits disabled.  This is
similar to the existing 'resource_alignment' parameter.

The ACS Request P2P Request Redirect, P2P Completion Redirect and P2P
Egress Control bits are disabled, which is sufficient to always allow
passing P2P traffic uninterrupted.  The bits are set after the kernel
(optionally) enables the ACS bits itself.  It is also done regardless of
whether the kernel or platform firmware sets the bits.

If the user tries to disable the ACS redirect for a device without the ACS
capability, print a warning to dmesg.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
[bhelgaas: reorder to add the generic code first and move the
device-specific quirk to subsequent patches]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Stephen Bates <sbates@raithlin.com>
Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
Acked-by: Christian König <christian.koenig@amd.com>
Documentation/admin-guide/kernel-parameters.txt
drivers/pci/pci.c