Skip to content

Commit 991ecef

Browse files
xiongzhazhenyw
authored andcommitted
drm/i915/gvt: Return error at the failure of finding page_track
In XenGT, ioreq copy is used to trap mmio write and ppgtt write. Both of them are memory write, ioreq handler couldn't distinguish them. So ioreq handler probe the ppgtt write handler, if it is succuess, this ioreq is ppgtt write, otherwise it is mmio write. So ppgtt write handler should return an error at the failure of finding page track, it is fatal to implement ioreq handler in XenGT. Signed-off-by: Xiong Zhang <[email protected]> Signed-off-by: Zhenyu Wang <[email protected]>
1 parent 7e60946 commit 991ecef

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/gpu/drm/i915/gvt/page_track.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,10 @@ int intel_vgpu_page_track_handler(struct intel_vgpu *vgpu, u64 gpa,
164164
mutex_lock(&gvt->lock);
165165

166166
page_track = intel_vgpu_find_page_track(vgpu, gpa >> PAGE_SHIFT);
167-
if (!page_track)
167+
if (!page_track) {
168+
ret = -ENXIO;
168169
goto out;
170+
}
169171

170172
if (unlikely(vgpu->failsafe)) {
171173
/* Remove write protection to prevent furture traps. */

0 commit comments

Comments
 (0)