mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Joao Martins" <joao.m.martins@oracle.com>,
	"Jason Gunthorpe" <jgg@nvidia.com>,
	"Arnd Bergmann" <arnd@kernel.org>
Cc: "Kevin Tian" <kevin.tian@intel.com>,
	"Yishai Hadas" <yishaih@nvidia.com>,
	"Shameerali Kolothum Thodi"
	<shameerali.kolothum.thodi@huawei.com>,
	"Alex Williamson" <alex.williamson@redhat.com>,
	"Brett Creeley" <brett.creeley@amd.com>,
	oushixiong <oushixiong@kylinos.cn>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vfio: mlx5, pds: add IOMMU_SUPPORT dependency
Date: Mon, 23 Oct 2023 14:55:13 +0200	[thread overview]
Message-ID: <b3f7ecb1-9484-426b-8692-98706f7ff6d4@app.fastmail.com> (raw)
In-Reply-To: <a16758d6-964d-4e46-9074-4d155f9b3703@oracle.com>

On Mon, Oct 23, 2023, at 14:37, Joao Martins wrote:
> On 23/10/2023 13:04, Jason Gunthorpe wrote:
>> On Mon, Oct 23, 2023 at 01:55:03PM +0200, Arnd Bergmann wrote:
>
> Right -- IOMMU drivers need really IOMMUFD (as its usage is driven by IOMMUFD),
> whereby vfio pci drivers don't quite need the iommufd support, only the helper
> code support, as the vfio UAPI drives VF own dirty tracking.
>
>> I think it means IOMMUFD_DRIVER should be lifted out of the
>> IOMMU_SUPPORT block somehow. I guess just move it into the top of
>> drivers/iommu/Kconfig?
>
> iommufd Kconfig is only included in the IOMMU_SUPPORT kconfig if clause; so
> moving it out from the iommufd kconfig out into iommu kconfig should fix it.
> Didn't realize that one can select IOMMU_API yet have IOMMU_SUPPORT unset/unmet.
> I'll make the move in v6

Are there any useful configurations with IOMMU_API but
not IOMMU_SUPPORT though? My first approach was actually

--- a/drivers/vfio/pci/mlx5/Kconfig
+++ b/drivers/vfio/pci/mlx5/Kconfig
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config MLX5_VFIO_PCI
        tristate "VFIO support for MLX5 PCI devices"
+       depends on IOMMU_SUPPORT
        depends on MLX5_CORE
        select VFIO_PCI_CORE
        select IOMMUFD_DRIVER

before I saw the other construct in the iommu drivers. Maybe that
is the best solution after all.

      Arnd

  reply	other threads:[~2023-10-23 12:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-23 11:55 Arnd Bergmann
2023-10-23 12:04 ` Jason Gunthorpe
2023-10-23 12:37   ` Joao Martins
2023-10-23 12:55     ` Arnd Bergmann [this message]
2023-10-23 13:23       ` Jason Gunthorpe
2023-10-23 14:02         ` Arnd Bergmann
2023-10-23 14:19           ` Jason Gunthorpe
2023-10-23 14:35             ` Arnd Bergmann
2023-10-23 14:43               ` Jason Gunthorpe
2023-10-23 14:52                 ` Arnd Bergmann
2023-10-23 13:12     ` Jason Gunthorpe
2023-10-23 17:50       ` Joao Martins
2023-10-23 18:08         ` Jason Gunthorpe
2023-10-23 18:46         ` Arnd Bergmann
2023-10-23 20:23           ` Joao Martins

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=b3f7ecb1-9484-426b-8692-98706f7ff6d4@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=alex.williamson@redhat.com \
    --cc=arnd@kernel.org \
    --cc=brett.creeley@amd.com \
    --cc=jgg@nvidia.com \
    --cc=joao.m.martins@oracle.com \
    --cc=kevin.tian@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oushixiong@kylinos.cn \
    --cc=shameerali.kolothum.thodi@huawei.com \
    --cc=yishaih@nvidia.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®