From patchwork Mon Oct 23 11:55:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13432800 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B5C4C001E0 for ; Mon, 23 Oct 2023 11:55:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234233AbjJWLza (ORCPT ); Mon, 23 Oct 2023 07:55:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234201AbjJWLz2 (ORCPT ); Mon, 23 Oct 2023 07:55:28 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69F89F5; Mon, 23 Oct 2023 04:55:26 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A99BDC433C9; Mon, 23 Oct 2023 11:55:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698062126; bh=QmL2n3u+Alr84E1Gw8kq6qtlkqPDghDn12S47YzShJE=; h=From:To:Cc:Subject:Date:From; b=CboYAmM/OqCQ2/1wE5prPGQSgk1mT+KLZqUT8Mq34t97GOdYLJBKWwiqL6ZFgIpuv c2sEkI6AZb3dRseyfKz5CAx9ka4jRO232X3z7KJEW3/ZU/02hLm71i8QhvUSu/lBJE N8StwgXNHY4krOFbwILM6Ow7uwqGPmrX3ctPzEZeS2QzFZNaC+Ih6KeojzlpDQ4L0x RW1GZ3oQ4CKPF8pM4brt/WpoHNDzNeSzy26WBYM5ZJP6iSw4Jno/d9GB0WWS63PSen Psz5ulowqnUQFZimJRiy64G6+g0xsBcVinXwAsBdwlQpXYK2PArlB6fmSfc4jRGcSF gerq9C04NDoqg== From: Arnd Bergmann To: Kevin Tian , Joao Martins Cc: Arnd Bergmann , Yishai Hadas , Jason Gunthorpe , Shameer Kolothum , Alex Williamson , Brett Creeley , Shixiong Ou , 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 Message-Id: <20231023115520.3530120-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: Arnd Bergmann 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 --- 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.