[AMD Official Use Only - AMD Internal Distribution Only]
The series looks good. Reviewed-by: Shravan Kumar Gande <[email protected]<mailto:[email protected]>> Thanks, Shravan _____________________________________________ From: Zhang, Hawking <[email protected]> Sent: Tuesday, August 19, 2025 1:50 AM To: Liu, Xiang(Dean) <[email protected]>; [email protected]; Skvortsov, Victor <[email protected]>; Gande, Shravan kumar <[email protected]> Cc: Zhou1, Tao <[email protected]>; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]> Subject: RE: [PATCH 2/2] drm/amdgpu: Check VF critical region before RAS poison injection [AMD Official Use Only - AMD Internal Distribution Only] + @Skvortsov, Victor<mailto:[email protected]>/@Gande, Shravan kumar<mailto:[email protected]> Hi Victor/Shravan, Could you please help review the code at your convenience? Regards, Hawking -----Original Message----- From: Liu, Xiang(Dean) <[email protected]<mailto:[email protected]>> Sent: Tuesday, August 19, 2025 13:26 To: [email protected]<mailto:[email protected]> Cc: Zhang, Hawking <[email protected]<mailto:[email protected]>>; Zhou1, Tao <[email protected]<mailto:[email protected]>>; Yang, Stanley <[email protected]<mailto:[email protected]>>; Chai, Thomas <[email protected]<mailto:[email protected]>>; Liu, Xiang(Dean) <[email protected]<mailto:[email protected]>> Subject: [PATCH 2/2] drm/amdgpu: Check VF critical region before RAS poison injection Check VF critical region before RAS poison injection to ensure that the poison injection will not hit the VF critical region. Signed-off-by: Xiang Liu <[email protected]<mailto:[email protected]>> --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index b00cbb927ca8..6730de574fdc 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c @@ -219,10 +219,17 @@ static int amdgpu_check_address_validity(struct amdgpu_device *adev, struct amdgpu_vram_block_info blk_info; uint64_t page_pfns[32] = {0}; int i, ret, count; + bool hit = false; if (amdgpu_ip_version(adev, UMC_HWIP, 0) < IP_VERSION(12, 0, 0)) return 0; + if (amdgpu_sriov_vf(adev)) { + if (amdgpu_virt_check_vf_critical_region(adev, address, &hit)) + return -EPERM; + return hit ? -EACCES : 0; + } + if ((address >= adev->gmc.mc_vram_size) || (address >= RAS_UMC_INJECT_ADDR_LIMIT)) return -EFAULT; -- 2.34.1
