[tip:x86/urgent] x86, vt-d: Handle previous faults after enabling fault handling

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: tip-bot for Suresh Siddha
Date: Monday, December 13, 2010 - 6:17 pm

Commit-ID:  7f99d946e71e71d484b7543b49e990508e70d0c0
Gitweb:     http://git.kernel.org/tip/7f99d946e71e71d484b7543b49e990508e70d0c0
Author:     Suresh Siddha <suresh.b.siddha@intel.com>
AuthorDate: Tue, 30 Nov 2010 22:22:29 -0800
Committer:  H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Mon, 13 Dec 2010 16:53:57 -0800

x86, vt-d: Handle previous faults after enabling fault handling

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>
---
 drivers/pci/dmar.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c
index 0157708..09933eb 100644
--- a/drivers/pci/dmar.c
+++ b/drivers/pci/dmar.c
@@ -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;
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[tip:x86/urgent] x86, vt-d: Quirk for masking vtd spec err ..., tip-bot for Suresh S ..., (Mon Dec 13, 6:15 pm)
[tip:x86/urgent] x86, vt-d: Fix the vt-d fault handling ir ..., tip-bot for Kenji Ka ..., (Mon Dec 13, 6:16 pm)
[tip:x86/urgent] x86: Enable the intr-remap fault handling ..., tip-bot for Kenji Ka ..., (Mon Dec 13, 6:16 pm)
[tip:x86/urgent] x86, vt-d: Handle previous faults after e ..., tip-bot for Suresh S ..., (Mon Dec 13, 6:17 pm)