From patchwork Thu Apr 22 13:35:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 425867 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp367482jao; Thu, 22 Apr 2021 06:36:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjCTygBNh2FFpBp9LMF5wbLy1tvqi2+6dB6fG9pWBlMiZ+0maVm1IriiC8e3p/7tLpOSQE X-Received: by 2002:a62:3706:0:b029:211:3d70:a55a with SMTP id e6-20020a6237060000b02902113d70a55amr3421543pfa.16.1619098562651; Thu, 22 Apr 2021 06:36:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619098562; cv=none; d=google.com; s=arc-20160816; b=I+v6+1QjBBqK9NRKQnA+8dYmCbqcNTPuPsfgBIv9j1vOlFXzOWkvtw573AIAsQn364 sI9amOhWe53MuHjrjeJ2R8aa3ZhiLigvHZ+2NIGB0fHT8369OZbzp51dAngSYj0gklU6 mcj+yyJr0IKSOOtxlRp2GZB+SRp4eDDwqa3eV0RqZDXwe8wW6U7tsZXNVk33fOpDhf58 4HM5/b22ERDJOCF+UFyUgs65AsDom/ed+XDPdwWgzoCX05l5pbFwOVwJp6rgOidpqrjy MTnkmrOqVSn68vnCl1Nxu1SCDcIMCddPgQnm+PTprsbtvTxw0nNyH05vQTuFmBvRqmbh auMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=Cvh/Nhwefnlz65Sh0Q7Sw5VVhDUWAXG9lk6znJMxpDg=; b=oOfV0+BvlIioM34bvvJJTjFw/NWOwT0pU20pGFWz1CvaJxn75MmDwM7wmJhDlK49y/ c3eGPkAbFagLtHmzu6pams/JJBW6BGvv3+TarLxHooL7teFfnEstYPcnkoALdOSnSu19 LQuVPjWpn794N0i3hfvI6VgsFhtF+KX79H72HMEHbT5Mrk5AHoc572zKSlwcLjJ+nJcu Efgv8SGHWMcfwzdWhJVvbCIrDlJzTfakFhX+946ZKXDMVvmlDOdG2rvwwaQ+tEGCR49X klrRnOSWaIJ3BKjQnwKfcwkcuZ5mfl5NztV55WTvkpZ7aPZ/hJTO8qb54lyIcdcrVVYF /4rA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=W7TO386J; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id v12si3344920ple.68.2021.04.22.06.36.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Apr 2021 06:36:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=W7TO386J; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E1FE66EA8B; Thu, 22 Apr 2021 13:35:58 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9FA416EA8B; Thu, 22 Apr 2021 13:35:58 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id CBFFA6145B; Thu, 22 Apr 2021 13:35:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1619098556; bh=d8G2H9mh1LJNBBM4BpJVdYdRdIV6lqbGhrLt219FUzY=; h=From:To:Cc:Subject:Date:From; b=W7TO386JUSq/S336+os/0lgLShCElbkv53kGPxp6KQarPHhKpLiEjAnSGSGT6UEyg aHtyuj/tasIYfMWfNt6jIYbB5vV2yR+JVUeZg+hrrgD1a6bwVra3yV2I7/EM6ne9dm vw5h6CXpyeYL96pDBY3cIi8MJDU3tmlFugP8CliUVe1b1DaEY+E+9CP/vxLRg1+gEv bBcBbDejf8MB1KqbmKJilHgGozMb9ObntzBfkw4fJg1JWDMDlzUJeE6BwupGlilB/L +OfPEYXifqTBW10STFYS7v6ok/kWUGNxQ/NwHhvC1z6/hyn6jmBL9LcY1EU6MFUorX zAtThf1ti9Zkg== From: Arnd Bergmann To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , Zhenyu Wang , Jason Gunthorpe , Alex Williamson , Kevin Tian , Cornelia Huck Subject: [PATCH] vfio/gvt: fix DRM_I915_GVT dependency on VFIO_MDEV Date: Thu, 22 Apr 2021 15:35:33 +0200 Message-Id: <20210422133547.1861063-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel@lists.freedesktop.org, Andrew Morton , intel-gfx@lists.freedesktop.org, Arnd Bergmann , linux-kernel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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(-) -- 2.29.2 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel Reviewed-by: Jason Gunthorpe Acked-by: Zhenyu Wang diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig index 7a5b7a93d33e..791cc9556863 100644 --- a/drivers/gpu/drm/i915/Kconfig +++ b/drivers/gpu/drm/i915/Kconfig @@ -111,7 +111,7 @@ config DRM_I915_GVT bool "Enable Intel GVT-g graphics virtualization host support" depends on DRM_I915 depends on 64BIT - depends on VFIO_MDEV + depends on VFIO_MDEV=y || VFIO_MDEV=DRM_I915 default n help Choose this option if you want to enable Intel GVT-g graphics