[Intel-xe] PT encoding ops

Thomas Hellström thomas.hellstrom at linux.intel.com
Tue Nov 14 13:48:42 UTC 2023


Hi, Lucas, Matt

IMO ideally we should try to keep all page-table-encoding bit definition 
usage in xe_pt.[ch] (or possibly a separate file if we expect a lot of 
hardware variation). Currently it's in xe_vm.c, which is intended for 
higher level vm stuff, although I didn't succeed in separatating it 
completely. I sort of stumbled on this while looking at encoding a 
single NULL mapping from the xe_migrate code.

Do you think it would be possible with only two ops:

pte_encode_addr() and
pde_encode_addr()

And the rest of the current ops would simply be non-hardware-specific 
helpers that called one of the above. Those helpers could then be placed 
in xe_vm.c and xe_bo.c

That would mean a set of generic (non-device-specific) flags:

XE_PT_ENCODE_RW
XE_PT_ENCODE_NULL
XE_PT_ENCODE_DEVMEM
XE_PT_ENCODE_XXX

/Thomas




More information about the Intel-xe mailing list