From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33C77C3A589 for ; Tue, 20 Aug 2019 10:31:25 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 098CC22D6D for ; Tue, 20 Aug 2019 10:31:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="E4fDwmPf"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="JIoIm7Db" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 098CC22D6D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=A8nOINIcO+1K418FA0RaQmOwFVWnivT77QFRL3VDlh8=; b=E4fDwmPfRjxJW/ xmIM5N94TqruCYDVrCroW8CqwcfuHItxr/k60I4gtKBea6Rw2DujNL73RU3Fg+nAKQOP5oMQ3vQMP L4xF2ilcq4XhVK9j3NMq0LEEBI7WFxc0WdgtepIfpOBWaoRFgJ+UNBio9k3+nxNphtyCGcBfc6wrq KOHTm06dR1ExP/875Pw8YgFc6A2szm0qLamuG8475Lapd+S8HuDNX+Aa2rqXgfHbry+K14CdSFW4U YRI6wLuzyl5rcfjAnfi1ExK2BoN/iWGS1Y0di84SAxmo3SI1pWs+Q2Ws3cRDDqoBtL/BoeKzdd3ug p/PuRE3/UP36pHt8YxFg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i01QC-00041Z-Il; Tue, 20 Aug 2019 10:31:24 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i01Q8-0003zP-CD for linux-arm-kernel@lists.infradead.org; Tue, 20 Aug 2019 10:31:21 +0000 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 ADDD422CF4; Tue, 20 Aug 2019 10:31:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566297079; bh=4BGIRfpdxn+C4hWqH87mAKMqnUtkkvEwwMwmi3ha0Yo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JIoIm7Dblia20ly5df5KEgLyPX9cMYqKbtR+dcf8m13dvUFZd+rD2XNAI9PF0uISf tNgmIHr/tUheptTGLanF0PONmSDlW3lN/bUkaHdR1wcQf5f5ib2LE1OPAFGAITycQM EonGx+kruT5WbB6IbRA+dD+UXF+t2syBwXuuuhhs= Date: Tue, 20 Aug 2019 11:31:16 +0100 From: Will Deacon To: Robin Murphy Subject: Re: [PATCH 3/4] iommu/io-pgtable-arm: Rationalise TCR handling Message-ID: <20190820103115.o7neehdethf7sbqi@willie-the-truck> References: <78df4f8e2510e88f3ded59eb385f79b4442ed4f2.1566238530.git.robin.murphy@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <78df4f8e2510e88f3ded59eb385f79b4442ed4f2.1566238530.git.robin.murphy@arm.com> User-Agent: NeoMutt/20170113 (1.7.2) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190820_033120_471168_587D8435 X-CRM114-Status: GOOD ( 13.30 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: robdclark@gmail.com, joro@8bytes.org, jcrouse@codeaurora.org, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Aug 19, 2019 at 07:19:30PM +0100, Robin Murphy wrote: > Although it's conceptually nice for the io_pgtable_cfg to provide a > standard VMSA TCR value, the reality is that no VMSA-compliant IOMMU > looks exactly like an Arm CPU, and they all have various other TCR > controls which io-pgtable can't be expected to understand. Thus since > there is an expectation that drivers will have to add to the given TCR > value anyway, let's strip it down to just the essentials that are > directly relevant to io-pgatble's inner workings - namely the address > sizes, walk attributes, and where appropriate, format selection. > > Signed-off-by: Robin Murphy > --- > drivers/iommu/arm-smmu-v3.c | 7 +------ > drivers/iommu/arm-smmu.c | 1 + > drivers/iommu/arm-smmu.h | 2 ++ > drivers/iommu/io-pgtable-arm-v7s.c | 6 ++---- > drivers/iommu/io-pgtable-arm.c | 4 ---- > drivers/iommu/qcom_iommu.c | 2 +- > 6 files changed, 7 insertions(+), 15 deletions(-) Hmm, so I'm a bit nervous about this one since I think we really should be providing a TCR with EPD1 set if we're only giving you TTBR0. Relying on the driver to do this worries me. See my comments on the next patch. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel