dat_entry_walk(9)
β¨ dat_entry_walk(9) β¨
okay so bestie, welcome to dat_entry_walk β it's a real one from the Kernel API Manual, and it's basically the girl whose whole job is walking the gmap page tables π like she literally strolls through them. no cap. let's get into it π«Ά
πΈ NAME πΈ
dat_entry_walk β walk the gmap page tables. that's it, that's the vibe π
π¦ SYNOPSIS π¦
int dat_entry_walk (struct kvm_s390_mmu_cache *mc , gfn_t gfn , union
asce asce , int flags , int walk_level , union crste **last , union pte
**ptepp );
π ARGUMENTS π
mcβ the cache she uses to allocate dat tables, if needed. and like, you can literally passNULLhere if neitherDAT_WALK_SPLITnorDAT_WALK_ALLOCis specified inflags. so she doesn't even need it, she's flexible like that β¨gfnβ the guest frame. yeah. that one.asceβ the ASCE of the address space πflagsβ the flags, from theWALK_*macros. there's a whole lineup of them below, keep reading πwalk_levelβ the level to walk to, using theLEVEL_*macros.lastβ gets filled with the last visited non-pte DAT entry πpteppβ gets filled with the last visited pte entry, if there even is one β otherwise it'sNULL. not every walk finds a pte, and that's okay π
π DESCRIPTION π
so what does she actually do? she returns a table entry pointer for the given guest address and walk_level. that's the whole main character energy of this function, fr fr π
and the flags? each one has a meaning, so let's go through them one by one, no skipping, i would never π€
DAT_WALK_IGN_HOLES: consider holes as normal table entries. holes are just entries to her, she doesn't judge π³οΈβ¨DAT_WALK_ALLOC: allocate new tables to reach the requested level, if needed.DAT_WALK_SPLIT: split existing large pages to reach the requested level, if needed. she will absolutely break up a large page if that's what it takes πDAT_WALK_LEAF: return successfully whenever a large page is encountered. like, found a big one? we're done here, slay.DAT_WALK_ANY: return successfully even if the requested level could not be reached. she's forgiving. she's chill. lowkey iconic.DAT_WALK_CONTINUE: walk to the requested level with the specified flags, and then try to continue walking to ptes with onlyDAT_WALK_ANY. two-step queen behavior πDAT_WALK_USES_SKEYS: storage keys are in use. noted. logged. tracked. π
π CONTEXT π
this one's important bestie, don't skip it: called with kvm->mmu_lock held. like, that's the rule. that's the whole rule. don't be out here calling her without the lock, that's not the move π
π RETURN π
okay so she can come back with a bunch of different things depending on what went down, and you need to know which is which:
PGM_ADDRESSINGif the requested address lies outside memory.- a PIC number if the requested address lies in a memory hole of type
_DAT_TOKEN_PIC. -EFAULTif the requested address lies inside a memory hole of a different type.-EINVALif the given ASCE is not compatible with the requested level. mismatch arc π-EFBIGif the requested level could not be reached because a larger frame was found.-ENOENTif the requested level could not be reached for other reasons.-ENOMEMif running out of memory while allocating or splitting a table. the classic π
π₯ SEE ALSO π₯
Kernel file ./arch/s390/kvm/gmap/dat.c dat_crstep_xchg_atomic(9), _dat_walk_gfn_range(9), dat_test_age_gfn(9), dat_perform_essa(9), dat_set_cmma_bits(9)
they're all in the group chat together, go say hi π«Ά
okay and that's the whole page!! this one lives over in ./arch/s390/kvm/gmap, and it's dated October 2026 β so like, mark your calendars bestie ππβ¨ slay, 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