| VMM-GFX(8) | System Manager's Manual | VMM-GFX(8) |
NAME
vmm-gfx — run one
virtual machine's GPU commands on the host GPU
SYNOPSIS
vmm-gfx |
-G nctx
-R fd
[-F fd
[-S | -I
fd]] -n
name |
vmm-gfx |
-G venus
-R fd
-n name |
DESCRIPTION
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:
-Ffd- The frame channel to the compositor, a connected
SOCK_SEQPACKETsocket 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-gfxstill serves the VMM. Without-F, it serves the VMM alone. -Gnctx|venus- The GPU path, which must be the one the build serves.
-Ifd- The screen VM's
vmm-gfx: the import channel from swm-wl(1), a connectedSOCK_SEQPACKETsocket that takes descriptors and is neither the socket of-Rnor of-F. Needs-Gnctxand-F, and takes no-S. Thisvmm-gfxkeeps one capability,CAP_SYS_NICE, to set its GPU context's priority. -nname- The session's name, for the log. It must be a valid session name.
-Rfd- The socket to the VMM, a connected
SOCK_SEQPACKETsocket that takes no descriptor. -S- A gfx VM slot's
vmm-gfx: the frame channel of-Fgoes 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.
Isolation
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.
ENVIRONMENT
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.
FILES
- /dev/dri/renderD*
- the one render node in its root
EXIT STATUS
- 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.
DIAGNOSTICS
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.
SEE ALSO
AUTHORS
Marco Peereboom <marco@peereboom.us>
| November 13, 2026 | Void Linux |