VFIO_DEVICE_GET_GFX_DMABUF(9)
π VFIO_DEVICE_GET_GFX_DMABUF π
okay so welcome to the Kernel API Manual, section 9, and today's main character is VFIO_DEVICE_GET_GFX_DMABUF β yes bestie, the name is giving very much "I am an ioctl and I know it" β¨
π NAME π
VFIO_DEVICE_GET_GFX_DMABUF β and her whole entire personality is right there in the encoding, no cap:
_IOW(VFIO_TYPE, VFIO_BASE + 15, __u32)
that's the vibe check, that's the whole ID, she's VFIO_TYPE with VFIO_BASE + 15 energy and a __u32 payload π«Ά
π¦ SYNOPSIS π¦
VFIO_DEVICE_GET_GFX_DMABUF
literally that's it. no arguments to memorise, no flags, nothing. she's lowkey effortless and we respect it π
πΈ DESCRIPTION πΈ
okay so picture this: this ioctl returns a brand-new dma-buf file descriptor π₯ for a guest framebuffer that's already been exposed β like, out there, visible, doing its little framebuffer thing.
and which framebuffer? the one described by the dmabuf_id you hand over. that's the token, that's the receipt, that's the little "yes, that one please" π
and where does that dmabuf_id come from in the first place? it's returned by VFIO_DEVICE_QUERY_GFX_PLANE, as a token of the exposed guest framebuffer. so the flow is literally: query the plane, get the token, then come back here with it β iykyk, one hand washes the other π
no surprises here, babe. no hidden tricks. the id you got from the query is the id you feed to this call, and out pops a fresh fd for you π¦
π SEE ALSO π
go off, cross-references, we love a linked list of lore π
- kernel file
./include/uapi/linux/vfio.hβ the source of truth, the blueprint, the origin story π VFIO_GET_API_VERSION(9)VFIO_CHECK_EXTENSION(9)VFIO_SET_IOMMU(9)VFIO_GROUP_SET_CONTAINER(9)VFIO_GROUP_UNSET_CONTAINER(9)VFIO_GROUP_GET_DEVICE_FD(9)struct vfio_region_gfx_edid(9)VFIO_DEVICE_RESET(9)VFIO_IOMMU_SPAPR_UNREGISTER_MEMORY(9)
and that's the whole page, bestie π«Ά straight from ./include/uapi/linux, dated October 2026, filed under VFIO_DEVICE_GET_GFX_DMABUF(9) β periodt π
β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms