Messages in this thread Patch in this message | | | From | David Woodhouse <> | Subject | [PATCH 1/3] iommu/amd: Don't register interrupt remapping irqdomain when IR is disabled | Date | Wed, 11 Nov 2020 14:43:20 +0000 |
| |
From: David Woodhouse <dwmw@amazon.co.uk>
This was potentially allowing I/OAPIC and MSI interrupts to be parented in the IOMMU IR domain even when IR was disabled. Don't do that.
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> --- drivers/iommu/amd/init.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c index 263670d36fed..90a8add186e0 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 -- 2.26.2
| |