Skip to content

Commit

Permalink
x86, dmar: check if it's initialized before disable queue invalidation
Browse files Browse the repository at this point in the history
If queue invalidation is disabled after it's already initialized,
dmar_enable_qi won't re-enable it due to iommu->qi is allocated.
It may result in system hang when use queue invalidation. Add this
check to avoid this case.

Signed-off-by: Weidong Han <weidong.han@intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
Han, Weidong authored and David Woodhouse committed Apr 4, 2009
1 parent 161fde0 commit 34aaaa9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/pci/intr_remapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,13 @@ int __init enable_intr_remapping(int eim)
for_each_drhd_unit(drhd) {
struct intel_iommu *iommu = drhd->iommu;

/*
* If the queued invalidation is already initialized,
* shouldn't disable it.
*/
if (iommu->qi)
continue;

/*
* Clear previous faults.
*/
Expand Down

0 comments on commit 34aaaa9

Please sign in to comment.