-
Notifications
You must be signed in to change notification settings - Fork 155
Description
(From #560 (review))
As we're going for the ability to eventually configure which capsets Rutabaga would be configured with, I was shocked to discover that…
libkrun/src/devices/src/virtio/gpu/device.rs
Lines 162 to 166 in 757b080
| let config = virtio_gpu_config { | |
| events_read: 0, | |
| events_clear: 0, | |
| num_scanouts: self.displays.len() as u32, | |
| num_capsets: 5, |
num_capsets in the MMIO-readable config is hardcoded to 5 and has been ever since rutabaga was imported into libkrun!
And this is what Linux uses to determine how many capsets to query. If we have fewer capsets, it all blows up.
[ 0.119895] [drm] cap set 0: id 6, max-version 0, max-size 592
[ 0.119946] [drm] cap set 1: id 5, max-version 0, max-size 16
[ 0.119992] [drm:virtio_gpu_dequeue_ctrl_func] *ERROR* response 0x1200 (command 0x108)
[ 5.129781] [drm:virtio_gpu_get_capsets] *ERROR* timed out waiting for cap set 2
[ 5.130347] [drm] Initialized virtio_gpu 0.1.0 for a005000.virtio_mmio on minor 0
[2026-02-27T03:41:29Z WARN rutabaga_gfx::rutabaga_core] CapSets [RutabagaCapsetInfo { capset_id: 6, component: VirglRenderer, name: "drm" }, RutabagaCapsetInfo { capset_id: 5, component: CrossDomain, name: "cross-domain" }]
[2026-02-27T03:41:29Z WARN rutabaga_gfx::rutabaga_core] get_capset_info 0
[2026-02-27T03:41:29Z WARN rutabaga_gfx::virgl_renderer] virgl_renderer_get_cap_set..
[2026-02-27T03:41:29Z INFO rutabaga_gfx::virgl_renderer] drm: drm_renderer_capset:135: c=(nil)
[2026-02-27T03:41:29Z WARN rutabaga_gfx::virgl_renderer] virgl_renderer_get_cap_set: 0 592
[2026-02-27T03:41:29Z WARN rutabaga_gfx::rutabaga_core] get_capset_info 0: 0 592
[2026-02-27T03:41:29Z WARN rutabaga_gfx::rutabaga_core] get_capset_info 1
[2026-02-27T03:41:29Z WARN rutabaga_gfx::cross_domain] CroDo get_capset_info
[2026-02-27T03:41:29Z WARN rutabaga_gfx::rutabaga_core] get_capset_info 1: 0 16
[2026-02-27T03:41:29Z WARN rutabaga_gfx::rutabaga_core] get_capset_info 2
…with all the control via flags i.e. muvm disabling legacy virgl etc. we never had fewer than 5 virtio-gpu caps?!?! 😮
This seems somewhat tricky to fix since Rutabaga is located in the worker thread, and this config area is served via the synchronous read_config in the.. main thread? It shooould be fine to use a sync oneshot channel right?