[PATCH] drm/amdgpu: add VCN poison consumption handler for SRIOV

Lazar, Lijo lijo.lazar at amd.com
Tue Sep 27 09:36:33 UTC 2022



On 9/27/2022 1:05 PM, Tao Zhou wrote:
> Inform host and let host handle consumption interrupt.
> 
> Signed-off-by: Tao Zhou <tao.zhou1 at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 12 ++++++++++--
>   1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> index f36e4f08db6d..cb2885999219 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
> @@ -1243,8 +1243,16 @@ int amdgpu_vcn_process_poison_irq(struct amdgpu_device *adev,
>   	if (!ras_if)
>   		return 0;
>   
> -	ih_data.head = *ras_if;
> -	amdgpu_ras_interrupt_dispatch(adev, &ih_data);
> +	if (!amdgpu_sriov_vf(adev)) {
> +		ih_data.head = *ras_if;
> +		amdgpu_ras_interrupt_dispatch(adev, &ih_data);
> +	} else {
> +		if (adev->virt.ops && adev->virt.ops->ras_poison_handler)
> +			adev->virt.ops->ras_poison_handler(adev);
> +		else
> +			dev_warn(adev->dev,
> +				"No ras_poison_handler interface in SRIOV for VCN!\n");
> +	}
>   

As guest is not a trusted domain, I guess we need to get more clarity 
about the final flow of events. Need to hold this.

Thanks,
Lijo

>   	return 0;
>   }
> 


More information about the amd-gfx mailing list