unique_id is normally fetched from the SMU on bare metal.  I guess in
the SR-IOV case, this would come from the hypervisor since the SMU is
not normally handled in the VF.  That makes sense for multi-VF, but
what about single VF?  Are you sure the ordering is correct such that
the SMU value won't overwrite this?  Maybe that's ok because they
would be the same in that case?

Alex


On Thu, May 13, 2021 at 10:39 PM Gu, JiaWei (Will) <[email protected]> wrote:
>
> [AMD Official Use Only - Internal Distribution Only]
>
> pinging
>
> -----Original Message-----
> From: Gu, JiaWei (Will)
> Sent: Thursday, May 13, 2021 7:01 PM
> To: Jiawei Gu <[email protected]>; [email protected]; Nieto, 
> David M <[email protected]>
> Cc: Deng, Emily <[email protected]>
> Subject: RE: [PATCH] drm/amdgpu: Fill adev->unique_id with data from PF2VF msg
>
> [AMD Official Use Only - Internal Distribution Only]
>
> Add David.
>
> -----Original Message-----
> From: Jiawei Gu <[email protected]>
> Sent: Thursday, May 13, 2021 2:41 PM
> To: [email protected]
> Cc: Deng, Emily <[email protected]>; Gu, JiaWei (Will) <[email protected]>
> Subject: [PATCH] drm/amdgpu: Fill adev->unique_id with data from PF2VF msg
>
> Initialize unique_id from PF2VF under virtualization.
>
> Signed-off-by: Jiawei Gu <[email protected]>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> index a57842689d42..96e269cbe326 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
> @@ -471,6 +471,8 @@ static int amdgpu_virt_read_pf2vf_data(struct 
> amdgpu_device *adev)
>                         ((struct amd_sriov_msg_pf2vf_info 
> *)pf2vf_info)->feature_flags.all;
>                 adev->virt.reg_access =
>                         ((struct amd_sriov_msg_pf2vf_info 
> *)pf2vf_info)->reg_access_flags.all;
> +               adev->unique_id =
> +                       ((struct amd_sriov_msg_pf2vf_info *)pf2vf_info)->uuid;
>
>                 break;
>         default:
> --
> 2.17.1
> _______________________________________________
> amd-gfx mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to