Skip to content

Commit

Permalink
drm/virtio: Remove restriction of non-zero blob_flags
Browse files Browse the repository at this point in the history
With native userspace drivers in guest, a lot of GEM objects need to be
neither shared nor mappable.  And in fact making everything mappable
and/or sharable results in unreasonably high fd usage in host VMM.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20220219170301.545432-1-robdclark@gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
  • Loading branch information
Rob Clark authored and Gerd Hoffmann committed Mar 25, 2022
1 parent 194d250 commit ec3cbb3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/gpu/drm/virtio/virtgpu_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,8 +609,7 @@ static int verify_blob(struct virtio_gpu_device *vgdev,
if (!vgdev->has_resource_blob)
return -EINVAL;

if ((rc_blob->blob_flags & ~VIRTGPU_BLOB_FLAG_USE_MASK) ||
!rc_blob->blob_flags)
if (rc_blob->blob_flags & ~VIRTGPU_BLOB_FLAG_USE_MASK)
return -EINVAL;

if (rc_blob->blob_flags & VIRTGPU_BLOB_FLAG_USE_CROSS_DEVICE) {
Expand Down

0 comments on commit ec3cbb3

Please sign in to comment.