Re: Using virtio-gpu instead of virtwl

Thomas Leonard
2022-04-19T11:58:35Z

On Thu, 14 Apr 2022 at 13:57, Alyssa Ross <hi@alyssa.is> wrote:
>
> On Wed, Apr 13, 2022 at 05:12:13PM +0000, Thomas Leonard wrote:
> > On Wed, 6 Apr 2022 at 12:19, Thomas Leonard <talex5@gmail.com> wrote:
> > [ converting from virtwl to virtio-gpu ]
> > > I tried, but failed, to figure out the protocol. I did manage to get 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 −577 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-spec.md
>
> That's extremely helpful, thanks for writing it up!
>
> > I don't think it's possible to avoid races completely, but it seems to
> > be working reasonably well so far.
>
> I wonder if it would be worth asking about the remaining problems on the
> relevant kernel mailing lists, since they sound like protocol issues
> rather than anything specific to your implementation.

The kernel isn't involved in any of the problems - it just relays
opaque messages between the host and the guest. So probably
crosvm/sommelier will sort things out by themselves after a while (and
I'll need to update the proxy when that happens).

> I tracked down the series where they were added[1], perhaps the
> From/To/Cc in that posting would be a good starting point?
>
> If you do reach out, please CC me (and this list, if you want)!
>
> [1]: https://lore.kernel.org/dri-devel/20210921232024.817-1-gurchetansingh@chromium.org/

--
talex5 (GitHub/Twitter)