All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH v7 0/5] virtio-gpu: Add userptr support and ROCm capability
@ 2026-11-06  8:27 Honglei Huang
  2026-11-06  8:27 ` [RFC PATCH v7 1/5] virtio-gpu: Update Linux headers to add ROCm capability set Honglei Huang
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Honglei Huang @ 2026-11-06  8:27 UTC (permalink / raw)
  To: alex.bennee, dmitry.osipenko, odaki, Ray.Huang
  Cc: mst, cohuck, pbonzini, qemu-devel, honghuan

This patch series introduces enhancements to virtio-gpu to improve
memory management and GPU virtualization capabilities for ROCm (Radeon Open Compute) 
workloads.

Usage example:
  -device virtio-gpu-gl,rocm=on

The series includes:

1. Add ROCm capset ID 10 to the imported Linux headers.

2. Enable ROCm native contexts through the "rocm=on" device property.

3. Remove the only qemu side 16384 entry limit for blob backing entries.

4. Add VIRTIO_GPU_F_BLOB_READONLY and VIRTIO_GPU_BLOB_FLAG_USE_READONLY
  to the imported Linux headers.

5. Advertise readonly blob support for ROCm devices with blobs enabled.

See overall detail in virglrenderer pr [1].

Changes in v7:
- Replace the obsolete USE_USERPTR=0x8 / USERPTR_RDONLY=0x10 header
  definitions with negotiated BLOB_READONLY feature bit 6 and
  USE_READONLY=0x8.
- Use ROCm capset ID 10 rather than 8.
- Add readonly advertisement for the paired ROCm blob backend.

Changes in v6:
- Changed to RFC status
- Removed VIRTIO_GPU_F_RESOURCE_USERPTR feature flag from patch 1
- Added VIRTIO_GPU_BLOB_FLAG_USERPTR_RDONLY flag to patch 1

Changes in v5:
- Split userptr header updates into dedicated patch (patch 1/4)
- Extracted nr_entries limit removal into standalone commit (patch 2/4)
- Split ROCm header updates into dedicated patch (patch 3/4)
- Removed VIRTIO_GPU_F_RESOURCE_USERPTR feature detection
- Keep ROCm capability support with "rocm=on" device property (patch 4/4)
- Change corresponding commit messages, change corresponding cover letter content
- Remove RFC label

Changes in v4:
- Change this series to RFC
- Renamed HSAKMT-related functionality to ROCm for better clarity and
  alignment with the ROCm ecosystem terminology
- Changed device property from "hsakmt=on" to "rocm=on"
- Changed flag from VIRTIO_GPU_FLAG_HSAKMT_ENABLED to
  VIRTIO_GPU_FLAG_ROCM_ENABLED
- Changed renderer flag from VIRGL_RENDER_USE_HSAKMT to
  VIRGL_RENDERER_USE_ROCM
- Updated capset handling to use VIRTIO_GPU_CAPSET_ROCM (8) instead of
  VIRTIO_GPU_CAPSET_HSAKMT (8)
- Removed the error handling fix from patch 1 (virtio-gpu-virgl.c) into
  another thread

Changes in v3:
- Renamed HSAKMT-related functionality to ROCm for better clarity and
  alignment with the ROCm ecosystem terminology
- Changed device property from "hsakmt=on" to "rocm=on"
- Changed flag from VIRTIO_GPU_FLAG_HSAKMT_ENABLED to
  VIRTIO_GPU_FLAG_ROCM_ENABLED
- Changed renderer flag from VIRGL_RENDER_USE_HSAKMT to
  VIRGL_RENDERER_USE_ROCM
- Updated capset handling to use VIRTIO_GPU_CAPSET_ROCM (8) instead of
  VIRTIO_GPU_CAPSET_HSAKMT (8)
- Removed the error handling fix from patch 1 (virtio-gpu-virgl.c) into
  another thread

Changes in v2:
- Fixed error handling bug in virtio-gpu-virgl.c where the return
  value check was inverted (changed from "if (!ret)" to "if (ret != 0)")
- Added VIRGL_RENDER_USE_HSAKMT flag initialization in virtio_gpu_virgl_init()
  when HSAKMT support is enabled
- Simplified blob resource creation logic by removing complex conditional
  branching for userptr vs regular blob handling
- Updated commit messages to reflect bug fixes and improvements
- Added references to related patches in Linux kernel, virglrenderer, and
  ROCm Runtime components for complete feature implementation tracking

[1]: https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1708

Honglei Huang (5):
  virtio-gpu: Update Linux headers to add ROCm capability set
  virtio-gpu: Add ROCm capability support
  virtio-gpu: remove the artificial IOV mapping limit
  virtio-gpu: add readonly blob definitions to Linux headers
  virtio-gpu: advertise readonly blobs for ROCm

 hw/display/virtio-gpu-base.c                |  4 ++++
 hw/display/virtio-gpu-gl.c                  |  2 ++
 hw/display/virtio-gpu-virgl.c               | 20 ++++++++++++++++++++
 hw/display/virtio-gpu.c                     |  7 -------
 include/hw/virtio/virtio-gpu.h              |  6 ++++++
 include/standard-headers/linux/virtio_gpu.h |  3 +++
 6 files changed, 35 insertions(+), 7 deletions(-)


base-commit: 73294d096cc591e122fde9e63db4739de6d84f2b
-- 
2.34.1



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2026-11-30 10:36 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-06  8:27 [RFC PATCH v7 0/5] virtio-gpu: Add userptr support and ROCm capability Honglei Huang
2026-11-06  8:27 ` [RFC PATCH v7 1/5] virtio-gpu: Update Linux headers to add ROCm capability set Honglei Huang
2026-11-27 14:44   ` Alex Bennée
2026-11-30 10:00     ` Huang, Honglei
2026-11-06  8:27 ` [RFC PATCH v7 2/5] virtio-gpu: Add ROCm capability support Honglei Huang
2026-11-27 14:18   ` Dmitry Osipenko
2026-11-30  9:51     ` Huang, Honglei
2026-11-06  8:27 ` [RFC PATCH v7 3/5] virtio-gpu: remove the artificial IOV mapping limit Honglei Huang
2026-11-27 14:15   ` Dmitry Osipenko
2026-11-30  9:50     ` Huang, Honglei
2026-11-30 10:35       ` Huang, Honglei
2026-11-06  8:27 ` [RFC PATCH v7 4/5] virtio-gpu: add readonly blob definitions to Linux headers Honglei Huang
2026-11-06  8:27 ` [RFC PATCH v7 5/5] virtio-gpu: advertise readonly blobs for ROCm Honglei Huang
2026-11-27 14:07   ` Dmitry Osipenko
2026-11-30  9:49     ` Huang, Honglei

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.