Thomas Leonard
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 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!
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 — 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-only
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.1696349... [2]: https://spectrum-os.org/lists/archives/spectrum-devel/20b1f9da3af/s/?b=pkgs/...