Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp903372rwl; Thu, 10 Aug 2023 03:35:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFYhu5n2T43FZAnZFvdTvveE8RqpLsDvYC6jbycgrQJDw6XYVUmxiD+Sv69r9RsRwVGoAnv X-Received: by 2002:a2e:a174:0:b0:2b9:d28c:9c1c with SMTP id u20-20020a2ea174000000b002b9d28c9c1cmr1640821ljl.26.1691663745447; Thu, 10 Aug 2023 03:35:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691663745; cv=none; d=google.com; s=arc-20160816; b=kMnJWBTraC2PTH7RRuMzfsDcOzcleivMWAzv/ZnxE/4hPHG2nVuQSgvuwiokOWqHQ2 VrQnHRXS9e1ufXm+zIkcrCe928gntee3WShQGSFhxGMwtHBUEQmjZmQx9VfjA44v8+SA y3Z8qNiOaBMILi0FpH+xNl0EeAvy7GOvvBXDnTZXq8zMk6uE5aqbUnhF5jUVWwRu+3O+ Zvu63d0lhnhLF95g+cOdQBbW/Q+5Q7nUW0OCIKsCbP3fmxfttcygZSZEVckgD2HITdFw qv8MbmvZ5Swp7Y1NX0HDljfJuQbirH49D5s+S1ZOzf7vKNmVD3YTPxwDuAnypW6iuDq3 ThgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Pgn4/qIV7fxvKZzxqSyuDtxTvEtyWVBr/gC+RKJiMZ0=; fh=t+8wUyKcQrCdL1Lrmfctd/7P6zFzoKI1W4CBYAN/NYQ=; b=MfBNr5R2tX4+MYf+gMwcmAH2tOv5859lLDlOEWiAO0dwTSx4he7dY9q3ZTYGKcmsFf WG1uPuJ+2wVJO/QiXaNH9vOyCq6BJ0c3Su+EXszHoYHKx4UFRBCoFYUoeXkWGS6hFpja dYo/Ce5a4xi9vyBYg0+a/DnSpsQP7KtYDZf2KFJOsupbRCC5J9PrWmh1RDB4I77659em rXovKdSzg92mTP7SrWY0ovctswuMwd2PmQptPpgbY4qxA0Fd/xUcBOOt/xjUI35Lfi/p 2vYKg9hzSczDAqzj8SW/TR5hLn/y6tO4T2WSsvBP7Lq5PAZk3q4uei5aTuf7PAwoTwUs 3zwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=Rl4LWFZS; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i17-20020a17090685d100b00992d730e99dsi1215366ejy.494.2023.08.10.03.35.19; Thu, 10 Aug 2023 03:35:45 -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=@google.com header.s=20221208 header.b=Rl4LWFZS; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233074AbjHJJpm (ORCPT + 99 others); Thu, 10 Aug 2023 05:45:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229994AbjHJJpl (ORCPT ); Thu, 10 Aug 2023 05:45:41 -0400 Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE2A81BD9 for ; Thu, 10 Aug 2023 02:45:40 -0700 (PDT) Received: by mail-qt1-x833.google.com with SMTP id d75a77b69052e-407db3e9669so168301cf.1 for ; Thu, 10 Aug 2023 02:45:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1691660740; x=1692265540; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Pgn4/qIV7fxvKZzxqSyuDtxTvEtyWVBr/gC+RKJiMZ0=; b=Rl4LWFZSxmP0VkxHciD8VhjO8/5h/FGy+WWDDjSPkV1/KQ7gP/QeOi1plC5N32mwqV h4S1Qp28dCmmXe8/p1G1BMd1AcF95bf2635ohTrRogPkfsEK4ghPJoSJl0Waobhjp/if v5ooebxurbyrTUt6s9ePt4iAXz/zZilY+pMDvz1b8E1Ntvd2pImDQGkgU9eXgT4loKNd YoQTVuChJwP1utUbTyadI7n7v2/N8TQNFQ9yhyb/49obm4e/k6M927cCXxFNQL2qCxyX PPjvhcnZpJZW/R6OdvE+RWYzrjhDlugSVEg+cvqYsLR/Egt2VSttP6kHKrEpPHqFIiqt QZVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691660740; x=1692265540; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Pgn4/qIV7fxvKZzxqSyuDtxTvEtyWVBr/gC+RKJiMZ0=; b=EJrZcoWegUVpgl2n9tJAgRBITAwoIh/UW+VCkSQg/VHl2QCy2sY0X3dDqhMerzuTNt UgzNtCO34oh5cryfwGhqH+NyeyxQDgMJVDBX206kR0KTvUSsCMN/ZdP46b8oQfkV+Mn1 J3FgcUXXteS1RH/c9TM6O6c4zTY/IaBeU+B/njCjs2W2cbDPHJ9S5JmJbYG7W/AsQjFW uIWb3Osc8QJJBzCTnT2DkPrmpSjbBlBO6gzIHgPO/zZK+qnH2yDQWQELwa6EKp+gj4CP eiV3kPs/q5MCIfzNynDZqsNeuDUk3zxwFLRU5HkGym901BbRLsTGViXvDw7VI62UDN64 VMIA== X-Gm-Message-State: AOJu0Ywu+Ph6+f7wLxbaeJ6hj/i5eNnSMrLvtgPuLpalzarShYWtqg4j 6Z6UVH0uA49dqYHEseooszE8f2PlrzHLTWRAIadAmg== X-Received: by 2002:ac8:58d1:0:b0:3f2:2c89:f1ef with SMTP id u17-20020ac858d1000000b003f22c89f1efmr402291qta.5.1691660739834; Thu, 10 Aug 2023 02:45:39 -0700 (PDT) MIME-Version: 1.0 References: <20230808171446.2187795-1-mshavit@google.com> <20230809011204.v5.6.Ice063dcf87d1b777a72e008d9e3406d2bcf6d876@changeid> <20230809135024.GD4226@willie-the-truck> In-Reply-To: <20230809135024.GD4226@willie-the-truck> From: Michael Shavit Date: Thu, 10 Aug 2023 17:45:03 +0800 Message-ID: Subject: Re: [PATCH v5 6/9] iommu/arm-smmu-v3: Move CD table to arm_smmu_master To: Will Deacon Cc: iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, robin.murphy@arm.com, nicolinc@nvidia.com, jgg@nvidia.com, jean-philippe@linaro.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham 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 Wed, Aug 9, 2023 at 9:50=E2=80=AFPM Will Deacon wrote: > > On Wed, Aug 09, 2023 at 01:12:02AM +0800, Michael Shavit wrote: > > @@ -2203,7 +2186,7 @@ static int arm_smmu_domain_finalise(struct iommu_= domain *domain, > > ias =3D min_t(unsigned long, ias, VA_BITS); > > oas =3D smmu->ias; > > fmt =3D ARM_64_LPAE_S1; > > - finalise_stage_fn =3D arm_smmu_domain_finalise_s1; > > + finalise_stage_fn =3D arm_smmu_domain_finalise_cd; > > Why is this a better name? Now we have inconsistency with > arm_smmu_domain_finalise_s2(). There was a time where s1cfg represented the entire STE and carried the entire cd table. We've gotten rid of s1cfg, and now only store arm_smmu_ctx_desc in the arm_smmu_domain for stage 1 domains. arm_smmu_domain_finalise_cd is IMO more clear, especially given the historical baggage around `s1`.