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

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Thu Dec 20 10:05:56 UTC 2018


Quoting Zhenyu Wang (2018-12-07 10:16:53)
> 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 for VFIO/mdev,
> hypervisor module would reference counting mdev when open and release.
> 
> This makes 'kvmgt' module really split from GVT device model. User
> needs to load 'kvmgt' to enable VFIO/mdev interface.
> 
> v6:
> - remove unused variable
> 
> v5:
> - put module reference in register error path
> 
> v4:
> - fix checkpatch warning
> 
> v3:
> - Fix module reference handling for device open and release. Unused
>   mdev devices would be cleaned up in device unregister when module unload.
> 
> v2:
> - Fix kvmgt order after i915 for built-in case
> 
> Cc: "Yuan, Hang" <hang.yuan at intel.com>
> Cc: Alex Williamson <alex.williamson at redhat.com>
> Cc: "He, Min" <min.he at intel.com>
> Reviewed-by: Yuan, Hang <hang.yuan at intel.com>
> Signed-off-by: Zhenyu Wang <zhenyuw at linux.intel.com>

For what i915 is concerned, this is the desireable direction. When
combined with the other series about making GVT build independantly,
and golden MMIO state (instead of capturing at boot).

With those This should both expedite the i915 driver loading on DOM0,
when GVT can be loaded as secondary module. And the golden MMIO state
instead of capturing from host would avoid leaking any changes in host
configuration (say, due to BIOS update) to the guests.

So as an intermediary step to that direction, for i915 portion (not that
much in this case) this is:

Acked-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>

I'm expecting somebody with more inisght to review the code under
gvt/.

Regards, Joonas


More information about the intel-gvt-dev mailing list