From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932738AbbA3MZ6 (ORCPT ); Fri, 30 Jan 2015 07:25:58 -0500 Received: from 8bytes.org ([81.169.241.247]:57597 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932485AbbA3MZc (ORCPT ); Fri, 30 Jan 2015 07:25:32 -0500 Date: Fri, 30 Jan 2015 13:25:30 +0100 From: Joerg Roedel To: Will Deacon Cc: "iommu@lists.linux-foundation.org" , Kukjin Kim , David Woodhouse , Heiko Stuebner , Hiroshi Doyu , Thierry Reding , Alex Williamson , Arnd Bergmann , "linux-kernel@vger.kernel.org" , Robin Murphy , Laurent Pinchart , "jroedel@suse.de" Subject: Re: [PATCH 2/5] iommu: Allocate a default domain for iommu groups Message-ID: <20150130122530.GB3702@8bytes.org> References: <1422317339-22620-1-git-send-email-joro@8bytes.org> <1422317339-22620-3-git-send-email-joro@8bytes.org> <20150128143006.GQ1569@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150128143006.GQ1569@arm.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 28, 2015 at 02:30:06PM +0000, Will Deacon wrote: > On Tue, Jan 27, 2015 at 12:08:56AM +0000, Joerg Roedel wrote: > > + if (group->default_domain == NULL) > > + group->default_domain = __iommu_domain_alloc(dev->bus, > > + IOMMU_DOMAIN_DMA); > > Having a per-group domain is wasteful for IOMMUs that only support a modest > number of concurrent domains, so in reality I think we need to have one > domain per IOMMU instance. Is that possible? Well, you could make sure that there are no more groups behind one IOMMU than the number of concurent domains it can handle. But that would be too static. But once we have an per-iommu-descriptor in the IOMMU core I see no reason to allocate a default domain per iommu only, based on a policy exported by the driver. Joerg