[PATCH v3 1/2] drm/i915/gvt: Add error rating system
Zhenyu Wang
zhenyuw at linux.intel.com
Wed Aug 30 06:06:44 UTC 2017
sorry for late review, comment below.
On 2017.08.21 11:09:02 +0800, fred gao wrote:
> diff --git a/drivers/gpu/drm/i915/gvt/execlist.c b/drivers/gpu/drm/i915/gvt/execlist.c
> index 5ec07ec..24770a5 100644
> --- a/drivers/gpu/drm/i915/gvt/execlist.c
> +++ b/drivers/gpu/drm/i915/gvt/execlist.c
> @@ -759,13 +759,16 @@ static int submit_context(struct intel_vgpu *vgpu, int ring_id,
> if (list_empty(workload_q_head(vgpu, ring_id))) {
> intel_runtime_pm_get(dev_priv);
> mutex_lock(&dev_priv->drm.struct_mutex);
> - intel_gvt_scan_and_shadow_workload(workload);
> + ret = intel_gvt_scan_and_shadow_workload(workload);
> mutex_unlock(&dev_priv->drm.struct_mutex);
> intel_runtime_pm_put(dev_priv);
> }
>
> - queue_workload(workload);
> - return 0;
> + if (ret == 0)
> + queue_workload(workload);
> + else if (vgpu_is_vm_unhealthy(ret))
> + enter_failsafe_mode(vgpu, GVT_FAILSAFE_GUEST_ERR);
> + return ret;
Your following fix one should be combined into this.
> }
>
> int intel_vgpu_submit_execlist(struct intel_vgpu *vgpu, int ring_id)
> diff --git a/drivers/gpu/drm/i915/gvt/gtt.c b/drivers/gpu/drm/i915/gvt/gtt.c
> index 0bd028f..125c711 100644
> --- a/drivers/gpu/drm/i915/gvt/gtt.c
> +++ b/drivers/gpu/drm/i915/gvt/gtt.c
> diff --git a/drivers/gpu/drm/i915/gvt/gvt.h b/drivers/gpu/drm/i915/gvt/gvt.h
> index 031868f..d2f7cef 100644
> --- a/drivers/gpu/drm/i915/gvt/gvt.h
> +++ b/drivers/gpu/drm/i915/gvt/gvt.h
> @@ -191,6 +191,16 @@ struct intel_vgpu {
> #endif
> };
>
> +
> +#define EUNKNOWNCMD 1000001
> +#define EINVALIDADDR 1000002
> +#define ENONPRIV 1000003
> +
Let's try to reuse standard defined errno instead of recreate, I think e.g
EBADRQC for unknow cmd, EFAULT for invalid address, EPERM for nonpriv.
--
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/20170830/f08957fd/attachment-0001.sig>
More information about the intel-gvt-dev
mailing list