[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <b3f7ecb1-9484-426b-8692-98706f7ff6d4@app.fastmail.com>
Date: Mon, 23 Oct 2023 14:55:13 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "Joao Martins" <joao.m.martins@...cle.com>,
"Jason Gunthorpe" <jgg@...dia.com>,
"Arnd Bergmann" <arnd@...nel.org>
Cc: "Kevin Tian" <kevin.tian@...el.com>,
"Yishai Hadas" <yishaih@...dia.com>,
"Shameerali Kolothum Thodi" <shameerali.kolothum.thodi@...wei.com>,
"Alex Williamson" <alex.williamson@...hat.com>,
"Brett Creeley" <brett.creeley@....com>,
oushixiong <oushixiong@...inos.cn>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] vfio: mlx5, pds: add IOMMU_SUPPORT dependency
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
Powered by blists - more mailing lists