Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp288191rdg; Thu, 12 Oct 2023 05:58:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEUsTlc28vtt4BSwL8bPLV8yWd8mNYRuVb1PisyYc13JZ9q3RpktXh5e6Bnw84OhWu0y50+ X-Received: by 2002:a05:6a21:a5a7:b0:15d:721e:44d5 with SMTP id gd39-20020a056a21a5a700b0015d721e44d5mr27991789pzc.49.1697115490213; Thu, 12 Oct 2023 05:58:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697115490; cv=none; d=google.com; s=arc-20160816; b=a8+5qrS2e4BPdcX8QVyRdqwB4u9W7W8N71jOqnHvsmhKwvtu22GpUENTlxHxvH9zC7 WjuDzyw1Feut/pH7JMM68amREP6/yznqeg1gUxF3V/dYjBwvmAVazXmrXethoegQJ4Xf JVOCbwBPEE1YgVmRmsESpa62Y0IJeraG5pdu9JjRkH6m5wpr9OJtWgo+fkQlt2Mq0m89 qSgPbdnXF7xeDcfj4lwYdaket872sNRrZcyQwFwLgPWMqzIJj1mOYlv/aJUYIqIJW/IO S+6Ju1RxkzRtOv0ZsffQKmvnOpC/dlxgciKS2tML2j1smpkVEgdbb0MS1eweQxOLda3j VwQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=UsLt/okUVIitukPsugEi4u+oPIMWGBKBc3QZyahQjW8=; fh=2DQa/yv7VfNBDVie5R0naK9HsKqPyEbDMx2IYqfIw/w=; b=hGbdBj+9G83FkjfM5pGeuiSEwDcx9Q8RdiKGulWk053dGHKVQa1eA5xBvYVXZu3fUu EJhY3wTLEbe4gZKEp7HUXEi1B/rtMoIYBRRCsvGtX9ClEKExpnn4Sm1QeCLTi0wlAO4R 6hJRAaggCf1LRy6+EaHdQ0fHh7qczYICXZ5sDu1n4Iq0ByTqRHJUiCqIfx+HSWGeGnfT KY718QJuJzBLtq0GjVfpwgqdHYOix+0YxD7lBdm8F6hMP0sEsTg9hKRnxAw3aDVefA8v FxwijOLwFvMsMBdNlDgmLWlTddWDDU3a3SNS33BtTutY9zoRVVy1mvIItIAmqSqA0nX/ OpbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nwzo08fu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id f9-20020a17090274c900b001bb9e2c38ecsi1993193plt.264.2023.10.12.05.58.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 05:58:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nwzo08fu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id C694C81AA51E; Thu, 12 Oct 2023 05:58:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378444AbjJLM5y (ORCPT + 99 others); Thu, 12 Oct 2023 08:57:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347260AbjJLM5w (ORCPT ); Thu, 12 Oct 2023 08:57:52 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85F03BA for ; Thu, 12 Oct 2023 05:57:51 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF889C433C8; Thu, 12 Oct 2023 12:57:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697115471; bh=Ok28SdhAWW1nvMtIM0V7FGuq4sgQwHbgRzFRQZos3eo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nwzo08fucF91DIEhvRvfXhMNnJ9L1KcNM2Ht+7wU+42fegJWJqnkRU9lBWCSRTUtJ iqHRhGvLvlzvJraz/+HnhcM6RSJ7mLvjtuWzt9BmSfLQMmEJeZrh2EGs+h7sP4FZgL mlaRa4DNCZucToVO1rNeGdGNMfahw/pE6xcXyGl3QvAG/Medx+PISc1PD1RAAewdiN CDTBYLArI7ySh6l4y0BNZelwyuFmAs8y72Jmf9hdBzaNN3+nnxc+m+6uWkgd5ieed9 eVT08lDYcmKz67eeiSx36fYOAXfO4sfKQKkqccXaHxqC20M+O8Y/Go3Mo3lpYGtJUU UaO7HQpqymbRw== Date: Thu, 12 Oct 2023 13:57:46 +0100 From: Will Deacon To: Robin Murphy Cc: joro@8bytes.org, iommu@lists.linux.dev, jgg@nvidia.com, baolu.lu@linux.intel.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 7/7] iommu: Clean up open-coded ownership checks Message-ID: <20231012125746.GB12142@willie-the-truck> References: <0d68867cec0fb90578d50cc145f7f9a180407f20.1697047261.git.robin.murphy@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0d68867cec0fb90578d50cc145f7f9a180407f20.1697047261.git.robin.murphy@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 12 Oct 2023 05:58:08 -0700 (PDT) On Wed, Oct 11, 2023 at 07:14:54PM +0100, Robin Murphy wrote: > Some drivers already implement their own defence against the possibility > of being given someone else's device. Since this is now taken care of by > the core code (and via a slightly different path from the original > fwspec-based idea), let's clean them up. > > Reviewed-by: Jason Gunthorpe > Signed-off-by: Robin Murphy > --- > drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 3 --- > drivers/iommu/arm/arm-smmu/arm-smmu.c | 9 +-------- > drivers/iommu/arm/arm-smmu/qcom_iommu.c | 16 +++------------- > drivers/iommu/mtk_iommu.c | 7 +------ > drivers/iommu/mtk_iommu_v1.c | 3 --- > drivers/iommu/sprd-iommu.c | 8 +------- > drivers/iommu/virtio-iommu.c | 3 --- > 7 files changed, 6 insertions(+), 43 deletions(-) Acked-by: Will Deacon Will