dat_crstep_xchg_atomic(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 β€” the asce of 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:

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