<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/pci/ats.c, branch linux-5.5.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.5.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.5.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-02-24T07:38:19Z</updated>
<entry>
<title>PCI/ATS: Restore EXPORT_SYMBOL_GPL() for pci_{enable,disable}_ats()</title>
<updated>2020-02-24T07:38:19Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
</author>
<published>2019-12-19T12:03:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=08bd511fe94577d962eb48dca90a2ebc3dcd3a15'/>
<id>urn:sha1:08bd511fe94577d962eb48dca90a2ebc3dcd3a15</id>
<content type='text'>
[ Upstream commit bb950bca5d522119f8b9ce3f6cbac4841c6d6517 ]

Commit d355bb209783 ("PCI/ATS: Remove unnecessary EXPORT_SYMBOL_GPL()")
unexported a bunch of symbols from the PCI core since the only external
users were non-modular IOMMU drivers. Although most of those symbols
can remain private for now, 'pci_{enable,disable_ats()' is required for
the ARM SMMUv3 driver to build as a module, 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 so that the ARM SMMUv3 driver can be build
as a module.

Cc: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Cc: Joerg Roedel &lt;jroedel@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@google.com&gt;
[will: rewrote commit message]
Signed-off-by: Will Deacon &lt;will@kernel.org&gt;
Tested-by: John Garry &lt;john.garry@huawei.com&gt; # smmu v3
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Acked-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Signed-off-by: Joerg Roedel &lt;jroedel@suse.de&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>PCI/ATS: Use PF PASID for VFs</title>
<updated>2020-02-11T12:36:49Z</updated>
<author>
<name>Kuppuswamy Sathyanarayanan</name>
</author>
<published>2020-01-29T19:14:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d224605733cd5568133426cbff92568a9c12ecb5'/>
<id>urn:sha1:d224605733cd5568133426cbff92568a9c12ecb5</id>
<content type='text'>
commit 2e34673be0bd6bb0c6c496a861cbc3f7431e7ce3 upstream.

