From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 46A9825119 for ; Tue, 28 Nov 2023 10:42:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=none Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A6EECC15; Tue, 28 Nov 2023 02:43:04 -0800 (PST) Received: from e121345-lin.cambridge.arm.com (e121345-lin.cambridge.arm.com [10.1.196.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 407283F73F; Tue, 28 Nov 2023 02:42:16 -0800 (PST) From: Robin Murphy To: joro@8bytes.org, jgg@ziepe.ca, kevin.tian@intel.com Cc: will@kernel.org, iommu@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 0/2] iommufd/selftest: Fix and cleanup for bus ops Date: Tue, 28 Nov 2023 10:42:10 +0000 Message-Id: X-Mailer: git-send-email 2.39.2.101.g768bb238c484.dirty Precedence: bulk X-Mailing-List: iommu@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi all, The bus ops removal relies on iommu_ops_from_fwnode(NULL) finding the "global" hardware driver ops on relevant platforms. Unfortunately I overlooked that this will also match the IOMMUFD mock driver, such that it can end up claiming to be the IOMMU for real platform etc. devices which don't have an IOMMU described by a fwspec. This mini-series addresses that. I've split it so patch #1 is minimal fix that mitigates the issue and could be applied independently, then patch #2 then builds on it to take full advantage of the new machinery and coexist as a normal IOMMU driver. However they could be squashed if preferred. Thanks, Robin. Robin Murphy (2): iommufd/selftest: Use a fwnode to distinguish devices iommufd/selftest: Use normal IOMMU registration drivers/iommu/iommu-priv.h | 7 ----- drivers/iommu/iommu.c | 46 +++------------------------- drivers/iommu/iommufd/iommufd_test.h | 2 ++ drivers/iommu/iommufd/selftest.c | 45 +++++++++++++-------------- 4 files changed, 27 insertions(+), 73 deletions(-) -- 2.39.2.101.g768bb238c484.dirty