WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [VTD] print out debug message in vt-d fau

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [VTD] print out debug message in vt-d fault handler only when iommu=debug is set
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Tue, 28 Jun 2011 07:44:17 +0100
Delivery-date: Mon, 27 Jun 2011 23:47:06 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Allen Kay <allen.m.kay@xxxxxxxxx>
# Date 1308823884 -3600
# Node ID d3ac71f22e8621d9a7604f82f3976337e6c97a9a
# Parent  065ca14be963fe4da55d629ed0b3692a14253a86
[VTD] print out debug message in vt-d fault handler only when iommu=debug is set

Print out debug messages in vtd_page_fault() handler only when
iommu=debug is set xen boot parameter.

Signed-off-by: Allen Kay <allen.m.kay@xxxxxxxxx>
---


diff -r 065ca14be963 -r d3ac71f22e86 xen/drivers/passthrough/amd/iommu_acpi.c
--- a/xen/drivers/passthrough/amd/iommu_acpi.c  Wed Jun 22 14:43:53 2011 +0100
+++ b/xen/drivers/passthrough/amd/iommu_acpi.c  Thu Jun 23 11:11:24 2011 +0100
@@ -817,7 +817,7 @@
 
     BUG_ON(!table);
 
-    if ( amd_iommu_debug )
+    if ( iommu_debug )
         dump_acpi_table_header(table);
 
     /* parse IVRS blocks */
diff -r 065ca14be963 -r d3ac71f22e86 xen/drivers/passthrough/iommu.c
--- a/xen/drivers/passthrough/iommu.c   Wed Jun 22 14:43:53 2011 +0100
+++ b/xen/drivers/passthrough/iommu.c   Thu Jun 23 11:11:24 2011 +0100
@@ -48,7 +48,7 @@
 bool_t __read_mostly iommu_qinval = 1;
 bool_t __read_mostly iommu_intremap = 1;
 bool_t __read_mostly iommu_hap_pt_share;
-bool_t __read_mostly amd_iommu_debug;
+bool_t __read_mostly iommu_debug;
 bool_t __read_mostly amd_iommu_perdev_intremap;
 
 static void __init parse_iommu_param(char *s)
@@ -74,8 +74,8 @@
             iommu_qinval = 0;
         else if ( !strcmp(s, "no-intremap") )
             iommu_intremap = 0;
-        else if ( !strcmp(s, "amd-iommu-debug") )
-            amd_iommu_debug = 1;
+        else if ( !strcmp(s, "debug") )
+            iommu_debug = 1;
         else if ( !strcmp(s, "amd-iommu-perdev-intremap") )
             amd_iommu_perdev_intremap = 1;
         else if ( !strcmp(s, "dom0-passthrough") )
