Skip to content

krun: require render server only when requested - #2152

Open
jakogut wants to merge 1 commit into
containers:mainfrom
jakogut:optional-render-server
Open

krun: require render server only when requested#2152
jakogut wants to merge 1 commit into
containers:mainfrom
jakogut:optional-render-server

Conversation

@jakogut

@jakogut jakogut commented Jul 30, 2026

Copy link
Copy Markdown

The GPU gate currently rejects every non-zero gpu_flags value unless /usr/libexec/virgl_render_server exists in the container filesystem. That requirement dates from the original fixed GPU mask, which enabled the Venus render-server path, but gpu_flags is now caller-controlled.

VIRGLRENDERER_RENDER_SERVER is bit 9 and explicitly moves rendering to the helper process. Native contexts instead use VIRGLRENDERER_DRM at bit 10: guest Mesa submits through virtio-gpu while the host-loaded libkrun and libvirglrenderer handle the DRM backend, so no render-server executable is spawned. For example, the native-context mask 1411 (0x583) sets DRM but not RENDER_SERVER and enumerates RADV successfully with the guest virglrenderer package absent.

Only check for virgl_render_server when the corresponding flag is set. Keep /dev/dri mandatory for every GPU configuration and preserve the existing failure when render-server mode is explicitly requested. Update the krun documentation to describe the conditional requirement.

@giuseppe

Copy link
Copy Markdown
Member

@slp PTAL

@giuseppe

Copy link
Copy Markdown
Member

could you please generate crun.1 as well, and commit it?

(I know generated files are not nice in git, but it avoids us a dependency in the CI)

The GPU gate currently rejects every non-zero gpu_flags value unless
/usr/libexec/virgl_render_server exists in the container filesystem. That
requirement dates from the original fixed GPU mask, which enabled the
Venus render-server path, but gpu_flags is now caller-controlled.

VIRGL_RENDERER_RENDER_SERVER is bit 9 and explicitly moves rendering to
the helper process. Native contexts instead use VIRGL_RENDERER_DRM at
bit 10: guest Mesa submits through virtio-gpu while the host-loaded
libkrun and libvirglrenderer handle the DRM backend, so no render-server
executable is spawned. For example, the native-context mask 1411 (0x583)
sets DRM but not RENDER_SERVER and enumerates RADV successfully with the
guest virglrenderer package absent.

Only check for virgl_render_server when the corresponding flag is set.
Keep /dev/dri mandatory for every GPU configuration and preserve the
existing failure when render-server mode is explicitly requested. Update
the krun documentation to describe the conditional requirement.

Signed-off-by: Joseph Kogut <joseph@anodize.com>
@jakogut
jakogut force-pushed the optional-render-server branch from ae22fd8 to 47b1841 Compare July 31, 2026 16:40
@jakogut

jakogut commented Jul 31, 2026

Copy link
Copy Markdown
Author

Thanks for taking a look, @giuseppe. I've amended this commit with the regenerated man page. If you would prefer, I can split it out, just let me know.

@giuseppe

Copy link
Copy Markdown
Member

it is good, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants