All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: Kevin Tian <kevin.tian@intel.com>,
	Joao Martins <joao.m.martins@oracle.com>
Cc: Arnd Bergmann <arnd@arndb.de>, Yishai Hadas <yishaih@nvidia.com>,
	Jason Gunthorpe <jgg@ziepe.ca>,
	Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>,
	Alex Williamson <alex.williamson@redhat.com>,
	Brett Creeley <brett.creeley@amd.com>,
	Shixiong Ou <oushixiong@kylinos.cn>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] vfio: mlx5, pds: add IOMMU_SUPPORT dependency
Date: Mon, 23 Oct 2023 13:55:03 +0200	[thread overview]
Message-ID: <20231023115520.3530120-1-arnd@kernel.org> (raw)

From: Arnd Bergmann <arnd@arndb.de>

Selecting IOMMUFD_DRIVER is not allowed if IOMMUs themselves are not supported:

WARNING: unmet direct dependencies detected for IOMMUFD_DRIVER
  Depends on [n]: IOMMU_SUPPORT [=n]
  Selected by [m]:
  - MLX5_VFIO_PCI [=m] && VFIO [=y] && PCI [=y] && MMU [=y] && MLX5_CORE [=y]

There is no actual build failure, only the warning.

Make the 'select' conditional using the same logic that we have for
INTEL_IOMMU and AMD_IOMMU.

Fixes: 33f6339534287 ("vfio: Move iova_bitmap into iommufd")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/vfio/pci/mlx5/Kconfig | 2 +-
 drivers/vfio/pci/pds/Kconfig  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/vfio/pci/mlx5/Kconfig b/drivers/vfio/pci/mlx5/Kconfig
index c3ced56b77876..c23815c486a75 100644
--- a/drivers/vfio/pci/mlx5/Kconfig
+++ b/drivers/vfio/pci/mlx5/Kconfig
@@ -3,7 +3,7 @@ config MLX5_VFIO_PCI
 	tristate "VFIO support for MLX5 PCI devices"
 	depends on MLX5_CORE
 	select VFIO_PCI_CORE
-	select IOMMUFD_DRIVER
+	select IOMMUFD_DRIVER if IOMMUFD
 	help
 	  This provides migration support for MLX5 devices using the VFIO
 	  framework.
diff --git a/drivers/vfio/pci/pds/Kconfig b/drivers/vfio/pci/pds/Kconfig
index fec9b167c7b9a..6091e11f0e521 100644
--- a/drivers/vfio/pci/pds/Kconfig
+++ b/drivers/vfio/pci/pds/Kconfig
@@ -5,7 +5,7 @@ config PDS_VFIO_PCI
 	tristate "VFIO support for PDS PCI devices"
 	depends on PDS_CORE && PCI_IOV
 	select VFIO_PCI_CORE
-	select IOMMUFD_DRIVER
+	select IOMMUFD_DRIVER if IOMMUFD
 	help
 	  This provides generic PCI support for PDS devices using the VFIO
 	  framework.
-- 
2.39.2


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

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-23 11:55 Arnd Bergmann [this message]
2023-10-23 12:04 ` [PATCH] vfio: mlx5, pds: add IOMMU_SUPPORT dependency Jason Gunthorpe
2023-10-23 12:37   ` Joao Martins
2023-10-23 12:55     ` Arnd Bergmann
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=20231023115520.3530120-1-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=alex.williamson@redhat.com \
    --cc=arnd@arndb.de \
    --cc=brett.creeley@amd.com \
    --cc=jgg@ziepe.ca \
    --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 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.