STRUCT MSM_VM_BIND_JOB(9)
π struct msm_vm_bind_job β tracking for a VM_BIND ioctl π
okay so this page lives in the Kernel API Manual, and the star of the show is struct msm_vm_bind_job(9) β the little bookkeeping baddie that keeps track of one single VM_BIND ioctl. it's giving "group project manager" energy and honestly? it ate. π¦
β¨ SYNOPSIS β¨
struct msm_vm_bind_job {
struct drm_sched_job base;
struct drm_gpuvm *vm;
struct dma_fence *fence;
struct msm_gpu_submitqueue *queue;
struct msm_mmu_prealloc prealloc;
struct list_head vm_ops;
bool bos_pinned;
unsigned int nr_ops;
struct msm_vm_bind_op {
uint32_t op;
uint32_t flags;
union {
struct drm_gem_object *obj;
uint32_t handle;
};
uint64_t obj_offset;
uint64_t iova;
uint64_t range;
} ops[];
};
like, look at that trailing ops[] β flexible array member main character energy, no notes. π
πΈ MEMBERS πΈ
baseβ the base class for drm_sched jobs. every job needs a foundation, and this is hers. πvmβ the VM being operated on. the actual vibe being transformed, iykyk.fenceβ the fence that is signaled when the job completes. think of it as the "we're so back" notification. πqueueβ the queue that the job runs on. her designated lane, literally.preallocβ tracking for pre-allocated MMU pgtable pages. pre-allocated = pre-planned, and we love a planner. πvm_opsβ a list ofstruct msm_vm_op. her little entourage of operations.bos_pinnedβ are the GEM objects being bound pinned? a whole yes/no moment, very vibe check. βnr_opsβ the number of userspace requested ops. girl is counting, always counting. π’opsβ the userspace requested ops. the whole reason she exists, fr fr.
the userspace requested ops are copied/parsed and validated before we start applying the updates, to try to do as much up-front error checking as possible β that way the VM doesn't end up in an undefined state due to a partially executed VM_BIND. β οΈ no cap, that's the entire point: fail early, fail clean, don't leave the VM in shambles mid-operation. π
this table also serves to hold a reference to the backing GEM objects. so she's not just a list, she's a lifeline β she keeps those objects alive. π«Ά
{unnamed_union}β anonymous. mysterious. doesn't gatekeep her identity. π
π DESCRIPTION π
so here's the whole storyline, bestie: a table of userspace requested VM updates β that's MSM_VM_BIND_OP_UNMAP/MAP/MAP_NULL β gets applied to the vm, and that generates a list of VM ops (MSM_VM_OP_MAP/UNMAP) which get applied to the pgtables asynchronously. β¨ async queen β¨
and lowkey the glow-up is real, because one userspace request can multiply. for example, a userspace requested MSM_VM_BIND_OP_MAP could end up generating both an MSM_VM_OP_UNMAP to unmap an existing mapping and an MSM_VM_OP_MAP to apply the new mapping. one request in, two ops out β that's range, that's versatility, that's the whole pipeline. π₯
ngl this is the part where you just trust the flow: userspace asks, the kernel validates, the pgtables get updated async later. simple as.
π 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)msm_gem_vm_unusable(9)msm_gem_vm_create(9)msm_gem_vm_close(9)
and that's the page, bestie β brought to you by ./drivers/gpu/drm/msm, dated October 2026, filed under struct msm_vm_bind_job(9). go read the SEE ALSOs, they're literally all connected π§βπ
π¦ 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