STRUCT IOMMU_VIOMMU_SELFTEST(9)
β¨ struct iommu_viommu_selftest β¨
okay bestie, buckle up π this is a page straight out of the Kernel API Manual, and it's about struct iommu_viommu_selftest β literally the vIOMMU data for the Mock driver, and the type tag for it is IOMMU_VIOMMU_TYPE_SELFTEST π
πΈ NAME πΈ
struct iommu_viommu_selftest β the vIOMMU data for the Mock driver, specifically for IOMMU_VIOMMU_TYPE_SELFTEST π¦ (yes that's the whole vibe, she's a test struct and she knows it)
β SYNOPSIS β
here's the shape of her, no cap, exactly like this:
struct iommu_viommu_selftest {
__u32 in_data;
__u32 out_data;
__aligned_u64 out_mmap_offset;
__aligned_u64 out_mmap_length;
};
(that little stray space before the closing brace? iconic. we keep it. π )
π Members π
okay so the glow-up tour of every single field, one by one, because we do NOT skip members in this house:
in_dataβ the input random data, coming at us from user space π«Ά it's giving "surprise me" energyout_dataβ the output data heading back out to user space, and plot twist: it matchesin_dataπout_mmap_offsetβ this one is literally theoffsetargument for themmapsyscall π no extra lore, that's the whole jobout_mmap_lengthβ and this is thelengthargument for themmapsyscall β same deal, she's just the argument
π¦ Description π¦
okay so the actual behaviour is so simple it's almost funny: it just sets out_data=in_data and calls it a loopback test ππ₯ what you put in is what you get out. that's it. that's the whole test. she ate and left zero crumbs π
π SEE ALSO π
go read the source, bestie, it's right here β kernel file ./drivers/iommu/iommufd/iommufd_test.h πΈ and while you're at it, these three are her besties:
struct iommu_hwpt_selftest(9)struct iommu_hwpt_invalidate_selftest(9)struct iommu_viommu_invalidate_selftest(9)
lowkey a reminder: this lives under ./drivers/iommu/iommufd and she's stamped October 2026 β
and that's the page, bestie π mwah π β this has been struct iommu...mmu_selftest(9) from the Kernel API Manual, source ./drivers/iommu/iommufd, dated October 2026. go forth and loopback test responsibly π§π
π¦ 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