lkml.org 
[lkml]   [2015]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V5 RESEND 2/3] iommu/hisilicon: Add hi6220-SoC smmu driver
On Sat, Nov 28, 2015 at 10:19:14AM +0800, chenfeng wrote:
> On 2015/11/27 20:02, Joerg Roedel wrote:
> > You need to create an iommu-group per smmu in your system and put all
> > devices translated by this smmu in that group. And then you must change
> > your code to allow attaching/detaching this iommu-group to different
> > domains.
> >
> I read the code,I am confused about these concepts.
> In my opinion,
> IOMMU-Domain: The masters in one domain share the same iova space. Is that right?

Yes, an iommu-domain is an abstraction of a single page-table and
describes one iova address space. The SMMU in your hardware supports
only on page-table, so all devices behind it share a single iova address
space, und must be in the same domain.

But the way you implemented it there could be only one domain per SMMU.
With the IOMMU-API we must support to change the domain of an SMMU.
Think of one domain for DMA-API usage and another for VFIO, for example.

> IOMMU-GROUP: As you mentioned up,all devices translated by this smmu
> should be into one group. I can do this. But if there is only on
> domain in the system, how can I attaching/detaching the group to
> different domains.

IOMMU-groups describe the isolation capabilities of the IOMMU between
devices. If devices are in a different IOMMU-group, this means that
the hardware can isolate them from each other.

Attaching the devices in a group to a new domain means in your case,
that you set a different page-table for them. Since you can only do that
for all devices behind a SMMU, these devices must be in on IOMMU-group.



Joerg



\
 
 \ /
  Last update: 2015-11-28 13:41    [W:0.053 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site