From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-4.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id 7E2302D269; Mon, 16 May 2022 11:55:39 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 496) id 3C2DB2D254; Mon, 16 May 2022 11:55:36 +0000 (UTC) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by atuin.qyliss.net (Postfix) with ESMTPS id 04C6A2D1E1 for ; Mon, 16 May 2022 11:55:31 +0000 (UTC) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 5F86C3200937; Mon, 16 May 2022 07:55:29 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 16 May 2022 07:55:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1652702128; x=1652788528; bh=H3rYnQzoNA xP8ozLRwrzAjLLKx+ZTj9tSiPI40exsro=; b=tkFo1jTqb+dGw9xMdNW6q8Pn43 wTk5UoDAKX5jhhgUG+AOvr/MZ/1GjBX++w4NsJYach8ftEGHWpIwyPV+2VjWlzKP piG9ZtnXYWmzmHlUosz3/eRbOCSl2XklQY4teKqnRWk9QWdPlJxpK2IsCnYBEN6H xAQkcw9FWqN/K1jB3LEkVCK97q3XJqxVXD3uCKHjo7AOpz2NcYROik+ZyrIKKfBi R5AtMomI2CnO+m0EQ69AYdfrAbjWh8N3UBBC/Fg5uBw6VyUtNzY///fesKJC1+2A 54/0ufp6eUEz9AFlxMp4g13CYECJhKrgRCUPcoDxdlYCee/uNU2eHZBAX39w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1652702128; x= 1652788528; bh=H3rYnQzoNAxP8ozLRwrzAjLLKx+ZTj9tSiPI40exsro=; b=P fBz71d1g9C5Lim46XBDTp9Epsb1BgpJfFuTgk7Nuxjn9ns0pOQJN5UBdj5lkUSqG 2lpxwkfqhSKq78O7TGh8t5ovoyFaFiidtuLJyr5jAxsKMNdBgYOCIelnC0LkRrts SN8wGMGiNGie1G85VI+1BJxxBwvYvDnJopNoO/9C+Zvui6rPYpV2AnPAhLqxd6Un LdlqQE3+kyEFmlUQRx8ECTCLpInp1a5+mUKcRuL6VmjDH5i64XBHM7ob/Zg42+zm G/7hdc9iCZIYcdEhJFAFINSVlt2Qz3QpjiaY6EPYBrpAZ0/MESk/W2Kz/u/a22UQ HZnKPsF0uSs/V0rCks6PQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrheehgdeggecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfffhvfevuffkfhggtggujgesghdtre ertddtjeenucfhrhhomheptehlhihsshgrucftohhsshcuoehhihesrghlhihsshgrrdhi sheqnecuggftrfgrthhtvghrnhephffgleekgeeitdejgefftdefveegfeelfedvuedtue etkeehtddvleejueeufedtnecuffhomhgrihhnpehgihhthhhusgdrtghomhdpvhhirhht ihhoqdhsphgvtgdrmhgunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomhepqhihlhhishhssegvvhgvrdhqhihlihhsshdrnhgvth X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 16 May 2022 07:55:28 -0400 (EDT) Received: by eve.qyliss.net (Postfix, from userid 1000) id 4C989F7B; Mon, 16 May 2022 11:55:27 +0000 (UTC) Date: Mon, 16 May 2022 11:55:27 +0000 From: Alyssa Ross To: Thomas Leonard Subject: Re: Using virtio-gpu instead of virtwl Message-ID: <20220516115527.2a3wnqqgzuo7gt3x@eve> References: <20220321160534.w4oifq3cdygrobrm@eve> <20220322111639.pvr5gxz6zmeu5oua@eve> <20220414135737.lvfbrch34kjojn3s@eve> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="uif3i3bmnqausb7s" Content-Disposition: inline In-Reply-To: Message-ID-Hash: ESNPHDNRZ6ZHDQJZMTCB3RL62IO2VEON X-Message-ID-Hash: ESNPHDNRZ6ZHDQJZMTCB3RL62IO2VEON X-MailFrom: qyliss@eve.qyliss.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-discuss.spectrum-os.org-0; header-match-discuss.spectrum-os.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: discuss@spectrum-os.org X-Mailman-Version: 3.3.5 Precedence: list List-Id: General high-level discussion about Spectrum Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --uif3i3bmnqausb7s Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Thanks for the update! On Sun, May 15, 2022 at 03:20:24PM +0000, Thomas Leonard wrote: > On Thu, 14 Apr 2022 at 13:57, Alyssa Ross wrote: > > > > On Wed, Apr 13, 2022 at 05:12:13PM +0000, Thomas Leonard wrote: > > > On Wed, 6 Apr 2022 at 12:19, Thomas Leonard wrote: > > > [ converting from virtwl to virtio-gpu ] > > > > I tried, but failed, to figure out the protocol. I did manage to ge= t a > > > > test application showing a little animation, but it crashes after a > > > > few seconds. > > > > > > OK, I found a solution to this: you can just open the device file > > > twice and use one instance for Wayland messages and the other for > > > allocating images. This avoids the first race. With that, I got the > > > proxy converted: > > > > > > https://github.com/talex5/wayland-proxy-virtwl/pull/28 > > > > > > Though I'm not sure it's an improvement: +1,819 =E2=88=92577 lines! > > > > > > Instructions for configuring crosvm to use it: > > > > > > https://github.com/talex5/wayland-proxy-virtwl#virtio-gpu-support > > > > > > And I wrote up my guesses about the protocol here: > > > > > > https://github.com/talex5/wayland-proxy-virtwl/blob/master/virtio-s= pec.md > > > > That's extremely helpful, thanks for writing it up! > > A small update on this: > > First, I got virtio-gpu working with the jail. It just needs a couple > of extra paths for NixOS: > > diff --git a/src/linux.rs b/src/linux.rs > index ad031749..52d3142f 100644 > --- a/src/linux.rs > +++ b/src/linux.rs > @@ -790,6 +790,8 @@ fn gpu_jail(cfg: &Config, policy: &str) -> > Result> { > jail_mount_bind_if_exists( > &mut jail, > &[ > + "/run/opengl-driver", > + "/nix/store", > "/usr/lib", > "/usr/lib64", > "/lib", > > Secondly, I realised that the "video" memory returned by virtio-gpu > was just regular host memory (from stracing crosvm). This is because > crosvm is compiled without minigbm support and falls back to this. > > After enabling minigbm and its amdgpu support (which also required > adding a dependency on mesa) it started allocating vram. However, this > broke the proxy because vram can't be used with the Wl_shm protocol. Do you have a Nix expression somewhere for crosvm with all this stuff fixed? I'd like to integrate it into my draft Nixpkgs PR. (If you didn't do it with Nix, I can make the changes myself.) --uif3i3bmnqausb7s Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEH9wgcxqlHM/ARR3h+dvtSFmyccAFAmKCO60ACgkQ+dvtSFmy ccBuyA/9ElNxt8UroNR0w3UlzniiLQBM7AAErBHBgR3kHduEvVZaTywQVj1fUaXz syI3Nd/YS8jKuJMjEfnSGlolZutGwRKcSWFr/a+37Ev58bmBf+gyWaY4KBV3qR8x 9imoHD47z0dthGcv+X+SqJYlRsh0IscKxfs0u2g3vT16S7lnWDU8SL5kw0yjO7U9 OoQQz4A6cFUVUqpW5OL6hNbr9JO8HXHADaIz1VJqcGugrZNXpbEFoGbXHB4j0kLv 4Dc7l0GPN6io2KErj2Tz/pbFs5HQvvdHxl+o+x4cXo7gyi4y4Fm7WYPdi9LHmVZU W3qsY/PBgjE+7boxHL17ZKZQ0b7RO/Fw/7QntB9GtADP7C46qH/m9BSLkRVqlcvi VDKpHkxl6PuQXbAQi3g4ACYRVwagVvaCcJ6Jf6aoYZcQEathzAEetwXnjnjGeYNx Nc/YCCQ8z8s2BhywVqY+44ESMsnJKSvWgTkjZ8R/USkl86cvkFgUAmJLRDawmHB1 mnei4RwACIK+89pvd/ColMNBc9VpIuJlST70NJ5BxKG6LGcNRCdrGldREn10vefs sjl1aqV8HhxV5/1f1YGAcKeDZCfCYIyxXwCZja04gTebl75gvMm97yIt9F8bMOKB A1r7+JSxA11pOa27x+pmc2rwQ1ldfBiscwetfQqqpJzC5YWbPKg= =enSH -----END PGP SIGNATURE----- --uif3i3bmnqausb7s--