diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2009-09-03 08:02:10 -0400 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2009-09-03 08:17:08 -0400 |
commit | e3e59876e82a5e1a07f365d5474e7b6943524725 (patch) | |
tree | b085528765b73c3699d28652c86821fd231b0ece /arch/x86/kernel/amd_iommu.c | |
parent | 37d0892c5a94e208cf863e3b7bac014edee4346d (diff) |
x86/amd-iommu: Dump fault entry on DTE error
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>
Diffstat (limited to 'arch/x86/kernel/amd_iommu.c')
-rw-r--r-- | arch/x86/kernel/amd_iommu.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index 6c99f5037801..364c6de26374 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c | |||
@@ -138,6 +138,15 @@ static int iommu_has_npcache(struct amd_iommu *iommu) | |||
138 | * | 138 | * |
139 | ****************************************************************************/ | 139 | ****************************************************************************/ |
140 | 140 | ||
141 | static void dump_dte_entry(u16 devid) | ||
142 | { | ||
143 | int i; | ||
144 | |||
145 | for (i = 0; i < 8; ++i) | ||
146 | pr_err("AMD-Vi: DTE[%d]: %08x\n", i, | ||
147 | amd_iommu_dev_table[devid].data[i]); | ||
148 | } | ||
149 | |||
141 | static void iommu_print_event(void *__evt) | 150 | static void iommu_print_event(void *__evt) |
142 | { | 151 | { |
143 | u32 *event = __evt; | 152 | u32 *event = __evt; |
@@ -155,6 +164,7 @@ static void iommu_print_event(void *__evt) | |||
155 | "address=0x%016llx flags=0x%04x]\n", | 164 | "address=0x%016llx flags=0x%04x]\n", |
156 | PCI_BUS(devid), PCI_SLOT(devid), PCI_FUNC(devid), | 165 | PCI_BUS(devid), PCI_SLOT(devid), PCI_FUNC(devid), |
157 | address, flags); | 166 | address, flags); |
167 | dump_dte_entry(devid); | ||
158 | break; | 168 | break; |
159 | case EVENT_TYPE_IO_FAULT: | 169 | case EVENT_TYPE_IO_FAULT: |
160 | printk("IO_PAGE_FAULT device=%02x:%02x.%x " | 170 | printk("IO_PAGE_FAULT device=%02x:%02x.%x " |