Message ID | 20241015152157.2955229-1-arnd@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | i915: fix DRM_I915_GVT_KVMGT dependencies | expand |
On Tue, Oct 15, 2024, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > Depending on x86 and KVM is not enough, as the kvm helper functions > that get called here are controlled by CONFIG_KVM_X86, which is > disabled if both KVM_INTEL and KVM_AMD are turned off. > > ERROR: modpost: "kvm_write_track_remove_gfn" [drivers/gpu/drm/i915/kvmgt.ko] undefined! > ERROR: modpost: "kvm_page_track_register_notifier" [drivers/gpu/drm/i915/kvmgt.ko] undefined! > ERROR: modpost: "kvm_page_track_unregister_notifier" [drivers/gpu/drm/i915/kvmgt.ko] undefined! > ERROR: modpost: "kvm_write_track_add_gfn" [drivers/gpu/drm/i915/kvmgt.ko] undefined! > > Change the dependency to CONFIG_KVM_X86 instead. > > Fixes: ea4290d77bda ("KVM: x86: leave kvm.ko out of the build if no vendor module is requested") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- > drivers/gpu/drm/i915/Kconfig | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig > index 46301c06d18a..985cb78d8256 100644 > --- a/drivers/gpu/drm/i915/Kconfig > +++ b/drivers/gpu/drm/i915/Kconfig > @@ -118,9 +118,8 @@ config DRM_I915_USERPTR > config DRM_I915_GVT_KVMGT > tristate "Enable KVM host support Intel GVT-g graphics virtualization" > depends on DRM_I915 > - depends on X86 > + depends on KVM_X86 Can GVT-g even work on non-Intel CPUs? I.e. would it make sense to take a dependency on KVM_INTEL? > depends on 64BIT > - depends on KVM > depends on VFIO > select DRM_I915_GVT > select KVM_EXTERNAL_WRITE_TRACKING > -- > 2.39.5 >
On Thu, Oct 17, 2024, at 00:26, Sean Christopherson wrote: > On Tue, Oct 15, 2024, Arnd Bergmann wrote: >> diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig >> index 46301c06d18a..985cb78d8256 100644 >> --- a/drivers/gpu/drm/i915/Kconfig >> +++ b/drivers/gpu/drm/i915/Kconfig >> @@ -118,9 +118,8 @@ config DRM_I915_USERPTR >> config DRM_I915_GVT_KVMGT >> tristate "Enable KVM host support Intel GVT-g graphics virtualization" >> depends on DRM_I915 >> - depends on X86 >> + depends on KVM_X86 > > Can GVT-g even work on non-Intel CPUs? I.e. would it make sense to take a > dependency on KVM_INTEL? > Yes, I think that should work, but I'm not sure if it needs a dependency on both KVM_INTEL and KVM_X86 in that case, to handle the link-time dependency in all configurations. Arnd
On Thu, Oct 17, 2024 at 05:11:37AM +0000, Arnd Bergmann wrote: > On Thu, Oct 17, 2024, at 00:26, Sean Christopherson wrote: > > On Tue, Oct 15, 2024, Arnd Bergmann wrote: > >> diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig > >> index 46301c06d18a..985cb78d8256 100644 > >> --- a/drivers/gpu/drm/i915/Kconfig > >> +++ b/drivers/gpu/drm/i915/Kconfig > >> @@ -118,9 +118,8 @@ config DRM_I915_USERPTR > >> config DRM_I915_GVT_KVMGT > >> tristate "Enable KVM host support Intel GVT-g graphics virtualization" > >> depends on DRM_I915 > >> - depends on X86 > >> + depends on KVM_X86 > > > > Can GVT-g even work on non-Intel CPUs? I.e. would it make sense to take a > > dependency on KVM_INTEL? > > > > Yes, I think that should work, but I'm not sure if it needs a dependency > on both KVM_INTEL and KVM_X86 in that case, to handle the link-time > dependency in all configurations. not sure as well, but let's take the safest approach. pushed this patch. Thanks > > Arnd
diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig index 46301c06d18a..985cb78d8256 100644 --- a/drivers/gpu/drm/i915/Kconfig +++ b/drivers/gpu/drm/i915/Kconfig @@ -118,9 +118,8 @@ config DRM_I915_USERPTR config DRM_I915_GVT_KVMGT tristate "Enable KVM host support Intel GVT-g graphics virtualization" depends on DRM_I915 - depends on X86 + depends on KVM_X86 depends on 64BIT - depends on KVM depends on VFIO select DRM_I915_GVT select KVM_EXTERNAL_WRITE_TRACKING