From: Bjorn Helgaas <bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
To: linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Joerg Roedel <jroedel-l3A5Bk7waGM@public.gmane.org>,
David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
Cc: Yinghai Lu <yinghai-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
Gregor Dick <gdick-s/n/eUQHGBpZroRs9YW3xA@public.gmane.org>
Subject: Re: [PATCH v3 00/11] PCI: Fix ATS deadlock
Date: Fri, 14 Aug 2015 09:40:57 -0500 [thread overview]
Message-ID: <20150814144057.GB26431@google.com> (raw)
In-Reply-To: <20150811154525.21078.85310.stgit-1RhO1Y9PlrlHTL0Zs8A6p/gx64E7kk8eUsxypvmhUTTZJqsBc5GL+g@public.gmane.org>
On Tue, Aug 11, 2015 at 10:50:59AM -0500, Bjorn Helgaas wrote:
> 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(-)
Applied with the tweaks Joerg suggested and his Ack/Reviewed-by to
pci/iommu for v4.3. Thanks for all your reviewing and testing!
WARNING: multiple messages have this Message-ID (diff)
From: Bjorn Helgaas <bhelgaas@google.com>
To: linux-pci@vger.kernel.org, Joerg Roedel <jroedel@suse.de>,
David Woodhouse <dwmw2@infradead.org>
Cc: Gregor Dick <gdick@solarflare.com>,
iommu@lists.linux-foundation.org, Yinghai Lu <yinghai@kernel.org>
Subject: Re: [PATCH v3 00/11] PCI: Fix ATS deadlock
Date: Fri, 14 Aug 2015 09:40:57 -0500 [thread overview]
Message-ID: <20150814144057.GB26431@google.com> (raw)
In-Reply-To: <20150811154525.21078.85310.stgit@bhelgaas-glaptop2.roam.corp.google.com>
On Tue, Aug 11, 2015 at 10:50:59AM -0500, Bjorn Helgaas wrote:
> 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(-)
Applied with the tweaks Joerg suggested and his Ack/Reviewed-by to
pci/iommu for v4.3. Thanks for all your reviewing and testing!
next prev parent reply other threads:[~2015-08-14 14:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
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
[not found] ` <20150811154525.21078.85310.stgit-1RhO1Y9PlrlHTL0Zs8A6p/gx64E7kk8eUsxypvmhUTTZJqsBc5GL+g@public.gmane.org>
2015-08-11 15:52 ` [PATCH v3 11/11] PCI: Remove pci_ats_enabled() Bjorn Helgaas
2015-08-11 15:52 ` Bjorn Helgaas
2015-08-14 14:40 ` Bjorn Helgaas [this message]
2015-08-14 14:40 ` [PATCH v3 00/11] PCI: Fix ATS deadlock Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150814144057.GB26431@google.com \
--to=bhelgaas-hpiqsd4aklfqt0dzr+alfa@public.gmane.org \
--cc=dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
--cc=gdick-s/n/eUQHGBpZroRs9YW3xA@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=jroedel-l3A5Bk7waGM@public.gmane.org \
--cc=linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=yinghai-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.