iopt_area_add_access(9)
π iopt_area_add_access(9) π
Okay bestie, welcome to the Kernel API Manual, section 9 β no cap, this is the real one. Today's main character is iopt_area_add_access, and she's here to record an in-kernel access for PFNs. The original page says "in-knerel" and honestly? iconic typo, we stan, but it means in-kernel. π«Ά
β¨ SYNOPSIS β¨
int iopt_area_add_access (struct iopt_area *area , unsigned long
start_index , unsigned long last_index , struct page **out_pages ,
unsigned int flags , bool lock_area );
Like, that's the whole signature, copy-pasted exactly, no edits, periodt. π
πΈ ARGUMENTS πΈ
areaβ the source of the PFNs. She's where the pages come from, the main character of the supply chain. πstart_indexβ first page index. Where the party starts. πlast_indexβ inclusive last page index. Yes bestie, inclusive β she's invited too. πout_pagesβ output list ofstruct page's representing the PFNs. You hand her a spot and she fills it in for you. β¨flagsβ theIOMMUFD_ACCESS_RW_*flags. Flags gonna flag. π©lock_areaβ fail userspacemunmapon this area. Basically a "do not disturb" sign on the door. π
π¦ DESCRIPTION π¦
So what she actually does: she records that an in-kernel access is gonna be accessing those pages, makes sure they are pinned, and then returns the PFNs as a simple list of 'struct page *'. Lowkey elegant, highkey essential. π
π Real talk though: this should be undone through a matching call to iopt_area_remove_access. Don't leave her hanging β always pair your access, bestie. Not me stressing about unbalanced calls at 3am. π
π SEE ALSO π
The kernel file lives at ./drivers/iommu/iommufd/pages.c β go read her, she's giving lore. π
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_fill_xarray(9)iopt_pages_rw_access(9)iopt_area_remove_access(9)
π slay, that's the whole page π
Shoutout to the source, ./drivers/iommu/iommufd, and to October 2026 for the date β bookmarking it, gonna be iconic. ππ¦β
π¦ 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