Skip to content

Commit

Permalink
x86, vt-d: Handle previous faults after enabling fault handling
Browse files Browse the repository at this point in the history
Fault handling is getting enabled after enabling the interrupt-remapping (as
the success of interrupt-remapping can affect the apic mode and hence the
fault handling mode).

Hence there can potentially be some faults between the window of enabling
interrupt-remapping in the vt-d and the fault-handling of the vt-d units.

Handle any previous faults after enabling the vt-d fault handling.

For v2.6.38 cleanup, need to check if we can remove the dmar_fault() in the
enable_intr_remapping() and see if we can enable fault handling along with
enabling intr-remapping.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
LKML-Reference: <20101201062244.630417138@intel.com>
Cc: stable@kernel.org [v2.6.32+]
Acked-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
  • Loading branch information
Suresh Siddha authored and H. Peter Anvin committed Dec 14, 2010
1 parent 7f7fbf4 commit 7f99d94
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/pci/dmar.c
Original file line number Diff line number Diff line change
Expand Up @@ -1417,6 +1417,11 @@ int __init enable_drhd_fault_handling(void)
(unsigned long long)drhd->reg_base_addr, ret);
return -1;
}

/*
* Clear any previous faults.
*/
dmar_fault(iommu->irq, iommu);
}

return 0;
Expand Down

0 comments on commit 7f99d94

Please sign in to comment.