From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id 9ABB3361E; Thu, 29 Jan 2026 14:10:35 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id EB00A3579; Thu, 29 Jan 2026 14:10:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_MISSING,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 Received: from fout-a2-smtp.messagingengine.com (fout-a2-smtp.messagingengine.com [103.168.172.145]) by atuin.qyliss.net (Postfix) with ESMTPS id ABE303572 for ; Thu, 29 Jan 2026 14:10:30 +0000 (UTC) Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfout.phl.internal (Postfix) with ESMTP id 6125FEC0552; Thu, 29 Jan 2026 09:10:29 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-04.internal (MEProxy); Thu, 29 Jan 2026 09:10:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1769695829; x=1769782229; bh=p6VRLBEQRM FVpeotYztOJ+0ciOOAYCRdhKReoGAgdbI=; b=N/AoiLDZ8ajRj+2x9ijzCMctUB F20nIs/4g8eFkUJL8rSQO6wm3zp+PnJqk3TZF1KumsMthM5afr9Bh543+1InwXJX etWydZ054tN8Z7oLzgRVGXqy5gh2xqIH7kK32c4IM3MqJz6MnGiwKlB9XTy/DkkX 7n7YAe0BoZCcrxutpinEPoCffQyzWBX0enoBzOOLxN76/S+F256lmMgJQHX23kIt Wxqhg9IC+K0X8RXpVnkHEgzwfkD8GU2mDVMuDZuLbKypr6VrJPm1iSj4zQlxIA+J 9w2ywP7XhNdG/IBqXVra/O0LlMcdyu5CJ38fopN821CjpJvKHRyhueLHBksA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1769695829; x=1769782229; bh=p6VRLBEQRMFVpeotYztOJ+0ciOOAYCRdhKR eoGAgdbI=; b=whv4qAwu7fH1d2fDouJQo7BfPqXI2EeZ7oLGO6h97XHVRekt13V l0PwOWFyEqWkvCcOebeDS7WKJBDMtvHe94tfYEGaruMGWdGd/foI55Tgp33bpWqV 5sbPhv4X3jvt8riJKwDPgLDvJka2SUnXOpKXeRMBiE7vr9j705fMMHAAL/zlALBO /enaV/0loiCKGFBxyM+glABR1xgPbuOpuz3P2Bex6VtqSw4FtBYK8DKEoRDsyKnF 020bPPa0JQ6PfEXcqDquJxehdHls+OjCbNzTPSndrd6Y4tW0bIUUCpJZvjecVFrJ WPpG7hmBFHiUrYS7tm+v0/6HmpcgV2zFxKA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdduieeigedtucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhephffvvefujghffffkgggtsehgtderredttddtnecuhfhrohhmpeetlhihshhsrgcu tfhoshhsuceohhhisegrlhihshhsrgdrihhsqeenucggtffrrghtthgvrhhnpeejuefhve dttdejleegveeileeufeeiudejveeiveefgfeiffetudfhtddtueehvdenucffohhmrghi nheptghouggvsggvrhhgrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomhephhhisegrlhihshhsrgdrihhspdhnsggprhgtphhtthhopedv pdhmohguvgepshhmthhpohhuthdprhgtphhtthhopeguvghmihhosggvnhhouhhrsehgmh grihhlrdgtohhmpdhrtghpthhtohepuggvvhgvlhesshhpvggtthhruhhmqdhoshdrohhr gh X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 29 Jan 2026 09:10:28 -0500 (EST) Received: by mbp.qyliss.net (Postfix, from userid 1000) id 195B8735711F; Thu, 29 Jan 2026 15:10:24 +0100 (CET) From: Alyssa Ross To: Demi Marie Obenour Subject: Re: [PATCH] GPU acceleration In-Reply-To: <20260120-gpu-accel-2-v1-1-ab80ef58d44e@gmail.com> References: <20260120-gpu-accel-2-v1-1-ab80ef58d44e@gmail.com> Date: Thu, 29 Jan 2026 15:10:22 +0100 Message-ID: <87bjic4ii9.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: YS3WEK7TUCEO4H5E662AIE6TNPDO7RRI X-Message-ID-Hash: YS3WEK7TUCEO4H5E662AIE6TNPDO7RRI X-MailFrom: hi@alyssa.is X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-devel.spectrum-os.org-0; header-match-devel.spectrum-os.org-1; header-match-devel.spectrum-os.org-2; header-match-devel.spectrum-os.org-3; header-match-devel.spectrum-os.org-4; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Spectrum OS Development X-Mailman-Version: 3.3.9 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --=-=-= Content-Type: text/plain Worth marking patches like this as RFC or similar in future, so everybody looking at it is on the same page about its status. (I'm assuming this was meant as a proof of concept and not meant to be applied as is.) Demi Marie Obenour writes: > This exposes GPU acceleration to VMs via virtio-GPU native contexts on > AMD and Qualcomm GPUs. Apple GPU support also exists but might require > patches to virglrenderer that are not upstream yet. > > On a system with an AMD GPU, this has been tested by running vkcube in > the VM. It reports that the AMD GPU is being used for rendering. > > Signed-off-by: Demi Marie Obenour > --- > I used an empty string for the hashes in 'gitfetch' and > 'buildRustPackage'. This is, of course, incorrect. The correct value > according to my own testing is > "sha256-EOMkQ0aPRjsowdGuZjy5K1yKyKEzd5AVYxaECTz7n6k=" (git hash) and > "sha256-k3dmxIuCQoOrn/VwauTdzuRw/XKQB6LPLgO5ql0rE7E=" (cargoHash). > However, these should be validated before applying them, which is why I > didn't include them in the patch themselves. This is a security > precaution: anyone who wants to inject malicious content must serve it > to multiple people, not just one. > --- > .../template/data/service/vhost-user-gpu/run | 2 +- > img/app/Makefile | 2 +- > img/app/default.nix | 14 ++++++++++++-- > img/app/image/etc/mdev.conf | 1 + > .../notification-fd | 0 > .../notification-fd.license | 0 > .../{wayland-proxy-virtwl => wl-cross-domain-proxy}/run | 17 +++++------------ > .../type | 0 > .../type.license | 0 > 9 files changed, 20 insertions(+), 16 deletions(-) > > diff --git a/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-gpu/run b/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-gpu/run > index fb9ac9971aef82dabe0b54c1299ac8c66d133eb5..87d72f55e293ea81b6f4aa12786a993bafc623e2 100755 > --- a/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-gpu/run > +++ b/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-gpu/run > @@ -42,4 +42,4 @@ bwrap > crosvm --no-syslog device gpu > --fd 0 > --wayland-sock $WAYLAND_DISPLAY > - --params "{\"context-types\":\"cross-domain\"}" > + --params "{\"context-types\":\"cross-domain:drm\"}" I suppose we'll need to get some sort of graceful fallback into crosvm/rutabaga, or to somehow detect native contexts support in this script before we enable it on the crosvm command line? 2026-01-29 14:06:30.082434936 [2026-01-29T14:06:30.082073581+00:00 ERROR rutabaga_gfx::virgl_renderer] failed to initialize drm renderer 2026-01-29 14:06:30.082842461 [2026-01-29T14:06:30.082652949+00:00 WARN rutabaga_gfx::rutabaga_core] error initializing gpu backend=virglrenderer, falling back to 2d. 2026-01-29 14:06:30.099779984 [2026-01-29T14:06:30.099379669+00:00 WARN devices::virtio::gpu::virtio_gpu] virtio-gpu get_capset_info(index=1) failed. intentionally poisoning response --- FYI: I needed the following additional diff to test the rootfs with this patch: diff --git a/img/app/default.nix b/img/app/default.nix index 1ce3225..d19f5f8 100644 --- a/img/app/default.nix +++ b/img/app/default.nix @@ -15,9 +15,9 @@ let src = fetchgit { url = "https://codeberg.org/drakulix/wl-cross-domain-proxy"; rev = "167b5ade788d297cd19929c2f367484a09a87316"; - hash = ""; + hash = "sha256-EOMkQ0aPRjsowdGuZjy5K1yKyKEzd5AVYxaECTz7n6k="; }; - cargoHash = ""; + cargoHash = "sha256-k3dmxIuCQoOrn/VwauTdzuRw/XKQB6LPLgO5ql0rE7E="; }; kernelTarget = if stdenvNoCC.hostPlatform.isx86 then diff --git a/img/app/file-list.mk b/img/app/file-list.mk index 815b63a..443e6f2 100644 --- a/img/app/file-list.mk +++ b/img/app/file-list.mk @@ -41,7 +41,6 @@ LINKS = \ S6_RC_FILES = \ image/etc/s6-rc/app/dependencies.d/dbus \ image/etc/s6-rc/app/dependencies.d/pipewire \ - image/etc/s6-rc/app/dependencies.d/wayland-proxy-virtwl \ image/etc/s6-rc/app/run \ image/etc/s6-rc/app/type \ image/etc/s6-rc/dbus-vsock/notification-fd \ @@ -64,10 +63,10 @@ S6_RC_FILES = \ image/etc/s6-rc/pipewire/notification-fd \ image/etc/s6-rc/pipewire/run \ image/etc/s6-rc/pipewire/type \ - image/etc/s6-rc/wayland-proxy-virtwl/notification-fd \ - image/etc/s6-rc/wayland-proxy-virtwl/run \ - image/etc/s6-rc/wayland-proxy-virtwl/type \ image/etc/s6-rc/wireplumber/dependencies.d/dbus \ image/etc/s6-rc/wireplumber/dependencies.d/pipewire \ image/etc/s6-rc/wireplumber/run \ - image/etc/s6-rc/wireplumber/type + image/etc/s6-rc/wireplumber/type \ + image/etc/s6-rc/wl-cross-domain-proxy/notification-fd \ + image/etc/s6-rc/wl-cross-domain-proxy/run \ + image/etc/s6-rc/wl-cross-domain-proxy/type diff --git a/img/app/image/etc/s6-rc/app/dependencies.d/wayland-proxy-virtwl b/img/app/image/etc/s6-rc/app/dependencies.d/wayland-proxy-virtwl deleted file mode 100644 index e69de29..0000000 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRV/neXydHjZma5XLJbRZGEIw/wogUCaXtqTgAKCRBbRZGEIw/w otBuAQDge2vWJaG6oxWl7frK8UHT47DKC5bsKpgetpmXIPN4+AEAnuVUmMUuvh25 q2j2AByN1AxWiRfclE5hp2loAkYpFQI= =pBXP -----END PGP SIGNATURE----- --=-=-=--