From: Jean Guyader Date: Tue, 22 Sep 2009 14:48:56 +0000 (+0100) Subject: XC-221: Make iommu malfunctional non fatal. X-Git-Url: http://xenbits.xen.org/gitweb?a=commitdiff_plain;h=fb62cc9bd57a9e9f486a1d57aca6b1702b6c4704;p=xenclient%2Fxen-pq.git XC-221: Make iommu malfunctional non fatal. --- diff --git a/master/iommu-replace-panic-with-printk b/master/iommu-replace-panic-with-printk new file mode 100644 index 0000000..e11f86f --- /dev/null +++ b/master/iommu-replace-panic-with-printk @@ -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 ) + { diff --git a/master/series b/master/series index 050a4a6..79eebcd 100644 --- a/master/series +++ b/master/series @@ -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