[Intel-xe] PT encoding ops

Lucas De Marchi lucas.demarchi at intel.com
Tue Nov 14 14:38:10 UTC 2023


On Tue, Nov 14, 2023 at 02:48:42PM +0100, Thomas Hellström wrote:
>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 

note that ggtt also has a different encoding for the entries

>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.

I stopped the abstraction where it is since I knew there was already
work going on by Matt Auld wrt PAT indexes. I agree some of this stuff
is incomplete.

>
>Do you think it would be possible with only two ops:
>
>pte_encode_addr() and
>pde_encode_addr()

even pte_ vs pde_ is kind of a misnomer IMO... pte_ is about leaf nodes,
and also encodes a pde entry. 

>
>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

I will  take a look and get back to you

Lucas De Marchi


More information about the Intel-xe mailing list