mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Honglei Huang <honghuan@amd.com>
To: alex.bennee@linaro.org, kraxel@redhat.com,
	dmitry.osipenko@collabora.com, Ray.Huang@amd.com
Cc: gurchetansingh@chromium.org, olvaffe@gmail.com,
	maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	tzimmermann@suse.de, simona@ffwll.ch,
	dri-devel@lists.freedesktop.org, virtualization@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3] virtio-gpu: Add user pointer and HSAKMT support enhancements
Date: Mon, 8 Dec 2025 15:50:07 +0800	[thread overview]
Message-ID: <3b2a9f46-abe5-49cc-bde1-18f8dae525db@amd.com> (raw)
In-Reply-To: <20251112075414.3719917-1-honghuan@amd.com>



Dear all,

I would like to share some progress that has been made in exploring GPU 
compute capabilities within virtio-gpu. Work has been undertaken to 
extend virtio-gpu beyond traditional graphics workloads to support 
compute applications, and I wanted to update the community on the 
current status and gather feedback on this effort.

Virtio-gpu has the potential to become a unified solution for both 
graphics and compute, providing efficient GPU access in virtualized 
environments. This work aims to enable modern GPU compute stacks like 
ROCm, allowing AI/ML workloads and scientific computing to run in 
virtual machines with minimal performance penalty.

The current implementation is functional with essential features enabled 
and operational. The implementation has been validated with production 
AI workloads. For ComfyUI image/video generation on AMD W7900, the 
observed overhead ranges from 0.4% to 8.3% across different tasks. For 
LLM inference using deepseek-r1-distill-qwen-1.5b, the implementation 
achieved approximately 86% efficiency with 14% virtualization overhead. 
For OpenCL, most CTS tests have also been validated, and on certain 
hardware platforms, full CTS can be fully validated.

As someone approaching this work as a learner, I would greatly 
appreciate feedback from the community. The current functionality and 
performance are not bad, there are certainly areas that could benefit 
from improvement. I am fully committed to addressing any feedback 
received and working with the community to refine the implementation to 
meet the expected standards.

Full documentation and testing resources are available at: 
https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1475

Thank you for your time and consideration. I welcome all feedback, 
questions, and suggestions.

Best regards,
Honglei Huang

On 2025/11/12 15:54, Honglei Huang wrote:
> This patch series introduces three key enhancements to virtio-gpu to improve
> memory management and GPU virtualization capabilities:
> 
> 1. VIRTIO_GPU_BLOB_FLAG_USE_USERPTR support: Enables user pointer mapping
>     for blob resources, allowing guest applications to use user-allocated
>     memory for GPU resources more efficiently.
> 
> 2. Configurable HSAKMT capset support: Provides better control over HSAKMT
>     functionality with a new device property "hsakmt=on" to avoid exposing
>     unsupported capabilities to guests.
> 
> 3. VIRTIO_GPU_F_RESOURCE_USERPTR feature support: Introduces a new virtio-gpu
>     feature flag with configurable "userptr=on" device property to enable
>     user pointer resources for enhanced memory management.
> 
> These patches work together to provide more flexible and efficient memory
> management between guest and host in GPU virtualization scenarios. The
> changes are backward compatible and controlled by new device properties.
> 
> Usage examples:
>    -device virtio-gpu-gl,hsakmt=on,userptr=on
> 
> The series has been tested with GPU workloads requiring advanced memory
> management capabilities.
> 
> Honglei Huang (3):
>    virtio-gpu: Add support for VIRTIO_GPU_BLOB_FLAG_USE_USERPTR flag
>    virtio-gpu: add configurable HSAKMT capset support
>    virtio-gpu: Add VIRTIO_GPU_F_RESOURCE_USERPTR feature support
> 
>   hw/display/virtio-gpu-base.c                |  3 +++
>   hw/display/virtio-gpu-gl.c                  |  2 ++
>   hw/display/virtio-gpu-virgl.c               | 30 ++++++++++++++++-----
>   hw/display/virtio-gpu.c                     |  9 ++-----
>   include/hw/virtio/virtio-gpu.h              |  6 +++++
>   include/standard-headers/linux/virtio_gpu.h |  4 +++
>   6 files changed, 41 insertions(+), 13 deletions(-)
> 


       reply	other threads:[~2025-12-08  7:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20251112075414.3719917-1-honghuan@amd.com>
2025-12-08  7:50 ` Honglei Huang [this message]
2025-12-08  7:53   ` Honglei Huang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3b2a9f46-abe5-49cc-bde1-18f8dae525db@amd.com \
    --to=honghuan@amd.com \
    --cc=Ray.Huang@amd.com \
    --cc=alex.bennee@linaro.org \
    --cc=dmitry.osipenko@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gurchetansingh@chromium.org \
    --cc=kraxel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=olvaffe@gmail.com \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    --cc=virtualization@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®