Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2824542rwd; Wed, 14 Jun 2023 07:48:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ67FUJfw9SV1Ge0aTI2ez4h1Cu5KTGqNIdVNmWYZ4pmZBrMdRu7fiSyFgntVi59ZzeMr7CI X-Received: by 2002:a17:907:6095:b0:94f:8aff:c8b3 with SMTP id ht21-20020a170907609500b0094f8affc8b3mr17559439ejc.28.1686754110918; Wed, 14 Jun 2023 07:48:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686754110; cv=none; d=google.com; s=arc-20160816; b=lU/n1exX0kXEODhUVDxk75i/JsQEZvtbTGMq7YN8sgIMp0/6klkKDzbqNhmnzt+9Bj sOYFu7lc9LB33wTtWQceX7arWB1r+9n3i/5ZW1XhWdtaoBZPCcHsaV/LF9hnIwHJTV59 mHPOKrPLElJL056Dp3eAD+gl0AX0IcsdYfskAesNdqPGtfMPDShjecXOqYhk8WqhmIgy bRk1p9G3MJrBon9Utjx2naOmjOLn3yIHfQ+NuiJYL+hkb5/Qmc4A33ua4oAcpU1VBNgp va+PdcYed1L/UiowMHisudLkUILQL/cHn17uziZ0FP1ZVUPnouBpZQPsiXgrbvsfFXVQ aJ3w== 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=nPogWzmsJ1uvTQmxk29cAdOXJbnNlr5lDiNRKRRfY+Y=; b=aLl5Vcu7C98p+kYMSKZZT88j9xidvb96dkiwLyRi98WT/Cyw/wP1JGPpJJANMaxo/e Dfh2IjhGgbn/isVzGulWM2B1+dlj60LBPwKFwVPXqfGMpB92xRBtg3X3yj/LzsUT+qGM +Vn2V9f2Q8v+qKxF9AoEU+OPShgwR1hTFxbxhUeyq3pfql5WDxngQ1ONd1jfI9gWyLxS 9/z6w9Bv+2Osxf9iOx3CgyA4Ca2HC3MPg1Cnm6SBhnQVcUo77CBSjznwvnivZ8hjQC7b AmR8F48A4b0YAGXYA6oFFgT2Ym1ztrN60mph2ZBF4Ax4mv9wMzjgOPtsKUJ7yvylHVEA 5DAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b="uD0jAp/l"; 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 d12-20020a1709064c4c00b00977b21cfce7si8355239ejw.375.2023.06.14.07.48.05; Wed, 14 Jun 2023 07:48:30 -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="uD0jAp/l"; 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 S245013AbjFNNbO (ORCPT + 99 others); Wed, 14 Jun 2023 09:31:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244932AbjFNNbM (ORCPT ); Wed, 14 Jun 2023 09:31:12 -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 3F8DE1BE8 for ; Wed, 14 Jun 2023 06:31:11 -0700 (PDT) Received: by mail-qt1-x833.google.com with SMTP id d75a77b69052e-3f98276f89cso191741cf.1 for ; Wed, 14 Jun 2023 06:31:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1686749470; x=1689341470; 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=nPogWzmsJ1uvTQmxk29cAdOXJbnNlr5lDiNRKRRfY+Y=; b=uD0jAp/lTJTKXuircqMDJh7ibnACj3Kymu3Rc/QmTOPRqLUM7CGWWjC1/Sj8QyDl3k 6KXJd7yNCltiUbmlaniei7G+fyaEOirccZnQCqYu7o0UJPPBz1kt9xynZm19ACbIsrtS 84iJPzLYoSU9QAJarFECN+V4RAwsoVbQlB396Wrty5lS8XrwEn2eJli66e4mcGvguTiq niJ/JMFW3AYlPi68nLDUWZCAAmocN6T9vZOusEaDAT7JHlT2TzQx9VK10LhFRgFYSWkX rfX6DCoDTM5CBcVpJlcpStCdXCaKrOG3czdGbp6TWxqQyB2STjzyO+G8c3tuZDCtqoMG xFlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686749470; x=1689341470; 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=nPogWzmsJ1uvTQmxk29cAdOXJbnNlr5lDiNRKRRfY+Y=; b=Jq2XxTDvohG0VRl1QlIPT/11DBC6WDbrJrUKlmN6edf0xcai/U+cOIxd+8y8ONXubw mqzAnkxY45ihgRMVlifM5wRjjyZ5BEKKi7W9lMVm+u8UwkXyq1MdrrP2/ZPmotQ+IDI3 i+/O+i4R7d8tt+WV52fOhiQbXwCa0XcVAW1h5OPXRRNoU3RX+RMYDi7PdYiTEZJMPcDz 0m1nHCfG0aPHLLXNf4xZpLFB6KSbnQAZ5vkta0LTOGw+PzpdHisbMN/mzGEQhiNFj8zf DP8WEMcDvXHy9xcM45Ixnfgj9Tk1dXu4St+y3c3/7qpn+pp4/+VrvoLSG+/nL4iSsFly 8KZw== X-Gm-Message-State: AC+VfDxalkQFgBM2nMg0Hn5nCPwtBttSZ19Z2Sj9Q2BT3sHia+bHwTiJ FkkAZyuvp4c5PGTLnxC9V2BjHanYILBxK1MhrRyCSQ== X-Received: by 2002:a05:622a:188f:b0:3f9:56c:1129 with SMTP id v15-20020a05622a188f00b003f9056c1129mr174966qtc.5.1686749470220; Wed, 14 Jun 2023 06:31:10 -0700 (PDT) MIME-Version: 1.0 References: <20230606120854.4170244-1-mshavit@google.com> <20230606120854.4170244-15-mshavit@google.com> In-Reply-To: From: Michael Shavit Date: Wed, 14 Jun 2023 21:30:34 +0800 Message-ID: Subject: Re: [PATCH v2 14/18] iommu/arm-smmu-v3: Support domains with shared CDs To: Jason Gunthorpe Cc: Will Deacon , Robin Murphy , Joerg Roedel , jean-philippe@linaro.org, nicolinc@nvidia.com, baolu.lu@linux.intel.com, linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.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_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,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, Jun 14, 2023 at 5:57=E2=80=AFPM Robin Murphy = wrote: > > In practice it would be entirely reasonable to only support > cross-instance attach between instances with matching capabilities such > that they *can* share the pagetable directly. On Wed, Jun 14, 2023 at 8:10=E2=80=AFPM Jason Gunthorpe wr= ote: > When we talk about multi instance support, it means the iommu_domain - > in whatever fixed IO page table format it uses - can be attached to > any SMMU instance that supports it as a compatible page table format. > > ARM doesn't quite reach this model, but once it passes the finalize > step it does. The goal is to move finalize to allocate. So for your > purposes you can ignore the difference. Got you. Failing the atach when the page table format is incompatible with the smmu device is a lot easier to handle. I didn't notice that SVA was already checking this elsewhere. I can give the multi-instance support a try (with the rest of these patches on top) and send it out as a follow-up series to this one. > I think it is good to make progress, it looked to me like the first > part stood alone fairly well and was an improvement on its own. Sorry for the noobie question; it's not 100% obvious to me what the next step is here. Is there anything I should do to progress that first part forward?