On Thu, 14 Apr 2022 at 13:57, Alyssa Ross email@example.com wrote:
On Wed, Apr 13, 2022 at 05:12:13PM +0000, Thomas Leonard wrote:
On Wed, 6 Apr 2022 at 12:19, Thomas Leonard firstname.lastname@example.org 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:
Though I'm not sure it's an improvement: +1,819 −577 lines!
Instructions for configuring crosvm to use it:
And I wrote up my guesses about the protocol here:
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, 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)!