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,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 Received: by atuin.qyliss.net (Postfix, from userid 496) id E34EC54899; Tue, 22 Mar 2022 11:17:18 +0000 (UTC) Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id BFD0A547E9; Tue, 22 Mar 2022 11:16:48 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 496) id 09533547C3; Tue, 22 Mar 2022 11:16:46 +0000 (UTC) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by atuin.qyliss.net (Postfix) with ESMTPS id 62E39547C1 for ; Tue, 22 Mar 2022 11:16:42 +0000 (UTC) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 600BF5C013F; Tue, 22 Mar 2022 07:16:41 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 22 Mar 2022 07:16:41 -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; bh=EGDRi6Rp7L3I/zHFN9Da+OouX/G2x0k2j6qLVl Jnfyc=; b=JEvZ7r7Z/WNpJWq7eqAoqg82v7ozc+yCzSt55X9NrRYit/R0mgNUdu wYDNllwlz1D8tVzNrdYnrmBnAXZ97p8iuezD4P3Vq/Wdv9lWIL2aZS6MBS7yhPDc dYfMOimiPJ6prE+gsXNHD4ZG4qUHxb42AqERD3VWM/nDipic5ljcA5S41bk3F5qJ kfmpKrivG6ufw6wat61v/4LOGg75xpsBTUv/+psnXZwHC86uKYezk1bW5kNGM90I Rf3GoVc+sfXvAZVZj3Oim5N3cLzwLx5jMdo2XyJJv8N394PONUPQHzW0vkuDMDLF WIKnbrQsJZoED/zgAty3pQCCrVngixLQ== 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=fm3; bh=EGDRi6Rp7L3I/zHFN 9Da+OouX/G2x0k2j6qLVlJnfyc=; b=iFrGrWgUB6ATG66Y24lA0xjeryLti9/xF wx8fzf+8+t6vycklw2uMe8Y/MZ/dzbwZJ2y0cqfS+I2HqDpOW543fZkQdilNCxtN EY63PldDVwLqfcf5J0C9Y03XjnESxzmAA91STH773ck4f1lKNPn0L0QXU7tISoqh sleEWhOqySbj0hX+OiEbtXtMVRLUkRWNt8rzn1swSM6JImq4h836sr2sClEK2jFy OuQpV+MTfF76xZnOPVIRLRdch9LXszFW4+6DPvYsOvmu3Veseqx12L4g6hYurj03 z07eqd48wWHz2Fh6suMO5+OQP56ub6hBWc1CbDHuUiNqrgc8zToZA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudeghedgvdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesghdtre ertddtjeenucfhrhhomheptehlhihsshgrucftohhsshcuoehhihesrghlhihsshgrrdhi sheqnecuggftrfgrthhtvghrnheptdejjeevheeufeektdfgtdejvdehveekjedugeegie ejleejteeggeevuefhhfdtnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehqhihlihhsshesvg hvvgdrqhihlhhishhsrdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 22 Mar 2022 07:16:40 -0400 (EDT) Received: by eve.qyliss.net (Postfix, from userid 1000) id 32DB689C1; Tue, 22 Mar 2022 11:16:39 +0000 (UTC) Date: Tue, 22 Mar 2022 11:16:39 +0000 From: Alyssa Ross To: Thomas Leonard Subject: Re: Using virtio-gpu instead of virtwl Message-ID: <20220322111639.pvr5gxz6zmeu5oua@eve> References: <87o871tqqu.fsf@alyssa.is> <87bl2sp3p3.fsf@alyssa.is> <20220315140604.ta433j557jsoknkv@eve> <20220315202339.6bqrzsf4yjkggbup@eve> <20220321160534.w4oifq3cdygrobrm@eve> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="tou5ki7ilspuy7fp" Content-Disposition: inline In-Reply-To: Message-ID-Hash: GY62CLGSGYARSAEVPGPS6BVIBPYCVYIM X-Message-ID-Hash: GY62CLGSGYARSAEVPGPS6BVIBPYCVYIM 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: --tou5ki7ilspuy7fp Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 22, 2022 at 11:08:15AM +0000, Thomas Leonard wrote: > On Mon, 21 Mar 2022 at 16:05, Alyssa Ross wrote: > > > > On Mon, Mar 21, 2022 at 12:10:43PM +0000, Thomas Leonard wrote: > > > Looking at the Linux virtio_gpu driver, it seems that using contexts > > > requires virgl: > > > > > > static int virtio_gpu_context_init_ioctl(struct drm_device *dev, void > > > *data, struct drm_file *file) > > > { > > > ... > > > if (!vgdev->has_context_init || !vgdev->has_virgl_3d) > > > return -EINVAL; > > > > > > https://github.com/torvalds/linux/blob/f443e374ae131c168a065ea1748fea= c6b2e76613/drivers/gpu/drm/virtio/virtgpu_ioctl.c#L732 > > > > > > 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 crash > > > 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 > > Thanks, that is very helpful! > > I gave it a try, and it got a little further. But now, doing `modprobe > virtio_gpu` in the VM crashes crosvm with: > > Stack trace of thread 2: > #0 0x00007fa5fd0915f6 abort (libc.so.6 + 0x265f6) > #1 0x00007fa5fcfc6bfd get_dlopen_handle.part.0 (libepoxy.so.0 + 0xc7bfd) > #2 0x00007fa5fcfc7366 epoxy_egl_dlsym (libepoxy.so.0 + 0xc8366) > #3 0x00007fa5fcfbf870 egl_single_resolver (libepoxy.so.0 + 0xc0870) > #4 0x00007fa5fcfc1d2f epoxy_eglQueryString_global_rewrite_ptr > (libepoxy.so.0 + 0xc2d2f) > #5 0x0000561703e72ca1 virgl_egl_init (crosvm + 0x3deca1) > #6 0x0000561703e72221 vrend_winsys_init (crosvm + 0x3de221) > #7 0x0000561703e380dc virgl_renderer_init (crosvm + 0x3a40dc) > #8 0x0000561703e35e44 > _ZN12rutabaga_gfx14virgl_renderer13VirglRenderer4init17h96573d71589e47fcE > (crosvm + 0x3a1e44) > #9 0x0000561703e23124 > _ZN12rutabaga_gfx13rutabaga_core15RutabagaBuilder5build17h694f3c234f8787f= fE > (crosvm + 0x38f124) > #10 0x0000561703cdfb0f > _ZN7devices6virtio3gpu10virtio_gpu9VirtioGpu3new17h43dded1b3497b0f1E > (crosvm + 0x24bb0f) > #11 0x0000561703d0feb2 > _ZN7devices6virtio3gpu5build17hc6e82daf2d41f5feE (crosvm + 0x27beb2) > #12 0x0000561703cbee32 > _ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17h8f078e46fd2= 5a72dE > (crosvm + 0x22ae32) > #13 0x0000561703cf5e0d > _ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h= 5605b62669a02b38E > (crosvm + 0x261e0d) > #14 0x0000561703ee8b43 > _ZN3std3sys4unix6thread6Thread3new12thread_start17h3f45e1fefa031d31E > (crosvm + 0x454b43) > #15 0x00007fa5fceb6d40 start_thread (libpthread.so.0 + 0x8d40) > #16 0x00007fa5fd16703f __clone (libc.so.6 + 0xfc03f) > > Stack trace of thread 1: > #0 0x00007fa5fd1684b2 recvfrom (libc.so.6 + 0xfd4b2) > #1 0x0000561703ec7b0c > _ZN8sys_util3net13UnixSeqpacket20recv_as_vec_with_fds17hcc9cb638a4fdbca9E > (crosvm + 0x433b0c) > #2 0x0000561703b85b87 _ZN4base4tube4Tube4recv17hd85339bce7434d11E > (crosvm + 0xf1b87) > #3 0x0000561703b90395 > _ZN7devices5proxy10child_proc17hde9579314b1fc020E (crosvm + 0xfc395) > #4 0x0000000103001400 n/a (n/a + 0x0) > > It looks like it should be printing a message to stderr before calling > abort, but I don't see it > (https://github.com/anholt/libepoxy/blob/1.5.9/src/dispatch_common.c#L315= ). Did you try --disable-sandbox, like I suggested in my other mail? The sandbox blocks writing error messages, and is something I frequently trip over when trying to use crosvm. --tou5ki7ilspuy7fp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEH9wgcxqlHM/ARR3h+dvtSFmyccAFAmI5sBUACgkQ+dvtSFmy ccDIiQ//blzqPfoYXcqBVZFm3QtfpGek2HvH65aqjDxZyZTiplgShqAa2Cb8Dc9I W4/QoK51gUA3N3/4L3b1NNKHhn07voqrUnKRABFkbUmI4kcq/UMIa6fMIVR0eCre IuG1RNWNThsGGa2xgzA8+GKXfAxl6hSRbeTgoHBVbnEbZJavKWUSyFDHzz57SAD+ 7lP4mG5CMcZ73/fMCtOM7aLniIRdJADDQf0Fuyket3jSMQWtrsPEDCCI7NElXsZI b+3hsCGKUyqb1FSVWB8nhdpn67AB0ApVUtbFAxA61ohgZfTRqtksN6P8/pvG7g0A 26AQEvcu6uYrIXc5EJiu8jTe27pXvCJD6Qipkj62jhq8LvGL6ShD16kWwWqyIsio /B127VrRbqQ3SG8HORdpFQKfS4pRmKG+nh4koJXxWYRl9lvavxxVvxafb2aOdDbZ gU63/BTyjbCGpskaCVv3GwbJjC1Vnfv/TPVCuOJeD+WGYe+XAGsldQCu24dGfp99 FOjP/aZGVhjICMxnVtnr0tao5c55tJfacPJSDlMZfGpjoG/aBNxycSI1fjTai95x lAntBwZRR8kG0cK0SP5p7d5dJaP3HtQK9K1vbm9i6WXwBLTNQOZBtf323medxwbh QbUyAM5ayslNVrE7m5ChqEp1gHpSoP2EFVGNVuoaPnH/G6K9xs4= =HVGs -----END PGP SIGNATURE----- --tou5ki7ilspuy7fp--