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=-6.7 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 B598EC43461 for ; Thu, 17 Sep 2020 14:41:32 +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 5175B20684 for ; Thu, 17 Sep 2020 14:41:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="cVNmr6w+"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="nWLsOgjo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5175B20684 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=hpnNx9d10YLrl1+LK6lSdpef51fkqoowmC1kPMyyDrg=; b=cVNmr6w+CHbx4t4YPV9eenAjB slCxaRTon+pog5juNXPlRAK4qMyM9OYMtdvlqy7PbEoyD0vRkUPkvCklbPnibi73Ewt+qjEOmhLL8 P0TtYtLFfx88AshnEj7+ZQkOA9EFb157HrsUMuZMH/61HC46gu48X2pyicXUbKZtJTKGdG7OPYkNe DvZT5/YC1xJ7Cf8TnU5zenz1T+n4oWax2Qp/0c32xAYgLlKujSqXMJpRFFLrXuzbtzgomJNf/p73m 0Bxr4ZG4JeuRfDft6w9aBIT2AbaCrgSfgmi+hEdBmjGXQcpwBDcNWuTAcjmxi73GRb0sdOdQugWFP 8LHtDXVKg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIv54-0004nn-N5; Thu, 17 Sep 2020 14:40:14 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIv52-0004mm-4g for linux-arm-kernel@lists.infradead.org; Thu, 17 Sep 2020 14:40:13 +0000 Received: by mail-wm1-x341.google.com with SMTP id l9so2317682wme.3 for ; Thu, 17 Sep 2020 07:40:11 -0700 (PDT) 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=AFLyIaK95Pcs3v3wg/rAuVTRxjhXIS5PXfpZ3zAaOv4=; b=nWLsOgjoU61ywvQ9ZZ82TsQRhow3wqYpSRb7J3wrgivoxq+dHXdSETF3r8wIxY00Am BIU5UH87TtUtB+HdqoiumsJLElQEnKYOVcBNrkycJGKU0aE2ZBcUW/HDU+JzXELttajy aWIjt7wufdqdBtB43FS6vYywByed9MFwtiI9wQrB9sICqofHKioVFZPGrsRqjfUHxjBO 7uXR6+UQZrebS7j3o8Wr8jbOOphKwcs1eYzv/854R7WIliBwwohybQEvJJWKN1z2/yQA 1v2Dea/oMLcs0y3iFzEMK9ef9WkXjT3mhbRMX/lDcTK1MXCvgAh+oCC6Thl4YvyWSTPu WvxA== 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=AFLyIaK95Pcs3v3wg/rAuVTRxjhXIS5PXfpZ3zAaOv4=; b=ndCxTnRe99VIF11x1oJnrOB0y3OJADIdSRJxpRLRhpZlpW6mg2TRdZOw9wS7ixah/O NC7dXqjIHzvCikT4y2D7NXPnXYesIG981R7u/1PbWSyI4/SvPFmd7f0nCb5VFtfCkISZ Ii6qKIMGF2H0JaRlFpDGmNygeggIbaQi1GLx5u1+8wNvy+7j8L3+mR7hu1HFDOgc011f WKkL+gTpLcZwjizbqRE8ohVxulG2LCOt8zls9djYfJcQfS6y4ZjJ9J49wh+v1abxRKEM 2III8ht+YHsQdmqTR9q8JCdtC3JMePk3o1vDtDWvWD7F7wlSBic5J44JwkvSIkLeuX+m pyJw== X-Gm-Message-State: AOAM530icbhXizgImDdKACtpfd+VbYnQvcdB2XMA5qVoUuz7lUMj4BUc rix5CbBX1MXEc6/BTMPZXhHjj43aPQfcmvMa X-Google-Smtp-Source: ABdhPJxSUUGTyJ6hnRF8W/ZFmbozBT4cLiO00TWm8X3HAAtPbdXGCiYd8wCQULGNjrxSn5FlEfb6QQ== X-Received: by 2002:a05:600c:2155:: with SMTP id v21mr10911853wml.118.1600353610755; Thu, 17 Sep 2020 07:40:10 -0700 (PDT) Received: from myrica ([2001:1715:4e26:a7e0:116c:c27a:3e7f:5eaf]) by smtp.gmail.com with ESMTPSA id f16sm9869987wrp.47.2020.09.17.07.40.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Sep 2020 07:40:10 -0700 (PDT) Date: Thu, 17 Sep 2020 16:39:51 +0200 From: Jean-Philippe Brucker To: Auger Eric Subject: Re: [PATCH RESEND v9 10/13] iommu/arm-smmu-v3: Check for SVA features Message-ID: <20200917143951.GE134903@myrica> References: <20200817171558.325917-1-jean-philippe@linaro.org> <20200817171558.325917-11-jean-philippe@linaro.org> 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-20200917_104012_618998_2F43827C X-CRM114-Status: GOOD ( 18.94 ) 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: 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 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 Tue, Sep 08, 2020 at 11:38:31AM +0200, Auger Eric wrote: > Hi Jean, > On 8/17/20 7:15 PM, Jean-Philippe Brucker wrote: > > Aggregate all sanity-checks for sharing CPU page tables with the SMMU > > under a single ARM_SMMU_FEAT_SVA bit. For PCIe SVA, users also need to > > check FEAT_ATS and FEAT_PRI. For platform SVA, they will have to check > > FEAT_STALLS. > > > > Introduce ARM_SMMU_FEAT_BTM (Broadcast TLB Maintenance), but don't > > enable it at the moment. Since the entire VMID space is shared with the > > CPU, enabling DVM (by clearing SMMU_CR2.PTM) could result in > > over-invalidation and affect performance of stage-2 mappings. > In which series do you plan to enable it? In the third part, after the PRI+stall series. I still haven't had time to look at solving the stage-2 DVM problem (pinning VMIDs through KVM), so it might be a while. [...] > > + /* > > + * See max_pinned_asids in arch/arm64/mm/context.c. The following is > > + * generally the maximum number of bindable processes. > > + */ > > + if (IS_ENABLED(CONFIG_UNMAP_KERNEL_AT_EL0)) > Out of curiosity, What is the rationale behind using > arm64_kernel_unmapped_at_el0() versus > IS_ENABLED(CONFIG_UNMAP_KERNEL_AT_EL0)? > CPU caps being finalized? I'm not sure. The caps are finalized at this point. I'll change it. > Is that why you say "generally" here? I said "generally" because having less PASIDs than ASIDs is in theory possible, but hardware will normally support 20-bit PASIDs. > > + asid_bits--; > > + dev_dbg(smmu->dev, "%d shared contexts\n", (1 << asid_bits) -> + num_possible_cpus() - 2); > nit: s/shared/bindable? I find "shared" clearer, with regard to contexts Thanks, Jean _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel