Skip to content

Commit adaeb71

Browse files
arndbawilliam
authored andcommitted
vfio/gvt: fix DRM_I915_GVT dependency on VFIO_MDEV
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: 07e543f ("vfio/gvt: Make DRM_I915_GVT depend on VFIO_MDEV") Fixes: 9169cff ("vfio/mdev: Correct the function signatures for the mdev_type_attributes") Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Zhenyu Wang <[email protected]> Message-Id: <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Signed-off-by: Alex Williamson <[email protected]>
1 parent 43dcf6c commit adaeb71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/i915/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ config DRM_I915_GVT
101101
bool "Enable Intel GVT-g graphics virtualization host support"
102102
depends on DRM_I915
103103
depends on 64BIT
104-
depends on VFIO_MDEV
104+
depends on VFIO_MDEV=y || VFIO_MDEV=DRM_I915
105105
default n
106106
help
107107
Choose this option if you want to enable Intel GVT-g graphics

0 commit comments

Comments
 (0)