All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Nicolin Chen <nicolinc@nvidia.com>
Cc: kevin.tian@intel.com, corbet@lwn.net, joro@8bytes.org,
	suravee.suthikulpanit@amd.com, will@kernel.org,
	robin.murphy@arm.com, dwmw2@infradead.org, shuah@kernel.org,
	iommu@lists.linux.dev, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	baolu.lu@linux.intel.com, eric.auger@redhat.com,
	jean-philippe@linaro.org, mdf@kernel.org, mshavit@google.com,
	shameerali.kolothum.thodi@huawei.com, smostafa@google.com,
	yi.l.liu@intel.com, aik@amd.com, zhangfei.gao@linaro.org,
	patches@lists.linux.dev
Subject: Re: [PATCH v6 02/13] iommufd: Move _iommufd_object_alloc helper to a sharable file
Date: Thu, 31 Oct 2024 10:12:01 -0300	[thread overview]
Message-ID: <20241031131201.GH10193@nvidia.com> (raw)
In-Reply-To: <52abef167409b25bfee559a0c03f2607ce77be3c.1730313237.git.nicolinc@nvidia.com>

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@nvidia.com>
> Signed-off-by: Nicolin Chen <nicolinc@nvidia.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@nvidia.com>

Jason

  reply	other threads:[~2024-10-31 13:12 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-30 21:34 [PATCH v6 00/13] iommufd: Add vIOMMU infrastructure (Part-1) Nicolin Chen
2024-10-30 21:34 ` [PATCH v6 01/13] iommufd: Move struct iommufd_object to public iommufd header Nicolin Chen
2024-10-30 21:34 ` [PATCH v6 02/13] iommufd: Move _iommufd_object_alloc helper to a sharable file Nicolin Chen
2024-10-31 13:12   ` Jason Gunthorpe [this message]
2024-10-30 21:34 ` [PATCH v6 03/13] iommufd: Introduce IOMMUFD_OBJ_VIOMMU and its related struct Nicolin Chen
2024-10-30 21:34 ` [PATCH v6 04/13] iommufd: Verify object in iommufd_object_finalize/abort() Nicolin Chen
2024-10-31 13:13   ` Jason Gunthorpe
2024-10-30 21:34 ` [PATCH v6 05/13] iommufd/viommu: Add IOMMU_VIOMMU_ALLOC ioctl Nicolin Chen
2024-11-07  1:37   ` Alexey Kardashevskiy
2024-11-07  2:03     ` Nicolin Chen
2024-11-07 18:46     ` Jason Gunthorpe
2024-10-30 21:34 ` [PATCH v6 06/13] iommufd: Add alloc_domain_nested op to iommufd_viommu_ops Nicolin Chen
2024-10-30 21:34 ` [PATCH v6 07/13] iommufd: Allow pt_id to carry viommu_id for IOMMU_HWPT_ALLOC Nicolin Chen
2024-10-31 13:14   ` Jason Gunthorpe
2024-10-31 16:37     ` Nicolin Chen
2024-11-01  1:06   ` kernel test robot
2024-10-30 21:34 ` [PATCH v6 08/13] iommufd/selftest: Add container_of helpers Nicolin Chen
2024-10-30 21:34 ` [PATCH v6 09/13] iommufd/selftest: Prepare for mock_viommu_alloc_domain_nested() Nicolin Chen
2024-10-30 21:34 ` [PATCH v6 10/13] iommufd/selftest: Add refcount to mock_iommu_device Nicolin Chen
2024-10-30 21:34 ` [PATCH v6 11/13] iommufd/selftest: Add IOMMU_VIOMMU_TYPE_SELFTEST Nicolin Chen
2024-10-30 21:34 ` [PATCH v6 12/13] iommufd/selftest: Add IOMMU_VIOMMU_ALLOC test coverage Nicolin Chen
2024-10-31 13:16   ` Jason Gunthorpe
2024-10-31 16:38     ` Nicolin Chen
2024-10-31 18:33       ` Nicolin Chen
2024-10-30 21:34 ` [PATCH v6 13/13] Documentation: userspace-api: iommufd: Update vIOMMU Nicolin Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241031131201.GH10193@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=aik@amd.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=corbet@lwn.net \
    --cc=dwmw2@infradead.org \
    --cc=eric.auger@redhat.com \
    --cc=iommu@lists.linux.dev \
    --cc=jean-philippe@linaro.org \
    --cc=joro@8bytes.org \
    --cc=kevin.tian@intel.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mdf@kernel.org \
    --cc=mshavit@google.com \
    --cc=nicolinc@nvidia.com \
    --cc=patches@lists.linux.dev \
    --cc=robin.murphy@arm.com \
    --cc=shameerali.kolothum.thodi@huawei.com \
    --cc=shuah@kernel.org \
    --cc=smostafa@google.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=will@kernel.org \
    --cc=yi.l.liu@intel.com \
    --cc=zhangfei.gao@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.