Skip to content

Commit

Permalink
iommu/amd: Don't register interrupt remapping irqdomain when IR is di…
Browse files Browse the repository at this point in the history
…sabled

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
  • Loading branch information
David Woodhouse authored and Thomas Gleixner committed Nov 11, 2020
1 parent 2fb6acf commit 2df985f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/iommu/amd/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2df985f

Please sign in to comment.