[PATCH 1/3] drm/i915/gvt: Don't submit request for error workload dispatch
Zhenyu Wang
zhenyuw at linux.intel.com
Fri Mar 1 02:39:42 UTC 2019
On 2019.03.01 02:10:40 +0000, Zhang, Xiong Y wrote:
>
> > As vGPU shadow ctx is loaded with guest context state, arbitrarily submitting
> > request in error workload dispatch path would cause trouble.
> > So don't try to submit in error path now like in previous code.
> > This is to fix VM failure when GPU hang happens.
> [Zhang, Xiong Y] As in the previous comments, arbitrarily submitting
> request in error workload dispatch path would cause gpu hang. But what's the mean of "This is to fix VM failure when GPU hang happens" ?
This error path was triggered when GPU hang happens that looks cause unrecovery
hang that all VM failed then. Thanks for review!
>
> Reviewed-by: Xiong Zhang (xiong.y.zhang at intel.com)
>
> thanks
> >
> > Fixes: f0e994372518 ("drm/i915/gvt: Fix workload request allocation before
> > request add")
> > Signed-off-by: Zhenyu Wang <zhenyuw at linux.intel.com>
> > ---
> > drivers/gpu/drm/i915/gvt/scheduler.c | 8 ++++++++
> > 1 file changed, 8 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/gvt/scheduler.c
> > b/drivers/gpu/drm/i915/gvt/scheduler.c
> > index 1bb8f936fdaa..5b59cba9f93a 100644
> > --- a/drivers/gpu/drm/i915/gvt/scheduler.c
> > +++ b/drivers/gpu/drm/i915/gvt/scheduler.c
> > @@ -678,6 +678,7 @@ static int dispatch_workload(struct
> > intel_vgpu_workload *workload) {
> > struct intel_vgpu *vgpu = workload->vgpu;
> > struct drm_i915_private *dev_priv = vgpu->gvt->dev_priv;
> > + struct i915_request *rq;
> > int ring_id = workload->ring_id;
> > int ret;
> >
> > @@ -703,6 +704,13 @@ static int dispatch_workload(struct
> > intel_vgpu_workload *workload)
> >
> > ret = prepare_workload(workload);
> > out:
> > + if (ret) {
> > + /* We might still need to add request with
> > + * clean ctx to retire it properly.. */
> > + rq = fetch_and_zero(&workload->req);
> > + i915_request_put(rq);
> > + }
> > +
> > if (!IS_ERR_OR_NULL(workload->req)) {
> > gvt_dbg_sched("ring id %d submit workload to i915 %p\n",
> > ring_id, workload->req);
> > --
> > 2.20.1
> >
> > _______________________________________________
> > intel-gvt-dev mailing list
> > intel-gvt-dev at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev
--
Open Source Technology Center, Intel ltd.
$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gvt-dev/attachments/20190301/b375a806/attachment.sig>
More information about the intel-gvt-dev
mailing list