Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp988278ybv; Thu, 20 Feb 2020 10:59:01 -0800 (PST) X-Google-Smtp-Source: APXvYqzmYo1UXgaGSNfZpY2AyHogWLeoGYn7aF1qY9VwajIvL0chi7B6+8XUtFRjRETv/qgTNDeF X-Received: by 2002:a9d:7:: with SMTP id 7mr23702696ota.26.1582225141608; Thu, 20 Feb 2020 10:59:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582225141; cv=none; d=google.com; s=arc-20160816; b=HDVqziARwISKYJ+v2jSyH6JIMvFY+4nQ3ldOn4J6Rr0c3y4XPV6By9LgZYamXrCOLA 4s7MRh1CZmvUIEkm7Na83BHeunz2GTm4cyIrlDXs0URISZEZrIyIgLG+SRRlLKQ2lw+D erC1SJ7xi8uYBC2g1kj/Jjy+zgIhrHFgd4RdweJT/2FhI/yHl55R4C82h8deOWd+gfJ7 +rcRI81EIkmI1XVlnAhbRgbYYvT1Rc7j7YtZHyAhHGOmDVcGIf/vwFmodfeZRytK1Yfz S5l9bAVBT3PbLcFwtfliJM8m/W8QMM7dYNkRwynjZzJXMK/l/zS6hf6D/5FTlq2gFKcS tVXw== 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:dmarc-filter:dkim-signature; bh=vvYcgKLiQoRaBLEmDopEG/p1yFw3UjwbMybQGfgcmIs=; b=bapv1iou8Y5ZGrQCKH3oFCokRmft827KWlfSm3eVf02sL1+CFFfRUgznNJeK/RnYMo dpIvUkLkwYilAHXta5uHTjs1nPiRtO9wnQ8p+pWmvZe8Fn2IOZB4WmyabKfWqZccD741 /Kbtz9DZ4SxI0tqo1mkfJ0EO8tQin+wwT/0xxODbzguHtTg0sSpqE4A+uMMHP2JPQ7Hj LERPAH//HE8qe/OO+pLgE9rPEaK0BoalEVh/AsFP7aW0/Ox5F7tcffgHGNiAPwiVPm2M v1ZYtB+4StByCIH/qCWH/PQeVoB8AEIW7hANeNZDDr3p0ekelN3PHhs+/pIuTmrpsiBM xeHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=FKlKE9hf; 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 f141si79279oib.125.2020.02.20.10.58.48; Thu, 20 Feb 2020 10:59:01 -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=fail header.i=@mg.codeaurora.org header.s=smtp header.b=FKlKE9hf; 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 S1728701AbgBTS5i (ORCPT + 99 others); Thu, 20 Feb 2020 13:57:38 -0500 Received: from mail27.static.mailgun.info ([104.130.122.27]:21455 "EHLO mail27.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728315AbgBTS5h (ORCPT ); Thu, 20 Feb 2020 13:57:37 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1582225057; h=In-Reply-To: Content-Type: MIME-Version: References: Message-ID: Subject: Cc: To: From: Date: Sender; bh=vvYcgKLiQoRaBLEmDopEG/p1yFw3UjwbMybQGfgcmIs=; b=FKlKE9hfjfuu6AwGbyqC3eDibBUudPnVAsTSTDRhP8mvERex0Vr7zUqAsPq/gfRwtsYWx9rx WE83bzm+fmVvDsJ7IsVbl/eQAJcEcnYRw60c8S6HwpsX6DeNUrcIZ2uA9oLV9QXTybYTQqPW xGoDRMWHNQL3hDbr0eYmrb1CIjQ= X-Mailgun-Sending-Ip: 104.130.122.27 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by mxa.mailgun.org with ESMTP id 5e4ed69a.7fb7887c5a78-smtp-out-n03; Thu, 20 Feb 2020 18:57:30 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 708A1C447A4; Thu, 20 Feb 2020 18:57:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.0 Received: from localhost (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: pratikp) by smtp.codeaurora.org (Postfix) with ESMTPSA id BC218C43383; Thu, 20 Feb 2020 18:57:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org BC218C43383 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=pratikp@codeaurora.org Date: Thu, 20 Feb 2020 10:57:28 -0800 From: Pratik Patel To: Will Deacon Cc: isaacm@codeaurora.org, Robin Murphy , Christoph Hellwig , 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: <20200220185728.GA32137@pratikp-lnx> References: <1581721096-16235-1-git-send-email-isaacm@codeaurora.org> <20200217080138.GB10342@infradead.org> <20200219111501.GA19400@willie-the-truck> <20200220084552.GB11827@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200220084552.GB11827@willie-the-truck> User-Agent: Mutt/1.11.2 (2019-01-07) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/20 08:45 am, Will Deacon wrote: > 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? > Yes, that would be an overkill. It certainly is useful and in some cases quite helpful to not waste that range of IOVA space for other masters on the same SMMU that can use it. -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project