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=-15.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 3FC5EC433E0 for ; Tue, 16 Mar 2021 13:05:41 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 C92516505E for ; Tue, 16 Mar 2021 13:05:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C92516505E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=desiato.20200630; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6sC0+VWAx58pUWddmiR7/4EynWFEACevEM24dNFpJ7M=; b=nVCM1SIMq00g55FRdMzWOQrTK kv75dk6x86n3wc77A3H21IpQU6XR2GQsZctUkCnCaMU+7OvuHmyXIcmA5QWJVTc01EYulPZ9deYlH IKSzGtKRfmWDnLseQavyMHanaq2vaNAQW3x0wjCI1t3vPkaSdws2KFBZg0em/5NVQy/igGy1HuKw9 7oUlvh4Y/tSznQtsApQWrVfrMLGJY+owJ9Ny445Bfuzhg78UM1XR5yTUr5YmUEAHIRD2fzwuLmQpW hDitkZGwv6lz6GP+cgQ6aGIn/Xd/su4dJbMGp1ahNc0lyQmh7XVU59ZnqphQV8L1oCD0oXl9tgybR 3wCvZ8tog==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lM9Ma-000nlA-EC; Tue, 16 Mar 2021 13:03:57 +0000 Received: from foss.arm.com ([217.140.110.172]) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lM9MV-000njF-AK for linux-arm-kernel@lists.infradead.org; Tue, 16 Mar 2021 13:03:54 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 83307101E; Tue, 16 Mar 2021 06:03:49 -0700 (PDT) Received: from [10.57.55.99] (unknown [10.57.55.99]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 768DC3F792; Tue, 16 Mar 2021 06:03:47 -0700 (PDT) Subject: Re: [PATCH 14/17] iommu: remove DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE To: Christoph Hellwig Cc: kvm@vger.kernel.org, Will Deacon , linuxppc-dev@lists.ozlabs.org, dri-devel@lists.freedesktop.org, Li Yang , iommu@lists.linux-foundation.org, netdev@vger.kernel.org, David Woodhouse , linux-arm-kernel@lists.infradead.org, Michael Ellerman , virtualization@lists.linux-foundation.org, freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org References: <20210301084257.945454-1-hch@lst.de> <20210301084257.945454-15-hch@lst.de> <1658805c-ed28-b650-7385-a56fab3383e3@arm.com> <20210310091501.GC5928@lst.de> <20210310092533.GA6819@lst.de> <20210311082609.GA6990@lst.de> <20210315083347.GA28445@lst.de> From: Robin Murphy Message-ID: <42f5aba4-9271-d106-4a85-1bfc9fd98de1@arm.com> Date: Tue, 16 Mar 2021 13:03:42 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <20210315083347.GA28445@lst.de> Content-Language: en-GB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210316_130352_246994_0FD39550 X-CRM114-Status: GOOD ( 22.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2021-03-15 08:33, Christoph Hellwig wrote: > On Fri, Mar 12, 2021 at 04:18:24PM +0000, Robin Murphy wrote: >>> Let me know what you think of the version here: >>> >>> http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/iommu-cleanup >>> >>> I'll happily switch the patch to you as the author if you're fine with >>> that as well. >> >> I still have reservations about removing the attribute API entirely and >> pretending that io_pgtable_cfg is anything other than a SoC-specific >> private interface, > > I think a private inteface would make more sense. For now I've just > condensed it down to a generic set of quirk bits and dropped the > attrs structure, which seems like an ok middle ground for now. That > being said I wonder why that quirk isn't simply set in the device > tree? Because it's a software policy decision rather than any inherent property of the platform, and the DT certainly doesn't know *when* any particular device might prefer its IOMMU to use cacheable pagetables to minimise TLB miss latency vs. saving the cache capacity for larger data buffers. It really is most logical to decide this at the driver level. In truth the overall concept *is* relatively generic (a trend towards larger system caches and cleverer usage is about both raw performance and saving power on off-SoC DRAM traffic), it's just the particular implementation of using io-pgtable to set an outer-cacheable walk attribute in an SMMU TCR that's pretty much specific to Qualcomm SoCs. Hence why having a common abstraction at the iommu_domain level, but where the exact details are free to vary across different IOMMUs and their respective client drivers, is in many ways an ideal fit. >> but the reworked patch on its own looks reasonable to >> me, thanks! (I wasn't too convinced about the iommu_cmd_line wrappers >> either...) Just iommu_get_dma_strict() needs an export since the SMMU >> drivers can be modular - I consciously didn't add that myself since I was >> mistakenly thinking only iommu-dma would call it. > > Fixed. Can I get your signoff for the patch? Then I'll switch it to > over to being attributed to you. Sure - I would have thought that the one I originally posted still stands, but for the avoidance of doubt, for the parts of commit 8b6d45c495bd in your tree that remain from what I wrote: Signed-off-by: Robin Murphy Cheers, Robin. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel