linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Ilya Lesokhin <ilyal@mellanox.com>
Cc: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: Devices behind a non-ACS switch are assigned different iommu-groups
Date: Mon, 6 Nov 2017 13:52:35 -0700	[thread overview]
Message-ID: <20171106135235.643ca4ec@t450s.home> (raw)
In-Reply-To: <AM4PR0501MB2723EC01DCA37976AE4EABA4D4580@AM4PR0501MB2723.eurprd05.prod.outlook.com>

On Sun, 29 Oct 2017 07:56:52 +0000
Ilya Lesokhin <ilyal@mellanox.com> wrote:

> Hi,
> I was testing devices assignment behind a non-ACS switch and to my surprise,
> Devices connected to different ports were assigned different iommu-groups.
> 
> The reason for this behavior is that pci_acs_enabled(...) considers the switch 
> Upstream port to have ACS enabled.
> http://elixir.free-electrons.com/linux/v4.13.1/source/drivers/pci/pci.c#L2914
> (the upstream port is not a multifunction device).
> 
> I'm not sure what the correct solution is but I believe, the upstream port
> Shouldn't be considered in pci_acs_path_enable(...).

Yes, this seems like a bug.  We should fix it, but we're likely to make
some people unhappy by doing so :-\  My guess it that this works
correctly if the switch enumerates downstream ports as separate
functions within the same slot, but fails if the downstream ports are
exposed as separate slots.  We like to assume that separate slots are
isolated, but of course they're all within the internal implementation
of the switch here.  Patches welcome, otherwise I'll try to look at it
soon.  Thanks,

Alex

      reply	other threads:[~2017-11-06 20:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-29  7:56 Devices behind a non-ACS switch are assigned different iommu-groups Ilya Lesokhin
2017-11-06 20:52 ` Alex Williamson [this message]

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=20171106135235.643ca4ec@t450s.home \
    --to=alex.williamson@redhat.com \
    --cc=ilyal@mellanox.com \
    --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 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).