aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/gpu/drm/i915/gvt/scheduler.c
diff options
context:
space:
mode:
authorfred gao <fred.gao@intel.com>2017-09-20 05:36:47 +0800
committerZhenyu Wang <zhenyuw@linux.intel.com>2017-11-16 11:46:51 +0800
commit5c56883a9531cd89561fb9a11a33697f2847c82a (patch)
tree470bd3e2c4a18366e569f7a6b92406e79720bf50 /drivers/gpu/drm/i915/gvt/scheduler.c
parentdrm/i915/gvt: Do not allocate initial ring scan buffer (diff)
downloadwireguard-linux-5c56883a9531cd89561fb9a11a33697f2847c82a.tar.xz
wireguard-linux-5c56883a9531cd89561fb9a11a33697f2847c82a.zip
drm/i915/gvt: Change the return type during command scan
Generally, there are 3 types of errors during command scan: a) some commands might be unknown with EBADRQC; b) some cmd access invalid address with EFAULT; c) some unexpected force nonpriv cmd with EPERM. later the healthy state can be judged through the return error. v2: - remove some internal i915 errors rating. (Zhenyu) v3: - the healthy state is judged through the internal defined return error. (Zhenyu) - force non priv cmd error can be ignored. (Kevin) v4: - reuse standard defined errno instead of recreate, e.g EBADRQC for unknown cmd, EFAULT for invalid address, EPERM for nonpriv. (Zhenyu) v5: - remove some irrelevant code for the patch. - fix typo of vgpu_is_vm_unhealthy. (Zhenyu) v6: - move the healthy check and failsafe code into another patch. (Zhenyu) v7: - polish title and commit message. (Zhenyu) Signed-off-by: fred gao <fred.gao@intel.com> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Diffstat (limited to '')
-rw-r--r--drivers/gpu/drm/i915/gvt/scheduler.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/gvt/scheduler.c b/drivers/gpu/drm/i915/gvt/scheduler.c
index 7cb1cf4223ed..0771b715f825 100644
--- a/drivers/gpu/drm/i915/gvt/scheduler.c
+++ b/drivers/gpu/drm/i915/gvt/scheduler.c
@@ -84,7 +84,7 @@ static int populate_shadow_context(struct intel_vgpu_workload *workload)
GTT_PAGE_SHIFT));
if (context_gpa == INTEL_GVT_INVALID_ADDR) {
gvt_vgpu_err("Invalid guest context descriptor\n");
- return -EINVAL;
+ return -EFAULT;
}
page = i915_gem_object_get_page(ctx_obj, LRC_HEADER_PAGES + i);