[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] vt-d: Clean up hypervisor logging.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1197454959 0
# Node ID 8ae3f083490a804ca1ae4b5b9463a418e1a7e71a
# Parent  ca077fa59206082270f64e0e19d24885877d50f2
vt-d: Clean up hypervisor logging.
Signed-off-by: Weidong Han <weidong.han@xxxxxxxxx>
---
 xen/arch/x86/hvm/vmx/vtd/dmar.c        |    1 -
 xen/arch/x86/hvm/vmx/vtd/intel-iommu.c |   26 +++++++++++---------------
 xen/arch/x86/hvm/vmx/vtd/io.c          |    7 ++++---
 xen/arch/x86/hvm/vmx/vtd/utils.c       |    1 -
 xen/include/asm-x86/iommu.h            |    1 +
 5 files changed, 16 insertions(+), 20 deletions(-)

diff -r ca077fa59206 -r 8ae3f083490a xen/arch/x86/hvm/vmx/vtd/dmar.c
--- a/xen/arch/x86/hvm/vmx/vtd/dmar.c   Wed Dec 12 10:19:44 2007 +0000
+++ b/xen/arch/x86/hvm/vmx/vtd/dmar.c   Wed Dec 12 10:22:39 2007 +0000
@@ -30,7 +30,6 @@
 #include "pci-direct.h"
 #include "pci_regs.h"
 
-#define VTDPREFIX
 int vtd_enabled;
 boolean_param("vtd", vtd_enabled);
 
diff -r ca077fa59206 -r 8ae3f083490a xen/arch/x86/hvm/vmx/vtd/intel-iommu.c
--- a/xen/arch/x86/hvm/vmx/vtd/intel-iommu.c    Wed Dec 12 10:19:44 2007 +0000
+++ b/xen/arch/x86/hvm/vmx/vtd/intel-iommu.c    Wed Dec 12 10:22:39 2007 +0000
@@ -37,7 +37,6 @@
 
 #define domain_iommu_domid(d) ((d)->arch.hvm_domain.hvm_iommu.iommu_domid)
 
-#define VTDPREFIX
 extern void print_iommu_regs(struct acpi_drhd_unit *drhd);
 extern void print_vtd_entries(struct domain *d, int bus, int devfn,
                               unsigned long gmfn);
@@ -954,7 +953,7 @@ struct iommu *iommu_alloc(void *hw_data)
 
     set_fixmap_nocache(FIX_IOMMU_REGS_BASE_0 + nr_iommus, drhd->address);
     iommu->reg = (void *) fix_to_virt(FIX_IOMMU_REGS_BASE_0 + nr_iommus);
