drm_gpusvm_scan_mm(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ drm_gpusvm_scan_mm(9) β€” the Kernel API Manual, bestie edition ✨

okay so you're looking at drm_gpusvm_scan_mm, straight out of the Kernel API Manual, and honestly? she's a little vibe-checker for your GPU SVM ranges 🫢


🌸 NAME 🌸

drm_gpusvm_scan_mm β€” check the migration state of a drm_gpusvm_range πŸ‘€


⭐ SYNOPSIS ⭐

enum drm_gpusvm_scan_result drm_gpusvm_scan_mm (struct drm_gpusvm_range
*range , void *dev_private_owner , const struct dev_pagemap *pagemap );

like, that's the whole signature, no cap πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • range β€” pointer to the struct drm_gpusvm_range you wanna check, bestie. that's the one we're scanning, periodt.
  • dev_private_owner β€” the struct dev_private_owner you use to figure out which device-private pages are compatible. it's giving "who's allowed in the club" energy.
  • pagemap β€” the struct dev_pagemap pointer used for pagemap-specific checks. yes, specific checks. she's thorough. ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

So what she does is scan the CPU address space that corresponds to range and hand you back the current migration state. Simple, iconic, done. πŸ’–

⚠️ But hear me out: the result may be invalid as soon as the function returns. It's an advisory check, not a promise. lowkey important, don't @ me.

TODO: bail early and call hmm_range_fault for subranges. (not me leaving a TODO in the docs, it's literally in the source 😭)


πŸ”₯ RETURN πŸ”₯

See enum drm_gpusvm_scan_result. that's it, that's the return. iykyk ⭐


πŸ’œ SEE ALSO πŸ’œ

Kernel file ./drivers/gpu/drm/drm_gpusvm.c and honestly the whole friend group:


and that's the page!! 🌈 sourced from ./drivers/gpu/drm, dated October 2026, and yes she ate. go read the kernel file bestie, ily, bye πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from