xe_evict --r evict-large leaks PTE on DG2 (probably all platforms too)
cat /sys/kernel/debug/dri/0/vram0_mm
use_type: 1
use_tt: 0
size: 1040384
usage: 16388096
0x0000000000000000-0x0000000000000010: 16: used
0x0000000000000010-0x0000000000000070: 96: used
0x0000000000000070-0x0000000000000090: 32: used
0x0000000000000090-0x00000000000008a0: 2064: used
0x00000000000008a0-0x00000000000008b0: 16: used
0x00000000000008b0-0x00000000000008c0: 16: used
0x00000000000008c0-0x00000000000008d0: 16: used
0x00000000000008d0-0x00000000000008f0: 32: used
0x00000000000008f0-0x0000000000000900: 16: used
0x0000000000000900-0x0000000000000910: 16: used
0x0000000000000910-0x0000000000000920: 16: used
0x0000000000000920-0x0000000000000930: 16: used
0x0000000000000930-0x0000000000000940: 16: used
0x0000000000000940-0x0000000000000950: 16: used
0x0000000000000950-0x0000000000000960: 16: used
0x0000000000000960-0x0000000000000970: 16: used
0x0000000000000970-0x0000000000000980: 16: used
0x0000000000000980-0x0000000000000990: 16: used
0x0000000000000990-0x00000000000009a0: 16: used
0x00000000000009a0-0x00000000000009c0: 32: used
0x00000000000009c0-0x00000000000009d0: 16: used
0x00000000000009d0-0x00000000000009f0: 32: used
0x00000000000009f0-0x0000000000000a00: 16: used
0x0000000000000a00-0x0000000000000a20: 32: used
0x0000000000000a20-0x0000000000000a30: 16: used
0x0000000000000a30-0x0000000000000a50: 32: used
0x0000000000000a50-0x0000000000000b50: 256: used
0x0000000000000b50-0x0000000000000b60: 16: used
0x0000000000000b60-0x0000000000000b61: 1: used
0x0000000000000b61-0x0000000000000b70: 15: free
0x0000000000000b70-0x0000000000000b90: 32: used
0x0000000000000b90-0x0000000000000ba0: 16: used
0x0000000000000ba0-0x0000000000000bb0: 16: used
0x0000000000000bb0-0x00000000000c123b: 788107: free
0x00000000000c123b-0x00000000000c123c: 1: used
0x00000000000c123c-0x00000000000c123d: 1: used
0x00000000000c123d-0x00000000000c123e: 1: used
0x00000000000c123e-0x00000000000c123f: 1: used
0x00000000000c123f-0x00000000000c1240: 1: used
0x00000000000c1240-0x00000000000c1241: 1: used
0x00000000000c1241-0x00000000000c1242: 1: used
0x00000000000c1242-0x00000000000c1243: 1: used
0x00000000000c1243-0x00000000000c1244: 1: used
0x00000000000c1244-0x00000000000c1245: 1: used
0x00000000000c1245-0x00000000000c1246: 1: used
0x00000000000c1246-0x00000000000c1247: 1: used
0x00000000000c1247-0x00000000000c1248: 1: used
0x00000000000c1248-0x00000000000c1249: 1: used
0x00000000000c1249-0x00000000000c124a: 1: used
0x00000000000c124a-0x00000000000c124b: 1: used
0x00000000000c124b-0x00000000000c124c: 1: used
0x00000000000c124c-0x00000000000c124d: 1: used
0x00000000000c124d-0x00000000000c124e: 1: used
0x00000000000c124e-0x00000000000c124f: 1: used
0x00000000000c124f-0x00000000000c1250: 1: used
0x00000000000c1250-0x00000000000c1251: 1: used
0x00000000000c1251-0x00000000000c1252: 1: used
0x00000000000c1252-0x00000000000c1253: 1: used
0x00000000000c1253-0x00000000000c1254: 1: used
0x00000000000c1254-0x00000000000c1255: 1: used
0x00000000000c1255-0x00000000000c1256: 1: used
0x00000000000c1256-0x00000000000c1257: 1: used
0x00000000000c1257-0x00000000000c1258: 1: used
0x00000000000c1258-0x00000000000c1259: 1: used
0x00000000000c1259-0x00000000000c125a: 1: used
...
PTEs go on forever
On driver unload:
[ 373.492345] [drm:drm_mm_takedown] *ERROR* node [000c123b + 00000001]: inserted at
drm_mm_insert_node_in_range+0x495/0x8e0
xe_ttm_vram_mgr_new+0x28f/0x380 [xe]
ttm_resource_alloc+0x6f/0x120
ttm_bo_mem_space+0xf8/0x3a0
ttm_bo_validate+0x197/0x270
ttm_bo_init_reserved+0x1cd/0x300
__xe_bo_create_locked+0x289/0x3e0 [xe]
xe_bo_create_locked+0x58/0x250 [xe]
xe_bo_create_pin_map+0xb/0x1a0 [xe]
xe_pt_create+0xad/0x140 [xe]
xe_pt_populate_for_vma.constprop.40+0x365/0xd40 [xe]
__xe_pt_prepare_bind+0x38c/0x900 [xe]
__xe_pt_prepare_bind+0x1e5/0x900 [xe]
__xe_vm_bind_vma+0x1b9/0x680 [xe]
xe_vm_bind_vma+0x16f/0x560 [xe]
xe_vm_rebind+0x443/0x7c0 [xe]
xe_exec_ioctl+0x3f6/0xd70 [xe]
drm_ioctl_kernel+0x16a/0x250
drm_ioctl+0x321/0x560
__x64_sys_ioctl+0xa4/0xe0
do_syscall_64+0x37/0x90
entry_SYSCALL_64_after_hwframe+0x63/0xcd