msm_gem_vm_create(9)
π msm_gem_vm_create(9) β like, the Kernel API Manual era π
okay bestie, so we're deep in the kernel docs rn β this is msm_gem_vm_create, straight out of the Kernel API Manual. sit down, grab a strawberry π, and let's get into it.
β¨ NAME β¨
msm_gem_vm_create β create and initialize an &msm_gem_vm. that's the whole assignment, no cap π
πΈ SYNOPSIS πΈ
struct drm_gpuvm * msm_gem_vm_create (struct drm_device *drm , struct
msm_mmu *mmu , const char *name , u64 va_start , u64 va_size , bool
managed );
look at that signature. it's giving main character energy π
π¦ ARGUMENTS π¦
drmβ the drm device. the whole reason we're here tbh.mmuβ the backing MMU objects that handle the mapping/unmapping. they do the actual work, we just vibe π«Άnameβ the name of the VM.va_startβ the start offset of the VA space.va_sizeβ the size of the VA space. yes it's au64, she's big πmanagedβ is it a kernel managed VM?bool, so like, yes or no, iconic behaviour.
π DESCRIPTION π
okay so this is the important bit, listen up π§
in a kernel managed VM, the kernel handles address allocation, and only synchronous operations are supported. periodt.
in a user managed VM, userspace handles the virtual address allocation, and both async and sync operations are supported. the range, the flexibility, we love to see it π₯
β RETURN β
on success you get a pointer to the created struct drm_gpuvm. on failure? you get an ERR_PTR(-errno). so like, check that pointer before you do anything cute with it π
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/msm/msm_gem_vma.c struct msm_vm_map_op(9)struct msm_vm_unmap_op(9)struct msm_vm_op(9)struct msm_vm_bind_job(9)msm_gem_vm_unusable(9)msm_gem_vm_close(9)
iykyk β go read the whole lil family, they're all connected π
lowkey a warning: don't just assume the VM you asked for got made β that ERR_PTR(-errno) return is real, so vibe check your pointer before using it. π
and that's the page, bestie β this one comes from ./drivers/gpu/drm/msm, dated October 2026. mwah, slay, go forth and map some addresses πβ¨π
π¦ 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