Subject: Re: [kernel] powerpc/powernv/sriov: Register IOMMU groups for VFs

From: Michael Ellerman <[email-masked]>
Date: Fri, 22 Feb 2019 21:01:31 +1100 (AEDT)

On Mon, 2019-02-18 at 05:58:01 UTC, Alexey Kardashevskiy wrote:
> The compound IOMMU group rework moved iommu_register_group() together in
> pnv_pci_ioda_setup_iommu_api() (which is a part of ppc_md.pcibios_fixup).
> As the result, pnv_ioda_setup_bus_iommu_group() does not create groups
> any more, it only adds devices to groups.
> 
> This works fine for boot time devices. However IOMMU groups for SRIOV's
> VFs were added by pnv_ioda_setup_bus_iommu_group() so this got broken:
> pnv_tce_iommu_bus_notifier() expects a group to be registered for VF
> and it is not.
> 
> This adds missing group registration and adds a NULL pointer check into
> the bus notifier so we won't stop in xmon if there is no group, although
> it is not expected to happen now.
> 
> Fixes: 0bd971676e68 "powerpc/powernv/npu: Add compound IOMMU groups"
> Signed-off-by: Alexey Kardashevskiy <[email-masked]>
> Reported-by: Santwana Samantray<[email-masked]>
> Reviewed-by: David Gibson <[email-masked]>

Applied to powerpc fixes, thanks.

https://git.kernel.org/powerpc/c/8f5b27347e88b171c755562f0090ce40

cheers