Re: [PATCH] drm/amdgpu: Fix discovery offset check under VF

2026-05-12 Thread Lazar, Lijo




On 12-May-26 9:17 PM, Pan, Ellen wrote:

AMD General

Reviewed-by:  Ellen Pan 



Thanks for the review.

On a second check, the original issue was introduced with

7055e5157742 ("drm/amdgpu: New interface to get IP discovery binary v3")

Will update the tag before committing the change.

Thanks,
Lijo


-Original Message-
From: Lazar, Lijo 
Sent: Tuesday, May 12, 2026 11:09 AM
To: [email protected]
Cc: Zhang, Hawking ; Deucher, Alexander 
; Pan, Ellen 
Subject: [PATCH] drm/amdgpu: Fix discovery offset check under VF

Discovery table may be kept at offset 0 by host driver. Remove the validation 
check.

Fixes: b69911681fd5 ("drm/amdgpu: fallback to default discovery offset/size in sriov 
guest")

Signed-off-by: Lijo Lazar 
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
index bbb807a16a50..8e3b6a4050e9 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
@@ -305,7 +305,7 @@ static int amdgpu_discovery_get_tmr_info(struct 
amdgpu_device *adev,
 
adev->virt.crit_regn_tbl[AMD_SRIOV_MSG_IPD_TABLE_ID].offset;
 adev->discovery.size =
 
adev->virt.crit_regn_tbl[AMD_SRIOV_MSG_IPD_TABLE_ID].size_kb << 10;
-   if (!adev->discovery.offset || !adev->discovery.size)
+   if (!adev->discovery.size)
 return -EINVAL;
 } else {
 goto out;
--
2.49.0





RE: [PATCH] drm/amdgpu: Fix discovery offset check under VF

2026-05-12 Thread Pan, Ellen
AMD General

Reviewed-by:  Ellen Pan 

-Original Message-
From: Lazar, Lijo 
Sent: Tuesday, May 12, 2026 11:09 AM
To: [email protected]
Cc: Zhang, Hawking ; Deucher, Alexander 
; Pan, Ellen 
Subject: [PATCH] drm/amdgpu: Fix discovery offset check under VF

Discovery table may be kept at offset 0 by host driver. Remove the validation 
check.

Fixes: b69911681fd5 ("drm/amdgpu: fallback to default discovery offset/size in 
sriov guest")

Signed-off-by: Lijo Lazar 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
index bbb807a16a50..8e3b6a4050e9 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
@@ -305,7 +305,7 @@ static int amdgpu_discovery_get_tmr_info(struct 
amdgpu_device *adev,

adev->virt.crit_regn_tbl[AMD_SRIOV_MSG_IPD_TABLE_ID].offset;
adev->discovery.size =

adev->virt.crit_regn_tbl[AMD_SRIOV_MSG_IPD_TABLE_ID].size_kb << 10;
-   if (!adev->discovery.offset || !adev->discovery.size)
+   if (!adev->discovery.size)
return -EINVAL;
} else {
goto out;
--
2.49.0