public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iommu/amd: Fix interrupt remapping for aliased devices
@ 2014-04-22 16:08 Alex Williamson
  2014-05-12 19:05 ` Joerg Roedel
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Williamson @ 2014-04-22 16:08 UTC (permalink / raw)
  To: joro, iommu; +Cc: linux-kernel

An apparent cut and paste error prevents the correct flags from being
set on the alias device resulting in MSI on conventional PCI devices
failing to work.  This also produces error events from the IOMMU like:

AMD-Vi: Event logged [INVALID_DEVICE_REQUEST device=00:14.4 address=0x000000fdf8000000 flags=0x0a00]

Where 14.4 is a PCIe-to-PCI bridge with a device behind it trying to
use MSI interrupts.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Cc: stable@vger.kernel.org
---
 drivers/iommu/amd_iommu.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 5113dce..6c0cca5 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -4004,7 +4004,7 @@ static struct irq_remap_table *get_irq_table(u16 devid, bool ioapic)
 	iommu_flush_dte(iommu, devid);
 	if (devid != alias) {
 		irq_lookup_table[alias] = table;
-		set_dte_irq_entry(devid, table);
+		set_dte_irq_entry(alias, table);
 		iommu_flush_dte(iommu, alias);
 	}
 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] iommu/amd: Fix interrupt remapping for aliased devices
  2014-04-22 16:08 [PATCH] iommu/amd: Fix interrupt remapping for aliased devices Alex Williamson
@ 2014-05-12 19:05 ` Joerg Roedel
  0 siblings, 0 replies; 2+ messages in thread
From: Joerg Roedel @ 2014-05-12 19:05 UTC (permalink / raw)
  To: Alex Williamson; +Cc: iommu, linux-kernel

On Tue, Apr 22, 2014 at 10:08:40AM -0600, Alex Williamson wrote:
> An apparent cut and paste error prevents the correct flags from being
> set on the alias device resulting in MSI on conventional PCI devices
> failing to work.  This also produces error events from the IOMMU like:
> 
> AMD-Vi: Event logged [INVALID_DEVICE_REQUEST device=00:14.4 address=0x000000fdf8000000 flags=0x0a00]
> 
> Where 14.4 is a PCIe-to-PCI bridge with a device behind it trying to
> use MSI interrupts.
> 
> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
> Cc: stable@vger.kernel.org

Applied, thanks Alex.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-12 19:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-22 16:08 [PATCH] iommu/amd: Fix interrupt remapping for aliased devices Alex Williamson
2014-05-12 19:05 ` Joerg Roedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox