[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241220100409.4007346-1-honglei1.huang@amd.com>
Date: Fri, 20 Dec 2024 18:04:07 +0800
From: Honglei Huang <honglei1.huang@....com>
To: Huang Rui <ray.huang@....com>,
<virtualization@...ts.linux-foundation.org>, <linux-kernel@...r.kernel.org>,
Dmitry Osipenko <dmitry.osipenko@...labora.com>,
<dri-devel@...ts.freedesktop.org>, David Airlie <airlied@...hat.com>, "Gerd
Hoffmann" <kraxel@...hat.com>, Gurchetan Singh <gurchetansingh@...omium.org>,
Chia-I Wu <olvaffe@...il.com>, Daniel Vetter <daniel.vetter@...ll.ch>,
Akihiko Odaki <akihiko.odaki@...nix.com>
CC: Lingshan Zhu <Lingshan.Zhu@....com>, Demi Marie Obenour
<demiobenour@...il.com>, Honglei Huang <Honglei1.Huang@....com>
Subject: [RFC PATCH 1/3] virtio-gpu api: add blob userptr resource
From: Honglei Huang <Honglei1.Huang@....com>
Add a new resource for blob resource, called userptr, used for let
host access guest user space memory, to acquire a simple SVM features
in virtio GPU.
- The capset VIRTIO_GPU_CAPSET_HSAKMT used for context init,
in this series patches only HSAKMT context can use the userptr
feature. HSAKMT is a GPU compute library in HSA stack, like
the role libdrm in mesa stack.
- New flag VIRTIO_GPU_BLOB_FLAG_USE_USERPTR used in blob create
to indicate the blob create ioctl is used for create a userptr
blob resource.
Signed-off-by: Honglei Huang <Honglei1.Huang@....com>
---
include/uapi/linux/virtio_gpu.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/uapi/linux/virtio_gpu.h b/include/uapi/linux/virtio_gpu.h
index b9a9783f0b14..0a6b56acbc13 100644
--- a/include/uapi/linux/virtio_gpu.h
+++ b/include/uapi/linux/virtio_gpu.h
@@ -323,6 +323,7 @@ struct virtio_gpu_cmd_submit {
#define VIRTIO_GPU_CAPSET_VIRGL 1
#define VIRTIO_GPU_CAPSET_VIRGL2 2
+#define VIRTIO_GPU_CAPSET_HSAKMT 7
/* VIRTIO_GPU_CMD_GET_CAPSET_INFO */
struct virtio_gpu_get_capset_info {
@@ -415,6 +416,7 @@ struct virtio_gpu_resource_create_blob {
#define VIRTIO_GPU_BLOB_FLAG_USE_MAPPABLE 0x0001
#define VIRTIO_GPU_BLOB_FLAG_USE_SHAREABLE 0x0002
#define VIRTIO_GPU_BLOB_FLAG_USE_CROSS_DEVICE 0x0004
+#define VIRTIO_GPU_BLOB_FLAG_USE_USERPTR 0x0008
/* zero is invalid blob mem */
__le32 blob_mem;
__le32 blob_flags;
--
2.34.1
Powered by blists - more mailing lists