drm/i915/gvt: Warning for invalid ggtt access
authorXiong Zhang <xiong.y.zhang@intel.com>
Mon, 27 May 2019 05:45:51 +0000 (13:45 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Tue, 30 Jul 2019 06:29:48 +0000 (14:29 +0800)
commitd18fd0576e05a4b03b588e131093b0437fccb75f
tree977a6e9940c91909cf94275334662a9a66464122
parentc00f9c6b79f7e1c5caf774c38e9fd5dad2d2ef1c
drm/i915/gvt: Warning for invalid ggtt access

Instead of silently return virtual ggtt entries that guest is allowed
to access, this patch add extra range check. If guest read out of
range, it will print a warning and return 0. If guest write out
of range, the write will be dropped without any message.

Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/gtt.c