Skip to content

Commit

Permalink
drm/i915/gvt: do not deliver a workload if its creation fails
Browse files Browse the repository at this point in the history
in workload creation routine, if any failure occurs, do not queue this
workload for delivery. if this failure is fatal, enter into failsafe
mode.

Fixes: 6d76303 ("drm/i915/gvt: Move common vGPU workload creation into scheduler.c")
Cc: [email protected] #4.19+
Cc: [email protected]
Signed-off-by: Yan Zhao <[email protected]>
Signed-off-by: Zhenyu Wang <[email protected]>
  • Loading branch information
yanzhao56 authored and zhenyw committed Mar 29, 2019
1 parent 26cdaac commit dade58e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/gpu/drm/i915/gvt/scheduler.c
Original file line number Diff line number Diff line change
Expand Up @@ -1486,8 +1486,9 @@ intel_vgpu_create_workload(struct intel_vgpu *vgpu, int ring_id,
intel_runtime_pm_put_unchecked(dev_priv);
}

if (ret && (vgpu_is_vm_unhealthy(ret))) {
enter_failsafe_mode(vgpu, GVT_FAILSAFE_GUEST_ERR);
if (ret) {
if (vgpu_is_vm_unhealthy(ret))
enter_failsafe_mode(vgpu, GVT_FAILSAFE_GUEST_ERR);
intel_vgpu_destroy_workload(workload);
return ERR_PTR(ret);
}
Expand Down

0 comments on commit dade58e

Please sign in to comment.