iopt_pages_fill_xarray(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 be NULL πŸ™ˆ (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:


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