From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4B3F6606A32D for ; Fri, 4 Dec 2026 12:56:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=MLvm9IX+ Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xZSpj-0000bq-R8; Fri, 04 Dec 2026 07:56:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xZSph-0000bh-Vh for qemu-devel@nongnu.org; Fri, 04 Dec 2026 07:56:14 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xZSpf-0006GY-N5 for qemu-devel@nongnu.org; Fri, 04 Dec 2026 07:56:13 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4bb606491faso3834985e9.3 for ; Fri, 04 Dec 2026 04:56:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1796388970; x=1796993770; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:message-id:date :user-agent:references:in-reply-to:subject:cc:to:from:from:to:cc :subject:date:message-id:reply-to:content-type; bh=iQA3bOCayjBSwUbv1RS7ISELB0LZIgKkmRfUrTI5NN8=; b=MLvm9IX+U+nhYVTLeTJSIE2cmjlbLLfnotnG8SN1qGfT/BnzsDysBvD7HNTu1JysHD 3A9U/8jMRW3Sf4ME/wy1/W+2AedEByqkzLMs4RGNQ55NYMMGUMBwDqm57UA5HBlpptMq 70PfgkQptI/i7ltZNHfiqGzp4STaZxCbURSzKMqPJ1Kisae55i+pGpoegG6gLmcnb8vv PfzDhxYFqgNdG5Lo/6RWj+Uj4B/BQvgzL+d+RdnSqOf95u/A5dIiiQvpBB5oB3ZAvrio 6AQ1uKNItAR312+WXiB5tUGx2ZOz1iDmh7FsOw0Y55KJv3qs5Bw38HcEH44spvf+3sAi 3/sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796388970; x=1796993770; h=content-transfer-encoding:content-type:mime-version:message-id:date :user-agent:references:in-reply-to:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=iQA3bOCayjBSwUbv1RS7ISELB0LZIgKkmRfUrTI5NN8=; b=yXYXTnUOjqLFdnwmaxrBHI64L6ZTm4H0qjtTVESSL27tpkplS4cT2Bu5SnUVo5SIUl NpeLR4l1KqU8o+nXszWJVIRaZLKk+uoN2K7Z1c5vutuQOvWKbX9FWpwNutQlRNlWZCvy NnFth3XtgA5PnlaKjD3PXNXD0j3TFuEC32oUi7QmoSpsIWaA6DpPpev0oq3J8Y7MgaEc i3vbVruVoytH+fR/NNT5/UIfi+JD/6nfi4A5KYDOcKGD91V5yAp9rMNwrBTMXRggVu81 UgkMkF/IaqFk4WnhW4F1V7KxahBefu+UMb0d6cZuNnAgyCmuejcFWgQGlk82s6aD7bFY Opyw== X-Forwarded-Encrypted: i=1; AL+hErFo5+8jHGMcG316RecDFRtT42UdkpH13b6mP4w2qfx1qwO40B/PMezfyODvnc0+MbdviEugTU5M5290@nongnu.org X-Gm-Message-State: APuU4Z9bY5EwANjE8SSzshpDe4VtMck1fh2j3PGKFjRzeypFZ9lITAnW 4hsmCje0Sn+gvHV9G6jd8a17t7acYUpAaLI1j2LjDSDXAkn+6bFpDUPWPtw4vrUosmw= X-Gm-Gg: AZFdTZfnFAMS4ZZxcNQebDDMN8lQ7Pqa5kMf0NWdhj7KTbvAo5ZD+berqVAsjRp4ju+ qZEddvyV0HZaK0bq5H05TiM9XL1tDU+dRfA5NxkXQxpA2iuH3k346/D2kN8xEeGAjLEsB1GbaAh cs+MvEcBTqynn3Kf7CwhNs/odLRZKwkbYsmv3YzwyJMyKAzqgOQRO0wcBEa/Tin7YLXlVa2CiWG 9wAEvW8zEJCGJfRtze4WIlS+C29yBKoJYia9Zp4oeyfKcXkyqcNP9nGIf5wYP/o4eppIjPDnQ6N f2QbhnzJ9WnZWESYBTWFFlGJ3AP0RxdaIvfz3yI8fc9Y8i3GJ1kqBLnX9GhnlL9moPOS8rD3ekj d6ze1PaYDqxT3Q9YsH/22lVMLM7RkKLwgUk2hmGerw2nAvci+x23CHuopVCFwknMVf4x1Yz40la NI+hkBV6bkpO/yq6UZsjCAjkJMFrK6zV0w+MIU1WH9xRlYjCUX40P7nWjkIfS4dykgx9/mvibIE WmCOX4ysCzwxjmmvm4+WqHBGwq3LEY2VLXAecUAie/cf+D4rjFwHKlMl+wbk0FO8S+GYQyxVzDG 0rnKqcppdQPlHVpAkYln1Dor34A8axa7tb22BflW6RdJxfZO1Q== X-Received: by 2002:a05:600c:3543:b0:4bb:7033:c938 with SMTP id 5b1f17b1804b1-4bbeb8cdd0cmr39194085e9.14.1796388969892; Fri, 04 Dec 2026 04:56:09 -0800 (PST) Received: from draig.lan ([185.124.0.158]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4d174c08b17sm5013096f8f.54.2026.12.04.04.56.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2026 04:56:09 -0800 (PST) Received: from draig (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 0C4095F8D7; Fri, 04 Dec 2026 12:56:08 +0000 (GMT) From: =?utf-8?Q?Alex_Benn=C3=A9e?= To: "Huang, Honglei1" Cc: "odaki@rsg.ci.i.u-tokyo.ac.jp" , "dmitry.osipenko@collabora.com" , "mst@redhat.com" , "cohuck@redhat.com" , "pbonzini@redhat.com" , "qemu-devel@nongnu.org" , "Huang, Ray" Subject: Re: [RFC PATCH v8 0/5] virtio-gpu: Add userptr support and ROCm capability In-Reply-To: (Honglei1 Huang's message of "Fri, 4 Dec 2026 06:50:45 +0000") References: <20261203014352.1792475-1-honghuan@amd.com> User-Agent: mu4e 1.14.5-pre2; emacs 30.1 Date: Fri, 04 Dec 2026 12:56:07 +0000 Message-ID: <87cxrhxl08.fsf@draig.linaro.org> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org X-Spam-Status: No, score=-11.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 "Huang, Honglei1" writes: > AMD General > > Hi all, > > Please let me know if you have any review comments. > Welcome to any comments. I'm trying to work out the best way to defend this with tests. I guess we need a fairly new virglrenderer? Is there any support for ROCm for the vhost-user-gpu backends? What would be useful is some sort of functional test with a (small) workload so we can at least exercise the interface when the libraries align. We should also document the host and guest requirements in virtio-gpu.rst. > > Regards, > Honglei > > -----Original Message----- > From: Huang, Honglei1 > Sent: Thursday, December 3, 2026 9:44 AM > To: alex.bennee@linaro.org; dmitry.osipenko@collabora.com; odaki@rsg.ci.i= .u-tokyo.ac.jp; Huang, Ray > Cc: mst@redhat.com; cohuck@redhat.com; pbonzini@redhat.com; qemu-devel@no= ngnu.org; Huang, Honglei1 > Subject: [RFC PATCH v8 0/5] virtio-gpu: Add userptr support and ROCm capa= bility > > This patch series introduces enhancements to virtio-gpu to improve memory= management and GPU virtualization capabilities for ROCm (Radeon Open Compu= te) workloads. > > Usage example: > -device virtio-gpu-gl,rocm=3Don > > The series includes: > > 1. Add ROCm capset ID 10 to the imported Linux headers. > 2. Enable ROCm native contexts through the "rocm=3Don" device property. > 3. Replace the qemu side 16384 entry limit with an overflow check. > 4. Add VIRTIO_GPU_F_BLOB_READONLY and VIRTIO_GPU_BLOB_FLAG_USE_READONLY > to the imported Linux headers. > 5. Advertise readonly blob support whenever blobs are enabled. > > See overall detail in virglrenderer pr [1]. > kernel header change patch: [2]. > Virtio spec change request: [3]. > > Changes in v8: > - Rebase onto current master. > - Patches 1, 4: generate with update-linux-headers.sh from [2] (Alex). > - Patch 2: add Dmitry's Reviewed-by. > - Patch 3: check entry array size overflow, not a fixed limit (Dmitry). > - Patch 5: advertise readonly blobs generically (Dmitry). > > Changes in v7: > - Replace the obsolete USE_USERPTR=3D0x8 / USERPTR_RDONLY=3D0x10 header > definitions with negotiated BLOB_READONLY feature bit 6 and > USE_READONLY=3D0x8. > - 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=3Don" 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=3Don" to "rocm=3Don" > - 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=3Don" to "rocm=3Don" > - 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 !=3D 0)") > - Added VIRGL_RENDER_USE_HSAKMT flag initialization in virtio_gpu_virgl_i= nit() > 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 > [2]: https://lore.kernel.org/all/20261202101658.1209083-1-honghuan@amd.co= m/ > [3]: https://lore.kernel.org/virtio-comment/20261202095728.1127178-1-hong= huan@amd.com/ > > Honglei Huang (5): > linux-headers: Update to v7.4-rc2-userptr-v11 for ROCm capset > (!UPSTREAM) > virtio-gpu: Add ROCm capability support > virtio-gpu: remove the artificial IOV mapping limit > linux-headers: Update to v7.4-rc2-userptr-v11 for readonly blob > (!UPSTREAM) > virtio-gpu: advertise readonly blobs > > hw/display/virtio-gpu-base.c | 1 + > hw/display/virtio-gpu-gl.c | 2 ++ > hw/display/virtio-gpu-rutabaga.c | 7 ++++++ > hw/display/virtio-gpu-virgl.c | 24 +++++++++++++++++++++ > hw/display/virtio-gpu.c | 19 ++++++++++------ > include/hw/virtio/virtio-gpu.h | 3 +++ > include/standard-headers/linux/virtio_gpu.h | 6 ++++++ > 7 files changed, 55 insertions(+), 7 deletions(-) > > > base-commit: 9cda597a1a3903d090e8e55e23f5b8a859da88ab --=20 Alex Benn=C3=A9e Virtualisation Tech Lead @ Linaro