linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: robin.murphy@arm.com (Robin Murphy)
To: linux-arm-kernel@lists.infradead.org
Subject: [GIT PULL] iommu: Kill off pgsize_bitmap field from struct iommu_ops
Date: Tue, 31 Mar 2015 17:07:01 +0100	[thread overview]
Message-ID: <551AC625.6000200@arm.com> (raw)
In-Reply-To: <20150331142440.GD22683@8bytes.org>

Hi Joerg,

On 31/03/15 15:24, Joerg Roedel wrote:
> Hi Will,
>
> On Fri, Mar 27, 2015 at 05:19:46PM +0000, Will Deacon wrote:
>> Please can you pull the following IOMMU changes for 4.1? They move the
>> per-iommu_ops pgsize_bitmap field into the iommu_domain, which allows
>> IOMMUs such as the ARM SMMU to support different page sizes within a
>> given SoC.
>
> I have some concerns about the direction taken with this patch-set. The
> goal for the IOMMU-API is still to have domains that can be attached to
> arbitrary devices (even when mappings already exist). But with this
> patch-set we move into a direction where a domain can only be used on
> IOMMUs that support the page-sizes required by the domain. In the end
> this would be visible to the user of the IOMMU-API, which is not what we
> want.

I think the notion of sharing domains between arbitrary devices is 
already broken for systems with multiple IOMMU devices - with the 
iommu_domain itself now embedded in a private data structure, it's 
certainly not safe to pass it to two different drivers, should the 
client devices be behind heterogeneous IOMMUs. Furthermore, since most 
of those private data structures contain instance-specific data, that 
prevents a domain spanning even two homogeneous IOMMU devices.

If the goal is for iommu_domains to be a hardware-independent 
abstraction, then shouldn't we be looking to move the other 
instance-specific features like attributes and geometry out of them? 
Perhaps the answer is the opposite; accept the existing iommu_domain as 
what it appears to be used as - a fairly thin abstraction of one or more 
context banks/uTLBs/DMARs/whatever on a single IOMMU device - and 
consider some higher-level interface for grouping one or more of these 
"device domains" together and sharing a single IOVA space between them.


Robin.

> I can understand the motivation behind these patches, but we need to
> think about how this could work with the desired semantics of the
> IOMMU-API.
>
>
> 	Joerg
>

  parent reply	other threads:[~2015-03-31 16:07 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-27 17:19 [GIT PULL] iommu: Kill off pgsize_bitmap field from struct iommu_ops Will Deacon
2015-03-31 14:24 ` Joerg Roedel
2015-03-31 14:49   ` Will Deacon
2015-03-31 15:50     ` Alex Williamson
2015-04-01 11:53       ` Will Deacon
2015-04-01 15:53         ` Joerg Roedel
2015-04-01 16:45         ` Alex Williamson
2015-04-01 15:38     ` Joerg Roedel
2015-04-01 17:03       ` Will Deacon
2015-04-01 21:24         ` Joerg Roedel
2015-03-31 16:07   ` Robin Murphy [this message]
2015-04-01 13:14 ` David Woodhouse
2015-04-01 13:39   ` Will Deacon
2015-04-01 13:52     ` David Woodhouse
2015-04-01 14:05       ` Will Deacon
2015-04-01 14:28         ` David Woodhouse
2015-04-01 14:39           ` Will Deacon
2015-04-01 14:46             ` David Woodhouse
2015-04-01 16:36               ` Will Deacon
2015-04-01 21:28                 ` joro at 8bytes.org
2015-04-02  8:58                   ` Will Deacon
2015-04-01 16:51       ` Alex Williamson
2015-04-01 17:50         ` Will Deacon
2015-04-01 18:18           ` 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=551AC625.6000200@arm.com \
    --to=robin.murphy@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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).