STRUCT IOMMU_VIOMMU_SELFTEST(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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" energy
  • out_data β€” the output data heading back out to user space, and plot twist: it matches in_data πŸ’–
  • out_mmap_offset β€” this one is literally the offset argument for the mmap syscall 🌈 no extra lore, that's the whole job
  • out_mmap_length β€” and this is the length argument for the mmap syscall ⭐ 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