-    dprintk(XENLOG_ERR VTDPREFIX,
+    dprintk(XENLOG_INFO VTDPREFIX,
             "iommu_alloc: iommu->reg = %p drhd->address = %lx\n",
             iommu->reg, drhd->address);
     nr_iommus++;
@@ -1058,7 +1057,7 @@ static int domain_context_mapping_one(
 
     if ( context_present(*context) )
     {
-        gdprintk(XENLOG_INFO VTDPREFIX,
+        gdprintk(XENLOG_WARNING VTDPREFIX,
                  "domain_context_mapping_one:context present:bdf=%x:%x:%x\n",
                  bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
         return 0;
@@ -1097,7 +1096,7 @@ static int domain_context_mapping_one(
     iommu_flush_cache_entry(iommu, context);
 
     gdprintk(XENLOG_INFO VTDPREFIX,
-             "context_mapping_one-%x:%x:%x-*context=%"PRIx64":%"PRIx64
+             "domain_context_mapping_one-%x:%x:%x-*context=%"PRIx64":%"PRIx64
              " hd->pgd=%p\n",
              bus, PCI_SLOT(devfn), PCI_FUNC(devfn),
              context->hi, context->lo, hd->pgd);
@@ -1198,14 +1197,11 @@ static int domain_context_mapping(
             PCI_FUNC(pdev->devfn), PCI_SUBORDINATE_BUS);
 
         if ( sec_bus != sub_bus )
-        {
-            dprintk(XENLOG_INFO VTDPREFIX,
-                    "context_mapping: nested PCI bridge not supported\n");
-            dprintk(XENLOG_INFO VTDPREFIX,
-                    "    bdf = %x:%x:%x sec_bus = %x sub_bus = %x\n",
-                    pdev->bus, PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn),
-                    sec_bus, sub_bus);
-        }
+            gdprintk(XENLOG_WARNING VTDPREFIX,
+                     "context_context_mapping: nested PCI bridge not "
+                     "supported: bdf = %x:%x:%x sec_bus = %x sub_bus = %x\n",
+                     pdev->bus, PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn),
+                     sec_bus, sub_bus);
         break;
     case DEV_TYPE_PCIe_ENDPOINT:
         gdprintk(XENLOG_INFO VTDPREFIX,
@@ -1227,7 +1223,7 @@ static int domain_context_mapping(
             if ( bus2bridge[pdev->bus].bus != 0 )
                 gdprintk(XENLOG_WARNING VTDPREFIX,
                          "domain_context_mapping:bus2bridge"
-                         "[pdev->bus].bus != 0\n");
+                         "[%d].bus != 0\n", pdev->bus);
 
             ret = domain_context_mapping_one(
                 domain, iommu,
@@ -1345,8 +1341,8 @@ static int domain_context_unmap(
         {
             if ( bus2bridge[pdev->bus].bus != 0 )
                 gdprintk(XENLOG_WARNING VTDPREFIX,
-                         "domain_context_mapping:"
-                         "bus2bridge[pdev->bus].bus != 0\n");
+                         "domain_context_unmap:"
+                         "bus2bridge[%d].bus != 0\n", pdev->bus);
 
             ret = domain_context_unmap_one(domain, iommu,
                                            (u8)(bus2bridge[pdev->bus].bus),
diff -r ca077fa59206 -r 8ae3f083490a xen/arch/x86/hvm/vmx/vtd/io.c
--- a/xen/arch/x86/hvm/vmx/vtd/io.c     Wed Dec 12 10:19:44 2007 +0000
+++ b/xen/arch/x86/hvm/vmx/vtd/io.c     Wed Dec 12 10:22:39 2007 +0000
@@ -131,7 +131,7 @@ int pt_irq_create_bind_vtd(
         pirq_guest_bind(d->vcpu[0], machine_gsi, BIND_PIRQ__WILL_SHARE);
     }
 
-    gdprintk(XENLOG_INFO,
+    gdprintk(XENLOG_INFO VTDPREFIX,
              "VT-d irq bind: m_irq = %x device = %x intx = %x\n",
              machine_gsi, device, intx);
     return 0;
@@ -187,7 +187,7 @@ static void hvm_dpci_isairq_eoi(struct d
                 if ( --dpci->mirq[i].pending == 0 )
                 {
                     spin_unlock(&dpci->dirq_lock);
-                    gdprintk(XENLOG_INFO,
+                    gdprintk(XENLOG_INFO VTDPREFIX,
                              "hvm_dpci_isairq_eoi:: mirq = %x\n", i);
                     stop_timer(&dpci->hvm_timer[irq_to_vector(i)]);
                     pirq_guest_eoi(d, i);
@@ -226,7 +226,8 @@ void hvm_dpci_eoi(struct domain *d, unsi
     {
         spin_unlock(&hvm_irq_dpci->dirq_lock);
 
-        gdprintk(XENLOG_INFO, "hvm_dpci_eoi:: mirq = %x\n", machine_gsi);
+        gdprintk(XENLOG_INFO VTDPREFIX,
+                 "hvm_dpci_eoi:: mirq = %x\n", machine_gsi);
         stop_timer(&hvm_irq_dpci->hvm_timer[irq_to_vector(machine_gsi)]);
         if ( (ent == NULL) || !ent->fields.mask )
             pirq_guest_eoi(d, machine_gsi);
diff -r ca077fa59206 -r 8ae3f083490a xen/arch/x86/hvm/vmx/vtd/utils.c
--- a/xen/arch/x86/hvm/vmx/vtd/utils.c  Wed Dec 12 10:19:44 2007 +0000
+++ b/xen/arch/x86/hvm/vmx/vtd/utils.c  Wed Dec 12 10:22:39 2007 +0000
@@ -34,7 +34,6 @@
 #include <xen/xmalloc.h>
 #include <xen/inttypes.h>
 
-#define VTDPREFIX "[VT-D]"
 #define INTEL   0x8086
 #define SEABURG 0x4000
 #define C_STEP  2
diff -r ca077fa59206 -r 8ae3f083490a xen/include/asm-x86/iommu.h
--- a/xen/include/asm-x86/iommu.h       Wed Dec 12 10:19:44 2007 +0000
+++ b/xen/include/asm-x86/iommu.h       Wed Dec 12 10:22:39 2007 +0000
@@ -79,5 +79,6 @@ int pt_irq_create_bind_vtd(struct domain
                            xen_domctl_bind_pt_irq_t *pt_irq_bind);
 
 #define PT_IRQ_TIME_OUT MILLISECS(8)
+#define VTDPREFIX "[VT-D]"
 
 #endif /* _IOMMU_H_ */

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.