lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sat, 28 Nov 2015 13:19:58 +0100
From:	Joerg Roedel <joro@...tes.org>
To:	chenfeng <puck.chen@...ilicon.com>
Cc:	iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
	robh+dt@...nel.org, pawel.moll@....com, mark.rutland@....com,
	ijc+devicetree@...lion.org.uk, devicetree@...r.kernel.org,
	puck.chen@...yun.com, w.f@...wei.com, xuwei5@...ilicon.com,
	guodong.xu@...aro.org, arnd@...aro.org, haojian.zhuang@...aro.org
Subject: Re: [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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists