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.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_2 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 80138C433E0 for ; Fri, 22 Jan 2021 13:32:12 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 377FE22D50 for ; Fri, 22 Jan 2021 13:32:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 377FE22D50 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=Huawei.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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: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=YcE3n7OpLW0FbuF9PDkzIFd1j7QMC9PIJdLl2OpGQBA=; b=mhc2bhaTgvonLwgX3QLP/ED7d EkqE9VMSr6JhODjt74qucgZhQTc4PGjBnWQTRXIZUaYIuQ1TKUOINPdCWEgGS1S94kUlWlGOl7ffJ XDsC+mQYi/ZdJyZOWE6uK/qVIVTDf2YAxV1sRNHM7f0Y7VxVNjYj3VyVk2h3GJTQHlT46eVf/cbYC WZM82kV0fePrcUYVHum40dfyTl22XYek9zbUq5kbXAG8vqPllmfxlFUMSgskPy2u5aBW+e0+LSNKs WEVcfAGynXxgDLCYcbKT7x51mFITm6+7HANAFvIImp/BEMJ6L5eGK2ZX4fS6ciADWcAODPg+rKkaS uM7bS5tYA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2wWS-0006AY-Nv; Fri, 22 Jan 2021 13:30:44 +0000 Received: from frasgout.his.huawei.com ([185.176.79.56]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2wWP-00069Y-Rq for linux-arm-kernel@lists.infradead.org; Fri, 22 Jan 2021 13:30:42 +0000 Received: from fraeml707-chm.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4DMg3d0S36z67d8S; Fri, 22 Jan 2021 21:25:01 +0800 (CST) Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by fraeml707-chm.china.huawei.com (10.206.15.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Fri, 22 Jan 2021 14:30:37 +0100 Received: from localhost (10.47.73.222) by lhreml710-chm.china.huawei.com (10.201.108.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Fri, 22 Jan 2021 13:30:36 +0000 Date: Fri, 22 Jan 2021 13:29:55 +0000 From: Jonathan Cameron To: Jean-Philippe Brucker Subject: Re: [PATCH 0/3] iommu/arm-smmu-v3: TLB invalidation for SVA Message-ID: <20210122132955.00000d4f@Huawei.com> In-Reply-To: <20210122115257.2502526-1-jean-philippe@linaro.org> References: <20210122115257.2502526-1-jean-philippe@linaro.org> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; i686-w64-mingw32) MIME-Version: 1.0 X-Originating-IP: [10.47.73.222] X-ClientProxiedBy: lhreml750-chm.china.huawei.com (10.201.108.200) To lhreml710-chm.china.huawei.com (10.201.108.61) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210122_083042_106334_A5ACDEBA X-CRM114-Status: GOOD ( 17.31 ) 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: vivek.gautam@arm.com, will@kernel.org, joro@8bytes.org, eric.auger@redhat.com, iommu@lists.linux-foundation.org, zhangfei.gao@linaro.org, robin.murphy@arm.com, 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+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 22 Jan 2021 12:52:55 +0100 Jean-Philippe Brucker wrote: > To support sharing page tables with the CPU, the SMMU can participate in > Broadcast TLB Maintenance (BTM), where TLB invalidate instructions from > the CPU are received by the SMMU. For platforms that do no implement BTM > [1], it is still possible to use SVA, by sending all TLB invalidations > through the command queue. Patch 2 implements this. > > This series also enables SVA for platforms that do support BTM, as an > intermediate step because properly supporting BTM requires cooperating > with KVM to allocate VMIDs [2]. With BTM enabled, the SMMU applies > broadcast invalidations by VMID to any matching TLB entry, because there > is no distinction between private and shared VMIDs like there is for > ASIDs. Therefore a stage-2 domain will need a VMID that doesn't conflict > with one allocated by KVM (or use the one from the corresponding VM, > pinned). > > These patches, along with the IOPF series [3] and the quirks [4], enable > SVA for the hisi accelerator that's already supported upstream. My quick > performance comparison between BTM and !BTM on that platform were > inconclusive. Doing invalidations via cmdq seemed to slightly reduce > performance of some heavy compression jobs, but there was too much noise > and not enough invalidations in my tests. > > This series does not depend on the IOPF one [3]. > > [1] https://lore.kernel.org/linux-iommu/BY5PR12MB37641E84D516054387FEE330B3CC0@BY5PR12MB3764.namprd12.prod.outlook.com/ > [2] https://lore.kernel.org/linux-iommu/20200522101755.GA3453945@myrica/ > [3] https://lore.kernel.org/linux-iommu/20210121123623.2060416-1-jean-philippe@linaro.org/ > [4] https://lore.kernel.org/linux-pci/1610960316-28935-1-git-send-email-zhangfei.gao@linaro.org/ Whole series looks good to me so FWIW Reviewed-by: Jonathan Cameron Will be very nice to have mainline support for SVA with those accelerators :) > > Jean-Philippe Brucker (3): > iommu/arm-smmu-v3: Split arm_smmu_tlb_inv_range() > iommu/arm-smmu-v3: Make BTM optional for SVA > iommu/arm-smmu-v3: Add support for VHE > > drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 6 + > .../iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c | 14 ++- > drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 104 ++++++++++++------ > 3 files changed, 89 insertions(+), 35 deletions(-) > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel