mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Akihiko Odaki <akihiko.odaki@daynix.com>
To: Honglei Huang <honglei1.huang@amd.com>,
	Gurchetan Singh <gurchetansingh@chromium.org>,
	Antonio Caggiano <quic_acaggian@quicinc.com>
Cc: Lingshan Zhu <Lingshan.Zhu@amd.com>,
	Demi Marie Obenour <demiobenour@gmail.com>,
	Huang Rui <ray.huang@amd.com>,
	virtualization@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org,
	Dmitry Osipenko <dmitry.osipenko@collabora.com>,
	dri-devel@lists.freedesktop.org,
	David Airlie <airlied@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>, Chia-I Wu <olvaffe@gmail.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [RFC PATCH 1/3] virtio-gpu api: add blob userptr resource
Date: Mon, 3 Feb 2025 17:25:53 +0900	[thread overview]
Message-ID: <a8bf6c8b-5ee5-4150-a9a2-75345fd07432@daynix.com> (raw)
In-Reply-To: <20241220100409.4007346-1-honglei1.huang@amd.com>

On 2024/12/20 19:04, Honglei Huang wrote:
> From: Honglei Huang <Honglei1.Huang@amd.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@amd.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

The changes to add VIRTIO_GPU_CAPSET_VENUS and VIRTIO_GPU_CAPSET_DRM are 
already merged so this should be rebased for clean apply.

Number 7 is also occupied since 2023:
https://chromium.googlesource.com/crosvm/crosvm/+/e4c1878733937042111fca58899a3a94002bfef0%5E%21/rutabaga_gfx/src/rutabaga_utils.rs

VCL, a proposed VirtIO-GPU OpenCL driver, is also going to use that number:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31634/diffs?commit_id=55a1a8a32057e83819b046f2de03aca333b052b4

I think you should talk with Antonio Caggiano, who picked the number for 
VCL, to allocate a number without a conflict with VCL.

Gurchetan (the author of Rutabaga change allocating the number), I think 
you should notify the number usage by sending a patch for Linux or 
virtio-spec.

Regards,
Akihiko Odaki

>   
>   /* 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;


  parent reply	other threads:[~2025-02-03  8:26 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-20 10:04 Honglei Huang
2024-12-20 10:04 ` [RFC PATCH 2/3] drm/virtgpu " Honglei Huang
2024-12-20 10:04 ` [RFC PATCH 3/3] drm/virtio: implement blob userptr resource object Honglei Huang
2024-12-20 15:35   ` Simona Vetter
2024-12-22  1:59     ` Demi Marie Obenour
2024-12-27  2:24       ` Huang, Honglei1
2025-01-08 17:05         ` Simona Vetter
2025-01-25  0:42           ` Demi Marie Obenour
2025-01-29 19:40             ` Demi Marie Obenour
2025-01-29 20:54           ` Demi Marie Obenour
2025-01-31  0:33             ` Demi Marie Obenour
2025-02-06 10:53               ` Huang, Honglei1
2025-02-06 18:21                 ` Demi Marie Obenour
2025-02-07 11:07                   ` Huang, Honglei1
2025-02-08  2:30                     ` Demi Marie Obenour
2025-02-08  2:43                       ` Demi Marie Obenour
     [not found]                         ` <d259279c-9989-410f-907d-9bf0b318bc84@amd.com>
2025-02-08 19:47                           ` Demi Marie Obenour
     [not found]       ` <40485636-7ea3-4e34-b4bb-1ccaaadd4e47@amd.com>
2025-01-20  9:54         ` Huang, Honglei1
2025-01-29 19:46           ` Demi Marie Obenour
2025-02-04 10:45           ` Simona Vetter
2025-02-06 11:05             ` Huang, Honglei1
2025-02-03  8:25 ` Akihiko Odaki [this message]
2025-02-06 10:40   ` [RFC PATCH 1/3] virtio-gpu api: add blob userptr resource Huang, Honglei1

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=a8bf6c8b-5ee5-4150-a9a2-75345fd07432@daynix.com \
    --to=akihiko.odaki@daynix.com \
    --cc=Lingshan.Zhu@amd.com \
    --cc=airlied@redhat.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=demiobenour@gmail.com \
    --cc=dmitry.osipenko@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gurchetansingh@chromium.org \
    --cc=honglei1.huang@amd.com \
    --cc=kraxel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olvaffe@gmail.com \
    --cc=quic_acaggian@quicinc.com \
    --cc=ray.huang@amd.com \
    --cc=virtualization@lists.linux-foundation.org \
    /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®