VFIO_SET_IOMMU(9)
π VFIO_SET_IOMMU π
okay so hi bestie, you're reading a page from the Kernel API Manual β section 9, the ioctl one β and this is literally the whole vibe: VFIO_SET_IOMMU. pull up a chair π«Ά
β¨ NAME β¨
VFIO_SET_IOMMU β and in case you were wondering what it actually is under the hood, it's _IOW(VFIO_TYPE, VFIO_BASE + 2, __s32). yes, that's the ioctl signature, write it down π
π¦ SYNOPSIS π¦
VFIO_SET_IOMMU
that's it. that's the whole thing. no arguments in the synopsis, no cap π
πΈ DESCRIPTION πΈ
okay so what does it do? it sets the iommu to the given type β simple as that, main character energy β¨
but here's the catch, bestie: that type must be supported by an iommu driver. and how do you know if it is? you verify it by calling CHECK_EXTENSION using the same type. like, matching types, iykyk π
also important β a group must be set to this file descriptor before this ioctl is available. so if you haven't set a group yet, this thing is justβ¦ not available to you. sorry babe π
and the IOMMU interfaces that get enabled by this call? those are specific to the value you set. so like, different type in, different interfaces out. it's giving "you get what you pick" π
β RETURN β
0on success β slay π-errnoon failure β not slay π
Availability: when VFIO group attached π
π SEE ALSO π
the kernel file to go look at:
./include/uapi/linux/vfio.h
and the whole friend group of related pages, fr fr:
VFIO_GET_API_VERSION(9)VFIO_CHECK_EXTENSION(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_DEVICE_GET_GFX_DMABUF(9)VFIO_IOMMU_SPAPR_UNREGISTER_MEMORY(9)
lowkey a heads up bestie: this is kernel API territory β no guessing at behaviour, no vibe-based assumptions. verify your types with CHECK_EXTENSION and make sure your group is attached first. periodt π
π that's the whole page! sources say it lives under ./include/uapi/linux and it's dated October 2026 β go off, you're gonna do amazing π«Άπ
π¦ 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