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=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 41D95C4361B for ; Mon, 14 Dec 2020 09:34:29 +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 DE90E207B2 for ; Mon, 14 Dec 2020 09:34:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DE90E207B2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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: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=pgmCnN4LpzQy2SNMgRAfGOaWNKE22t3Xiv7+k+S7Euo=; b=hCr+H9x66xfeMBTvAmk85cnsd f16NND58khO74O7egQcpP+ky5I+eZf6Hsy07Y9GN1gAk0rX7UmW3ozy/OhEAEd8kXeEfZP7BnwmTP V8rPIS0WJKBiqJEQmxZPWNY4z6u3X8hQD2rV6Yuyr5fatLPeAUrU/BzXhEhMnbhmzuaiiD/Vpnq36 vAZgvvRwx93cTGkaoxbGLVVVXsn9WdjhN3T3SFilzVCEX5T1f6ups0Dgpl6VqSMmyedExGdnbKAKg poscfXmSYlCE/NG8ediQAQjTorJxBhmm8fh99bu7PtrOLNBD0aFz2z/Rz6kAXM6VU67N9Fu2IcY24 YAJl/JM/w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kokEE-0008VO-74; Mon, 14 Dec 2020 09:33:14 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kokEA-0008Tt-LT for linux-arm-kernel@lists.infradead.org; Mon, 14 Dec 2020 09:33:11 +0000 Received: by mail-wm1-x342.google.com with SMTP id c133so1047294wme.4 for ; Mon, 14 Dec 2020 01:33:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=TineRrEPPDttYAyutqZGvIPRC+1HCPGVhbRY4x0K8Gw=; b=afWbPJGiCE2mtIz13p0+yRbJLVOQgZMmsmuDvI9jIIAcPLtiFcG+XHo+k8dHq9ALU/ 9OjP+VVL168dcpsoMIV4XlM2SehyFwUo7Xv+LsuiZmq8m1b9aQ22yZiZY7vJt1XxAEks vCo7Kj8RPnv8VFaYhw9nSc9M5pSvAnTJqpqAG3e1iIte+0YvepCGIvzAK4/nUy1zR2Qh x+G9vrla5aDL+GI9wv+wOF/VIRiKPV4me3jTimLSIlGyfYw/jq1MSAT/DDJx9OITRW2f s5qdQSfRvUSotqJzh5FMC7vSs3jDxrlqt75Yuscx3M2qY6dqGzuTZtgX0kcTnlvweMHl o7Ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=TineRrEPPDttYAyutqZGvIPRC+1HCPGVhbRY4x0K8Gw=; b=mMjLBjl3FJ8QJnsn8Cv+RS3sn3k2wt/CM0JSdmbqftQPH4h/RDvLrwWBk4braFLfDo M1FA4GjwMSzNxLVx34fTA8ZHSof7JktSdBSVfV+sDLR20SJzs0t++HYay/75CEpQcDgb +UL0L6XyN1R7a1JAZGEdztZI52QYW+EXjQY9GrKlnymM2/nGTMBv3HN+KpLqOPElTGE9 lVBtoju1qLfyiKClOtLlWmSZeT6gvwlR9KRvyVRDNjwpRrNb9v71UiVknh7pN9K0YvCQ OsJUumRwfa+wDjRyZMv3k8/p3nONn1fUqr7o9yM+z/lXty0rf4MRHG0iU/IT/ehndGMo IbRg== X-Gm-Message-State: AOAM5301Twai2W4VMd8Yv93bYwswJ3+ijL+fnC1c32kSLe/9ooZYb8a5 fjAs+nVLSf6IcojVBvZ/er4H5A== X-Google-Smtp-Source: ABdhPJyFirWR60k25HcLsKbSDtl/crzD/mM5f4fKJkJAzdezDCgXo+JRjNimtjlIMUkKqgn0vf6CbA== X-Received: by 2002:a1c:e309:: with SMTP id a9mr27264055wmh.172.1607938387127; Mon, 14 Dec 2020 01:33:07 -0800 (PST) Received: from myrica ([2001:1715:4e26:a7e0:116c:c27a:3e7f:5eaf]) by smtp.gmail.com with ESMTPSA id c7sm22420381wro.16.2020.12.14.01.33.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Dec 2020 01:33:06 -0800 (PST) Date: Mon, 14 Dec 2020 10:32:47 +0100 From: Jean-Philippe Brucker To: Krishna Reddy Subject: Re: [PATCH v10 10/13] iommu/arm-smmu-v3: Check for SVA features Message-ID: References: <20200918101852.582559-1-jean-philippe@linaro.org> <20200918101852.582559-11-jean-philippe@linaro.org> <753bcd76c21c4ea98ef1d4e492db01f4@huawei.com> <20200924101340.GC170808@myrica> <47b244b99f284790b82b2c0a968ba830@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201214_043310_779926_C501739C X-CRM114-Status: GOOD ( 20.67 ) 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: Sachin Nikam , "fenghua.yu@intel.com" , Yu-Huan Hsu , Suzuki K Poulose , "catalin.marinas@arm.com" , Alistair Popple , "robin.murphy@arm.com" , Shameerali Kolothum Thodi , Pritesh Raithatha , Vikram Sethi , "linux-mm@kvack.org" , "iommu@lists.linux-foundation.org" , Jason Gunthorpe , "zhangfei.gao@linaro.org" , "will@kernel.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+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Dec 09, 2020 at 07:49:09PM +0000, Krishna Reddy wrote: > Hi Jean, > > > Why is BTM mandated for SVA? I couldn't find this requirement in > > > SMMU spec (Sorry if I missed it or this got discussed earlier). But > > > if performance is the > > only concern here, > > > is it better just to allow it with a warning rather than limiting > > > SMMUs without > > BTM? > > > > It's a performance concern and requires to support multiple > > configurations, but the spec allows it. Are there SMMUs without BTM > > that need it? > > The Tegra Next Generation SOC uses arm-smmu-v3, but it doesn't have support for BTM. > Do you have plan to get your earlier patch to handle invalidate notifications into upstream sometime soon? > Can the dependency on BTM be relaxed with the patch? > > PATCH v9 13/13] iommu/arm-smmu-v3: Hook up ATC invalidation to mm ops > https://www.spinics.net/lists/arm-kernel/msg825099.html This patch (which should be in 5.11) only takes care of sending ATC invalidations to PCIe endpoints. With this, BTM is still required to invalidate SMMU TLBs. However we could enable command-queue invalidation when ARM_SMMU_FEAT_BTM isn't set. Invalidations are still a relatively rare event so it may not be outrageously slow. I can add a patch to my tree if you have hardware to test. This could also be a first step for enabling SVA on other systems as well, because I'm not finding time to work on BTM at the moment (requires pinning VMIDs in KVM). Thanks, Jean _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel