Skip to content

Commit 6d67b68

Browse files
rerrabolualexdeucher
authored andcommitted
drm/amdgpu: Checkpoint and Restore VRAM BOs without VA
Extend checkpoint logic to allow inclusion of VRAM BOs that do not have a VA attached Signed-off-by: Ramesh Errabolu <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 952ee94 commit 6d67b68

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/gpu/drm/amd/amdkfd/kfd_chardev.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1846,7 +1846,7 @@ static uint32_t get_process_num_bos(struct kfd_process *p)
18461846
idr_for_each_entry(&pdd->alloc_idr, mem, id) {
18471847
struct kgd_mem *kgd_mem = (struct kgd_mem *)mem;
18481848

1849-
if ((uint64_t)kgd_mem->va > pdd->gpuvm_base)
1849+
if (!kgd_mem->va || kgd_mem->va > pdd->gpuvm_base)
18501850
num_of_bos++;
18511851
}
18521852
}
@@ -1918,7 +1918,11 @@ static int criu_checkpoint_bos(struct kfd_process *p,
19181918
kgd_mem = (struct kgd_mem *)mem;
19191919
dumper_bo = kgd_mem->bo;
19201920

1921-
if ((uint64_t)kgd_mem->va <= pdd->gpuvm_base)
1921+
/* Skip checkpointing BOs that are used for Trap handler
1922+
* code and state. Currently, these BOs have a VA that
1923+
* is less GPUVM Base
1924+
*/
1925+
if (kgd_mem->va && kgd_mem->va <= pdd->gpuvm_base)
19221926
continue;
19231927

19241928
bo_bucket = &bo_buckets[bo_index];

0 commit comments

Comments
 (0)