Message ID | 20230822185632.RFC.v2.8.I65dd382de382428dcb33333342b35405903ac768@changeid (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 5581AEE4993 for <linux-arm-kernel@archiver.kernel.org>; Tue, 22 Aug 2023 10:59:16 +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:From:Subject:Message-ID: References:Mime-Version:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=Y52nV6gnhoAipv2RQRoDsDce4z6a0JjOILWFxk1zL04=; b=Iu7gxxJDyURlehGN/vCFLKZHbL /GCVklSoJeypqWxLSOYS+NidhvBgytoK/vK+2yBHsSjYyqop0IsSXNijKEOJY23SF8rkaBpOCOcUt NqweBfdCPNlA/4DyPwxdSMCnT6AZZ1qgrd/AD78mzfEK1QWrFmh7NdxNsSbpXCyuEqqoL70PD2yXt 64psWr6J9ZFfuuaEF688o7BYj32feriPBr/6I2dq7kvIncs+Srp/CvfG/lKigPi3pnNTUFDu2ouHw uE50b4ZWPayZCHDFflK9sSFvZLX+bPKyXooWbFQu1PxSOGjVLLlKOhXK7VgPz4Mi19wF7kGWZNvg6 HJ+oMEug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qYP61-00Fmjw-2o; Tue, 22 Aug 2023 10:58:49 +0000 Received: from mail-yw1-x1149.google.com ([2607:f8b0:4864:20::1149]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qYP5a-00FmSd-3B for linux-arm-kernel@lists.infradead.org; Tue, 22 Aug 2023 10:58:24 +0000 Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-591138c0978so33255947b3.1 for <linux-arm-kernel@lists.infradead.org>; Tue, 22 Aug 2023 03:58:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1692701901; x=1693306701; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=1xwW+v61rdPoCKQce2vPFjbmpLjAsPrfEpwPotlFF+U=; b=ih84672TYQ0uR36sTapzunrkuaUbWHstif3b6iKv7mV3HpIc9cWZ/oYc7uNRCSLHII 2pHZd83QwfjJv/p3f29R0trlm8vijxENfi7yMuVBaY2+T5CCUyaUJS2KkqT9Jorm3XyA F4CKy9vVBhIcyEG+ZlJR3RgTozztbPtNsvxGcUzwgmX8MvrZ72+oxt2V2nNn9EAFgnZd eMI7hjX/T68tgwFc11i6TnaPMU0k2YP/zpC4v7zSsVJ90z2wWeWwpZtxjLTYUJzRvz1S uJ/x16oIz4Tkeb54hZV8Q6cD5KoMVbD2Mj8OWAieMWxQdl+7RGvaPgogdL6XCaL/ypW3 BHkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692701901; x=1693306701; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=1xwW+v61rdPoCKQce2vPFjbmpLjAsPrfEpwPotlFF+U=; b=MPUA+wYnn/MrBDSkewt/dYG3rhKKMUwiXE4cirALkUO3eYC34VmcB9YZC3sUlZPalZ DKnM5rPfvcn/EmBP6QVdQZcIZHUCXa04btAq5gSbOJ0rt8A+7gyswnRS5aiPazWXEZpV 0gwWosl3N/6pLAxxoG2FjWhHIMFk3lXOWqc7U84zC6b00tC/HKvvnlZYmuWXY4dACkYU Fu6m75IxVk8VZkRcgUVA2mzZQLHYEBgzhTN05JyIeriUw60RxamZQ/pethrIXtWoqWy3 GCL9XxEut9FMcJy72eFN4uNOcVpECRc+ZNAH+0Wzv8spVNK1ghBV1spo8nFaAjlGve2J ihcQ== X-Gm-Message-State: AOJu0YzCX42vSfts9weS6YbrrhJ1a5/32UqMJa32sqXIRCS6a82bphcV 2rwJeJ5iNtZtkkaMtXY5/fTYupxTllFl X-Google-Smtp-Source: AGHT+IGuW/3tPdCQ3blX7ef1nckHZq80wU2cX1yfJoUAETquSTLyTg4Dg7WC4rSmY3PWOYxMSvKC8jV1/Uko X-Received: from mshavit.ntc.corp.google.com ([2401:fa00:95:20c:44ad:3968:8aaa:c4fe]) (user=mshavit job=sendgmr) by 2002:a81:af23:0:b0:562:837:122f with SMTP id n35-20020a81af23000000b005620837122fmr87489ywh.9.1692701901552; Tue, 22 Aug 2023 03:58:21 -0700 (PDT) Date: Tue, 22 Aug 2023 18:57:04 +0800 In-Reply-To: <20230822105738.1607365-1-mshavit@google.com> Mime-Version: 1.0 References: <20230822105738.1607365-1-mshavit@google.com> X-Mailer: git-send-email 2.42.0.rc1.204.g551eb34607-goog Message-ID: <20230822185632.RFC.v2.8.I65dd382de382428dcb33333342b35405903ac768@changeid> Subject: [RFC PATCH v2 8/9] iommu/arm-smmu-v3: check for domain initialization using pgtbl_ops From: Michael Shavit <mshavit@google.com> To: iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: nicolinc@nvidia.com, tina.zhang@intel.com, jean-philippe@linaro.org, will@kernel.org, robin.murphy@arm.com, jgg@nvidia.com, Michael Shavit <mshavit@google.com>, Dawei Li <set_pte_at@outlook.com>, Jason Gunthorpe <jgg@ziepe.ca>, Joerg Roedel <joro@8bytes.org>, "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>, Lu Baolu <baolu.lu@linux.intel.com>, Mark Brown <broonie@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230822_035823_027512_C96E13F3 X-CRM114-Status: GOOD ( 12.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
Install domain onto multiple smmus
|
expand
|
diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c index 7c9897702bcde..9f8b701771fc3 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c @@ -2894,7 +2894,7 @@ static int arm_smmu_enable_nesting(struct iommu_domain *domain) int ret = 0; mutex_lock(&smmu_domain->init_mutex); - if (smmu_domain->smmu) + if (smmu_domain->pgtbl_ops) ret = -EPERM; else smmu_domain->stage = ARM_SMMU_DOMAIN_NESTED;
In order to remove smmu_domain->smmu in the next commit Signed-off-by: Michael Shavit <mshavit@google.com> --- (no changes since v1) drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)