summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2018-03-21 15:08:47 +0100
committerZhenyu Wang <zhenyuw@linux.intel.com>2018-03-22 03:20:12 +0100
commit9f591ae60e1be026901398ef99eede91237aa3a1 (patch)
treeb50708b4d0c1f8111560169602b855f19fde931a
parentdrm/i915/gvt: force to set all context control bits from guest (diff)
downloadlinux-9f591ae60e1be026901398ef99eede91237aa3a1.tar.xz
linux-9f591ae60e1be026901398ef99eede91237aa3a1.zip
drm/i915/gvt: throw error on unhandled vfio ioctls
On unknown/unhandled ioctls the driver should return an error, so userspace knows it tried to use something unsupported. Cc: stable@vger.kernel.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
-rw-r--r--drivers/gpu/drm/i915/gvt/kvmgt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c
index 520fe3d0a882..f8540cc67b44 100644
--- a/drivers/gpu/drm/i915/gvt/kvmgt.c
+++ b/drivers/gpu/drm/i915/gvt/kvmgt.c
@@ -1254,7 +1254,7 @@ static long intel_vgpu_ioctl(struct mdev_device *mdev, unsigned int cmd,
}
- return 0;
+ return -ENOTTY;
}
static ssize_t