drm/i915/gvt: free VFIO region space in vgpu detach
authorHang Yuan <hang.yuan@linux.intel.com>
Mon, 14 Jan 2019 10:43:39 +0000 (18:43 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Tue, 15 Jan 2019 10:28:15 +0000 (18:28 +0800)
commit6c2d0f9976ad19eca6d03dad5d726f8eff848b70
tree757eede560b44538dfda13a0b0078a8ea948fce3
parentba0a64bcf8fc491f73e4646069d97abb4374beb3
drm/i915/gvt: free VFIO region space in vgpu detach

VFIO region space is allocated when one region is registered for
one vgpu. So free the space when destroy the vgpu.

Also change the parameter of detach_vgpu callback to use vgpu directly.

Fixes: b851adeac0858c7d257b3 ("drm/i915/gvt: Add opregion support")
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Hang Yuan <hang.yuan@linux.intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/hypercall.h
drivers/gpu/drm/i915/gvt/kvmgt.c
drivers/gpu/drm/i915/gvt/mpt.h