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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 01 Sep 2014 15:14:45 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	linaro-mm-sig@...ts.linaro.org
Cc:	Marek Szyprowski <m.szyprowski@...sung.com>,
	Rob Herring <robh@...nel.org>,
	"linux-samsung-soc@...r.kernel.org" 
	<linux-samsung-soc@...r.kernel.org>,
	Shaik Ameer Basha <shaik.ameer@...sung.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Joerg Roedel <joro@...tes.org>,
	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Cho KyongHo <pullip.cho@...sung.com>,
	Tomasz Figa <tomasz.figa@...il.com>,
	Inki Dae <inki.dae@...sung.com>,
	"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
	Kukjin Kim <kgene.kim@...sung.com>,
	Laurent Pinchart <laurent.pinchart@...asonboard.com>,
	Sylwester Nawrocki <s.nawrocki@...sung.com>,
	Olof Johansson <olof@...om.net>,
	Kyungmin Park <kyungmin.park@...sung.com>,
	Thierry Reding <treding@...dia.com>,
	linux-arm-kernel@...ts.infradead.org, will.deacon@....com
Subject: Re: [Linaro-mm-sig] [PATCH 10/29] drivers: add DRIVER_HAS_OWN_IOMMU_MANAGER flag

On Monday 01 September 2014 14:07:34 Marek Szyprowski wrote:
> On 2014-09-01 13:56, Arnd Bergmann wrote:
> > On Monday 01 September 2014 12:47:08 Marek Szyprowski wrote:
> >>> Who do you think needs to set this flag, and who needs to read it?
> >> In the proposed solution Exynos IOMMU driver creates a separate IO
> >> address space
> >> for every client device in a system and binds it to the default
> >> dma-mapping space
> >> for the given device. When drivers are doing its own management of IO
> >> address
> >> space, instead of relying on what is available by default with dma-mapping
> >> interface, this will require releasing of the previously created default
> >> structures and resources. So this flag is set by the driver doing its own
> >> management of io address space. The flags is then checked by Exynos
> >> IOMMU driver
> >> to avoid creating the default dma-mapping address space for devices
> >> which driver
> >> does its own management.
> > I don't completely understand it yet. I would assume the device
> > to be added to the default domain at device creation time
> > (of_platform_populate), way before we know which device driver
> > is going to be used. How can this prevent the iommu driver
> > from doing the association with the domain?
> 
> of_platform_populate() is too early to do the association, because that 
> time the
> exynos iommu driver is even not yet probed.

Please have a look at the "Introduce automatic DMA configuration for IOMMU
masters" series that Will Deacon sent out the other day. The idea is that
we are changing the probe order so that the iommu gets initialized early
enough for all IOMMU association to be done there.

> The association with default dma-mapping domain is done in
> IOMMU_GROUP_NOTIFY_BIND_DRIVER notifier, just before binding the driver 
> to the
> given device. This way iommu driver can check dev->driver->flags and 
> skip creating
> default dma-mapping domain if driver announces that it wants to handle it by
> itself.

I really want to kill off those notifiers.

	Arnd
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