[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a16758d6-964d-4e46-9074-4d155f9b3703@oracle.com>
Date: Mon, 23 Oct 2023 13:37:28 +0100
From: Joao Martins <joao.m.martins@...cle.com>
To: Jason Gunthorpe <jgg@...dia.com>, Arnd Bergmann <arnd@...nel.org>
Cc: Kevin Tian <kevin.tian@...el.com>, Arnd Bergmann <arnd@...db.de>,
Yishai Hadas <yishaih@...dia.com>,
Shameer Kolothum <shameerali.kolothum.thodi@...wei.com>,
Alex Williamson <alex.williamson@...hat.com>,
Brett Creeley <brett.creeley@....com>,
Shixiong Ou <oushixiong@...inos.cn>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] vfio: mlx5, pds: add IOMMU_SUPPORT dependency
On 23/10/2023 13:04, Jason Gunthorpe wrote:
> On Mon, Oct 23, 2023 at 01:55:03PM +0200, Arnd Bergmann wrote:
>> From: Arnd Bergmann <arnd@...db.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@...db.de>
>> ---
>> drivers/vfio/pci/mlx5/Kconfig | 2 +-
>> drivers/vfio/pci/pds/Kconfig | 2 +-
>> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> But this isn't the logic this wants, it wants to turn on
> IOMMUFD_DRIVER if MLX5_VFIO_PCI is turned on.
>
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
Joao
Powered by blists - more mailing lists