iommufd_viom..._hwpt_nested(9)
π iommufd_viom..._hwpt_nested(9) β the kernel API manual, but make it make sense
okay so bestie, welcome to the iommufd_viom..._hwpt_nested(9) page β¨ (yes the title got truncated, the kernel is dramatic like that π). This is the Kernel API Manual era of your life now, and honestly? You're gonna slay it.
β¨ NAME β¨
iommufd_viommu_alloc_hwpt_nested β get a hwpt_nested for a vIOMMU π
Like, that's the whole vibe. You got a virtual IOMMU, you want a nested hardware pagetable for it, this is the function. Periodt.
πΈ SYNOPSIS πΈ
struct iommufd_hwpt_nested * iommufd_viommu_alloc_hwpt_nested (struct
iommufd_viommu *viommu , u32 flags , const struct iommu_user_data
*user_data );
Copy it exactly, don't retype it from memory, I'm begging you π β return type is struct iommufd_hwpt_nested *, and it takes three args, in that order: a struct iommufd_viommu *viommu, a u32 flags, and a const struct iommu_user_data *user_data. No cap.
π¦ ARGUMENTS π¦
viommuβ the vIOMMU ojbect to associate thehwpt_nested/domain with π«Ά (the original page really does spell it "ojbect" and honestly? iconic. we keep it. it's part of the lore.)flagsβ flags, straight from userspace π«user_dataβ theuser_datapointer. Must be valid. π¨ Not "probably valid", not "valid-ish", valid. Do not come in here with a garbage pointer, that's not the main character energy we're going for π
π₯ DESCRIPTION π₯
So what does it actually do? It allocates a brand new IOMMU_DOMAIN_NESTED for a vIOMMU π and hands it back to you as a NESTED hw_pagetable. That's it, that's the function. Allocate, nest, return, slay. π
π SEE ALSO π
- Kernel file
./drivers/iommu/iommufd/hw_pagetable.cβ go read it, that's where the actual sauce lives π iommufd_hwpt_paging_alloc(9)β the paging sibling π§iommufd_hwpt_nested_alloc(9)β the nested sibling β
Lowkey a flex: this page lives at ./drivers/iommu/iommufd, dated October 2026, in the Kernel API Manual. Bestie, in the Linux kernel, in the future. Obsessed. π¦π
okay bye, go allocate your nested hwpt responsibly, mwah π
π¦ 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