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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50B93C433FE for ; Tue, 31 May 2022 16:15:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346062AbiEaQPZ (ORCPT ); Tue, 31 May 2022 12:15:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346025AbiEaQPY (ORCPT ); Tue, 31 May 2022 12:15:24 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B07E095DCE; Tue, 31 May 2022 09:15:22 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id n124-20020a1c2782000000b003972dfca96cso1484158wmn.4; Tue, 31 May 2022 09:15:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yTwbDkRh5hDmKjnX326/H9mLZmvE5gWxqRme+WbiGTU=; b=Rru3PwBplI26UVmu4AXwOX9WpBcGD4aIv0VSI8ypmKBntq8oSPd9BEv9TniUq1iLvp YBRmDAhwsRw8pp75B5ILEfiMaxPMxFGFKGYBrb6SdwRv/QNuPZoYyxcce5ElLzRkxNYS PAvH8P2D8UU78DqlF9etOWjlmopXtvn1GEUjdUucWxPaWHKbHyys0MMKV6e0HLLoqF2r LFt+T/F5phreLYp1vMgOVXGeX8tXiA0JYKNoFZyqLbu6auPuzF943C8foHaaN0qnMqjx gJjP8I6Pne2uobs/BDW2AAVT39AxR7/ICC7vlZxIolKQUDFOn6MJVnfuJfovNUwZhil3 PnIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yTwbDkRh5hDmKjnX326/H9mLZmvE5gWxqRme+WbiGTU=; b=1UoCrCW5g4CxWQov+VPeh6Jmr3GTi488Lv76DWz8KXKHQEqK1nuYM4kCPZ3fNmxlgy GB02MG9djRXsf4KmyAcfarO8d/JmQjk4b4saBZj6oxybkAzjqZ2BFhYcP86XdF2CdqN0 Ks9rueCMkh+sbq5dmGJITSVI+0mT8Ezf98lQUuiHRGrWX+X30wqFq2szJi1kuEVJs5FN 8bLpSRy92paek4jD5E2gylFUA9Pk8qA69M7MFyseUFJfceCv40wlCRZeueoSnQMVFHs8 YUbaJYRD8RzR72VgTq9ADPgDqEgoqkgqvtuX2fIONnx28j9jVcZ11NNmV8atkcF7Dt1a BjPg== X-Gm-Message-State: AOAM531SBeKSKHE+h2a6w2vgJw+BFVlyCX/NcfhP9rA3cBHfELbl+bSh Jqj0JVBdttfOM4x4m+VLsHSogr4bmx0sThOWhLo= X-Google-Smtp-Source: ABdhPJw8TmZisoYJQb2SVHP2J/XSkZSzLw0bfkiAV9h8OY9eEHr/k33ODPPnsIXrdwWQH0cYw+WJ2+TymTyZCKqRUgQ= X-Received: by 2002:a7b:c5d0:0:b0:389:fe85:3d79 with SMTP id n16-20020a7bc5d0000000b00389fe853d79mr24898741wmk.77.1654013721128; Tue, 31 May 2022 09:15:21 -0700 (PDT) MIME-Version: 1.0 References: <20220527212901.29268-1-konrad.dybcio@somainline.org> <20220527212901.29268-2-konrad.dybcio@somainline.org> <20220531154631.GA25502@willie-the-truck> In-Reply-To: <20220531154631.GA25502@willie-the-truck> From: Rob Clark Date: Tue, 31 May 2022 09:15:22 -0700 Message-ID: Subject: Re: [PATCH 1/6] iommu/qcom: Use the asid read from device-tree if specified To: Will Deacon 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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 BR, -R 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 Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7977AC43217 for ; Tue, 31 May 2022 16:15:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 15A1C83F84; Tue, 31 May 2022 16:15:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hoHgOCEqBHPv; Tue, 31 May 2022 16:15:26 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp1.osuosl.org (Postfix) with ESMTPS id E44E483F28; Tue, 31 May 2022 16:15:25 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id AF6D7C0039; Tue, 31 May 2022 16:15:25 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists.linuxfoundation.org (Postfix) with ESMTP id D6246C002D for ; Tue, 31 May 2022 16:15:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id C36A460E8A for ; Tue, 31 May 2022 16:15:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Q3h04BAmniNb for ; Tue, 31 May 2022 16:15:23 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by smtp3.osuosl.org (Postfix) with ESMTPS id 0CFF560C21 for ; Tue, 31 May 2022 16:15:22 +0000 (UTC) Received: by mail-wm1-x32a.google.com with SMTP id r129so3017302wmr.3 for ; Tue, 31 May 2022 09:15:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yTwbDkRh5hDmKjnX326/H9mLZmvE5gWxqRme+WbiGTU=; b=Rru3PwBplI26UVmu4AXwOX9WpBcGD4aIv0VSI8ypmKBntq8oSPd9BEv9TniUq1iLvp YBRmDAhwsRw8pp75B5ILEfiMaxPMxFGFKGYBrb6SdwRv/QNuPZoYyxcce5ElLzRkxNYS PAvH8P2D8UU78DqlF9etOWjlmopXtvn1GEUjdUucWxPaWHKbHyys0MMKV6e0HLLoqF2r LFt+T/F5phreLYp1vMgOVXGeX8tXiA0JYKNoFZyqLbu6auPuzF943C8foHaaN0qnMqjx gJjP8I6Pne2uobs/BDW2AAVT39AxR7/ICC7vlZxIolKQUDFOn6MJVnfuJfovNUwZhil3 PnIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yTwbDkRh5hDmKjnX326/H9mLZmvE5gWxqRme+WbiGTU=; b=v0IZ/doCUMslVcY6jDMlVGmBVztjtzwfTBP6GRCuCeMLUW8ol/OUO6+ALAb2XaVeOY 5no9LxEoGfUExBv+4OmKNGV4eAL4uOyngbYg98Nkocx+Zt3kRhYx6rePM3alev52APfy QUpzOxTwJH9SGYmBP2AOmsl5rMdPWwxB74oeRWbwcyS4P+3Hd7Dx4dSoxCuDS5aU0zqw 9jLfao8f890cGdAZ5sI178Y2Z/iwIizsDgZRIWzI6qoknFh0OroDdgQ9PEbxIdO9qgjz LD5nF4qeu0UixpnIpqvqp6OLVCZ6HzByvqyJ3oENCL/ebSV7eWCzj26mb8+l4FzJ/FeP 6zxw== X-Gm-Message-State: AOAM533yZ0UjCtdhx/pqmCSU1S/pRBZARtA60NGDEc0B6M4L2qU5EK3M Cq63Fw3baJBnsO2+59n+Vnpl/xoYekJRNxn2bYw= X-Google-Smtp-Source: ABdhPJw8TmZisoYJQb2SVHP2J/XSkZSzLw0bfkiAV9h8OY9eEHr/k33ODPPnsIXrdwWQH0cYw+WJ2+TymTyZCKqRUgQ= X-Received: by 2002:a7b:c5d0:0:b0:389:fe85:3d79 with SMTP id n16-20020a7bc5d0000000b00389fe853d79mr24898741wmk.77.1654013721128; Tue, 31 May 2022 09:15:21 -0700 (PDT) MIME-Version: 1.0 References: <20220527212901.29268-1-konrad.dybcio@somainline.org> <20220527212901.29268-2-konrad.dybcio@somainline.org> <20220531154631.GA25502@willie-the-truck> In-Reply-To: <20220531154631.GA25502@willie-the-truck> From: Rob Clark Date: Tue, 31 May 2022 09:15:22 -0700 Message-ID: Subject: Re: [PATCH 1/6] iommu/qcom: Use the asid read from device-tree if specified To: Will Deacon Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , linux-arm-msm , Konrad Dybcio , Linux Kernel Mailing List , jamipkettunen@somainline.org, Rob Herring , "list@263.net:IOMMU DRIVERS , Joerg Roedel , " , Andy Gross , Martin Botka , ~postmarketos/upstreaming@lists.sr.ht, Krzysztof Kozlowski , AngeloGioacchino Del Regno , Marijn Suijten , Robin Murphy , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" 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 BR, -R _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu 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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EB215C433EF for ; Tue, 31 May 2022 16:16:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7cIrsg8VsLRBwKOjr1qbKAzbld2IIDXO4OuiUdjCEbw=; b=rNxqr61rgyUkKm IJxxYQjb3d3Vq3IsV7A9r/tCNvE9OQoQIXsNHSrBvTcsUhQciXhtEVg9+cRyWv5Vo1mtF4ZygwuDj uB/1rpJ9/IAZS/epPwfF2guynWX5+zgY10tU1lbdj6cCu8S+MiFehmEknn5yxzbhZoul63TyeEXlh 4EZyh9rjJL4aAdXgHzZX5TZiDL4ZsXzuY8QOdglTsHht2pgUssr0q7XQPSaijhSJxoDZ6llFKUMp8 B/V12IdXPQgd5PmsJaJmFZs3wRXVzckSTfIXu+LK2RGEaoQhux14CeQqiFr8nTRmFpfzKCTA5jZdq 6UKufF8tYlImUi6JuS8w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nw4Wt-00Bjxs-Br; Tue, 31 May 2022 16:15:35 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nw4Wj-00Bjt7-MX for linux-arm-kernel@lists.infradead.org; Tue, 31 May 2022 16:15:26 +0000 Received: by mail-wm1-x32b.google.com with SMTP id y24so8298096wmq.5 for ; Tue, 31 May 2022 09:15:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yTwbDkRh5hDmKjnX326/H9mLZmvE5gWxqRme+WbiGTU=; b=Rru3PwBplI26UVmu4AXwOX9WpBcGD4aIv0VSI8ypmKBntq8oSPd9BEv9TniUq1iLvp YBRmDAhwsRw8pp75B5ILEfiMaxPMxFGFKGYBrb6SdwRv/QNuPZoYyxcce5ElLzRkxNYS PAvH8P2D8UU78DqlF9etOWjlmopXtvn1GEUjdUucWxPaWHKbHyys0MMKV6e0HLLoqF2r LFt+T/F5phreLYp1vMgOVXGeX8tXiA0JYKNoFZyqLbu6auPuzF943C8foHaaN0qnMqjx gJjP8I6Pne2uobs/BDW2AAVT39AxR7/ICC7vlZxIolKQUDFOn6MJVnfuJfovNUwZhil3 PnIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yTwbDkRh5hDmKjnX326/H9mLZmvE5gWxqRme+WbiGTU=; b=OIXFlH4cNiW5/r1zlVBSkXwZj3LaTAhjhds8Iygvxfi0fgNlQZoYVPevvtNkDF1kCU oc4pI+KW2t08C3gBi3xepxLhISpgs/7BfuxSrDmQ7WkgvtaeUC2e3SryvC0yCHpagAoX 1N+RBpN8iw2mOcG+Ie+gjgfIotZOD39SIiI5UYZt2uvs38vMwEzFayZNLd6Wo4D0sPQ8 /DOrHQjrxO8KPmiEarglZYrWhUIs8TSwORh/qOV3rYiw8EH0ESeWo0QkS9lA8qnBo7uv v2BFXLF+5wcuco8VODZZlkrtNQSGLC+be3fUwDd/an2TPlnFU3D+wqZaaO+X+Y7UWeOR izwg== X-Gm-Message-State: AOAM5309+5vd6/u0dKt0IBaJPVUUCnYGEEI0H6sJ1NiHKC9lmKnfXZhi jxo5laBuyR9ux8W1bXFMrTg0Zdm1YYJyhPdMRG4= X-Google-Smtp-Source: ABdhPJw8TmZisoYJQb2SVHP2J/XSkZSzLw0bfkiAV9h8OY9eEHr/k33ODPPnsIXrdwWQH0cYw+WJ2+TymTyZCKqRUgQ= X-Received: by 2002:a7b:c5d0:0:b0:389:fe85:3d79 with SMTP id n16-20020a7bc5d0000000b00389fe853d79mr24898741wmk.77.1654013721128; Tue, 31 May 2022 09:15:21 -0700 (PDT) MIME-Version: 1.0 References: <20220527212901.29268-1-konrad.dybcio@somainline.org> <20220527212901.29268-2-konrad.dybcio@somainline.org> <20220531154631.GA25502@willie-the-truck> In-Reply-To: <20220531154631.GA25502@willie-the-truck> From: Rob Clark Date: Tue, 31 May 2022 09:15:22 -0700 Message-ID: Subject: Re: [PATCH 1/6] iommu/qcom: Use the asid read from device-tree if specified To: Will Deacon 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220531_091525_761629_3D97A19C X-CRM114-Status: GOOD ( 18.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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, 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 BR, -R _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel