drm/amdkfd: Validate queue cwsr area and eop buffer size
authorPhilip Yang <Philip.Yang@amd.com>
Wed, 26 Jun 2024 19:03:05 +0000 (15:03 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 24 Jul 2024 18:46:06 +0000 (14:46 -0400)
commit629568d25fea8ece4f65073f039aeef4e240ab67
tree29686a45dde1e06605ec985c18cb3e20a4c311d4
parent517fff221c1e6b8a8db69e7a440116caee120ff5
drm/amdkfd: Validate queue cwsr area and eop buffer size

When creating KFD user compute queue, check if queue eop buffer size,
cwsr area size, ctl stack size equal to the size of KFD node
properities.

Check the entire cwsr area which may split into multiple svm ranges
aligned to granularity boundary.

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_queue.c