From: Bjorn Helgaas <bhelgaas@google.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] pci/quirks: Enable quirks for PCIe ACS on Intel PCH root ports
Date: Fri, 31 Jan 2014 16:25:47 -0700 [thread overview]
Message-ID: <20140131232547.GA12318@google.com> (raw)
In-Reply-To: <1391198773.6959.133.camel@bling.home>
On Fri, Jan 31, 2014 at 01:06:13PM -0700, Alex Williamson wrote:
> On Fri, 2014-01-31 at 12:26 -0700, Bjorn Helgaas wrote:
> > On Mon, Jan 20, 2014 at 03:01:52PM -0700, Alex Williamson wrote:
> > > +/*
> > > + * Many Intel PCH root ports do provide ACS-like features to disable peer
> > > + * transactions and validate bus numbers in requests, but do not provide an
> > > + * actual PCIe ACS capability. This is the list of device IDs known to fall
> > > + * into that category as provided by Intel in Red Hat bugzilla 1037684.
> >
> > Is there any documentation for this? I'd feel better if we had a public
> > statement from Intel that "these devices support ACS and this is how you do
> > it." The standard PCIe ACS capability is an explicit statement that the
> > vendor intends to support the feature as documented in the spec. If we put
> > in undocumented quirks, we may end up relying on something the vendor has
> > not qualified and does not intend to actually support.
>
> I've tried to get a public document, but the bz list is the best I've
> been able to achieve and the best I expect to happen.
>
> > I see the device ID list in the RH bugzilla, of course, but I don't see the
> > name of anybody in Intel who stands behind the list and the knobs used in
> > this patch. I expect you'll remind me that we don't have any better
> > documentation for 15b100dfd1c9 ("PCI: Claim ACS support for AMD southbridge
> > devices"), which is true. Mea culpa.
>
> The list in the bz is actually posted by an Intel partner, for whatever
> reason using their redhat.com login rather than intel.com. FWIW, I
> agree 100% that I would prefer the list and procedure where public
> documents, those who have been part of the process can attest to how
> hard we've pushed for that, unfortunately this is what we have.
Heh, I saw "Don Dugger," but for some reason I read "Don Dutile" :) I
wonder if you could get him (Don Dugger) to ack this patch?
Absent that, and maybe even *with* that, I'd like some sort of dmesg note
about enabling undocumented ACS-like features. I'm not happy with Linux
claiming to support something that the vendor isn't willing to stand
behind, especially a security-related thing like this.
> > > +static int pci_quirk_enable_intel_pch_acs(struct pci_dev *dev)
> > > +{
> > > + if (!pci_quirk_intel_pch_acs_match(dev))
> > > + return -ENOTTY;
> > > +
> > > + if (atomic_read(&intel_pch_acs_quirk_status) < 0)
> > > + return 0;
> > > +
> > > + if (pci_quirk_enable_intel_lpc_acs(dev)) {
> > > + dev_warn(&dev->dev, "Failed to enable Intel PCH ACS quirk\n");
> > > + atomic_set(&intel_pch_acs_quirk_status, -1);
> >
> > This means we handle hot-added Root Ports differently than those present at
> > boot. If the system supports ACS, then we hot-add a Root Port that doesn't
> > support ACS, then remove it, I think the system (with original
> > configuration) no longer supports ACS.
>
> That's true, sort of. IOMMU groups are determined as the devices are
> probed and remain static. So, while this turns off ACS, the IOMMU
> groups after Root Port unplug remain as they were before. Making them
> dynamic is a much larger problem. I was trying to use the atomic to
> avoid allocating data structures runtime for this quirk. The other
> question though would be whether any of these particular PCH devices
> support hotplug. Do you know for which Intel chipsets this is even
> feasible? If we need more fine grained tracking we'll need to track the
> segment and bus number, then we might as well use another byte with a
> bit per function identifying the quirked ports. Unfortunately with a
> list comes some sort of locking and allocation and de-allocation of
> entries, so we need an unplug hook. It's possible, but I'd rather keep
> it simple if this is only a "what if" question.
This is definitely a "what if" question. I have no idea whether these
devices can be hotplugged.
My point is that the reader should not *need* to know whether these
particular devices can be hot-plugged. If we need that knowledge, it
becomes impractical to analyze the code. So if we can write this in a way
that obviously works for hot-plugged Root Ports, that would be much better.
Can we add an "acs_enabled" bit in the pci_dev or something?
> Thanks,
Don't thank me, I haven't done anything yet except make your life harder :)
Bjorn
next prev parent reply other threads:[~2014-01-31 23:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-20 22:01 [PATCH 0/2] Quirk Intel PCH root ports for ACS-like features Alex Williamson
2014-01-20 22:01 ` [PATCH 1/2] pci: Add device specific PCI ACS enable Alex Williamson
2014-01-20 22:01 ` [PATCH 2/2] pci/quirks: Enable quirks for PCIe ACS on Intel PCH root ports Alex Williamson
2014-01-31 19:26 ` Bjorn Helgaas
2014-01-31 20:06 ` Alex Williamson
2014-01-31 23:25 ` Bjorn Helgaas [this message]
2014-01-31 18:49 ` [PATCH 0/2] Quirk Intel PCH root ports for ACS-like features Bjorn Helgaas
2014-01-31 19:25 ` Alex Williamson
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=20140131232547.GA12318@google.com \
--to=bhelgaas@google.com \
--cc=alex.williamson@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.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.