STRUCT XE_MIGRATE_PT_UPDATE_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 struct xe_migrate_pt_update_ops(9) 🌸

okay so bestie, this is a page straight out of the Kernel API Manual and it's literally the cheat sheet for one lil struct β€” struct xe_migrate_pt_update_ops ✨. And what is that struct, you ask? It's the callbacks for the xe_migrate_update_pgtables() function πŸ’…. That's the whole vibe. It's a bundle of function pointers that the page-table machinery calls back into. iykyk πŸŽ€


✨ SYNOPSIS ✨

here's the shape of it, no cap β€” copy it exactly, don't be cute with the code:

struct xe_migrate_pt_update_ops {
    void (*populate)(struct xe_migrate_pt_update *pt_update, struct
xe_tile *tile, struct iosys_map *map, void *pos, u32 ofs, u32
num_qwords, const struct xe_vm_pgtable_update *update);
    void (*clear)(struct xe_migrate_pt_update *pt_update, struct xe_tile
*tile, struct iosys_map *map, void *pos, u32 ofs, u32 num_qwords, const
struct xe_vm_pgtable_update *update);
    int (*pre_commit)(struct xe_migrate_pt_update *pt_update);
 };

πŸ‘‘ MEMBERS πŸ‘‘

three members, three little main characters. let's go πŸ¦‹

πŸ’– populate

Populate a command buffer or page-table with ptes. 🫢 that's the job. here's what every single argument means:

  • pt_update β€” Embeddable callback argument. (yeah, it gets passed around, it's that girl)
  • tile β€” The tile for the current operation.
  • map β€” struct iosys_map into the memory to be populated.
  • pos β€” If map is NULL, map into the memory to be populated.
  • ofs β€” qword offset into map, unused if map is NULL.
  • num_qwords β€” Number of qwords to write.
  • update β€” Information about the PTEs to be inserted.
This interface is intended to be used as a callback into the page-table system to populate command buffers or shared page-tables with PTEs. 🧚 that's literally its whole purpose, bestie.

πŸ’œ clear

Clear a command buffer or page-table with ptes. πŸ’… same energy, but clearing instead of populating. args, one by one:

  • pt_update β€” Embeddable callback argument.
  • tile β€” The tile for the current operation.
  • map β€” struct iosys_map into the memory to be populated.
  • pos β€” If map is NULL, map into the memory to be populated.
  • ofs β€” qword offset into map, unused if map is NULL.
  • num_qwords β€” Number of qwords to write.
  • update β€” Information about the PTEs to be inserted.
This interface is intended to be used as a callback into the page-table system to populate command buffers or shared page-tables with PTEs. ⭐ yes, same sentence as above β€” that's the shared purpose of the interface, not a typo, don't @ me 😭

πŸ”₯ pre_commit

Callback to be called just before arming the sched_job. ⚑ so close to the drop, literally the pre-game.

  • pt_update β€” Pointer to embeddable callback argument.

Return: 0 on success, negative error code on error. 🌈 zero is the slay outcome; negative means something went πŸ’€ and you handle it.


🌸 SEE ALSO 🌸

  • Kernel file ./drivers/gpu/drm/xe/xe_migrate.h
  • struct xe_migrate_pt_update(9) β€” go read that one too, they're besties 🫢

and that's the page, periodt πŸ’– this lil edition lives in ./drivers/gpu/drm/xe, dropped October 2026 under the Kernel API Manual β€” mwah, go populate some page tables bestie βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from