STRUCT IO_PGTABLE_CFG(9)
π NAME π
okay so this is struct io_pgtable_cfg(9) from the Kernel API Manual, and it's literally the configuration data for a set of page tables. That's the whole vibe: one struct holding all the page-table knobs, bestie. π«Ά
β¨ SYNOPSIS β¨
struct io_pgtable_cfg {
#define IO_PGTABLE_QUIRK_ARM_NS BIT(0);
#define IO_PGTABLE_QUIRK_NO_PERMS BIT(1);
#define IO_PGTABLE_QUIRK_ARM_MTK_EXT BIT(3);
#define IO_PGTABLE_QUIRK_ARM_MTK_TTBR_EXT BIT(4);
#define IO_PGTABLE_QUIRK_ARM_TTBR1 BIT(5);
#define IO_PGTABLE_QUIRK_ARM_OUTER_WBWA BIT(6);
#define IO_PGTABLE_QUIRK_ARM_HD BIT(7);
#define IO_PGTABLE_QUIRK_ARM_S2FWB BIT(8);
#define IO_PGTABLE_QUIRK_NO_WARN BIT(9);
unsigned long quirks;
unsigned long pgsize_bitmap;
unsigned int ias;
unsigned int oas;
bool coherent_walk;
const struct iommu_flush_ops *tlb;
struct device *iommu_dev;
void *(*alloc)(void *cookie, size_t size, gfp_t gfp);
void (*free)(void *cookie, void *pages, size_t size);
};
π Members π
Bestie, here's the field-by-field tea β β every member, no skipping:
quirksβ a bitmap of hardware quirks that require some special action by the low-level page table allocator. β¨pgsize_bitmapβ a bitmap of page sizes supported by this set of page tables. π¦iasβ input address (iova) size, in bits.oasβ output address (paddr) size, in bits.coherent_walkβ a flag to indicate whether or not page table walks made by the IOMMU are coherent with the CPU caches.tlbβ TLB management callbacks for this set of tables.iommu_devβ the device representing the DMA configuration for the page table walker.allocβ custom page allocator. This is an optional hook used to allocate page tables. If this function isNULL,freemust beNULLtoo. π
Memory returned should be zeroed and suitable for dma_map_single and virt_to_phys.
Not all formats support custom page allocators. Before considering passing a non-NULL value, make sure the chosen page format supports this feature.
freeβ custom page de-allocator. This is an optional hook used to free page tables allocated with theallochook. It must be non-NULLifallocis notNULL, and it must beNULLotherwise. π₯
π SEE ALSO π
- Kernel file
./include/linux/io-pgtable.h struct iommu_flush_ops(9)struct arm_lpae_io_pgtable_walk_data(9)struct io_pgtable_ops(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)
source/version: ./include/linux Β· date: October 2026 Β· page: struct io_pgtable_cfg(9) β mwah, bestie, go configure those page tables 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