When initializing gem objects call virtio_max_dma_size() to figure the scatter list limit. Needed to make virtio-gpu work properly with SEV. Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/virtio/virtgpu_object.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c index 1359eb8f1a02..26b608e2554e 100644 --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -214,6 +214,7 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, goto err_free_gem; bo->dumb = params->dumb; + shmem_obj->base.max_segment = virtio_max_dma_size(vgdev->vdev); if (fence) { ret = -ENOMEM; -- 2.18.4