diff options
author | David Woodhouse <dwmw@amazon.co.uk> | 2020-11-11 14:43:20 +0000 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2020-11-11 23:01:58 +0100 |
commit | 2df985f5e44c43f5d29d8cc3aaa8e8ac697e9de6 (patch) | |
tree | 61cde3d225f61735a12b5c5640922508a442f878 /drivers/iommu/amd | |
parent | 2fb6acf3edfeb904505f9ba3fd01166866062591 (diff) | |
download | linux-2df985f5e44c43f5d29d8cc3aaa8e8ac697e9de6.tar.bz2 |
iommu/amd: Don't register interrupt remapping irqdomain when IR is disabled
Registering the remapping irq domain unconditionally is potentially
allowing I/O-APIC and MSI interrupts to be parented in the IOMMU IR domain
even when IR is disabled. Don't do that.
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20201111144322.1659970-1-dwmw2@infradead.org
Diffstat (limited to 'drivers/iommu/amd')
-rw-r--r-- | drivers/iommu/amd/init.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c index c2769f2b2abd..a94b96f1e13a 100644 --- a/drivers/iommu/amd/init.c +++ b/drivers/iommu/amd/init.c @@ -1601,9 +1601,11 @@ static int __init init_iommu_one(struct amd_iommu *iommu, struct ivhd_header *h) if (ret) return ret; - ret = amd_iommu_create_irq_domain(iommu); - if (ret) - return ret; + if (amd_iommu_irq_remap) { + ret = amd_iommu_create_irq_domain(iommu); + if (ret) + return ret; + } /* * Make sure IOMMU is not considered to translate itself. The IVRS |