iommu: Add IOMMU_DOMAIN_PLATFORM for S390
authorJason Gunthorpe <jgg@nvidia.com>
Wed, 13 Sep 2023 13:43:37 +0000 (10:43 -0300)
committerJoerg Roedel <jroedel@suse.de>
Mon, 25 Sep 2023 09:40:53 +0000 (11:40 +0200)
commite04c7487a6655722172e93e8f36e51d6ab279f86
tree73d75ad2b569ae70702219d7181de1d593d7cafc
parent2ad56efa80dba89162106c06ebc00b611325e584
iommu: Add IOMMU_DOMAIN_PLATFORM for S390

The PLATFORM domain will be set as the default domain and attached as
normal during probe. The driver will ignore the initial attach from a NULL
domain to the PLATFORM domain.

After this, the PLATFORM domain's attach_dev will be called whenever we
detach from an UNMANAGED domain (eg for VFIO). This is the same time the
original design would have called op->detach_dev().

This is temporary until the S390 dma-iommu.c conversion is merged.

Tested-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Niklas Schnelle <schnelle@linux.ibm.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/4-v8-81230027b2fa+9d-iommu_all_defdom_jgg@nvidia.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/s390-iommu.c