]> xenbits.xen.org Git - xenclient/xen-pq.git/commitdiff
XC-221: Make iommu malfunctional non fatal.
authorJean Guyader <jean.guyader@eu.citrix.com>
Tue, 22 Sep 2009 14:48:56 +0000 (15:48 +0100)
committerJean Guyader <jean.guyader@eu.citrix.com>
Tue, 22 Sep 2009 14:48:56 +0000 (15:48 +0100)
master/iommu-replace-panic-with-printk [new file with mode: 0644]
master/series

diff --git a/master/iommu-replace-panic-with-printk b/master/iommu-replace-panic-with-printk
new file mode 100644 (file)
index 0000000..e11f86f
--- /dev/null
@@ -0,0 +1,67 @@
+diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c
+index ff56a19..15555a0 100644
+--- a/xen/drivers/passthrough/vtd/iommu.c
++++ b/xen/drivers/passthrough/vtd/iommu.c
+@@ -247,7 +247,7 @@ static void iommu_flush_write_buffer(struct iommu *iommu)
+         if ( !(val & DMA_GSTS_WBFS) )
+             break;
+         if ( NOW() > start_time + DMAR_OPERATION_TIMEOUT )
+-            panic("%s: DMAR hardware is malfunctional,"
++            printk("%s: DMAR hardware is malfunctional,"
+                   " please disable IOMMU\n", __func__);
+         cpu_relax();
+     }
+@@ -308,7 +308,7 @@ static int flush_context_reg(
+         if ( !(val & DMA_CCMD_ICC) )
+             break;
+         if ( NOW() > start_time + DMAR_OPERATION_TIMEOUT )
+-            panic("%s: DMAR hardware is malfunctional,"
++            printk("%s: DMAR hardware is malfunctional,"
+                   " please disable IOMMU\n", __func__);
+         cpu_relax();
+     }
+@@ -406,7 +406,7 @@ static int flush_iotlb_reg(void *_iommu, u16 did,
+         if ( !(val & DMA_TLB_IVT) )
+             break;
+         if ( NOW() > start_time + DMAR_OPERATION_TIMEOUT )
+-            panic("%s: DMAR hardware is malfunctional,"
++            printk("%s: DMAR hardware is malfunctional,"
+                   " please disable IOMMU\n", __func__);
+         cpu_relax();
+     }
+@@ -600,7 +600,7 @@ static int iommu_set_root_entry(struct iommu *iommu)
+         if ( sts & DMA_GSTS_RTPS )
+             break;
+         if ( NOW() > start_time + DMAR_OPERATION_TIMEOUT )
+-            panic("%s: DMAR hardware is malfunctional,"
++            printk("%s: DMAR hardware is malfunctional,"
+                   " please disable IOMMU\n", __func__);
+         cpu_relax();
+     }
+@@ -629,7 +629,7 @@ static void iommu_enable_translation(struct iommu *iommu)
+         if ( sts & DMA_GSTS_TES )
+             break;
+         if ( NOW() > start_time + DMAR_OPERATION_TIMEOUT )
+-            panic("%s: DMAR hardware is malfunctional,"
++            printk("%s: DMAR hardware is malfunctional,"
+                   " please disable IOMMU\n", __func__);
+         cpu_relax();
+     }
+@@ -657,7 +657,7 @@ static void iommu_disable_translation(struct iommu *iommu)
+         if ( !(sts & DMA_GSTS_TES) )
+             break;
+         if ( NOW() > start_time + DMAR_OPERATION_TIMEOUT )
+-            panic("%s: DMAR hardware is malfunctional,"
++            printk("%s: DMAR hardware is malfunctional,"
+                   " please disable IOMMU\n", __func__);
+         cpu_relax();
+     }
+@@ -1996,7 +1996,7 @@ void iommu_resume(void)
+     iommu_flush_all();
+     if ( init_vtd_hw() != 0  && force_iommu )
+-         panic("IOMMU setup failed, crash Xen for security purpose!\n");
++         printk("IOMMU setup failed, crash Xen for security purpose!\n");
+     for_each_drhd_unit ( drhd )
+     {
index 050a4a65cbf18cf8051e4af44b4225af52fc683e..79eebcd3acf635097c9fc0bda449268c207ce8ae 100644 (file)
@@ -22,3 +22,4 @@ ugly-hack-to-fix-sata
 serial-card
 boot-second-cd
 b-m-arb-sync-with-native-linux
+iommu-replace-panic-with-printk