dmabuf_obj = list_entry(pos, struct intel_vgpu_dmabuf_obj, list);
if (dmabuf_obj == obj) {
list_del(pos);
- vfio_device_put(vgpu->vfio_device);
idr_remove(&vgpu->object_idr,
dmabuf_obj->dmabuf_id);
kfree(dmabuf_obj->info);
kref_init(&dmabuf_obj->kref);
- mutex_lock(&vgpu->dmabuf_lock);
- vgpu->vfio_device = vfio_device_get_from_dev(mdev_dev(vgpu->mdev));
- if (!vgpu->vfio_device) {
- gvt_vgpu_err("failed to get vfio device\n");
- mutex_unlock(&vgpu->dmabuf_lock);
- ret = -ENODEV;
- goto out_free_info;
- }
- mutex_unlock(&vgpu->dmabuf_lock);
-
update_fb_info(gfx_plane_info, &fb_info);
INIT_LIST_HEAD(&dmabuf_obj->list);
dmabuf_obj->vgpu = NULL;
idr_remove(&vgpu->object_idr, dmabuf_obj->dmabuf_id);
- vfio_device_put(vgpu->vfio_device);
list_del(pos);
/* dmabuf_obj might be freed in dmabuf_obj_put */
struct kvm *kvm;
struct work_struct release_work;
atomic_t released;
- struct vfio_device *vfio_device;
struct vfio_group *vfio_group;
struct kvm_page_track_notifier_node track_node;