Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp424171ybv; Thu, 20 Feb 2020 00:46:42 -0800 (PST) X-Google-Smtp-Source: APXvYqzfjztFmkw63+0S4k6R2mDs1FSQ8iDspv3yqnYfptC2Gr2bsSP4pve5IFmfsRORK9NPT156 X-Received: by 2002:a9d:4c14:: with SMTP id l20mr22469894otf.125.1582188401878; Thu, 20 Feb 2020 00:46:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582188401; cv=none; d=google.com; s=arc-20160816; b=EuspYRLTH47wCDfgotndoFdwX3SXS7mby4BXsdj+ar3zfGY/CDM6H0x6U9patxRbD4 c8UUj86EBIVEH8EoTdnDTverkO6HsVj6OGUmutv/EUtRM9e/Xmu9TNQ/V+bSNnIH/mNX MPqh+Z6lxfTb1zild5krLLa8yUg5GDIcZIwJ7TDijbeQ1BSof9kx2uHSOOy9O1opUOv7 hXv+uI776XK6si6WOQgHl2/en8GCY/C44vCLv96SI7T6Jmfc6YiIeiG2jgFzsEz+NyzN sljLqqzSd0ivKe+L9ar8K6gn2XUjV2WiRW27eCJExK0/GFJgxvvoEbWSgrK1Q8qN5Bd+ 6VhA== 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=UcOn58l8NKXakvqwztdEL2RHRZWaC5nzDAAkh+GVRoM=; b=l5FUIAmVh5VHYXeol/aECMnoiXL5GIZP8OSj93e4DXQ+Uhy3M3xAF3VhoLikhJ0zEl tD/1ea2U8JyFd/5jMomws5CBLkITRielZHFMpT4zYl9bupKMBuZmr+E1gCfFIaH5HPH9 eRdcwyRQKVS/lNYh0/4+P37uCPdCzqqKM0JvVliQtSNTfJjJPl6R6cOZZvSEwGEYl9nZ RfhT6vIwSqNenTIIPjtUYnlDVLiiogYksgzFQme6qjo7OELLM3shKRCcaJ7B2vaphjkP /VM4dDX2+dshXZELncBBGOz4Ghjzac49J2EqLdMmXAgeh86i2O9pUfqjEnIgiJpsek/K ktBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lI95RFO8; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m26si1479998otk.305.2020.02.20.00.46.29; Thu, 20 Feb 2020 00:46:41 -0800 (PST) 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=pass header.i=@kernel.org header.s=default header.b=lI95RFO8; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726959AbgBTIp6 (ORCPT + 99 others); Thu, 20 Feb 2020 03:45:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:47662 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726799AbgBTIp5 (ORCPT ); Thu, 20 Feb 2020 03:45:57 -0500 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BBBD9207FD; Thu, 20 Feb 2020 08:45:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582188357; bh=M6GGXuQ/D6jiRe6KPYbT3GWIqkyMWWqU9w9MfTEu9pc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lI95RFO8JMLFC9bEmf1jbUprqiB7R/md/sR6FxYDha9JFtReCPlJ8MzUa8NB4H7yn elIzgxmFyp4jHkujurvO69MXlPwSkJHAxULUB0mTK8rEzCAJqLKDq/eGxbqzbVYOX1 75GGZ4a4pc3c6KF0Jp8wmYBF1HTwpHWB98LbtTNU= Date: Thu, 20 Feb 2020 08:45:52 +0000 From: Will Deacon To: isaacm@codeaurora.org Cc: Robin Murphy , Christoph Hellwig , pratikp@codeaurora.org, linux-kernel@vger.kernel.org, Liam Mark , iommu@lists.linux-foundation.org, kernel-team@android.com Subject: Re: [RFC PATCH] iommu/dma: Allow drivers to reserve an iova range Message-ID: <20200220084552.GB11827@willie-the-truck> References: <1581721096-16235-1-git-send-email-isaacm@codeaurora.org> <20200217080138.GB10342@infradead.org> <20200219111501.GA19400@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 19, 2020 at 12:06:28PM -0800, isaacm@codeaurora.org wrote: > On 2020-02-19 03:15, Will Deacon wrote: > > On Tue, Feb 18, 2020 at 05:57:18PM -0800, isaacm@codeaurora.org wrote: > > > Does this mean that the driver should be managing the IOVA space and > > > mappings for this device using the IOMMU API? If so, is the > > > rationale for > > > this because the device driver can have the information of what IOVA > > > ranges > > > can and cannot be used? Shouldn't there be a generic way of > > > informing an > > > IOMMU driver about these reserved ranges? Perhaps through a device > > > tree > > > property, instead of deferring this type of management to the driver? > > > > Before we dive into designing that, can you please clarify whether the > > reserved IOVA range applies to all DMA masters mastering through a > > particular SMMU, or whether it's just about one specific master? I was > > assuming the former, but wanted to be sure. > > > This situation currently applies to one master. Interesting. Is it problematic if the range is reserved for all masters sharing that SMMU? Will