STRUCT MSM_VM_OP(9)
π struct msm_vm_op(9)
okay so bestie, welcome to the Kernel API Manual β this one's about struct msm_vm_op, and it's literally just a MAP or UNMAP operation. that's it. that's the whole vibe. π¦
β¨ NAME β¨
struct msm_vm_op β a MAP or UNMAP operation π
πΈ SYNOPSIS πΈ
here's the whole struct, copy it exactly bestie, i'm not joking:
struct msm_vm_op {
enum {
MSM_VM_OP_MAP = 1,
MSM_VM_OP_UNMAP,
} op;
union {
struct msm_vm_map_op map;
struct msm_vm_unmap_op unmap;
};
struct list_head node;
struct drm_gem_object *obj;
};
no cap, that's the shape of it. π«Ά
π Members π
okay let's go through the fields one by one, i gotchu:
opβ the operation type. that's the whole assignment. which op are we doing, bestie? π{unnamed_union}β anonymous. yes, it literally has no name. mysterious. iconic. main character energy. πmapβ the parameters used ifop == MSM_VMA_OP_MAP. πΊοΈunmapβ the parameters used ifop == MSM_VMA_OP_UNMAP. π§Ήnodeβ the list head inmsm_vm_bind_job::vm_ops. it's giving linked-list realness. πobjβ backing object for pages to be mapped/unmapped. the actual backbone, fr fr. π
π§ a lil note on references (important, don't skip)
async unmap ops β in particular β must hold a reference to the original GEM object backing the mapping that will be unmapped. no exceptions, bestie. β οΈ
but the same can be required in the map path too β for example if there's not a corresponding unmap op, like on process exit. yeah. that happens. π
this ensures that the pages backing the mapping are not freed before the mapping is torn down. like, the pages stay alive until the teardown is done, periodt. β¨
π₯ 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_bind_job(9)msm_gem_vm_unusable(9)msm_gem_vm_create(9)msm_gem_vm_close(9)
go read those next, i promise they slay too. ππ
ok that's the whole page bestie, you ate that. now go map some pages (or unmap them, i don't judge). π
β¨ mwah β¨ this lil masterpiece lives in ./drivers/gpu/drm/msm, dated October 2026, and it's struct msm_vm_op(9) in case you forgot already. byeeee π
π
π¦ 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