Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4791579yba; Tue, 30 Apr 2019 04:34:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqxm3JgiCsUORUi7jLUlU5t+tUS+rG1QSiV0hNCJXA1lBfzTvfLxC+kpHRKDoW903AjfH1Lr X-Received: by 2002:a17:902:1003:: with SMTP id b3mr69193282pla.306.1556624051209; Tue, 30 Apr 2019 04:34:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556624051; cv=none; d=google.com; s=arc-20160816; b=y4lWJZFljuj1+RKL0pSJFWEHsGEP0i3ovCZ/4EX0mrJmNjkKevNs0qy2eBBwUhl+OY +drIa9Xo2zW/VR/TSnUGimJqKSFb0/bdZqh7ltqLiES08/ch/cAD6BbTIzA8jpPnpqxJ 50p6j8JS0xwms6p5v4mt/ZVK8ADmtgIjRnflGhfWgjE6eB0RaHnu3NrXJQddtod9reTE CgsRxH7NlTRnucZWNZVGXfRAv/4mtiYV5iOQ3hXimLLGqTNRXaxBOT6BO8da3hB093xQ FT7UK7yqJ8UJUr+ZP8ypnLt54L/Fu6o09svyF/21X/S9yv/wMtzYgpHw6hdKIuDbQe4q dCEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=bTJakeGtXfCFO8teZRiPCc85hwY+hi5jOYp83RF2vK8=; b=G+y2YE1mg47iUnQRBgU4SKaXuM+BI9OvcaysMgBdobXWZw/sT4/9ic26nB2jTp7aAd V1zpGWINijtNh1+0/hjR5USfWdvLBnYMYQPguHASFSol++9EuSiUK8CPXmzFyF76qByW 0VkKO4Y3PRikr6/NactaXYGHSeRkF4BhIbJ3Sy7hsH6ZizBK5OeUVZzTxYqI304cVhVV IayEAZSEc1C2aLfEtyM22R0allL6DZ4nUhhiw9kMw7ARhHMb7176q1eTTWj3amnMURsc 2CmeGGumN9Ck9mYOPNuFBseu7JVW74a9wdbIb+1EgQYXgUr+m9pxoyXGfYA+QWkK5ZTa nsSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=dDD5+vZ4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p1si36217977pls.64.2019.04.30.04.33.55; Tue, 30 Apr 2019 04:34:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=dDD5+vZ4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727512AbfD3LdA (ORCPT + 99 others); Tue, 30 Apr 2019 07:33:00 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:38432 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726202AbfD3Lc7 (ORCPT ); Tue, 30 Apr 2019 07:32:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=bTJakeGtXfCFO8teZRiPCc85hwY+hi5jOYp83RF2vK8=; b=dDD5+vZ4p7vFzthS3GF6A0TlP ou3DVrSmopmodYFGsBbdcncayzVXwQG3COqT57jRiBZUGiydOiTieZk5+UCHSbNOGdwMhA3TK3I5f tZ3149OtnCiWjvgs+yLvDEwj3ntD3Kf0bfxa/+FEReeeRVjYs5JGFmBcNOf9H1ulIRxXk5aILadkd 8td8Z7QYGelf3PNUPabK7mtdtZ/YBJie8Lr7Jfb3avfZnu6GGONkihvjPeK56qnyAEgV4CSxuMSKS 5VCu/Q1DOFX/FBg7oC5ZE6sEaKbjonvJSX/oXJGOGcS4KM4fNZ2FfQzjL/fS2ZaHkhjEDrsU5wjOp SkVGgORmA==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1hLR0H-00069j-G0; Tue, 30 Apr 2019 11:32:53 +0000 Date: Tue, 30 Apr 2019 04:32:53 -0700 From: Christoph Hellwig To: Robin Murphy Cc: Christoph Hellwig , Tom Murphy , iommu@lists.linux-foundation.org, Heiko Stuebner , Will Deacon , David Brown , Thierry Reding , linux-s390@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Krzysztof Kozlowski , Jonathan Hunter , linux-rockchip@lists.infradead.org, Kukjin Kim , Gerald Schaefer , Andy Gross , linux-tegra@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-mediatek@lists.infradead.org, Matthias Brugger , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, murphyt7@tcd.ie, David Woodhouse Subject: Re: [PATCH v2 3/4] iommu/dma-iommu: Use the dev->coherent_dma_mask Message-ID: <20190430113253.GA23210@infradead.org> References: <20190430002952.18909-1-tmurphy@arista.com> <20190430002952.18909-4-tmurphy@arista.com> <20190430111222.GA3191@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 30, 2019 at 12:27:02PM +0100, Robin Murphy wrote: > > Hmm, I don't think we need the DMA mask for the MSI mapping, this > > should probably always use a 64-bit mask. > > If that were true then we wouldn't need DMA masks for regular mappings > either. If we have to map the MSI doorbell at all, then we certainly have to > place it at an IOVA that the relevant device is actually capable of > addressing. Well, as shown by the patch below we don't even look at the DMA mask for the MSI page - we just allocate from bottom to top.