Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

David Woodhouse and committed by
Thomas Gleixner
2df985f5 2fb6acf3

+5 -3
+5 -3
drivers/iommu/amd/init.c
··· 1601 1601 if (ret) 1602 1602 return ret; 1603 1603 1604 - ret = amd_iommu_create_irq_domain(iommu); 1605 - if (ret) 1606 - return ret; 1604 + if (amd_iommu_irq_remap) { 1605 + ret = amd_iommu_create_irq_domain(iommu); 1606 + if (ret) 1607 + return ret; 1608 + } 1607 1609 1608 1610 /* 1609 1611 * Make sure IOMMU is not considered to translate itself. The IVRS