[Intel-gfx] [PATCH v2] drm/i915/gvt: Change KVMGT as self load module

Alex Williamson alex.williamson at redhat.com
Fri Nov 30 15:44:23 UTC 2018


On Fri, 30 Nov 2018 14:51:24 +0800
Zhenyu Wang <zhenyuw at linux.intel.com> wrote:

> This trys to make 'kvmgt' module as self loadable instead of loading
> by i915/gvt device model. So hypervisor specific module could be
> stand-alone, e.g only after loading hypervisor specific module, GVT
> feature could be enabled via specific hypervisor interface, e.g VFIO/mdev.
> 
> So this trys to use hypervisor module register/unregister interface
> for that. Hypervisor module needs to take care of module reference
> itself when working for hypervisor interface, e.g reference counting
> for any VFIO/mdev creation.

This doesn't sound right and I don't see that it's how it works today.
mdev core doesn't take a reference to the vendor driver, it's the
vendor driver's responsibility to take a module reference when a device
is opened.  Likewise created, but unused devices probably shouldn't
hold a reference, they should be cleaned up on module release
callback.  Thanks,

Alex


More information about the Intel-gfx mailing list