x86/amd-iommu: Dump fault entry on DTE error
authorJoerg Roedel <joerg.roedel@amd.com>
Thu, 3 Sep 2009 12:02:10 +0000 (14:02 +0200)
committerJoerg Roedel <joerg.roedel@amd.com>
Thu, 3 Sep 2009 12:17:08 +0000 (14:17 +0200)
This patch adds code to dump the content of the device table
entry which caused an ILLEGAL_DEV_TABLE_ENTRY error from the
IOMMU hardware.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
arch/x86/kernel/amd_iommu.c

index 6c99f5037801302fc60da447ce414a3179fad3eb..364c6de263741ace8a2c8930fffd762c1b6ee25f 100644 (file)
@@ -138,6 +138,15 @@ static int iommu_has_npcache(struct amd_iommu *iommu)
  *
  ****************************************************************************/
 
+static void dump_dte_entry(u16 devid)
+{
+       int i;
+
+       for (i = 0; i < 8; ++i)
+               pr_err("AMD-Vi: DTE[%d]: %08x\n", i,
+                       amd_iommu_dev_table[devid].data[i]);
+}
+
 static void iommu_print_event(void *__evt)
 {
        u32 *event = __evt;
@@ -155,6 +164,7 @@ static void iommu_print_event(void *__evt)
                       "address=0x%016llx flags=0x%04x]\n",
                       PCI_BUS(devid), PCI_SLOT(devid), PCI_FUNC(devid),
                       address, flags);
+               dump_dte_entry(devid);
                break;
        case EVENT_TYPE_IO_FAULT:
                printk("IO_PAGE_FAULT device=%02x:%02x.%x "