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

Zhenyu Wang zhenyuw at linux.intel.com
Mon Dec 3 03:38:51 UTC 2018


On 2018.11.30 08:44:23 -0700, Alex Williamson wrote:
> 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,
> 

In this patch kvmgt driver trys to take module reference when device
created and put when destroy, and yeah I think your point is right,
we'd better handle reference when device is opened or released, and
when hypervisor module releases it would call mdev core device unregister
which has already handled unused devices clean up. Will refresh in that manner.

Thanks

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gvt-dev/attachments/20181203/4e7745dd/attachment.sig>


More information about the intel-gvt-dev mailing list