Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1171312rda; Mon, 23 Oct 2023 05:04:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF9IdumuQYNmpRW6CwuyrxbKcrRbbK13/Rw5WKIdLDYsj5FUptqXmeXG9Zqq9xzh1eURewP X-Received: by 2002:a05:6a00:1255:b0:68e:2d59:b1f3 with SMTP id u21-20020a056a00125500b0068e2d59b1f3mr6746352pfi.13.1698062681853; Mon, 23 Oct 2023 05:04:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698062681; cv=pass; d=google.com; s=arc-20160816; b=mgiZdyPnAVd8a1eK78FnBQOfSAPW9BrJ7pNoTxdQDbto0YaBDRXStvpWCHrDipJ+KD lAFNbkbUG8waPAngEBtrQDHD2BQL3w7wGnFnzfX22UlVvOjRGzwhl+iLQl99R0rU1EYf Grz/mmvZzieKiJXg23ZbUKAdYzjHQMpDkpdnS3B6BnACC8cHbH7qyag22Es5IM6/1ryI s8sisHeXsOscfYpiLCLpGynBUkrIsExvYZYsvLPfofmn5leyG3Coc1xt8tjO5P7V7of/ FnT/YHirbOg2UL2daeLPgzJxhLpEldb7yWJAZjxEt287yVSMVaS3+IrxNY59+JWM5/2X RZfg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=jXfN2i19zVMDLEgm49TGGKeHHppF1p6eb27csOjwUPs=; fh=8fX/V/L85KP2IKe8WPcDsvvnHeJKeYLbC3zwKG/anxw=; b=p//IjwbOmU/aGxt22NWQqKskMbu5BdBYPWbtOmOTdIWux4kGzeuOr3Pw7/wDODkK7i PvUTQxrs54Ad5U44LX2eVcEeNoQ17kpxNYbHnx6j777M0XhJxbo2/yz0I/BcQRDzY+dt HCCvHIbp00lb9AAkXQHbyREk7yy8nnVHWF/8WpdwJyiTmjy0IpXch31YulMO1pgFiyeA 3sUR8yAQvGVd4/hGvyaJhaLCnNs5GBN9bIW0pKH11lOFj8F2GCeWDdnRssVmV5vVEM/F QieGdsfI0aCCbTxSmWTv9E9dpdpQPIBm0HlwLLActeLpQuQiphuCnJWUpUxIdgPAxRi4 Z+0Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=FXXMGRAy; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id f17-20020aa79d91000000b0068fb1a85ec8si6297321pfq.370.2023.10.23.05.04.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 05:04:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=FXXMGRAy; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 389938074CE6; Mon, 23 Oct 2023 05:04:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234647AbjJWME1 (ORCPT + 99 others); Mon, 23 Oct 2023 08:04:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234646AbjJWMEZ (ORCPT ); Mon, 23 Oct 2023 08:04:25 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2059.outbound.protection.outlook.com [40.107.243.59]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3CB6D7A; Mon, 23 Oct 2023 05:04:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kgiKM4tTdMl9IELuolbYPbNySP6BPQdpoV68IuMFmSr8QdcrHqioPcjtjlBd371A7Epysf9ed3/ukh6mWqwMsmx1gJy/SI8ry4cCCWM4d5Zmyw/7xvTZeQnTBKxPIdTTHsuXa5EBN82rGLeYMpRrUzeJY8/cfFwfkPSxPN4twsWHXcguaJVbxXdysIksb+LDL4oPHaLt2tTscfKR+OxlITk9g4QpKTu7HLXpWFrgUHleB+D1H4yuJdiKxGJJEX4dLzIYIcHsFWWtTuKxrOTVpWtku5Bons11HWljP4ZIInADcDNniej4OtSQILOoiqf5wElCvttw8qAPk55Q/eeX1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jXfN2i19zVMDLEgm49TGGKeHHppF1p6eb27csOjwUPs=; b=Lf90vrTgw+vw9I05/ybqkBgIIAhaL33Pq7Y1TDRNNWZmEi1hAys4o9LHob93FtcIcMoy7NCHEg+5eTg8LJuFBP7bYT3fp57LMoT9sGrv2/s8h3uXQ7ssaoGre7lj2hg0FuNxsGya4OMSg/n0pBBJwOut5GdqrR3eObawoaFN05b8Q8L0HSrx2JGJOujbVvlULuxYXC21dTjXsYLd//0vSnSxdKdy+f+AXeIQIIdib5L9AA1+U8C6lsiag8rcYJiduDlaRJnPxg7yDLpwmMLR0TJIU9/p4y8waUU7el2Un45dbCczgK/A8rwWc2oExJP4dmjJrR/iqkyI44BSv5kV0g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jXfN2i19zVMDLEgm49TGGKeHHppF1p6eb27csOjwUPs=; b=FXXMGRAyNCoeLeFxpQCUUHQFH8VTCpynBslszZPjAzFdwN3f4N7kJSFWxGDDOaknuXIjJMNglSwkfkfnlx58BjiijPKGpw9aQ/aSwTaFIaIzBbkTETxiZuZM1ggOV0btHDUEpoCV7jqlP120GSKjPeVkR9qVU49nr6Zxh++jQiuYmRwr9TsKiSddl1tu11/vYKYKy23Hhw0hXL8n03P6qC1uN4f9TRt/Spa4Hpc+hnI7VShqFV84OLcl0ori96/I0Wb99D+5/f/bztrBW9XDsLKZh85tLhOrv8xUzUwttyje9+jeFJSyHcVFJEXZt2LOG+5ie8GFBC3QnxxGIqTx5g== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from LV2PR12MB5869.namprd12.prod.outlook.com (2603:10b6:408:176::16) by CH0PR12MB5217.namprd12.prod.outlook.com (2603:10b6:610:d0::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.29; Mon, 23 Oct 2023 12:04:20 +0000 Received: from LV2PR12MB5869.namprd12.prod.outlook.com ([fe80::3f66:c2b6:59eb:78c2]) by LV2PR12MB5869.namprd12.prod.outlook.com ([fe80::3f66:c2b6:59eb:78c2%6]) with mapi id 15.20.6886.034; Mon, 23 Oct 2023 12:04:20 +0000 Date: Mon, 23 Oct 2023 09:04:18 -0300 From: Jason Gunthorpe To: Arnd Bergmann , Joao Martins Cc: Kevin Tian , Arnd Bergmann , Yishai Hadas , Shameer Kolothum , Alex Williamson , Brett Creeley , Shixiong Ou , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] vfio: mlx5, pds: add IOMMU_SUPPORT dependency Message-ID: <20231023120418.GH691768@ziepe.ca> References: <20231023115520.3530120-1-arnd@kernel.org> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231023115520.3530120-1-arnd@kernel.org> X-ClientProxiedBy: DS7PR05CA0067.namprd05.prod.outlook.com (2603:10b6:8:57::12) To LV2PR12MB5869.namprd12.prod.outlook.com (2603:10b6:408:176::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: LV2PR12MB5869:EE_|CH0PR12MB5217:EE_ X-MS-Office365-Filtering-Correlation-Id: cad0be06-de6a-40f6-14a2-08dbd3c03076 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +uhE9xAgLCqRUej80a+M4zOLWTj6pa+47mcf7xjsZ3p+qjmDn9Zx+CL8wLGT4ih5wc1T/KCKW+rbFPLCSm3xkVNESVCwEB+bAWWo42o0lKH2JLG5A4W6+QKUw+Gfav1q+Nw+vMDN86W06Qb/QIaqFsSviAV5BPFS4xLbaQ+1lQspBjdo5Nop72BTBuWvqJP6e0WzlFCXAKYNP2DhoA0gl4YqyMb97BHkclvE2CvEBF9JPS3SniSLoYUAnE9L8XSSZXSeU+Kf1BoOV2iPqkjMXMZKLyC5DhTx/hCrjx8TFfrz7we+KOeQWG0JwwK3m01mf0KCJ5fk9zdzW0vfv7VKW1pnJ74bVsD83cfsWrqJ7hwMP6zx8DMfzCKd5dH+MW6HifmSmZ6h2W6GZ4Fxo/YERd/tnZijrwpbc/0gVDqfxIrWPEP/ZJSlS6Wf/tGadEbNUQ2LCEStwQuPXJ2jugZj234LHBgWPblJYSkAzuy9bDbuD2PWhYv1NNi3aKyNurQaLM1z/eHzF7emT7c3pXCjqbbpOEmpqoK5wGFmkjJWDO5F7KiN6mV/HTWdjaWKN3fdVOetqdE6/7zebX11Rvd/soq1LsJOz7Z+keXBL3pBWGw= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV2PR12MB5869.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(39860400002)(376002)(346002)(136003)(396003)(366004)(230922051799003)(451199024)(186009)(64100799003)(1800799009)(26005)(38100700002)(2906002)(41300700001)(86362001)(5660300002)(36756003)(7416002)(4326008)(8676002)(8936002)(33656002)(6506007)(478600001)(110136005)(1076003)(316002)(54906003)(66476007)(66946007)(66556008)(83380400001)(6486002)(6512007)(9686003)(27376004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?rDMwCOi1jhL4nuzV+pu5rHROVcAfLNI1tkCneiCBON71pU3r9nmz/4OMDDtN?= =?us-ascii?Q?sHcR00HR9aza3ITYgkRHQ8PebQv1GG3AJLixX9X7iGhnPVCNWHiumBk2YwMb?= =?us-ascii?Q?+46YvpG0RgZ7XlkoaYUay/WK0kDxXKGOiN3tMMs3bEgq8a9Pd1RTFjUScofO?= =?us-ascii?Q?CF1De5FJb1zxL+pgKtGlWRQ/bwW0wERnlOrsFj7pi1UWz/G7uv6p2indUU5h?= =?us-ascii?Q?rQ2Ps0xWZAnDCb1vGJY27j5bZ+oxgvijuR7ivQ3TelGJCbXHXdpkDoTx8J9W?= =?us-ascii?Q?5VpPWq9atrl8FRW4WkZ5FJF+NthTj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Qy/ME5CzqmBB4bFsRv34cllS+scGCqQGoeyka2/TvdqO1SzJnX+?= =?us-ascii?Q?VlMK5igQba1ZH/3sKrPOrY0910Y+ZwroUODC35kfYApxDPQs+xo6A0KKMNAK?= =?us-ascii?Q?i4z/JCLPvGuE2cNyXl+Eh+Yo4akRo9aahJY8hgiRlD95DWxVd0OukA9OsRUq?= =?us-ascii?Q?rbpYL0EMEi2bTRr9eL9afOnn8qQY8qB/nFKhKbWF+GBfK5X1Ela+Lr3HUKii?= =?us-ascii?Q?9K4fwwd84eI8lUs8+EAqaFzCkR3bRLTcAZRttNktZtN6WLlK2sMu9gaWJvU/?= =?us-ascii?Q?Z0ayBXj+y0DGnpayCIJxfHmnlpxNDF/B3jwk06PGUU5A64oOiMwy3qi5N9sp?= =?us-ascii?Q?m8sIxg8KmV5oT+6vrss=3D?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: cad0be06-de6a-40f6-14a2-08dbd3c03076 X-MS-Exchange-CrossTenant-AuthSource: LV2PR12MB5869.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Oct 2023 12:04:20.5733 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: N4spnyah2pEwZsy+AZthJeKJWhhgEquULjeMi1foStEClpDiee8fwx1yC3C3fqN7 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5217 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 23 Oct 2023 05:04:39 -0700 (PDT) On Mon, Oct 23, 2023 at 01:55:03PM +0200, Arnd Bergmann wrote: > 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(-) But this isn't the logic this wants, it wants to turn on IOMMUFD_DRIVER if MLX5_VFIO_PCI is turned on. 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? Jason