summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/gvt/cmd_parser.h
diff options
context:
space:
mode:
authorYan Zhao <yan.y.zhao@intel.com>2020-12-23 06:45:00 +0300
committerZhenyu Wang <zhenyuw@linux.intel.com>2020-12-25 06:15:15 +0300
commit3c4f2120d890b53855366c2e53ebe20806ed0cad (patch)
treea816fdc0d3e087588851abdb94fcaa039c2e73e9 /drivers/gpu/drm/i915/gvt/cmd_parser.h
parent493f30cd086e5250e77f1ff201d22872a46e83e4 (diff)
downloadlinux-3c4f2120d890b53855366c2e53ebe20806ed0cad.tar.xz
drm/i915/gvt: scan VM ctx pages
Logical Context is actually a big batch buffer consisting of multiple LRI commands + saved registers. It comprises Ring Context (the first 0x50 dwords) and Engine Context. The registers defined in Engine Context are command accessible, and safe to execute in VM Context. This patch 1. stops copy Ring Context and only copys Engine Context from VM Context 2. audits VM Engine Contexts to disallow undesired LRIs (if accessing registers out of Engine Context that hardware generates). Cc: Kevin Tian <kevin.tian@intel.com> Signed-off-by: Wang Zhi <zhi.a.wang@intel.com> Signed-off-by: Yan Zhao <yan.y.zhao@intel.com> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20201223034500.16983-1-yan.y.zhao@intel.com Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/gvt/cmd_parser.h')
-rw-r--r--drivers/gpu/drm/i915/gvt/cmd_parser.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.h b/drivers/gpu/drm/i915/gvt/cmd_parser.h
index 09ca2b8a63c8..d5e95b7026a1 100644
--- a/drivers/gpu/drm/i915/gvt/cmd_parser.h
+++ b/drivers/gpu/drm/i915/gvt/cmd_parser.h
@@ -52,4 +52,6 @@ int intel_gvt_scan_and_shadow_wa_ctx(struct intel_shadow_wa_ctx *wa_ctx);
void intel_gvt_update_reg_whitelist(struct intel_vgpu *vgpu);
+int intel_gvt_scan_engine_context(struct intel_vgpu_workload *workload);
+
#endif