scrotwmos
VMM-GFX(8) System Manager's Manual VMM-GFX(8)

vmm-gfx — run one virtual machine's GPU commands on the host GPU

vmm-gfx -G nctx -R fd [-F fd [-S | -I fd]] -n name

vmm-gfx -G venus -R fd -n name

vmm-gfx runs the GPU commands of one virtual machine on a GPU render node, with virglrenderer. The root monitor starts one vmm-gfx for each VM whose GPU path is nctx, before it starts that VM's swm-vmm(8). It passes every socket to vmm-gfx as an open descriptor. In the gfx VM, the guest's first process starts the venus build of vmm-gfx once for each client VM. Nobody runs it by hand.

There are two builds. The dom0 build serves native context, -G nctx, on an Intel GPU through i915. It refuses a GPU that has memory of its own. The gfx VM build serves Venus, -G venus, with Mesa's anv driver linked in, on the slot's virtio-gpu render node. It takes no -F, -S, or -I.

The options are as follows:

fd
The frame channel to the compositor, a connected SOCK_SEQPACKET socket that takes no descriptor and is not the socket of -R. The compositor asks for a guest buffer by its resource id and gets its dma-buf back. A bad message or a hang-up closes this channel alone; vmm-gfx still serves the VMM. Without -F, it serves the VMM alone.
nctx |
The GPU path, which must be the one the build serves.
fd
The screen VM's vmm-gfx: the import channel from swm-wl(1), a connected SOCK_SEQPACKET socket that takes descriptors and is neither the socket of -R nor of -F. Needs -G nctx and -F, and takes no -S. This vmm-gfx keeps one capability, CAP_SYS_NICE, to set its GPU context's priority.
name
The session's name, for the log. It must be a valid session name.
fd
The socket to the VMM, a connected SOCK_SEQPACKET socket that takes no descriptor.
A gfx VM slot's vmm-gfx: the frame channel of -F goes to the gfx VM's VMM, which maps blobs through it; the compositor does not export through it. Needs -F.

Every fd must be 3 or more.

vmm-gfx never sees guest memory: it gets ids, sizes, and command bytes the VMM copied. It checks each message from the VMM and runs it to its end before it reads the next. A message that fails the check, or names an id that was never made, ends vmm-gfx.

Its root holds only the one render node and a read-only subset of sysfs. vmm-gfx refuses a root with no render node or with more than one. vmm-gfx runs under a uid of its own for each slot, with no capabilities but the one of -I, no environment, its own mount, IPC, UTS, cgroup, and network namespaces, and no core dumps. Its cgroup's memory limit is the guest's memory and the GPU region the guest maps. Past it, the kernel kills the whole process. It has no swap. After the VMM's first message, the hello, and before it answers, it installs a seccomp filter on every thread. A refused system call kills the whole process.

vmm-gfx is started with an empty environment, so no Mesa or virglrenderer variable reaches it. The gfx VM build sets anv_external_memory_implicit_sync to “true” for anv itself before it starts Venus.

/dev/dri/renderD*
the one render node in its root

0
The VMM hung up.
1
A bad argument, a setup that failed, a read or poll of the VMM that failed, or a VMM that broke the protocol.

vmm-gfx logs to the standard error, each line starting with “vmm-gfx name:”. Before that, it logs a refused argument after “vmm-gfx:”. When it ends, it logs the reason and the counts of its messages.

swm-wl(1), scrotwmos.conf(5), scrotwmd(8), swm-vmm(8)

Marco Peereboom <marco@peereboom.us>

November 13, 2026 Void Linux