All of lore.kernel.org
 help / color / mirror / Atom feed
* Devices behind a non-ACS switch are assigned different iommu-groups
@ 2017-10-29  7:56 Ilya Lesokhin
  2017-11-06 20:52 ` Alex Williamson
  0 siblings, 1 reply; 2+ messages in thread
From: Ilya Lesokhin @ 2017-10-29  7:56 UTC (permalink / raw)
  To: alex.williamson, linux-pci

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 swi=
tch=20
Upstream port to have ACS enabled.
http://elixir.free-electrons.com/linux/v4.13.1/source/drivers/pci/pci.c#L29=
14
(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(...).

Thanks,
Ilya

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

* Re: Devices behind a non-ACS switch are assigned different iommu-groups
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Williamson @ 2017-11-06 20:52 UTC (permalink / raw)
  To: Ilya Lesokhin; +Cc: linux-pci

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

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

end of thread, other threads:[~2017-11-06 20:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.