From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [RFC PATCH 0/7] Introduce automatic DMA configuration for IOMMU masters Date: Tue, 02 Sep 2014 14:43:18 +0200 Message-ID: <3133975.8bg0CLVMMz@wuerfel> References: <1409327670-3495-1-git-send-email-will.deacon@arm.com> <20140902105730.GH25379@arm.com> <5405B6F2.1060105@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5405B6F2.1060105-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Marek Szyprowski Cc: "jroedel-l3A5Bk7waGM@public.gmane.org" , Will Deacon , "iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org" , "thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" , "laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org" , "Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org" , "dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org" , "linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org" List-Id: iommu@lists.linux-foundation.org On Tuesday 02 September 2014 14:24:18 Marek Szyprowski wrote: > >>> For isolation purposes, it can only help to have more domains, but > >>> I would guess that there is some space overhead in maintaining lots > >>> of page tables. > >> I'm okay with both approaches (separate domain for each device vs. single > >> common domain for all devices). Maybe this can be some kind of Kconfig > >> option added to DMA debugging? Separation might be really helpful when > >> debugging strange device behavior. > > One potential problem with a single domain is when you have multiple > > instances of a given IOMMU, each with different hardware restrictions. > > Then you can end up with multiple sets of page tables for the domain > > which, although not impossible to work with, is a bit of a mess. > > Maybe the default dma-mapping domain should be one per a given IOMMU > instance? > This will simplify a lot of things in such case. Yes, that sounds like a good idea. Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 From: arnd@arndb.de (Arnd Bergmann) Date: Tue, 02 Sep 2014 14:43:18 +0200 Subject: [RFC PATCH 0/7] Introduce automatic DMA configuration for IOMMU masters In-Reply-To: <5405B6F2.1060105@samsung.com> References: <1409327670-3495-1-git-send-email-will.deacon@arm.com> <20140902105730.GH25379@arm.com> <5405B6F2.1060105@samsung.com> Message-ID: <3133975.8bg0CLVMMz@wuerfel> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Tuesday 02 September 2014 14:24:18 Marek Szyprowski wrote: > >>> For isolation purposes, it can only help to have more domains, but > >>> I would guess that there is some space overhead in maintaining lots > >>> of page tables. > >> I'm okay with both approaches (separate domain for each device vs. single > >> common domain for all devices). Maybe this can be some kind of Kconfig > >> option added to DMA debugging? Separation might be really helpful when > >> debugging strange device behavior. > > One potential problem with a single domain is when you have multiple > > instances of a given IOMMU, each with different hardware restrictions. > > Then you can end up with multiple sets of page tables for the domain > > which, although not impossible to work with, is a bit of a mess. > > Maybe the default dma-mapping domain should be one per a given IOMMU > instance? > This will simplify a lot of things in such case. Yes, that sounds like a good idea. Arnd