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.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 D4A2BC4361B for ; Mon, 14 Dec 2020 09:33:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 53BE322583 for ; Mon, 14 Dec 2020 09:33:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 53BE322583 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 99D186B0036; Mon, 14 Dec 2020 04:33:09 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 929E36B005C; Mon, 14 Dec 2020 04:33:09 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7789B6B005D; Mon, 14 Dec 2020 04:33:09 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0167.hostedemail.com [216.40.44.167]) by kanga.kvack.org (Postfix) with ESMTP id 59C206B0036 for ; Mon, 14 Dec 2020 04:33:09 -0500 (EST) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 1BA398792 for ; Mon, 14 Dec 2020 09:33:09 +0000 (UTC) X-FDA: 77591374098.28.girl86_18113bf27419 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin28.hostedemail.com (Postfix) with ESMTP id F04464DC1 for ; Mon, 14 Dec 2020 09:33:08 +0000 (UTC) X-HE-Tag: girl86_18113bf27419 X-Filterd-Recvd-Size: 5432 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by imf10.hostedemail.com (Postfix) with ESMTP for ; Mon, 14 Dec 2020 09:33:08 +0000 (UTC) Received: by mail-wm1-f65.google.com with SMTP id a6so13062130wmc.2 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=CXa0uImeGCNIChXLma8sRXImUAK4mo0PNDpYUCILHrqcoE5pMJWa9mRodWy5Wc9eXh fEyq+Mg58tn3PzczwPXo95GIhrCwcTSKPeVOuBWcNb2dqYDNUvccw71Da/5L9koa7Pl4 /LcW7eH45uC4AAtMERnZc44lIpYMBbYXbZApWJiLgh2RxLFVNZlPrQ8VnNpWMk/FdTJC nfMCuyqSfmqM//CV+MU5MgAwn6RUqmfUcd1es350XSCYv5mn4jMjn+XHWT82mZzBdi2j r66jd/znpYZLOgPtMOog502Dozk0uTFrPPDRvZbx6Mj7SlMSOL7zsVMJf/uADHUEeeTo C3PA== X-Gm-Message-State: AOAM5305PbBq+Lke+WIUYiboEMSmAvs/4kXJPUYQo1hPYVoxD/u5covz aMcUhm5MrgTO9OnwNAiEFmljDg== 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 Cc: "fenghua.yu@intel.com" , "will@kernel.org" , Suzuki K Poulose , "catalin.marinas@arm.com" , "linux-mm@kvack.org" , "iommu@lists.linux-foundation.org" , "zhangfei.gao@linaro.org" , "robin.murphy@arm.com" , "linux-arm-kernel@lists.infradead.org" , Sachin Nikam , Pritesh Raithatha , Vikram Sethi , Jason Gunthorpe , Alistair Popple , Yu-Huan Hsu , Shameerali Kolothum Thodi 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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