lkml.org 
[lkml]   [2018]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v4 04/14] PCI/P2PDMA: Clear ACS P2P flags for all devices behind switches
On 5/11/2018 2:52 AM, Christian König wrote:
> This only works when the IOVA and the PCI bus addresses never overlap.
> I'm not sure how the IOVA allocation works but I don't think we
> guarantee that on Linux.

I find this hard to believe. There's always the possibility that some
part of the system doesn't support ACS so if the PCI bus addresses and
IOVA overlap there's a good chance that P2P and ATS won't work at all on
some hardware.


> If we really want to enable P2P without ATS and IOMMU enabled I think we
> should probably approach it like this:
>
> a) Make double sure that IOVA in an IOMMU group never overlap with PCI
> BARs in that group.
>
> b) Add configuration options to put a whole PCI branch of devices (e.g.
> a bridge) into a single IOMMU group.
>
> c) Add a configuration option to disable the ACS bit on bridges in the
> same IOMMU group.

I think a configuration option to manage IOMMU groups as you suggest
would be a very complex interface and difficult to implement. I prefer
the option to disable the ACS bit on boot and let the existing code put
the devices into their own IOMMU group (as it should already do to
support hardware that doesn't have ACS support).

Logan

\
 
 \ /
  Last update: 2018-05-11 17:49    [W:0.071 / U:2.972 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site