Skip to contentSkip to conversation

iommu/crash: Interrupt remapping is also disabled on crash

PATCH New Andrew Cooper 1 participant 1 message Apr 15, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu/crash: Interrupt remapping is also disabled on crash

This fixes a regression side-effect caused by:
IOMMU: properly check whether interrupt remapping is enabled

    git: fae0372140befb88d890a30704a8ec058c902af8
     hg: 26742:e1ec14bad0cb

On the crash path in nmi_shootdown_cpus(), we shut down the IOMMU, then disable the IOAPIC.

On systems which support interrupt remapping, the variable iommu_intremap remains set, meaning that disable_IO_APIC() issues interrupt remapping invalidate requests.

IOAPIC interrupt remapping used to be conditional on iommu_enabled, but is now conditional on iommu_intremap, following the above changeset.

This behaviour can be fixed by also indicating that interrupt remapping is not enabled after shutting down the IOMMU.

xen/drivers/passthrough/iommu.c +1 -1
diff -r 98f80bf9e286 -r b1a9ebef21af xen/drivers/passthrough/iommu.c
@@ -601,7 +601,7 @@ void iommu_crash_shutdown(void)
     const struct iommu_ops *ops = iommu_get_ops();
     if ( iommu_enabled )
         ops->crash_shutdown();
-    iommu_enabled = 0;
+    iommu_enabled = iommu_intremap = 0;
 }
 
 int iommu_do_domctl(