diff -r 065ca14be963 -r d3ac71f22e86 xen/drivers/passthrough/vtd/iommu.c
--- a/xen/drivers/passthrough/vtd/iommu.c       Wed Jun 22 14:43:53 2011 +0100
+++ b/xen/drivers/passthrough/vtd/iommu.c       Thu Jun 23 11:11:24 2011 +0100
@@ -818,7 +818,7 @@
 
     if ( fault_type == DMA_REMAP )
     {
-        dprintk(XENLOG_WARNING VTDPREFIX,
+        INTEL_IOMMU_DEBUG(
                 "DMAR:[%s] Request device [%02x:%02x.%d] "
                 "fault addr %"PRIx64", iommu reg = %p\n"
                 "DMAR:[fault reason %02xh] %s\n",
@@ -827,12 +827,13 @@
                 PCI_FUNC(source_id & 0xFF), addr, iommu->reg,
                 fault_reason, reason);
 #ifndef __i386__ /* map_domain_page() cannot be used in this context */
-        print_vtd_entries(iommu, (source_id >> 8),
+       if (iommu_debug)
+            print_vtd_entries(iommu, (source_id >> 8),
                           (source_id & 0xff), (addr >> PAGE_SHIFT));
 #endif
     }
     else
-        dprintk(XENLOG_WARNING VTDPREFIX,
+        INTEL_IOMMU_DEBUG(
                 "INTR-REMAP: Request device [%02x:%02x.%d] "
                 "fault index %"PRIx64", iommu reg = %p\n"
                 "INTR-REMAP:[fault reason %02xh] %s\n",
@@ -846,26 +847,19 @@
 static void iommu_fault_status(u32 fault_status)
 {
     if ( fault_status & DMA_FSTS_PFO )
-        dprintk(XENLOG_ERR VTDPREFIX,
-            "iommu_fault_status: Fault Overflow\n");
+        INTEL_IOMMU_DEBUG("iommu_fault_status: Fault Overflow\n");
     if ( fault_status & DMA_FSTS_PPF )
-        dprintk(XENLOG_ERR VTDPREFIX,
-            "iommu_fault_status: Primary Pending Fault\n");
+        INTEL_IOMMU_DEBUG("iommu_fault_status: Primary Pending Fault\n");
     if ( fault_status & DMA_FSTS_AFO )
-        dprintk(XENLOG_ERR VTDPREFIX,
-            "iommu_fault_status: Advanced Fault Overflow\n");
+        INTEL_IOMMU_DEBUG("iommu_fault_status: Advanced Fault Overflow\n");
     if ( fault_status & DMA_FSTS_APF )
-        dprintk(XENLOG_ERR VTDPREFIX,
-            "iommu_fault_status: Advanced Pending Fault\n");
+        INTEL_IOMMU_DEBUG("iommu_fault_status: Advanced Pending Fault\n");
     if ( fault_status & DMA_FSTS_IQE )
-        dprintk(XENLOG_ERR VTDPREFIX,
-            "iommu_fault_status: Invalidation Queue Error\n");
+        INTEL_IOMMU_DEBUG("iommu_fault_status: Invalidation Queue Error\n");
     if ( fault_status & DMA_FSTS_ICE )
-        dprintk(XENLOG_ERR VTDPREFIX,
-            "iommu_fault_status: Invalidation Completion Error\n");
+        INTEL_IOMMU_DEBUG("iommu_fault_status: Invalidation Completion 
Error\n");
     if ( fault_status & DMA_FSTS_ITE )
-        dprintk(XENLOG_ERR VTDPREFIX,
-            "iommu_fault_status: Invalidation Time-out Error\n");
+        INTEL_IOMMU_DEBUG("iommu_fault_status: Invalidation Time-out Error\n");
 }
 
 #define PRIMARY_FAULT_REG_LEN (16)
diff -r 065ca14be963 -r d3ac71f22e86 xen/drivers/passthrough/vtd/iommu.h
--- a/xen/drivers/passthrough/vtd/iommu.h       Wed Jun 22 14:43:53 2011 +0100
+++ b/xen/drivers/passthrough/vtd/iommu.h       Thu Jun 23 11:11:24 2011 +0100
@@ -512,4 +512,11 @@
     struct acpi_drhd_unit *drhd;
 };
 
+#define INTEL_IOMMU_DEBUG(fmt, args...) \
+    do  \
+    {   \
+        if ( iommu_debug )  \
+            dprintk(XENLOG_WARNING VTDPREFIX, fmt, ## args);    \
+    } while(0)
+
 #endif
diff -r 065ca14be963 -r d3ac71f22e86 
xen/include/asm-x86/hvm/svm/amd-iommu-proto.h
--- a/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h     Wed Jun 22 14:43:53 
2011 +0100
+++ b/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h     Thu Jun 23 11:11:24 
2011 +0100
@@ -35,7 +35,7 @@
 #define AMD_IOMMU_DEBUG(fmt, args...) \
     do  \
     {   \
-        if ( amd_iommu_debug )  \
+        if ( iommu_debug )  \
             printk(XENLOG_INFO "AMD-Vi: " fmt, ## args);    \
     } while(0)
 
diff -r 065ca14be963 -r d3ac71f22e86 xen/include/xen/iommu.h
--- a/xen/include/xen/iommu.h   Wed Jun 22 14:43:53 2011 +0100
+++ b/xen/include/xen/iommu.h   Thu Jun 23 11:11:24 2011 +0100
@@ -31,7 +31,7 @@
 extern bool_t iommu_workaround_bios_bug, iommu_passthrough;
 extern bool_t iommu_snoop, iommu_qinval, iommu_intremap;
 extern bool_t iommu_hap_pt_share;
-extern bool_t amd_iommu_debug;
+extern bool_t iommu_debug;
 extern bool_t amd_iommu_perdev_intremap;
 
 extern struct rangeset *mmio_ro_ranges;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [VTD] print out debug message in vt-d fault handler only when iommu=debug is set, Xen patchbot-unstable <=