[PATCH v2 1/2] drm/i915/gvt: Fix possible recursive locking issue
Dong, Chuanxiao
chuanxiao.dong at intel.com
Fri Jun 23 07:02:47 UTC 2017
> -----Original Message-----
> From: Zhenyu Wang [mailto:zhenyuw at linux.intel.com]
> Sent: Friday, June 23, 2017 2:51 PM
> To: Dong, Chuanxiao <chuanxiao.dong at intel.com>
> Cc: intel-gvt-dev at lists.freedesktop.org
> Subject: Re: [PATCH v2 1/2] drm/i915/gvt: Fix possible recursive locking issue
>
> On 2017.06.21 10:29:57 +0800, Chuanxiao Dong wrote:
> > @@ -482,6 +513,7 @@ static int intel_vgpu_iommu_notifier(struct
> notifier_block *nb,
> > struct intel_vgpu *vgpu = container_of(nb,
> > struct intel_vgpu,
> > vdev.iommu_notifier);
> > + bool sched_unmap = false;
> >
> > if (action == VFIO_IOMMU_NOTIFY_DMA_UNMAP) {
> > struct vfio_iommu_type1_dma_unmap *unmap = data; @@
> -491,7 +523,10
> > @@ static int intel_vgpu_iommu_notifier(struct notifier_block *nb,
> > end_gfn = gfn + unmap->size / PAGE_SIZE;
> >
> > while (gfn < end_gfn)
> > - gvt_cache_remove(vgpu, gfn++);
> > + sched_unmap |= gvt_cache_mark(vgpu, gfn++);
> > +
> > + if (sched_unmap)
> > + schedule_work(&vgpu->vdev.unpin_work);
> > }
> >
>
> And might just check list_empty(unpin_list) here if require to schedule unpin
> work, pls resend this with those change.
Sure. Will cook the v3 for review. Thanks a lot for the comments!
Thanks
Chuanxiao
>
> --
> Open Source Technology Center, Intel ltd.
>
> $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
More information about the intel-gvt-dev
mailing list