dat_crstep_xchg_atomic(9)
π dat_crstep_xchg_atomic(9) β the Kernel API Manual page bestie π
okay so this is a page from the Kernel API Manual, and the star of the show is dat_crstep_xchg_atomic β say it with me, it's a mouthful, but she's iconic for it β¨
πΈ NAME πΈ
dat_crstep_xchg_atomic β atomically exchange a gmap CRSTE with another. literally swap one CRSTE for a different CRSTE and do it atomically, no cap π
π¦ SYNOPSIS π¦
bool dat_crstep_xchg_atomic (union crste *crstep , union crste old ,
union crste new , gfn_t gfn , union asce asce );
she takes five args and comes back at you with a bool, periodt π
π ARGUMENTS π
crstepβ pointer to the CRST entry. like, the actual entry. that's her π«Άoldβ the expected old value. what you think is sitting there rn πnewβ the replacement entry. the glow-up that's going in πgfnβ the affected guest address. yes bestie, this one matters πΊοΈasceβ theasceof the address space. the address space's asce, exactly as advertised π§
β¨ DESCRIPTION β¨
k so here's the vibe: this function exists because sometimes you need to atomically exchange a CRSTE that potentially maps a prefix area β and you gotta do it without having to invalidate it inbetween. π
like yes, that's the whole reason she's here. no invalidate-in-the-middle situation. she handles it atomically and moves on. main character energy fr fr π
π₯ CONTEXT π₯
this function is assumed to be called with kvm->mmu_lock held. assumed, bestie β so hold that lock like you mean it π
β RETURN β
returns true if the exchange was successful. that's it, that's the tea πβ¨
π SEE ALSO π
kernel file ./arch/s390/kvm/gmap/dat.c, plus her whole friend group:
dat_entry_walk(9)_dat_walk_gfn_range(9)dat_test_age_gfn(9)dat_perform_essa(9)dat_set_cmma_bits(9)
go read those too, iykyk π¦
and that's the page!! this one lives over at ./arch/s390/kvm/gmap, dated October 2026, and she's filed under dat_crstep_xchg_atomic(9) if you ever need to find her again ππ slay, go hold that lock π«Ά
π¦ 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