STRUCT PVR_VM_CONTEXT(9)
π struct pvr_vm_context(9) π
okay bestie, welcome to the Kernel API Manual β¨ this one is literally all about struct pvr_vm_context and it's giving "I hold a whole VM together" energy, periodt.
πΈ NAME πΈ
struct pvr_vm_context β the context type used to represent a single VM. no cap, that's the whole vibe.
π¦ SYNOPSIS π¦
struct pvr_vm_context {
struct pvr_device *pvr_dev;
struct pvr_mmu_context *mmu_ctx;
struct drm_gpuvm gpuvm_mgr;
struct mutex lock;
struct pvr_fw_object *fw_mem_ctx_obj;
struct kref ref_count;
struct drm_gem_object dummy_gem;
};
π Members π
pvr_devβ the PowerVR device this context is bound to, and bestie, that binding is immutable for the life of the context. it's not changing, okay? that's its main character commitment. πmmu_ctxβ the context for binding to physical memory. literally the link between this VM and actual memory. π₯gpuvm_mgrβ the GPUVM object associated with this context. yes, it manages the GPUVM side of things, slay. β¨lockβ a global lock on this VM. one lock to rule them all, no cap. ππfw_mem_ctx_objβ the firmware object that represents the firmware memory context. it's giving "firmware memory representation" and we're obsessed. π§ref_countβ the reference count of the object. classic refcounting moment, fr fr. π«Άdummy_gemβ a GEM object that exists to enable VM reservation. important caveat bestie: all private BOs should usedummy_gem.resvand not their own_resvfield. like, do not do that. use the dummy one. periodt. π
lowkey this dummy_gem detail is the one that matters most, so don't skip it. it's literally the rule. π¨
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/imagination/pvr_vm.c Memory context(9)pvr_vm_get_page_table_root_addr(9)pvr_vm_get_dma_resv(9)Memory mappings(9)struct pvr_vm_gpuva(9)struct pvr_vm_bind_op(9)pvr_vm_bind_op_exec(9)pvr_vm_gpuva_map(9)pvr_vm_gpuva_unmap(9)pvr_vm_gpuva_remap(9)pvr_device_addr_is_valid(9)pvr_device_addr_and_size_are_valid(9)pvr_vm_create_context(9)pvr_vm_context_release(9)pvr_vm_context_lookup(9)pvr_vm_context_put(9)pvr_destroy_vm_contexts_for_file(9)pvr_vm_map(9)pvr_vm_unmap_obj_locked(9)pvr_vm_unmap_obj(9)pvr_vm_unmap(9)pvr_vm_unmap_all(9)pvr_heap_contains_range(9)pvr_find_heap_containing(9)pvr_vm_find_gem_object(9)pvr_vm_get_fw_mem_context(9)
like, that's a whole friend group of references, and you should def go say hi to them. π
okay that's the whole page, bestie! this lovely little manpage came from ./drivers/gpu/drm/imagination and it's dated October 2026 β iconic. stay slay, keep your refcounts balanced, and remember: use dummy_gem.resv, not your own _resv. mwah! π
β¨π
π¦ 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