[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241031131201.GH10193@nvidia.com>
Date: Thu, 31 Oct 2024 10:12:01 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Nicolin Chen <nicolinc@...dia.com>
Cc: kevin.tian@...el.com, corbet@....net, joro@...tes.org,
suravee.suthikulpanit@....com, will@...nel.org,
robin.murphy@....com, dwmw2@...radead.org, shuah@...nel.org,
iommu@...ts.linux.dev, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
baolu.lu@...ux.intel.com, eric.auger@...hat.com,
jean-philippe@...aro.org, mdf@...nel.org, mshavit@...gle.com,
shameerali.kolothum.thodi@...wei.com, smostafa@...gle.com,
yi.l.liu@...el.com, aik@....com, zhangfei.gao@...aro.org,
patches@...ts.linux.dev
Subject: Re: [PATCH v6 02/13] iommufd: Move _iommufd_object_alloc helper to a
sharable file
On Wed, Oct 30, 2024 at 02:34:28PM -0700, Nicolin Chen wrote:
> The following patch will add a new vIOMMU allocator that will require this
> _iommufd_object_alloc to be sharable with IOMMU drivers (and iommufd too).
>
> Add a new driver.c file that will be built with CONFIG_IOMMUFD_DRIVER_CORE
> selected by CONFIG_IOMMUFD, and put the CONFIG_DRIVER under that remaining
> to be selectable for drivers to build the existing iova_bitmap.c file.
>
> Suggested-by: Jason Gunthorpe <jgg@...dia.com>
> Signed-off-by: Nicolin Chen <nicolinc@...dia.com>
> ---
> drivers/iommu/iommufd/Kconfig | 5 ++++
> drivers/iommu/iommufd/Makefile | 5 +++-
> drivers/iommu/iommufd/iommufd_private.h | 4 ---
> include/linux/iommufd.h | 10 +++++++
> drivers/iommu/iommufd/driver.c | 40 +++++++++++++++++++++++++
> drivers/iommu/iommufd/main.c | 32 --------------------
> 6 files changed, 59 insertions(+), 37 deletions(-)
> create mode 100644 drivers/iommu/iommufd/driver.c
>
> diff --git a/drivers/iommu/iommufd/Kconfig b/drivers/iommu/iommufd/Kconfig
> index 76656fe0470d..83addbe2ff7b 100644
> --- a/drivers/iommu/iommufd/Kconfig
> +++ b/drivers/iommu/iommufd/Kconfig
> @@ -1,9 +1,14 @@
> # SPDX-License-Identifier: GPL-2.0-only
> +config IOMMUFD_DRIVER_CORE
> + tristate
> + default IOMMUFD_DRIVER || IOMMUFD
> +
> config IOMMUFD
> tristate "IOMMU Userspace API"
> select INTERVAL_TREE
> select INTERVAL_TREE_SPAN_ITER
> select IOMMU_API
> + select IOMMUFD_DRIVER_CORE
Should drop the select
Reviewed-by: Jason Gunthorpe <jgg@...dia.com>
Jason
Powered by blists - more mailing lists