Received: by 2002:ac0:de83:0:0:0:0:0 with SMTP id b3csp185428imk; Sat, 2 Jul 2022 15:33:52 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t+ouR+K8THng1HlI+iYSYxH7BITu+ifw5Ans0G5tqROfBD8lOhUHZG7+tjDTr5HAMGS5xa X-Received: by 2002:a63:1824:0:b0:408:a22b:df0c with SMTP id y36-20020a631824000000b00408a22bdf0cmr19087042pgl.119.1656801232139; Sat, 02 Jul 2022 15:33:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656801232; cv=none; d=google.com; s=arc-20160816; b=eIIhnb5giVia2XO1NMxAQjGxCVeETGedS33gVZuRivfhTz83a8jHCI5s85Ro47w/kf +qzk9zJzlqpnPzEoSA7P73VZLKXCPANvOYHEZxYTO2aRoKRgN104E00a6p+/vYMUh48S duuSKcfgKuS00ieuy23E1OAofjSeCQMG31W38Sj09E1WmSqt0N+SkA2MXa+WWnbeYp2F KBEmeyh4G2Zohq76MIZVS+g5c1nJTTCNY6awXUvri6wtreeodTYcG9ImE/GgDqlBA835 5zV2LsAiaNT7kiQr3CrT1eAaOtS0AECogtE7gaf2Vr1pay3W5dZlbCeqt/3SusyD5mCk QvkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=xwhpF2WN1J6S5lDXRAv+Kjl/+1IwILg/3g/jg+Rhz9c=; b=oAjtRgqZbe669gLha85R+k6UdxQRTzkZitz3fx+ofJZeeX5KmASVcOI9kH7vQnjMHV lKXHJdiGskbDDf5PZTYFuVGtrJifuczWhltqWm2SKMofHS9Rg0oe0JvUJ/kISkFjkcnY 5uDqO6iY6BkxEeXLXROANCXcpfOp3R7ueQ8UaVXVFOGhdkj6r7ZGg5cFrgwznUW70zXY G9V1FLhnvp8BhlB71miWooEj55W2pBBYIXUOvW1ChksmW3jhDUWKg5hDwbZnNcU59+fM 32xVjpzwTG4i9HEEyY5z4ig7P75tpVxRV6XLxgcRKO38sqo76ZCcAAtJ77LmbC8C+bXs h+vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oCpQEhUQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y65-20020a638a44000000b0040d46709b85si13508619pgd.738.2022.07.02.15.33.38; Sat, 02 Jul 2022 15:33:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oCpQEhUQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230249AbiGBVs5 (ORCPT + 99 others); Sat, 2 Jul 2022 17:48:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229911AbiGBVsz (ORCPT ); Sat, 2 Jul 2022 17:48:55 -0400 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44F9EDEB9 for ; Sat, 2 Jul 2022 14:48:54 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id a11so6625482ljb.5 for ; Sat, 02 Jul 2022 14:48:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xwhpF2WN1J6S5lDXRAv+Kjl/+1IwILg/3g/jg+Rhz9c=; b=oCpQEhUQFqNhRyRxjTjg2S5HdHN/+rGO/9TGX6J3EXmBo7rnTdLvPgvWrtCYw2J9UL wPu+VXgoiZTIjlLx8ApyAAFpKJYDCFzUjD+6WIbD9w2kENrTihBt45XO8XYjeSnU93NS krbAIogLcjd8c8Hl+HuDng2dDRSr96aWR3ZV8g8//QDnIuXXK552X9Zyvv13uHm9LwGT Qg2/7MLD3xII8a4IFaufxcAVcoUOcYwp49Xo4IqzHP2n5rUaXUo3LyC/py01oAEAukQp tovSlF37pVHf7oPsn77gzJU3rv/MI1477WsxbQ52/qO1KKeng3K1lsh93mSnr2STndqD 2RJg== 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=xwhpF2WN1J6S5lDXRAv+Kjl/+1IwILg/3g/jg+Rhz9c=; b=uZYR28mC9CSr9zJo3cgeizj0zDpLcdkZ/skXXNmaDb+kzfDoQ/sAAjG8/TiNa/AJtZ b6YygnoYG0ClHP9t0gyNxkm71/iHAou96ez75CT7QP1G+FpsOdEB6/K+HBGkKRfytrxu pZ4WyZYHHVlSLdh6UkLs6sRMeW5TXY8w5epO7HgevYWz7XjmjTWBt5VTPpymLRYXubuc J4nkkWm01mhNxRooWquBMFFjIef5q5amnDZey6YjLAXpbDqxP51eNL2OtEK8FubV3cfH +OvDUS/KAObhtpJfzIARlC80MIIU1d0wQFsghoc6hL2QGUkMy3SpUbCtWEzYYtfeiI19 WNuA== X-Gm-Message-State: AJIora+ilcrw1IhQhq0y+pwwoFfLFMaNkS6732e7du+lV0+x+38S0Wo0 si8PLOJR6GDyrjunszhnLsn+tMMQrAmKYkuxqGc12w== X-Received: by 2002:a2e:8ec9:0:b0:25a:754d:db39 with SMTP id e9-20020a2e8ec9000000b0025a754ddb39mr12010480ljl.4.1656798532393; Sat, 02 Jul 2022 14:48:52 -0700 (PDT) MIME-Version: 1.0 References: <20220702213724.3949-1-semen.protsenko@linaro.org> In-Reply-To: <20220702213724.3949-1-semen.protsenko@linaro.org> From: Sam Protsenko Date: Sun, 3 Jul 2022 00:48:41 +0300 Message-ID: Subject: Re: [PATCH 0/4] iommu/exynos: Add basic support for SysMMU v7 To: Marek Szyprowski Cc: Krzysztof Kozlowski , Joerg Roedel , Will Deacon , Robin Murphy , Janghyuck Kim , Cho KyongHo , Daniel Mentz , Sumit Semwal , iommu@lists.linux-foundation.org, iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,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 Sun, 3 Jul 2022 at 00:37, Sam Protsenko wrote: > > Existing exynos-iommu driver only supports SysMMU versions up to v5. But > it's pretty much ready for basic usage with SysMMU v7, only small > changes have to be done. As SysMMU version is tested dynamically (by > reading the corresponding register), there is no need to introduce new > compatible string. > > One major change is that SysMMU v7 can have different register layouts: > - with Virtual Machine support > - without Virtual Machine support > > That can be checked by reading the capability registers. In case the > SysMMU IP-core is VM-capable, the VM registers have to be used, and some > additional initialization is needed. That is the case on E850-96 board, > which non-secure SysMMU (v7.4) implements VM-capable register set. > > The patch series was tested on E850-96 board. Because at the moment > there are no SysMMU users for that board, the testing was done using so > called "Emulated Translation" registers available on SysMMU v7. That > allows one to initiate the translation from CPU, by writing to those > registers, and then reading the corresponding TLB registers to find out > the translation result. The testing driver can be found in [1] tree. > > [1] https://github.com/joe-skb7/linux/tree/e850-96-mainline-iommu > > Sam Protsenko (4): > iommu/exynos: Set correct dma mask for SysMMU v5+ > iommu/exynos: Check if SysMMU v7 has VM registers > iommu/exynos: Use lookup based approach to access v7 registers > iommu/exynos: Add minimal support for SysMMU v7 with VM registers > > drivers/iommu/exynos-iommu.c | 112 ++++++++++++++++++++++++++++++++--- > 1 file changed, 104 insertions(+), 8 deletions(-) > > -- > 2.30.2 > Hi Marek, As I understand, you have some board with SysMMU v7, which is not VM capable (judging from the patches you shared earlier). Could you please somehow verify if this series works fine for you? For example, this testing driver [1] can be helpful. Thanks! [1] https://github.com/joe-skb7/linux/commit/bbadd46fa525fe1fef2ccbdfff81f7d29caf0506