From: Thomas Leonard <talex5@gmail.com>
To: Alyssa Ross <hi@alyssa.is>
Cc: discuss@spectrum-os.org
Subject: Re: Using virtio-gpu instead of virtwl
Date: Tue, 22 Mar 2022 11:08:15 +0000 [thread overview]
Message-ID: <CAG4opy_aRBBrqLOQkjeTe_mE9XeyG=i+7+Fke+f0DHays=NiHw@mail.gmail.com> (raw)
In-Reply-To: <20220321160534.w4oifq3cdygrobrm@eve>
On Mon, 21 Mar 2022 at 16:05, Alyssa Ross <hi@alyssa.is> 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/f443e374ae131c168a065ea1748feac6b2e76613/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 — 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_core15RutabagaBuilder5build17h694f3c234f8787ffE
(crosvm + 0x38f124)
#10 0x0000561703cdfb0f
_ZN7devices6virtio3gpu10virtio_gpu9VirtioGpu3new17h43dded1b3497b0f1E
(crosvm + 0x24bb0f)
#11 0x0000561703d0feb2
_ZN7devices6virtio3gpu5build17hc6e82daf2d41f5feE (crosvm + 0x27beb2)
#12 0x0000561703cbee32
_ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17h8f078e46fd25a72dE
(crosvm + 0x22ae32)
#13 0x0000561703cf5e0d
_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h5605b62669a02b38E
(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).
I also tried with --gpu=backend=virglrenderer,egl=false, which crashes
instead with:
Stack trace of thread 2:
#0 0x0000000000000000 n/a (n/a + 0x0)
#1 0x00007fac70002b00 n/a (n/a + 0x0)
I think I'll give up on virtio_gpu for now and try again after a few months.
--
talex5 (GitHub/Twitter)
http://roscidus.com/blog/
next prev parent reply other threads:[~2022-03-22 11:09 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-05 19:27 New user getting started questions Thomas Leonard
2021-01-05 20:09 ` Michael Raskin
2021-01-06 7:04 ` Alyssa's break Alyssa Ross
2021-01-06 9:11 ` Michał "rysiek" Woźniak
2021-01-06 7:00 ` New user getting started questions Alyssa Ross
2021-01-06 15:56 ` Thomas Leonard
2021-01-07 11:38 ` Thomas Leonard
2021-01-07 15:33 ` Thomas Leonard
2021-01-14 12:29 ` Alyssa Ross
2021-01-14 12:51 ` Alyssa Ross
2021-01-20 13:04 ` Thomas Leonard
2021-01-27 17:31 ` Thomas Leonard
2021-03-07 12:52 ` Thomas Leonard
2021-03-09 16:59 ` Qubes-lite With KVM and Wayland Alyssa Ross
2021-03-10 14:19 ` Thomas Leonard
2021-03-10 22:34 ` Alyssa Ross
2021-03-09 16:25 ` New user getting started questions Alyssa Ross
2021-03-13 7:21 ` Thomas Leonard
2021-03-13 13:52 ` Alyssa Ross
2021-10-30 12:58 ` Thomas Leonard
2021-11-03 11:36 ` Alyssa Ross
2021-11-03 18:27 ` Thomas Leonard
2021-11-10 12:58 ` Alyssa Ross
2021-11-10 12:00 ` Thomas Leonard
2021-11-11 11:09 ` Alyssa Ross
2021-11-11 16:12 ` Thomas Leonard
2021-11-12 10:47 ` Alyssa Ross
2022-03-13 15:08 ` Thomas Leonard
2022-03-15 14:06 ` Alyssa Ross
2022-03-15 20:23 ` Alyssa Ross
2022-03-16 16:18 ` Using virtio-gpu instead of virtwl Thomas Leonard
2022-03-16 16:54 ` Alyssa Ross
2022-03-21 12:10 ` Thomas Leonard
2022-03-21 16:05 ` Alyssa Ross
2022-03-22 11:08 ` Thomas Leonard [this message]
2022-03-22 11:16 ` Alyssa Ross
2022-03-22 20:05 ` Thomas Leonard
2022-04-06 12:19 ` Thomas Leonard
2022-04-13 17:12 ` Thomas Leonard
2022-04-14 13:57 ` Alyssa Ross
2022-04-19 12:58 ` Thomas Leonard
2022-04-19 12:01 ` Alyssa Ross
2022-05-15 15:20 ` Thomas Leonard
2022-05-16 11:55 ` Alyssa Ross
2022-05-18 9:55 ` Thomas Leonard
2022-06-05 16:29 ` Thomas Leonard
2022-08-09 12:00 ` Alyssa Ross
2022-10-10 15:16 ` Thomas Leonard
2022-10-10 16:53 ` Alyssa Ross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAG4opy_aRBBrqLOQkjeTe_mE9XeyG=i+7+Fke+f0DHays=NiHw@mail.gmail.com' \
--to=talex5@gmail.com \
--cc=discuss@spectrum-os.org \
--cc=hi@alyssa.is \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).