Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp497063pxy; Thu, 22 Apr 2021 07:01:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4D3gPRRAlfr3mXsr4g31bxB3XwxJ71fZlihmAoN7Ldgyx3FYqntVW+OPxsxeQQdlD6B1j X-Received: by 2002:a17:906:4342:: with SMTP id z2mr3443795ejm.337.1619100105818; Thu, 22 Apr 2021 07:01:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619100105; cv=none; d=google.com; s=arc-20160816; b=aYCNaTZwZnXoHKsbEMMPiHq88OUIHV1pyzTMb8wVASZPrDgJWz53jZFnut/dnhB0UW s5j+NftRyx1IRKtpbCIUC1WQr+OBe7zZptkbWXRkiTe7HVUtnDM2X3J8fAYYuQ6nU/sl D2NxfSSr4VMTGiyh+0acgRxaIfvUEPWzqwibanr2jfrv5LYpFd1o+SK6r8IFIB9gRLEp wbOxScPhEfTk+1OImyX6QLfguMmelQqykLMmYHZtfGmDgVHs0uF2/V64j/tYG90RCdLv A05isp1t7rRB3EQJjd7OK2wqVG9nob0gQsxjATU0cTQAH3DPbSvv7VDS3ERgVVkhx2Ro yKdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=pDNnkJPb2aQUATNCDosNiyczROSb5OwKI26xW7uSy28=; b=ARNPqWdy5wecJvoPYktCytsPF+dV5O7bh1Yw6QSVPir2OCLbNxnpSuT4+Clq1cyFGB 8nppkBX8aAYe3XPx8mVvTsLUXSOzhswy1MsHKWgW20ISYPAziXxm36P8cnRpe0WKDgPe 4CHcrsyUiZWMrqexrsRnxviPGjhlnQCeYKRDpMqzNAG0h5dRiqnNE51ExtdmPxMOHNqd SbVN7PmQrj+5nc58AVyRvY/DWjCnwGlCMAWNVtf3uRpRHZArxlaZeHCRoD4TxVGH+bKL uxeMuP+6Ml6K3lgG9VjE+PREYMeh8sLJmWH4ovTCk2xUkEbqzj2nSTn68PGbIsehbfy0 rICA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=R4gYl8V9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y17si2210706edo.60.2021.04.22.07.01.20; Thu, 22 Apr 2021 07:01:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=R4gYl8V9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236528AbhDVN6r (ORCPT + 99 others); Thu, 22 Apr 2021 09:58:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236283AbhDVN6r (ORCPT ); Thu, 22 Apr 2021 09:58:47 -0400 Received: from mail-qv1-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70505C06174A for ; Thu, 22 Apr 2021 06:58:12 -0700 (PDT) Received: by mail-qv1-xf33.google.com with SMTP id j3so22014880qvs.1 for ; Thu, 22 Apr 2021 06:58:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=pDNnkJPb2aQUATNCDosNiyczROSb5OwKI26xW7uSy28=; b=R4gYl8V9m76fiz5yMnlKUIbRJene//D0v8wbWVpqrHO13nHZEo37aC7E7PIRJDsGeq sfEgLFCT2klfSqwCXqz/IIT5X254leclwQZtLDrL5ONQafBUy+aPNsgEqJaO2mHBQd+o J6RM68h3qBw9hnHl99j17M1JzZwY8v7XBzy2Vqmjkfj5ZpIo5PXCfF2+jRZvl1eK0U0T dAGIPAH1bZDSJM82Et7l7ckY/uUPPqg4j3zspAHhT4ef2sCzxSwX6Eqvy8o0Slrchqoe lRX0E3VLVB0FKsqQ1xfL9ZlggAqn1sJTeHZ9Dee+xWmyAbNz1Tg07GG2m2Scla4qFYtg 2JKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=pDNnkJPb2aQUATNCDosNiyczROSb5OwKI26xW7uSy28=; b=B4QeV/Nop9iza2xnPuCzRPr3MQKny+7uXkkyYDa2pewd0NAmPBQS2new3bxDJD7eWK oMX6o6DsQv3P36S8VNYGVIfhxTWRdBqeNeJUhQStPIS9hXVIYmaen3g8VZED1pSU1cIA kGT0ZAmFYahOxIU/6TGZZvSc1vQhSLozJm2LJ0OZ/7pOZyrg02LsJvKyfO5QXJ3JdEdX bzKNF3EAUg4r7D7fGAZDZbkNzzR9xRqvpazbgD6iLr8i+BFfo0Sf/45pWjPiooTy/PJS l8xui0Ofvw4+GC8o/5PDH+sv8AIhTDO5pZwClWdc9GmxPCadYrMc+DONcgQAQIygQ0la DHVw== X-Gm-Message-State: AOAM532/ZiiqdRcc9j+7K2CMq1vj/k1x3uJ9VM0RQdG4GD1K9e+iqUxb Bemnzf7RQjUvwZkbQLUz7c/ZjQ== X-Received: by 2002:a05:6214:2a9:: with SMTP id m9mr3807764qvv.39.1619099891662; Thu, 22 Apr 2021 06:58:11 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-47-55-113-94.dhcp-dynamic.fibreop.ns.bellaliant.net. [47.55.113.94]) by smtp.gmail.com with ESMTPSA id r25sm2278007qtm.18.2021.04.22.06.58.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Apr 2021 06:58:11 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1lZZqM-00A2d6-Nq; Thu, 22 Apr 2021 10:58:10 -0300 Date: Thu, 22 Apr 2021 10:58:10 -0300 From: Jason Gunthorpe To: Arnd Bergmann Cc: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Zhenyu Wang , Alex Williamson , Kevin Tian , Cornelia Huck , Arnd Bergmann , Andrew Morton , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] vfio/gvt: fix DRM_I915_GVT dependency on VFIO_MDEV Message-ID: <20210422135810.GG2047089@ziepe.ca> References: <20210422133547.1861063-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210422133547.1861063-1-arnd@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 22, 2021 at 03:35:33PM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > The Kconfig dependency is incomplete since DRM_I915_GVT is a 'bool' > symbol that depends on the 'tristate' VFIO_MDEV. This allows a > configuration with VFIO_MDEV=m, DRM_I915_GVT=y and DRM_I915=y that > causes a link failure: > > x86_64-linux-ld: drivers/gpu/drm/i915/gvt/gvt.o: in function `available_instances_show': > gvt.c:(.text+0x67a): undefined reference to `mtype_get_parent_dev' > x86_64-linux-ld: gvt.c:(.text+0x6a5): undefined reference to `mtype_get_type_group_id' > x86_64-linux-ld: drivers/gpu/drm/i915/gvt/gvt.o: in function `description_show': > gvt.c:(.text+0x76e): undefined reference to `mtype_get_parent_dev' > x86_64-linux-ld: gvt.c:(.text+0x799): undefined reference to `mtype_get_type_group_id' > > Clarify the dependency by specifically disallowing the broken > configuration. If VFIO_MDEV is built-in, it will work, but if > VFIO_MDEV=m, the i915 driver cannot be built-in here. > > Fixes: 07e543f4f9d1 ("vfio/gvt: Make DRM_I915_GVT depend on VFIO_MDEV") > Fixes: 9169cff168ff ("vfio/mdev: Correct the function signatures for the mdev_type_attributes") > Signed-off-by: Arnd Bergmann > --- > drivers/gpu/drm/i915/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Oh kconfig stuff like this makes my head hurt, thanks for finding it I also can't see an alternative to this ugly thing, besides having the i915 guys properly modularize this code someday Reviewed-by: Jason Gunthorpe Jason