Per PCIe r5.0, sec 9.3.7.14, if a PF implements the PASID Capability, the
PF PASID configuration is shared by its VFs, and VFs must not implement
their own PASID Capability.  But commit 751035b8dc06 ("PCI/ATS: Cache PASID
Capability offset") changed pci_max_pasids() and pci_pasid_features() to
use the PASID Capability of the VF device instead of the associated PF
device.  This leads to IOMMU bind failures when pci_max_pasids() and
pci_pasid_features() are called for VFs.

In pci_max_pasids() and pci_pasid_features(), always use the PF PASID
Capability.

Fixes: 751035b8dc06 ("PCI/ATS: Cache PASID Capability offset")
Link: https://lore.kernel.org/r/fe891f9755cb18349389609e7fed9940fc5b081a.1580325170.git.sathyanarayanan.kuppuswamy@linux.intel.com
Signed-off-by: Kuppuswamy Sathyanarayanan &lt;sathyanarayanan.kuppuswamy@linux.intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
CC: stable@vger.kernel.org	# v5.5+
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PCI/ATS: Remove unnecessary EXPORT_SYMBOL_GPL()</title>
<updated>2019-10-15T21:39:11Z</updated>
<author>
<name>Bjorn Helgaas</name>
</author>
<published>2019-10-09T21:41:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d355bb2097834a977a6f47cec003b7d7748adbd6'/>
<id>urn:sha1:d355bb2097834a977a6f47cec003b7d7748adbd6</id>
<content type='text'>
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_enable_pri()
  pci_restore_pri_state()
  pci_reset_pri()
  pci_prg_resp_pasid_required()

  pci_enable_pasid()
  pci_disable_pasid()
  pci_restore_pasid_state()
  pci_pasid_features()
  pci_max_pasids()

Remove the unnecessary EXPORT_SYMBOL_GPL()s.

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Joerg Roedel &lt;jroedel@suse.de&gt;
</content>
</entry>
<entry>
<title>PCI/ATS: Cache PRI PRG Response PASID Required bit</title>
<updated>2019-10-15T21:39:10Z</updated>
<author>
<name>Bjorn Helgaas</name>
</author>
<published>2019-10-09T21:07:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e5adf79a1d8086aefa56f48eeb08f8fe4e054a3d'/>
<id>urn:sha1:e5adf79a1d8086aefa56f48eeb08f8fe4e054a3d</id>
<content type='text'>
The PRG Response PASID Required bit in the PRI Capability is read-only.
Read it once when we enumerate the device and cache the value so we don't
need to read it again.

Based-on-patch-by: Kuppuswamy Sathyanarayanan &lt;sathyanarayanan.kuppuswamy@linux.intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
</content>
</entry>
<entry>
<title>PCI/ATS: Cache PASID Capability offset</title>
<updated>2019-10-15T21:39:10Z</updated>
<author>
<name>Kuppuswamy Sathyanarayanan</name>
</author>
<published>2019-09-05T19:31:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=751035b8dc061ae434c3311bac9cd6d0e5e00f94'/>
<id>urn:sha1:751035b8dc061ae434c3311bac9cd6d0e5e00f94</id>
<content type='text'>
Previously each PASID interface searched for the PASID Capability.  Cache
the capability offset the first time we use it instead of searching each
time.

[bhelgaas: commit log, reorder patch to later, call pci_pasid_init() from
pci_init_capabilities()]
Link: https://lore.kernel.org/r/4957778959fa34eab3e8b3065d1951989c61cb0f.1567029860.git.sathyanarayanan.kuppuswamy@linux.intel.com
Link: https://lore.kernel.org/r/20190905193146.90250-6-helgaas@kernel.org
Signed-off-by: Kuppuswamy Sathyanarayanan &lt;sathyanarayanan.kuppuswamy@linux.intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
</content>
</entry>
<entry>
<title>PCI/ATS: Cache PRI Capability offset</title>
<updated>2019-10-15T21:39:09Z</updated>
<author>
<name>Kuppuswamy Sathyanarayanan</name>
</author>
<published>2019-09-05T19:31:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c065190bbcd4fb54ce9c5fd34fcad71acf2a0ea4'/>
<id>urn:sha1:c065190bbcd4fb54ce9c5fd34fcad71acf2a0ea4</id>
<content type='text'>
Previously each PRI interface searched for the PRI Capability.  Cache the
capability offset the first time we use it instead of searching each time.

[bhelgaas: commit log, reorder patch to later, call pci_pri_init() from
pci_init_capabilities()]
Link: https://lore.kernel.org/r/0c5495d376faf6dbb8eb2165204c474438aaae65.156
7029860.git.sathyanarayanan.kuppuswamy@linux.intel.com
Link: https://lore.kernel.org/r/20190905193146.90250-5-helgaas@kernel.org
Signed-off-by: Kuppuswamy Sathyanarayanan &lt;sathyanarayanan.kuppuswamy@linux.intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
</content>
</entry>
<entry>
<title>PCI/ATS: Disable PF/VF ATS service independently</title>
<updated>2019-10-15T21:39:09Z</updated>
<author>
<name>Kuppuswamy Sathyanarayanan</name>
</author>
<published>2019-09-05T19:31:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3ad62192097443e8c3a8e244475bacaecb894d4e'/>
<id>urn:sha1:3ad62192097443e8c3a8e244475bacaecb894d4e</id>
<content type='text'>
Previously we didn't disable the PF ATS until all associated VFs had
disabled it.  But per PCIe spec r5.0, sec 9.3.7.8, the ATS Capability in
VFs and associated PFs may be enabled independently.  Leaving ATS enabled
in the PF unnecessarily may have power and performance impacts.

Remove this dependency logic in the ATS enable/disable code.

[bhelgaas: commit log]
Suggested-by: Ashok Raj &lt;ashok.raj@intel.com&gt;
Link: https://lore.kernel.org/r/8163ab8fa66afd2cba514ae95d29ab12104781aa.1567029860.git.sathyanarayanan.kuppuswamy@linux.intel.com
Link: https://lore.kernel.org/r/20190905193146.90250-4-helgaas@kernel.org
Signed-off-by: Kuppuswamy Sathyanarayanan &lt;sathyanarayanan.kuppuswamy@linux.intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Cc: Ashok Raj &lt;ashok.raj@intel.com&gt;
Cc: Keith Busch &lt;keith.busch@intel.com&gt;
</content>
</entry>
<entry>
<title>PCI/ATS: Handle sharing of PF PASID Capability with all VFs</title>
<updated>2019-10-15T21:39:09Z</updated>
<author>
<name>Kuppuswamy Sathyanarayanan</name>
</author>
<published>2019-09-05T19:31:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2b0ae7cc3bfc3fae124c25870f41291c670b4549'/>
<id>urn:sha1:2b0ae7cc3bfc3fae124c25870f41291c670b4549</id>
<content type='text'>
Per PCIe r5.0, sec 9.3.7.14, if a PF implements the PASID Capability, the
PF PASID configuration is shared by its VFs.  VFs must not implement their
own PASID Capability.  Since VFs don't have a PASID Capability,
pci_enable_pasid() always failed, which caused IOMMU setup to fail.

Update the PASID interfaces so for VFs they reflect the state of the PF
PASID.

[bhelgaas: rebase without pasid_cap caching, commit log]
Suggested-by: Ashok Raj &lt;ashok.raj@intel.com&gt;
Link: https://lore.kernel.org/r/8ba1ac192e4ac737508b6ac15002158e176bab91.1567029860.git.sathyanarayanan.kuppuswamy@linux.intel.com
Link: https://lore.kernel.org/r/20190905193146.90250-3-helgaas@kernel.org
Signed-off-by: Kuppuswamy Sathyanarayanan &lt;sathyanarayanan.kuppuswamy@linux.intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Cc: Ashok Raj &lt;ashok.raj@intel.com&gt;
Cc: Keith Busch &lt;keith.busch@intel.com&gt;
</content>
</entry>
<entry>
<title>PCI/ATS: Handle sharing of PF PRI Capability with all VFs</title>
<updated>2019-10-15T21:39:09Z</updated>
<author>
<name>Kuppuswamy Sathyanarayanan</name>
</author>
<published>2019-09-05T19:31:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9bf49e36d7183a170a9906d19acc5254818fc574'/>
<id>urn:sha1:9bf49e36d7183a170a9906d19acc5254818fc574</id>
<content type='text'>
Per PCIe r5.0, sec 9.3.7.11, VFs must not implement the PRI Capability.  If
the PF implements PRI, it is shared by the VFs.  Since VFs don't have a PRI
Capability, pci_enable_pri() always failed, which caused IOMMU setup to
fail.

Update the PRI interfaces so for VFs they reflect the state of the PF PRI.

[bhelgaas: rebase without pri_cap caching, commit log]
Suggested-by: Ashok Raj &lt;ashok.raj@intel.com&gt;
Link: https://lore.kernel.org/r/b971e31f8695980da8e4a7f93e3b6a3edba3edaa.1567029860.git.sathyanarayanan.kuppuswamy@linux.intel.com
Link: https://lore.kernel.org/r/20190905193146.90250-2-helgaas@kernel.org
Signed-off-by: Kuppuswamy Sathyanarayanan &lt;sathyanarayanan.kuppuswamy@linux.intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Cc: Ashok Raj &lt;ashok.raj@intel.com&gt;
Cc: Keith Busch &lt;keith.busch@intel.com&gt;
</content>
</entry>
<entry>
<title>PCI/ATS: Move pci_prg_resp_pasid_required() to CONFIG_PCI_PRI</title>
<updated>2019-10-15T21:38:33Z</updated>
<author>
<name>Bjorn Helgaas</name>
</author>
<published>2019-10-09T19:54:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8cbb8a9374a271099bacdc890fb16d374261332b'/>
<id>urn:sha1:8cbb8a9374a271099bacdc890fb16d374261332b</id>
<content type='text'>
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-related things.

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Kuppuswamy Sathyanarayanan &lt;sathyanarayanan.kuppuswamy@linux.intel.com&gt;
Reviewed-by: Joerg Roedel &lt;jroedel@suse.de&gt;
</content>
</entry>
</feed>
