STRUCT IO_PGTABLE_OPS(9)
π struct io_pgtable_ops(9) β Kernel API Manual
okay bestie, so this is struct io_pgtable_ops, and it's literally the page table manipulation API for IOMMU drivers. that's the whole vibe. π
β¨ NAME β¨
struct io_pgtable_ops β the page table manipulation API for IOMMU drivers. no cap, that's what it is. π¦
πΈ SYNOPSIS πΈ
struct io_pgtable_ops {
int (*map_pages)(struct io_pgtable_ops *ops, unsigned long iova,
phys_addr_t paddr, size_t pgsize, size_t pgcount, int prot, gfp_t gfp,
size_t *mapped);
size_t (*unmap_pages)(struct io_pgtable_ops *ops, unsigned long
iova, size_t pgsize, size_t pgcount, struct iommu_iotlb_gather *gather);
phys_addr_t (*iova_to_phys)(struct io_pgtable_ops *ops, unsigned
long iova);
int (*pgtable_walk)(struct io_pgtable_ops *ops, unsigned long iova,
void *wd);
int (*read_and_clear_dirty)(struct io_pgtable_ops *ops, unsigned
long iova, size_t size, unsigned long flags, struct iommu_dirty_bitmap
*dirty);
};
like, look at all those function pointers. she's got range. π
π Members π
map_pagesβ maps a physically contiguous range of pages that are all the same size. iconic behaviour honestly. β¨unmap_pagesβ unmaps a range of virtually contiguous pages that are all the same size. the reverse slay. π¦iova_to_physβ translates aniovainto a physical address. the little matchmaker between virtual and physical, iykyk. πpgtable_walkβ (optional) performs a page table walk for a giveniova. optional means you don't have to, but if you doβ¦ main character energy. πread_and_clear_dirtyβ records dirty info per IOVA. if an IOVA is dirty, it clears its dirty state from the PTE β unless theIOMMU_DIRTY_NO_CLEARflag is passed in. read the flag, bestie, or the dirty bit stays. π
π Description π
these functions map directly onto the iommu_ops member functions with the same names. same names, same energy, no middleman drama. periodt. π«Ά
π SEE ALSO π
- kernel file
./include/linux/io-pgtable.h struct iommu_flush_ops(9)struct io_pgtable_cfg(9)struct arm_lpae_io_pgtable_walk_data(9)alloc_io_pgtable_ops(9)free_io_pgtable_ops(9)struct io_pgtable(9)enum io_pgtable_caps(9)struct io_pgtable_init_fns(9)
go read them all, I'll wait. π
and that's the page!! π this little gem lives in ./include/linux, dropping with the October 2026 energy, so likeβ¦ cite me accordingly bestie. 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