Re: [Intel-gfx] [PATCH] drm/i915/gvt: Fix workload status after wait
On 2016.11.02 08:47:52 +0200, Joonas Lahtinen wrote: > On ke, 2016-11-02 at 13:41 +0800, Zhenyu Wang wrote: > > From commit e95433c73a11759203af1cae5958f998c9673370, workload status > > setting > > was changed to only capture on error path, but we need to set it properly in > > normal path too, otherwise we'll fail to complete workload which could lead > > guest VM vGPU reset. > > > > Should have Fixes tag with the above commit. > > > @@ -455,7 +455,8 @@ static int workload_thread(void *priv) > > if (lret < 0) { > > workload->status = lret; > > gvt_err("fail to wait workload, skip\n"); > > - } > > + } else > > + workload->status = 0; > > All branches of if-else continuum must use braces if one does, so > "} else {" here > Thanks for the review. I'll queue this up in gvt-linux tree as it stopped our testing and will be included in next pull request. -- Open Source Technology Center, Intel ltd. $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827 signature.asc Description: PGP signature ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915/gvt: Fix workload status after wait
On ke, 2016-11-02 at 13:41 +0800, Zhenyu Wang wrote: > From commit e95433c73a11759203af1cae5958f998c9673370, workload status setting > was changed to only capture on error path, but we need to set it properly in > normal path too, otherwise we'll fail to complete workload which could lead > guest VM vGPU reset. > Should have Fixes tag with the above commit. > @@ -455,7 +455,8 @@ static int workload_thread(void *priv) > if (lret < 0) { > workload->status = lret; > gvt_err("fail to wait workload, skip\n"); > - } > + } else > + workload->status = 0; All branches of if-else continuum must use braces if one does, so "} else {" here Regards, Joonas -- Joonas Lahtinen Open Source Technology Center Intel Corporation ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH] drm/i915/gvt: Fix workload status after wait
From commit e95433c73a11759203af1cae5958f998c9673370, workload status setting was changed to only capture on error path, but we need to set it properly in normal path too, otherwise we'll fail to complete workload which could lead guest VM vGPU reset. Cc: Chris WilsonSigned-off-by: Zhenyu Wang --- drivers/gpu/drm/i915/gvt/scheduler.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gvt/scheduler.c b/drivers/gpu/drm/i915/gvt/scheduler.c index 18acb45..bc4c14a 100644 --- a/drivers/gpu/drm/i915/gvt/scheduler.c +++ b/drivers/gpu/drm/i915/gvt/scheduler.c @@ -455,7 +455,8 @@ static int workload_thread(void *priv) if (lret < 0) { workload->status = lret; gvt_err("fail to wait workload, skip\n"); - } + } else + workload->status = 0; complete: gvt_dbg_sched("will complete workload %p\n, status: %d\n", -- 2.10.2 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx