iopt_pages_fill_xarray(9)
β¨ iopt_pages_fill_xarray(9) β a Kernel API Manual moment β¨
okay SO bestie, we're diving into iopt_pages_fill_xarray from the Kernel API Manual (iopt_pages_fill_xarray(9), that's the whole page name, slay). Buckle up, it's giving kernel-internals realness π
πΈ NAME πΈ
iopt_pages_fill_xarray β literally just "Read PFNs" π«Ά that's the whole vibe.
π¦ SYNOPSIS π¦
int iopt_pages_fill_xarray (struct iopt_pages *pages , unsigned long
start_index , unsigned long last_index , struct page **out_pages );
no cap, that's the exact signature, don't come for me about the line breaks π
π ARGUMENTS π
pagesβ the pages we're acting on. the main characters, honestly πstart_indexβ the first page index in the range. where the party starts πlast_indexβ the last page index in the range. where it ends, periodt.out_pagesβ the output array that the pages get returned in. heads up: it may beNULLπ (yes, really, that's allowed)
π DESCRIPTION π
So what does this actually do? It populates the xarray and returns the pages in out_pages. Simple enough, right?
But here's the tea β β as the slow path, this one is able to copy pages from other storage tiers into the xarray. like, it'll go fetch them from elsewhere if it has to. highkey dedicated π₯
β οΈ Important caveat bestie: on failure the xarray is left unchanged. So if it doesn't work out, nothing gets messed up. no messy breakups, we keep it clean πβ¨
And for context, this is part of the SW iommu interface to read pages for in-kernel use. iykyk π§
π SEE ALSO π
Kernel file ./drivers/iommu/iommufd/pages.c β and also go check out these iconic functions, they're all in the same friend group:
iopt_area_unmap_domain(9)iopt_area_unfill_domain(9)iopt_area_fill_domain(9)iopt_area_fill_domains(9)iopt_area_unfill_domains(9)iopt_pages_unfill_xarray(9)iopt_pages_fill_from_xarray(9)iopt_pages_rw_access(9)iopt_area_add_access(9)iopt_area_remove_access(9)
and that's the whole page, bestie, go read some PFNs π
source: ./drivers/iommu/iommufd Β· dated October 2026 Β· iopt_pages_fill_xarray(9) β mwah, thanks for reading, ily, bye! ππ¦β¨
π¦ 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