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=-8.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 E35EFC433DB for ; Fri, 22 Jan 2021 14:15:05 +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 A188C23AC2 for ; Fri, 22 Jan 2021 14:15:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A188C23AC2 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=81pY/Xd3ErR3H1dmZcRe5UwpKJgmfbJdgkoEfsOVqYI=; b=t+Xykr6GOwVWC6LB00PK62sPk pPcHLETYHCCe/E5dtk5vYrjjbX6OgZPbsVj/5ajcBTj1lkaBJwUlDqIJtnNqV1b7/hoAPJOX9zbls IDtrvYvsaEPe/84a3NunlniHTIs9G/QbHeBtbb2C5UVzp2eUe/KqmBjnpEt0pKrtgXYjbshyI3c9D bSMjiGTzzF/H39qfjnd79rcRTSOJQweG47mEmjcG8wCCn51FcgYo1I9/trw+lQ/ML/rilqZMRHMLe 2GWfiobu2i3Dx6mmKna+cP15eIgZFjXR9ELADRhseORDH6wwwm1H/aDEVyXTzeGfygrPCtCw88N6r n8ryfVyMw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2xCD-0005Ev-33; Fri, 22 Jan 2021 14:13:53 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2xCA-0005Cm-MP for linux-arm-kernel@lists.infradead.org; Fri, 22 Jan 2021 14:13:51 +0000 Received: by mail-wr1-x436.google.com with SMTP id q7so5201432wre.13 for ; Fri, 22 Jan 2021 06:13:45 -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=r3ROlS+99yPh3Cf8rVxZygPyogtMgfG8l3Bd6blxRns=; b=roCSatN8uErvDWYGEyV3aDuDpJJLYmYqOcbGcLYN2nRARag3Jz19mcjJiypn5PdgsQ 7uJh0it0gRIAN1yoR+O0vgHuWzbRMeQi4mlHxdhVXzgvoNF42d6J/AHHpCJJLZ3dj7YT lpd0P4N9QC3h55YlRObPqwQqZdQtPJThLo7GLHWpx88W1IPUTvoWpzbyavIobtrCqMfR ykTzYYnInxW9842rnCkBmqd9KHNCwBXqyJI0N3OggcNIr3QZ34RL6zZ2q7T84/l4QwQ9 +BfCh6hhp24avtoFN07lZktp3eBR4nvcC1CNpbw7XFP4mmPMpA0rzg2B0fNVpqI5x0hx 9uxw== 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=r3ROlS+99yPh3Cf8rVxZygPyogtMgfG8l3Bd6blxRns=; b=I/twgdpsHutNnCnrbFGeSmaNR3uFL8OYQGxpRQWifDXYaMW40lJaOMRBKM5l53IO/u 7eQXNBg36TDGezJ6YMj1ltxDIe65gQTCiehIvETLyZN/mK6DTQ3ttj27j+s2vMWseAQO 7WR6yzAU5HQu31+3A3QkalK4+9umSsRtFRg6I6cZe6VPEbeBclafRTVIVthQwDcQUF9t 7/lpiqf4NxWL1flx8Y0rBUhfLq5JsBdiIR6Srxvd69P0LLeVwFlfTWJ8P7fBFPDKxzF6 CFpp7nsnCuKr9jLzlOprsDE8RbjdMzXg9i+PAX4q3k/0vbN0v2n0+Gw3+8F4HDidvYPJ rrQw== X-Gm-Message-State: AOAM5313QPcNjbKtTqZTDstUpK3IbEpP4bAsoZnDIKo4gcQHgnEjCRx2 bkR33bQj0K0F+USTB/KF5dUWWQ== X-Google-Smtp-Source: ABdhPJzfvPjjb/O+AAsiAFD7Fq3vGIjrDRJkTjrUKWqwngjwrVGooW9LBrLl/l6negP8ADFJbj+pyw== X-Received: by 2002:adf:f6c9:: with SMTP id y9mr4803926wrp.121.1611324824306; Fri, 22 Jan 2021 06:13:44 -0800 (PST) Received: from myrica ([2001:1715:4e26:a7e0:116c:c27a:3e7f:5eaf]) by smtp.gmail.com with ESMTPSA id w4sm11330748wmc.13.2021.01.22.06.13.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Jan 2021 06:13:43 -0800 (PST) Date: Fri, 22 Jan 2021 15:13:24 +0100 From: Jean-Philippe Brucker To: Robin Murphy Subject: Re: [PATCH 2/3] iommu/arm-smmu-v3: Make BTM optional for SVA Message-ID: References: <20210122115257.2502526-1-jean-philippe@linaro.org> <20210122115257.2502526-3-jean-philippe@linaro.org> <14f78aee-c7fd-22ff-64d4-6aff2e9ec015@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <14f78aee-c7fd-22ff-64d4-6aff2e9ec015@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210122_091350_738794_156C1FF2 X-CRM114-Status: GOOD ( 13.09 ) 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: joro@8bytes.org, vivek.gautam@arm.com, iommu@lists.linux-foundation.org, 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 Fri, Jan 22, 2021 at 02:04:55PM +0000, Robin Murphy wrote: > > @@ -182,9 +183,13 @@ static void arm_smmu_mm_invalidate_range(struct mmu_notifier *mn, > > unsigned long start, unsigned long end) > > { > > struct arm_smmu_mmu_notifier *smmu_mn = mn_to_smmu(mn); > > + struct arm_smmu_domain *smmu_domain = smmu_mn->domain; > > + size_t size = end - start + 1; > > - arm_smmu_atc_inv_domain(smmu_mn->domain, mm->pasid, start, > > - end - start + 1); > > + if (smmu_mn->tlb_inv_command) > > Since we're going to be drilling down to smmu_domain->smmu->features in the > invalidate call anyway, perhaps we could just test for BTM directly here? Yes even with BTM enabled we'll still check features in atc_inv_domain(), so this shortcut isn't useful. Thanks, Jean _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel