On 11/6/26 11:26, Honglei Huang wrote:
Add a new GPU capability set VIRTIO_GPU_CAPSET_ROCM to support ROCm
compute workloads in virtualized environments.

ROCm (Radeon Open Compute) is AMD's open-source software platform for
GPU compute and HPC workloads.

ID 7 is already used by the OpenCL capset (VIRCL), and gfxstream's
rutabaga_gfx has already claimed IDs 7-9 ahead of any spec or kernel
header update, so ROCm uses ID 10 to avoid a further collision. A
matching virtio-gpu specification change is in progress to register this
assignment.

Also add the matching VIRTGPU_DRM_CAPSET_ROCM alias in virtgpu_drm.h for
consistency with the other capability sets exposed through
DRM_IOCTL_VIRTGPU_GET_CAPS.

Signed-off-by: Honglei Huang <[email protected]>
---
  include/uapi/drm/virtgpu_drm.h  | 1 +
  include/uapi/linux/virtio_gpu.h | 1 +
  2 files changed, 2 insertions(+)

diff --git a/include/uapi/drm/virtgpu_drm.h b/include/uapi/drm/virtgpu_drm.h
index 95587e12ae..9b886e9772 100644
--- a/include/uapi/drm/virtgpu_drm.h
+++ b/include/uapi/drm/virtgpu_drm.h
@@ -170,6 +170,7 @@ struct drm_virtgpu_3d_wait {
  #define VIRTGPU_DRM_CAPSET_VENUS 4
  #define VIRTGPU_DRM_CAPSET_CROSS_DOMAIN 5
  #define VIRTGPU_DRM_CAPSET_DRM 6
+#define VIRTGPU_DRM_CAPSET_ROCM 10
  struct drm_virtgpu_get_caps {
        __u32 cap_set_id;
        __u32 cap_set_ver;
diff --git a/include/uapi/linux/virtio_gpu.h b/include/uapi/linux/virtio_gpu.h
index 4f530d9005..e22049835e 100644
--- a/include/uapi/linux/virtio_gpu.h
+++ b/include/uapi/linux/virtio_gpu.h
@@ -321,6 +321,7 @@ struct virtio_gpu_cmd_submit {
  #define VIRTIO_GPU_CAPSET_VENUS 4
  #define VIRTIO_GPU_CAPSET_CROSS_DOMAIN 5
  #define VIRTIO_GPU_CAPSET_DRM 6
+#define VIRTIO_GPU_CAPSET_ROCM 10
/* VIRTIO_GPU_CMD_GET_CAPSET_INFO */
  struct virtio_gpu_get_capset_info {

Could you please give a link to the spec change discussion? Please send it to virtio-comment ML if haven't been done yet.

--
Best regards,
Dmitry

Reply via email to