[PATCH 1/2] drm/i915/gvt: Add read handler for GDRST register

fred gao fred.gao at intel.com
Wed May 24 04:02:24 UTC 2017


emulating the GDRST read behavior to ack the guest
reset request.

v2:
- split the original patch into two:
  GDRST read handler and virtual gpu reset. (Zhengyu)
v3:
- emulate the GDRST read right after write. (Zhengyu)

Cc: Zhenyu Wang <zhenyuw at linux.intel.com>
Cc: Zhang Yulei <yulei.zhang at intel.com>
Signed-off-by: fred gao <fred.gao at intel.com>
---
 drivers/gpu/drm/i915/gvt/handlers.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/gvt/handlers.c b/drivers/gpu/drm/i915/gvt/handlers.c
index 973396b..d826f40 100644
--- a/drivers/gpu/drm/i915/gvt/handlers.c
+++ b/drivers/gpu/drm/i915/gvt/handlers.c
@@ -297,6 +297,9 @@ static int gdrst_mmio_write(struct intel_vgpu *vgpu, unsigned int offset,
 
 	intel_gvt_reset_vgpu_locked(vgpu, false, engine_mask);
 
+	/* sw will wait for the device to ack the reset request */
+	 vgpu_vreg(vgpu, offset) = 0;
+
 	return 0;
 }
 
-- 
2.7.4



More information about the intel-gvt-dev mailing list