Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5775620ioo; Wed, 1 Jun 2022 12:19:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDcCD4UeAUa2M21M/DSSsrxeKzPo3pIWOH64Ehy48Gxl6Tkl2ZS/kpegKFkQfqF/A69igN X-Received: by 2002:a17:903:110c:b0:15f:f15:30ec with SMTP id n12-20020a170903110c00b0015f0f1530ecmr930996plh.162.1654111160740; Wed, 01 Jun 2022 12:19:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654111160; cv=none; d=google.com; s=arc-20160816; b=o/wnW70gryyxX/F4pVsW1tI72xYp5B8BBJZZv6DJl3I6646p2SnpyXBvtAoBlsFZsy RZSbbwzDdlK1yqJCI3h7luj3h/6yfpKNAw02ianb/IAZMrdjZsYwJwAB03IDvsZT7IBk /jGMcaQFmyutg79DO7QPKKnWI4sJc2dQ3C7BDQiKcs3QdlNtER/NHQON7ZvJg29nw4kU mvjS4MNdcUQb1zaeOlZPHTDw83ZY2kdwQ//lsnFH2wtksZjPpkYfKLM716PCLmhjAVzm GU2SbLlbKk5LkrLbsSS5E1a55QvA3wf1bJZ0pt3XZ8JK8978A0ikIwDcmzSfdxPTklN7 fWww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=wNGrH9F0W82ju63NOn6ndRnlXwcht8XdFEpEpd2twfI=; b=i2aoDWqER4OVe9OAp1AzQhoY7+iH4sorJj9nQUU5ujIkrqzDRhaGm+s0DKyIuC4m6w miuq2ReubMYPnVkBIUGpX+GRkk9Wmiwfe7l+vyjEbF5veN4rhcLmlSeYnFfr8vKn9/Fq wlnswI2RkD9tNGkHvVECbHANRSuWUqZKhbGuR97P+H3TCJT3GbrEJHj5QpZsrIXLVpPZ XuJdZRj4cyrTU4AlK0be3UcOPk6sKmS8vu1yMX5jw2cqwHUqGI0+MN5rAX4jRfKI4Bgb JlBV2/d/9V9ZjadCYF7yEWp85iVcUSAvto03VZ7ekxhf20jcfRmypqBbDdCbrXtTKV7+ hlHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=c7uCs1jy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 67-20020a630746000000b003fa7bac8299si1683914pgh.126.2022.06.01.12.19.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 12:19:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=c7uCs1jy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 075AE157EAC; Wed, 1 Jun 2022 11:55:30 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346100AbiEaQTZ (ORCPT + 99 others); Tue, 31 May 2022 12:19:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346097AbiEaQTV (ORCPT ); Tue, 31 May 2022 12:19:21 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 100C598590; Tue, 31 May 2022 09:19:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B9C53B810EE; Tue, 31 May 2022 16:19:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 19D2CC385A9; Tue, 31 May 2022 16:19:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654013958; bh=C7JqPHYdDIfIV1hFpEuC1J6B7QEItv7CaH7EVzTRasE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=c7uCs1jy8TG74D+Nj32f4BthpKKQvR+72bqpZXJZDojOu/Ri4D//ChSLI2vkj884B k35ZMlm5UJfSwDAtNkaERyfhCvFvZXDpAthbHc4HkQ7W03zyQPBFHoKp7stXu318GC 5VM4zAwxH7TtP3LB1s/bzGOH8e9Lq2vjBfscQPE3016J1EHU4Nqji9R8xT3oCFM7zr HGeViJPNgdB51Kq1EoXhNEyKiBj2Ya4ArkH46ly3m4pxnzPNywvMEU2/pM4mGnrLa2 psUMVuVTbOqTI27e5Hs7HKH8fpB6H+JgeeIjB7UTyNZkdBfYSv+/9JLpw/iQ0xyJfZ r4XR05x5qaAjg== Date: Tue, 31 May 2022 17:19:11 +0100 From: Will Deacon To: Rob Clark Cc: Konrad Dybcio , ~postmarketos/upstreaming@lists.sr.ht, linux-arm-msm , Bjorn Andersson , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , "list@263.net:IOMMU DRIVERS , Joerg Roedel ," , Martin Botka , AngeloGioacchino Del Regno , Marijn Suijten , jamipkettunen@somainline.org, Andy Gross , Joerg Roedel , Rob Herring , Krzysztof Kozlowski , Robin Murphy , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux Kernel Mailing List Subject: Re: [PATCH 1/6] iommu/qcom: Use the asid read from device-tree if specified Message-ID: <20220531161910.GE25502@willie-the-truck> References: <20220527212901.29268-1-konrad.dybcio@somainline.org> <20220527212901.29268-2-konrad.dybcio@somainline.org> <20220531154631.GA25502@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 31, 2022 at 09:15:22AM -0700, Rob Clark wrote: > On Tue, May 31, 2022 at 8:46 AM Will Deacon wrote: > > > > On Fri, May 27, 2022 at 11:28:56PM +0200, Konrad Dybcio wrote: > > > From: AngeloGioacchino Del Regno > > > > > > As specified in this driver, the context banks are 0x1000 apart. > > > Problem is that sometimes the context number (our asid) does not > > > match this logic and we end up using the wrong one: this starts > > > being a problem in the case that we need to send TZ commands > > > to do anything on a specific context. > > > > I don't understand this. The ASID is a software construct, so it shouldn't > > matter what we use. If it does matter, then please can you explain why? The > > fact that the context banks are 0x1000 apart seems unrelated. > > I think the connection is that mapping from ctx bank to ASID is 1:1 But in what sense? How is the ASID used beyond a tag in the TLB? The commit message hints at "TZ commands" being a problem. I'm not doubting that this is needed to make the thing work, I just don't understand why. Will