On 05.03.2025 10:11, Mykola Kvach wrote:
> --- a/xen/drivers/passthrough/iommu.c
> +++ b/xen/drivers/passthrough/iommu.c
> @@ -613,7 +613,7 @@ int __init iommu_setup(void)
>
> int iommu_suspend(void)
> {
> - if ( iommu_enabled )
> + if ( iommu_enabled && iommu_get_ops() && iommu_get_ops()->suspend )
> return iommu_call(iommu_get_ops(), suspend);
>
> return 0;
> @@ -621,7 +621,7 @@ int iommu_suspend(void)
>
> void iommu_resume(void)
> {
> - if ( iommu_enabled )
> + if ( iommu_enabled && iommu_get_ops() && iommu_get_ops()->resume )
> iommu_vcall(iommu_get_ops(), resume);
> }
When iommu_enabled is true, surely iommu_get_ops() is required to return
non-NULL?
Jan