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 C22604A92; Mon, 02 Feb 2026 10:57:10 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 1613C4971; Mon, 02 Feb 2026 10:57:08 +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.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_MISSING,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 Received: from flow-b8-smtp.messagingengine.com (flow-b8-smtp.messagingengine.com [202.12.124.143]) by atuin.qyliss.net (Postfix) with ESMTPS id BD9EF49F5 for ; Mon, 02 Feb 2026 10:57:05 +0000 (UTC) Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailflow.stl.internal (Postfix) with ESMTP id 75F2B1300647; Mon, 2 Feb 2026 05:57:03 -0500 (EST) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Mon, 02 Feb 2026 05:57:03 -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=1770029823; x=1770037023; bh=dxVx1d2Y5z ojH6GvhR3F3eYalVA9UB/Lq0+SwvKDmAY=; b=MNu5Qs5ERV44/we2IL4oi03OZ+ V7P3lSmd18PsIxmD/S7gv4aKL5iGXEdd/cgH1ZpVqEZ9jXaXGD8VrQNTWXeCJcig Hy4HqB6KWY2hLd5tpv+MKw8uuPF1oGdV4EqWES2rDb648GhAcVwH9JPG8+q7LWz+ USU6ls/44ux09nrhKerEL+nBT6hl0WpdWQ9fE0Oqq9pArX6V4BnhREesrEldAxJ4 awyrpZnXlnbFoN63PcoEKCSkf0xk32pR3sDefkCww1E0dfNHQyhXjwPP7yz5xmdX nXqxAWj5mPb9/5VojNecCnnchoE0Qdms3ZX2sl4aMezUJsUpXTjRog4Jr/bA== 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= 1770029823; x=1770037023; bh=dxVx1d2Y5zojH6GvhR3F3eYalVA9UB/Lq0+ SwvKDmAY=; b=dYp1pfPW80kFOAP9lKcxhIo85nD8TJxgIMKGUFGznxsmhD3fINq DhPBqqojaHxPefcxQndbN93rQuIoEfQtlMY8876rC2akrtioPHDe3Wi0iHuRMWWa 8Cgd4rJYy0IpgTXXMKWjzMnjevFvPeE65LHRIJFPb5xzLvnbcKId3pIaAfc6QalK rwVRqhrO+UFy//KsrWFZn7VPXqAureYdv4tNn3q+IEbeGunoAsuYoGd63najsHXJ +D9wWTsuGDmib3KR8uTApwbX7CLVl2Vbi9hEqDfZJologRSgmPvpuMyGRjQH3aBT DO18BH9q5/Vk35MaVuwv3jzQ2m1e6ZOABSw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddujeejgeehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhephffvvefujghffffkgggtsehgtderredttdejnecuhfhrohhmpeetlhihshhsrgcu tfhoshhsuceohhhisegrlhihshhsrgdrihhsqeenucggtffrrghtthgvrhhnpeetheevud fgjefghefhieejudelkeeljeegvdekueeuhffhgedvveefteevgeetieenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehhihesrghlhihsshgrrd hishdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohep uggvmhhiohgsvghnohhurhesghhmrghilhdrtghomhdprhgtphhtthhopeguvghvvghlse hsphgvtghtrhhumhdqohhsrdhorhhg X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 2 Feb 2026 05:57:02 -0500 (EST) Received: by mbp.qyliss.net (Postfix, from userid 1000) id C55BB73AF0E7; Mon, 02 Feb 2026 11:57:00 +0100 (CET) From: Alyssa Ross To: Demi Marie Obenour Subject: Re: [PATCH] GPU acceleration In-Reply-To: <6c782b86-5542-42bc-b41e-004a645a9703@gmail.com> References: <20260120-gpu-accel-2-v1-1-ab80ef58d44e@gmail.com> <87bjic4ii9.fsf@alyssa.is> <6c782b86-5542-42bc-b41e-004a645a9703@gmail.com> Date: Mon, 02 Feb 2026 11:56:59 +0100 Message-ID: <87jywv76ro.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: UXQY2DPJFMTNNXUMO7CHAIUK7CKDA2J7 X-Message-ID-Hash: UXQY2DPJFMTNNXUMO7CHAIUK7CKDA2J7 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; charset=utf-8 Content-Transfer-Encoding: quoted-printable Demi Marie Obenour writes: > On 1/29/26 09:10, Alyssa Ross wrote: >> 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.) > > With the hash change, I was hoping it could be applied. I forgot to > run scripts/genfiles.sh, though, and completely missed the missing > fallback in crosvm. > >> Demi Marie Obenour writes: >>=20 >>> 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=3D" (git hash) and >>> "sha256-k3dmxIuCQoOrn/VwauTdzuRw/XKQB6LPLgO5ql0rE7E=3D" (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 =3D> 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-s= ervices/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..87d72f55e293ea81b6f4aa1= 2786a993bafc623e2 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\"}" >>=20 >> 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? >>=20 >> 2026-01-29 14:06:30.082434936 [2026-01-29T14:06:30.082073581+00:00 ERRO= R 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=3Dvirglrender= er, 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=3D1) f= ailed. intentionally poisoning response > > Ideally crosvm would fallback automatically, but on ChromeOS it never > needs to because it is built specifically for its target hardware. Okay, but crosvm is open to contributions. They're willing to accept affordances for non-Chrome OS use. Even Google doesn't use it exclusively on Chrome OS=E2=80=A6 > It should be sufficient to detect if an AMD or Qualcomm GPU is > available and the user has enabled GPU acceleration. That doesn't sound very good, because then we'll have to keep updating it as new GPUs are supported. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRV/neXydHjZma5XLJbRZGEIw/wogUCaYCC+wAKCRBbRZGEIw/w omFzAP46Iyx6ZPahtUV+EHlMR630/gkCNpf8HyHmjR033Ss/ggD/QARrUqxN+UvK QXPc0WHYiiSdfo0aixsBIfXJSU35qAY= =UX1M -----END PGP SIGNATURE----- --=-=-=--