STRUCT XE_MIGRATE_PT_UPDATE_OPS(9)
πΈ 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_mapinto the memory to be populated.posβ IfmapisNULL, map into the memory to be populated.ofsβ qword offset intomap, unused ifmapisNULL.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_mapinto the memory to be populated.posβ IfmapisNULL, map into the memory to be populated.ofsβ qword offset intomap, unused ifmapisNULL.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
- 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