drm/i915/gvt: introduce host_init/host_exit to MPT
GVT host needs init/exit hooks to do some initialization/cleanup work, e.g.: vfio mdev host device register/unregister. Signed-off-by: Jike Song <jike.song@intel.com> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
此提交包含在:
@@ -55,6 +55,27 @@ static inline int intel_gvt_hypervisor_detect_host(void)
|
||||
return intel_gvt_host.mpt->detect_host();
|
||||
}
|
||||
|
||||
/**
|
||||
* intel_gvt_hypervisor_host_init - init GVT-g host side
|
||||
*
|
||||
* Returns:
|
||||
* Zero on success, negative error code if failed
|
||||
*/
|
||||
static inline int intel_gvt_hypervisor_host_init(struct device *dev,
|
||||
void *gvt, const void *ops)
|
||||
{
|
||||
return intel_gvt_host.mpt->host_init(dev, gvt, ops);
|
||||
}
|
||||
|
||||
/**
|
||||
* intel_gvt_hypervisor_host_exit - exit GVT-g host side
|
||||
*/
|
||||
static inline void intel_gvt_hypervisor_host_exit(struct device *dev,
|
||||
void *gvt)
|
||||
{
|
||||
intel_gvt_host.mpt->host_exit(dev, gvt);
|
||||
}
|
||||
|
||||
/**
|
||||
* intel_gvt_hypervisor_attach_vgpu - call hypervisor to initialize vGPU
|
||||
* related stuffs inside hypervisor.
|
||||
|
新增問題並參考
封鎖使用者