[PATCH 0/2] iommu/amd: Handle IOMMU initialization failure

From: Suravee Suthikulpanit
Date: Tue Jun 19 2018 - 12:46:06 EST


Currently, AMD system will not boot if the AMD IOMMU driver initialization
fails. This is mainly due to devices' dma_ops are still configured to use
amd_iommu_ops. Instead, the driver should retore the device dma_ops to
the default one as part of its error recovery.

However, other clean ups should also be taken care of (e.g. removing
IOMMU groups, and unsetting bus IOMMU).

NOTE: This issue was found when booting Linux with pci=nomsi option.
Since the AMD IOMMU requires MSI, this result in failure to
initialize IOMMU interrupt.

Thanks,
Suravee

Suravee Suthikulpanit (2):
iommu: Introduce interface for unsetting bus IOMMU
iommu/amd: Fallback to dma_direct_ops when fail to enable IOMMU

drivers/iommu/amd_iommu.c | 14 +++++++++++++-
drivers/iommu/amd_iommu_init.c | 19 +++++++++++++++++--
drivers/iommu/amd_iommu_proto.h | 2 ++
drivers/iommu/iommu.c | 22 ++++++++++++++++++++++
include/linux/device.h | 1 +
include/linux/iommu.h | 1 +
6 files changed, 56 insertions(+), 3 deletions(-)

--
2.7.4