lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20230705035622.2841499-1-julia.zhang@amd.com>
Date:   Wed, 5 Jul 2023 11:56:22 +0800
From:   Julia Zhang <julia.zhang@....com>
To:     Juergen Gross <jgross@...e.com>,
        Gurchetan Singh <gurchetansingh@...omium.org>,
        Chia-I Wu <olvaffe@...il.com>,
        David Airlie <airlied@...hat.com>,
        Gerd Hoffmann <kraxel@...hat.com>,
        Oleksandr Tyshchenko <oleksandr_tyshchenko@...m.com>,
        Boris Ostrovsky <boris.ostrovsky@...cle.com>,
        Roger Pau Monné <roger.pau@...rix.com>,
        Jan Beulich <jbeulich@...e.com>,
        <linux-kernel@...r.kernel.org>, <dri-devel@...ts.freedesktop.org>,
        <amd-gfx@...ts.freedesktop.org>,
        <virtualization@...ts.linux-foundation.org>
CC:     Alex Deucher <alexander.deucher@....com>,
        Stefano Stabellini <sstabellini@...nel.org>,
        Christian König <christian.koenig@....com>,
        Xenia Ragiadakou <burzalodowa@...il.com>,
        "Erik Faye-Lund" <kusmabite@...il.com>,
        Qiang Yu <yuq825@...il.com>,
        Marek Olšák <marek.olsak@....com>,
        Robert Beckett <bob.beckett@...labora.com>,
        Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@....com>,
        Honglei Huang <honglei1.huang@....com>,
        Chen Jiqian <Jiqian.Chen@....com>,
        Huang Rui <ray.huang@....com>,
        Julia Zhang <julia.zhang@....com>,
        Julia Zhang <julizhan@....com>
Subject: [PATCH] virtio-gpu: Remove stride and layer_stride check for dGPU prime on VM

Remove stride and layer_stride check in virtio-gpu so that virgl can
send transfer data command with non zero stride to sync up data from
guest to host for dGPU prime on VM.

Link: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23896

Signed-off-by: Julia Zhang <julizhan@....com>
---
 drivers/gpu/drm/virtio/virtgpu_ioctl.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/gpu/drm/virtio/virtgpu_ioctl.c b/drivers/gpu/drm/virtio/virtgpu_ioctl.c
index 5d05093014ac..4d3f8d36e3c7 100644
--- a/drivers/gpu/drm/virtio/virtgpu_ioctl.c
+++ b/drivers/gpu/drm/virtio/virtgpu_ioctl.c
@@ -414,11 +414,6 @@ static int virtio_gpu_transfer_from_host_ioctl(struct drm_device *dev,
 		goto err_put_free;
 	}
 
-	if (!bo->host3d_blob && (args->stride || args->layer_stride)) {
-		ret = -EINVAL;
-		goto err_put_free;
-	}
-
 	ret = virtio_gpu_array_lock_resv(objs);
 	if (ret != 0)
 		goto err_put_free;
@@ -473,11 +468,6 @@ static int virtio_gpu_transfer_to_host_ioctl(struct drm_device *dev, void *data,
 	} else {
 		virtio_gpu_create_context(dev, file);
 
-		if (!bo->host3d_blob && (args->stride || args->layer_stride)) {
-			ret = -EINVAL;
-			goto err_put_free;
-		}
-
 		ret = virtio_gpu_array_lock_resv(objs);
 		if (ret != 0)
 			goto err_put_free;
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