linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/11] PCI: Fix ATS deadlock
@ 2015-08-11 15:50 Bjorn Helgaas
  2015-08-11 15:51 ` [PATCH v3 01/11] iommu/vt-d: Cache PCI ATS state and Invalidate Queue Depth Bjorn Helgaas
                   ` (11 more replies)
  0 siblings, 12 replies; 15+ messages in thread
From: Bjorn Helgaas @ 2015-08-11 15:50 UTC (permalink / raw)
  To: linux-pci, Joerg Roedel, David Woodhouse; +Cc: Gregor Dick, iommu, Yinghai Lu

Gregor reported a deadlock [1] when enabling a VF that supports ATS.
This series is intended to fix that.  The second patch should be enough to
fix the deadlock; the rest are simplification and cleanup.

These are based on v4.2-rc2.

[1] http://permalink.gmane.org/gmane.linux.kernel.iommu/9433

Changes between v2 and v3:
  - Initialize info->ats.enabled, qdep in intel-iommu.c (Yinghai)
  - Use "u8 enabled:1", not "int enabled:1" in intel-iommu.c state
  - WARN_ON() if enabling ATS when already enabled (Joerg)
  - Return -EBUSY, not -EINVAL if enabling ATS when already enabled
  - Added Reviewed-by from Joerg

Changes between v1 and v2:
  - Remove use of pci_ats_enabled() (intel-iommu.c)
  - Call pci_ats_queue_depth() only once per device and cache result
    (intel-iommu.c)
  - Remove pci_ats_enabled() interface
  - Stop caching queue depth in pci_dev to save space
  - Add PF refcount of how many associated VFs have ATS enabled
  - Add comment that ATS must be enabled on PF before on VFs
  - Require ATS to be disabled on all VFs and PF before changing STU

---

Bjorn Helgaas (11):
      iommu/vt-d: Cache PCI ATS state and Invalidate Queue Depth
      PCI: Allocate ATS struct during enumeration
      PCI: Embed ATS info directly into struct pci_dev
      PCI: Reduce size of ATS structure elements
      PCI: Rationalize pci_ats_queue_depth() error checking
      PCI: Inline the ATS setup code into pci_ats_init()
      PCI: Use pci_physfn() rather than looking up physfn by hand
      PCI: Clean up ATS error handling
      PCI: Move ATS declarations to linux/pci.h so they're all together
      PCI: Stop caching ATS Invalidate Queue Depth
      PCI: Remove pci_ats_enabled()


 drivers/iommu/intel-iommu.c |   28 ++++++---
 drivers/pci/ats.c           |  132 +++++++++++++++----------------------------
 drivers/pci/probe.c         |    3 +
 include/linux/pci-ats.h     |   49 ----------------
 include/linux/pci.h         |   18 ++++++
 5 files changed, 85 insertions(+), 145 deletions(-)

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-08-14 14:41 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-11 15:50 [PATCH v3 00/11] PCI: Fix ATS deadlock Bjorn Helgaas
2015-08-11 15:51 ` [PATCH v3 01/11] iommu/vt-d: Cache PCI ATS state and Invalidate Queue Depth Bjorn Helgaas
2015-08-13  7:53   ` Joerg Roedel
2015-08-11 15:51 ` [PATCH v3 02/11] PCI: Allocate ATS struct during enumeration Bjorn Helgaas
2015-08-11 15:51 ` [PATCH v3 03/11] PCI: Embed ATS info directly into struct pci_dev Bjorn Helgaas
2015-08-11 15:51 ` [PATCH v3 04/11] PCI: Reduce size of ATS structure elements Bjorn Helgaas
2015-08-11 15:51 ` [PATCH v3 05/11] PCI: Rationalize pci_ats_queue_depth() error checking Bjorn Helgaas
2015-08-11 15:51 ` [PATCH v3 06/11] PCI: Inline the ATS setup code into pci_ats_init() Bjorn Helgaas
2015-08-11 15:51 ` [PATCH v3 07/11] PCI: Use pci_physfn() rather than looking up physfn by hand Bjorn Helgaas
2015-08-11 15:52 ` [PATCH v3 08/11] PCI: Clean up ATS error handling Bjorn Helgaas
2015-08-13  7:57   ` Joerg Roedel
2015-08-11 15:52 ` [PATCH v3 09/11] PCI: Move ATS declarations to linux/pci.h so they're all together Bjorn Helgaas
2015-08-11 15:52 ` [PATCH v3 10/11] PCI: Stop caching ATS Invalidate Queue Depth Bjorn Helgaas
2015-08-11 15:52 ` [PATCH v3 11/11] PCI: Remove pci_ats_enabled() Bjorn Helgaas
2015-08-14 14:40 ` [PATCH v3 00/11] PCI: Fix ATS deadlock Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).