From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS 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 3DE228E726; Mon, 10 Oct 2022 16:54:15 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 496) id 6203B8E724; Mon, 10 Oct 2022 16:54:12 +0000 (UTC) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by atuin.qyliss.net (Postfix) with ESMTPS id B7AD68E6CA for ; Mon, 10 Oct 2022 16:54:08 +0000 (UTC) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id CAF965C0093; Mon, 10 Oct 2022 12:54:03 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 10 Oct 2022 12:54:03 -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=fm2; t=1665420843; x=1665507243; bh=Lg7qGK3C5m U3QcdFbRWRHFmItOhewyg7J1C/Lckgl00=; b=S4brXLJpoYAvZHm0eDolqlnqfb a/XZdA6wzmG1wUKGoYvHpDm62xv8HQPW8ddAgDfBJhpXBW4FXrn9BzqZVA/q1TsJ me09BLXEhV6vARLS95sKpCuz5MvvOv4AOOtG0ly2ECH2qx4hdZgRTKc4syP0sEav A3j/ob/u2XhWZtYIchdRn+61qvKMXvboWrKSnUt1/PHmODkMHQRW1elJjMeNsPE+ IDvmYjVE3uRpdSkLqkgZpNQ0wPmGHw6JW3/xTYLtQsmXI03kV7Pdq1+rtyXmicAb 80BcuHVGVEDTMvr2102eKZfZisViLQcdsmnTv/n9hNE1ifdGyWfspqD9Fu7g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id: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= fm3; t=1665420843; x=1665507243; bh=Lg7qGK3C5mU3QcdFbRWRHFmItOhe wyg7J1C/Lckgl00=; b=NlCE7PyDRkHcz7crGBlaSnmEVMS9DvnyeLbR9y8lIaoj 8AGhlL3EHXXxqKWxIRh94mUuhTDndyWxYuhrzs2rWoyiLCPlII58Aslr8oOOu6F+ XGQPXnMse2BwTkzzghLBQ1aokR8dx3+OeTSmy8cMdcNb3Uu88tYx5XbJmN640Mo/ UXXrsbSq0K2B/Z+xVoMLV/wyHsFjSBKP8qS2TJcrbp7tH2ryuruLXFMgcLyJ2RKH XnoXbSD6z+NoGhHrop0euRtF+q4FAqTm47Yy54/Rf+GWK3Nt4VoYRJjOHUbjgpjy C0zgP6P30HBvxsxReWfWk7G6tgsFpIa5VCk0lg+xyQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeejgedguddttdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufgjfhffkfggtgesghdtreertddtjeenucfhrhhomheptehlhihs shgrucftohhsshcuoehhihesrghlhihsshgrrdhisheqnecuggftrfgrthhtvghrnhepfe elteejfeehvdevheetjedtjeeuudduhefgvddvieettdehieeuveeuieduffeinecuffho mhgrihhnpehgihhthhhusgdrtghomhdpghhithhlrggsrdgtohhmpdhsphgvtghtrhhumh dqohhsrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhf rhhomhephhhisegrlhihshhsrgdrihhs X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 10 Oct 2022 12:54:02 -0400 (EDT) Received: by x220.qyliss.net (Postfix, from userid 1000) id ED478CBB; Mon, 10 Oct 2022 16:54:00 +0000 (UTC) From: Alyssa Ross To: Thomas Leonard Subject: Re: Using virtio-gpu instead of virtwl In-Reply-To: References: <87o871tqqu.fsf@alyssa.is> <87bl2sp3p3.fsf@alyssa.is> <20220315140604.ta433j557jsoknkv@eve> <20220315202339.6bqrzsf4yjkggbup@eve> <20220321160534.w4oifq3cdygrobrm@eve> <20220809120046.zds6z36nh5uig3um@eve> Date: Mon, 10 Oct 2022 16:53:57 +0000 Message-ID: <87czazd3h6.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Message-ID-Hash: VKWTXG4C72523L5ZKAKWXTHLL6ENYVEX X-Message-ID-Hash: VKWTXG4C72523L5ZKAKWXTHLL6ENYVEX X-MailFrom: hi@alyssa.is 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; header-match-discuss.spectrum-os.org-2; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Puck Meerburg , 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: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Thomas Leonard writes: > On Tue, 9 Aug 2022 at 12:01, Alyssa Ross wrote: >> >> On Mon, Mar 21, 2022 at 04:05:34PM +0000, Alyssa Ross wrote: >> > On Mon, Mar 21, 2022 at 12:10:43PM +0000, Thomas Leonard wrote: >> > > I think perhaps that crosvm is compiled without the "virgl_renderer" >> > > feature (it's not in the default set), and this is causing it to cra= sh >> > > because that's also "self.default_component". I don't know how to >> > > compile crosvm with virgl enabled, though. >> > >> > It wasn't easy, but I got it to build[1]. I hope that helps. It adds >> > both virgl_renderer and virgl_renderer_next. I think virgl_renderer >> > is on by default with --gpu, and virgl_renderer_next is used with the >> > --gpu-render-server argument. Hopefully at least one of those does the >> > right thing =E2=80=94 let me know! >> > >> > [1]: https://github.com/NixOS/nixpkgs/pull/165128 >> >> Small update: Nixpkgs unstable's crosvm package is now built with the >> virgl_renderer and virgl_renderer_next features. > > I got this working eventually, but I had to apply a load of patches. > How are you getting it to run? > > My patches are here: https://gitlab.com/talex5/crosvm/-/commits/main > > In particular: > - It failed to start (when using virtio-gpu) because it doesn't have > access to /nix/store, and I haven't hit this one. I've mostly been testing with vhost-user =E2=80=94 maybe crosvm devices don't run sandboxed when run standalone for vhost-user, since running that device is the only thing the crosvm process is doing? > - It failed to send Wayland keymaps because they need to be mapped read-o= nly The vhost-user-gpu frontend implementation we wrote for cloud-hypervisor[1] will map buffers as read-only if mapping them read-write fails[2]. This is only a workaround for crosvm not setting the flags correctly in the vhost-user message, though. The real fix will be in crosvm. Also, not all Wayland compositors require keymaps to be mapped read-only. wlroots does, but Weston doesn't. I suspect Chromium doesn't either, hence the bug persisting in crosvm. [1]: https://spectrum-os.org/lists/archives/spectrum-devel/20220930210906.1= 696349-8-alyssa.ross@unikie.com/ [2]: https://spectrum-os.org/lists/archives/spectrum-devel/20b1f9da3af/s/?b= =3Dpkgs/applications/virtualization/cloud-hypervisor/0003-virtio-devices-ad= d-a-GPU-device.patch#n247 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEH9wgcxqlHM/ARR3h+dvtSFmyccAFAmNETicACgkQ+dvtSFmy ccA4LQ/7B2moB7mTbFPcXLM6AJZp6QPmaoD5mlvtrh9loSfuNBX1xisWl9Jfjb9W I4Ij/BuAs61ZbGQ100YKOdTxNaeMEDGvhnefprnMS7lfcVjDjdH5recnno95p9Sn HhKK8xb+Q9526l/2Nxjc+/ZrPvJ0hUEbzBGvZyxdbwl2TjNouGeSXHoldncRayuB n02zN/FyJ0izGrQLrSBBJESjRzBoxpN1Dk6UZNJ0iWbqB9Q/AnXaoypOIGReGqdn MBinF0xVFYei+4zfnJ3fj756M7ztV8dXWigQp9SIMLqTgcpMCKi9fkpWArThFMmp hyTMZyJD3WbgRKOxn6ZMpmVaAtH5kcfHK4yP14BoOt1KqWQJiTtI6UXk3aqGC2HD Sc5HjNSjwv8+LpERpktrxcFgQ4oggvPvU/Rn8zKohD7N28xbvbw/nRwj2S5vVj7T PM03cEhib11c5+d9L9W/gjucqMnCHfAotAUU5KiSq44TE6rv3khMLi6mAqYLCuZx swYZ0PicTEG9DIAgHSMKRCfTF3Zc7CzERfDmzpYToM4iFEg5bxEH4TFP3nXaL529 LWP05M/7MHTz7GnZQGobRb++dyENBZbeTEODmf6qEjFMu7qS0rjpzyfKjUkReWBQ 0SakTCsutxtnL8TuPIaXbFUHjvZxWG3jdxo0e16VoWvYNuR1zF0= =X8Bj -----END PGP SIGNATURE----- --=-=-=--