STRUCT PANTHOR_VM_POOL(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, welcome to the Kernel API Manual πŸ’– β€” today's main character is struct panthor_vm_pool(9), aka the VM pool object. It's giving kernel plumbing but make it cute. ✨

πŸ¦‹ NAME πŸ¦‹

struct panthor_vm_pool β€” VM pool object. That's it, that's the name. No cap. πŸ’…

✨ SYNOPSIS ✨

here's the struct in all its glory, copied exactly:

struct panthor_vm_pool {
    struct xarray xa;
    struct panthor_gem_object *dummy;
};

🫢 Members 🫢

okay so it has exactly two members, and they're both important:

  • xa β€” the array used for VM handle tracking. It's the little index card system for VM handles, basically. πŸ—‚οΈ
  • dummy β€” the dummy object used for sparse mappings. Yes, it's literally called dummy, and it's doing important work. πŸ™ˆ

now the lore behind dummy: sparse bindings map virtual address ranges onto a dummy BO in a modulo fashion. Sparse writes are meant to be discarded, and sparse reads are undefined β€” but those writes are still reflected in the dummy buffer. So we have to keep a dummy object per file context, or data leaks between them. That's the whole reason it exists. Periodt. 🫢

🚨 bestie, this is the caveat: one dummy object per file context, not shared, because sharing it would leak data between contexts. Not the vibe. πŸ’€

πŸ’œ SEE ALSO πŸ’œ

the kernel file is ./drivers/gpu/drm/panthor/panthor_mmu.c, and here's the whole friend group:

xoxo, source/version ./drivers/gpu/drm/panthor, dated October 2026, and this whole page is struct panthor_vm_pool(9) πŸ’–βœ¨

πŸ“¦ where this page comes from