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