ia64/xen-unstable

changeset 16593:8ae3f083490a

vt-d: Clean up hypervisor logging.
Signed-off-by: Weidong Han <weidong.han@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Dec 12 10:22:39 2007 +0000 (2007-12-12)
parents ca077fa59206
children 5a451d2c36bc
files xen/arch/x86/hvm/vmx/vtd/dmar.c xen/arch/x86/hvm/vmx/vtd/intel-iommu.c xen/arch/x86/hvm/vmx/vtd/io.c xen/arch/x86/hvm/vmx/vtd/utils.c xen/include/asm-x86/iommu.h
line diff
     1.1 --- a/xen/arch/x86/hvm/vmx/vtd/dmar.c	Wed Dec 12 10:19:44 2007 +0000
     1.2 +++ b/xen/arch/x86/hvm/vmx/vtd/dmar.c	Wed Dec 12 10:22:39 2007 +0000
     1.3 @@ -30,7 +30,6 @@
     1.4  #include "pci-direct.h"
     1.5  #include "pci_regs.h"
     1.6  
     1.7 -#define VTDPREFIX
     1.8  int vtd_enabled;
     1.9  boolean_param("vtd", vtd_enabled);
    1.10  
     2.1 --- a/xen/arch/x86/hvm/vmx/vtd/intel-iommu.c	Wed Dec 12 10:19:44 2007 +0000
     2.2 +++ b/xen/arch/x86/hvm/vmx/vtd/intel-iommu.c	Wed Dec 12 10:22:39 2007 +0000
     2.3 @@ -37,7 +37,6 @@
     2.4  
     2.5  #define domain_iommu_domid(d) ((d)->arch.hvm_domain.hvm_iommu.iommu_domid)
     2.6  
     2.7 -#define VTDPREFIX
     2.8  extern void print_iommu_regs(struct acpi_drhd_unit *drhd);
     2.9  extern void print_vtd_entries(struct domain *d, int bus, int devfn,
    2.10                                unsigned long gmfn);
    2.11 @@ -954,7 +953,7 @@ struct iommu *iommu_alloc(void *hw_data)
    2.12  
    2.13      set_fixmap_nocache(FIX_IOMMU_REGS_BASE_0 + nr_iommus, drhd->address);
    2.14      iommu->reg = (void *) fix_to_virt(FIX_IOMMU_REGS_BASE_0 + nr_iommus);
    2.15 -    dprintk(XENLOG_ERR VTDPREFIX,
    2.16 +    dprintk(XENLOG_INFO VTDPREFIX,
    2.17              "iommu_alloc: iommu->reg = %p drhd->address = %lx\n",
    2.18              iommu->reg, drhd->address);
    2.19      nr_iommus++;
    2.20 @@ -1058,7 +1057,7 @@ static int domain_context_mapping_one(
    2.21  
    2.22      if ( context_present(*context) )
    2.23      {
    2.24 -        gdprintk(XENLOG_INFO VTDPREFIX,
    2.25 +        gdprintk(XENLOG_WARNING VTDPREFIX,
    2.26                   "domain_context_mapping_one:context present:bdf=%x:%x:%x\n",
    2.27                   bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
    2.28          return 0;
    2.29 @@ -1097,7 +1096,7 @@ static int domain_context_mapping_one(
    2.30      iommu_flush_cache_entry(iommu, context);
    2.31  
    2.32      gdprintk(XENLOG_INFO VTDPREFIX,
    2.33 -             "context_mapping_one-%x:%x:%x-*context=%"PRIx64":%"PRIx64
    2.34 +             "domain_context_mapping_one-%x:%x:%x-*context=%"PRIx64":%"PRIx64
    2.35               " hd->pgd=%p\n",
    2.36               bus, PCI_SLOT(devfn), PCI_FUNC(devfn),
    2.37               context->hi, context->lo, hd->pgd);
    2.38 @@ -1198,14 +1197,11 @@ static int domain_context_mapping(
    2.39              PCI_FUNC(pdev->devfn), PCI_SUBORDINATE_BUS);
    2.40  
    2.41          if ( sec_bus != sub_bus )
    2.42 -        {
    2.43 -            dprintk(XENLOG_INFO VTDPREFIX,
    2.44 -                    "context_mapping: nested PCI bridge not supported\n");
    2.45 -            dprintk(XENLOG_INFO VTDPREFIX,
    2.46 -                    "    bdf = %x:%x:%x sec_bus = %x sub_bus = %x\n",
    2.47 -                    pdev->bus, PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn),
    2.48 -                    sec_bus, sub_bus);
    2.49 -        }
    2.50 +            gdprintk(XENLOG_WARNING VTDPREFIX,
    2.51 +                     "context_context_mapping: nested PCI bridge not "
    2.52 +                     "supported: bdf = %x:%x:%x sec_bus = %x sub_bus = %x\n",
    2.53 +                     pdev->bus, PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn),
    2.54 +                     sec_bus, sub_bus);
    2.55          break;
    2.56      case DEV_TYPE_PCIe_ENDPOINT:
    2.57          gdprintk(XENLOG_INFO VTDPREFIX,
    2.58 @@ -1227,7 +1223,7 @@ static int domain_context_mapping(
    2.59              if ( bus2bridge[pdev->bus].bus != 0 )
    2.60                  gdprintk(XENLOG_WARNING VTDPREFIX,
    2.61                           "domain_context_mapping:bus2bridge"
    2.62 -                         "[pdev->bus].bus != 0\n");
    2.63 +                         "[%d].bus != 0\n", pdev->bus);
    2.64  
    2.65              ret = domain_context_mapping_one(
    2.66                  domain, iommu,
    2.67 @@ -1345,8 +1341,8 @@ static int domain_context_unmap(
    2.68          {
    2.69              if ( bus2bridge[pdev->bus].bus != 0 )
    2.70                  gdprintk(XENLOG_WARNING VTDPREFIX,
    2.71 -                         "domain_context_mapping:"
    2.72 -                         "bus2bridge[pdev->bus].bus != 0\n");
    2.73 +                         "domain_context_unmap:"
    2.74 +                         "bus2bridge[%d].bus != 0\n", pdev->bus);
    2.75  
    2.76              ret = domain_context_unmap_one(domain, iommu,
    2.77                                             (u8)(bus2bridge[pdev->bus].bus),
     3.1 --- a/xen/arch/x86/hvm/vmx/vtd/io.c	Wed Dec 12 10:19:44 2007 +0000
     3.2 +++ b/xen/arch/x86/hvm/vmx/vtd/io.c	Wed Dec 12 10:22:39 2007 +0000
     3.3 @@ -131,7 +131,7 @@ int pt_irq_create_bind_vtd(
     3.4          pirq_guest_bind(d->vcpu[0], machine_gsi, BIND_PIRQ__WILL_SHARE);
     3.5      }
     3.6  
     3.7 -    gdprintk(XENLOG_INFO,
     3.8 +    gdprintk(XENLOG_INFO VTDPREFIX,
     3.9               "VT-d irq bind: m_irq = %x device = %x intx = %x\n",
    3.10               machine_gsi, device, intx);
    3.11      return 0;
    3.12 @@ -187,7 +187,7 @@ static void hvm_dpci_isairq_eoi(struct d
    3.13                  if ( --dpci->mirq[i].pending == 0 )
    3.14                  {
    3.15                      spin_unlock(&dpci->dirq_lock);
    3.16 -                    gdprintk(XENLOG_INFO,
    3.17 +                    gdprintk(XENLOG_INFO VTDPREFIX,
    3.18                               "hvm_dpci_isairq_eoi:: mirq = %x\n", i);
    3.19                      stop_timer(&dpci->hvm_timer[irq_to_vector(i)]);
    3.20                      pirq_guest_eoi(d, i);
    3.21 @@ -226,7 +226,8 @@ void hvm_dpci_eoi(struct domain *d, unsi
    3.22      {
    3.23          spin_unlock(&hvm_irq_dpci->dirq_lock);
    3.24  
    3.25 -        gdprintk(XENLOG_INFO, "hvm_dpci_eoi:: mirq = %x\n", machine_gsi);
    3.26 +        gdprintk(XENLOG_INFO VTDPREFIX,
    3.27 +                 "hvm_dpci_eoi:: mirq = %x\n", machine_gsi);
    3.28          stop_timer(&hvm_irq_dpci->hvm_timer[irq_to_vector(machine_gsi)]);
    3.29          if ( (ent == NULL) || !ent->fields.mask )
    3.30              pirq_guest_eoi(d, machine_gsi);
     4.1 --- a/xen/arch/x86/hvm/vmx/vtd/utils.c	Wed Dec 12 10:19:44 2007 +0000
     4.2 +++ b/xen/arch/x86/hvm/vmx/vtd/utils.c	Wed Dec 12 10:22:39 2007 +0000
     4.3 @@ -34,7 +34,6 @@
     4.4  #include <xen/xmalloc.h>
     4.5  #include <xen/inttypes.h>
     4.6  
     4.7 -#define VTDPREFIX "[VT-D]"
     4.8  #define INTEL   0x8086
     4.9  #define SEABURG 0x4000
    4.10  #define C_STEP  2
     5.1 --- a/xen/include/asm-x86/iommu.h	Wed Dec 12 10:19:44 2007 +0000
     5.2 +++ b/xen/include/asm-x86/iommu.h	Wed Dec 12 10:22:39 2007 +0000
     5.3 @@ -79,5 +79,6 @@ int pt_irq_create_bind_vtd(struct domain
     5.4                             xen_domctl_bind_pt_irq_t *pt_irq_bind);
     5.5  
     5.6  #define PT_IRQ_TIME_OUT MILLISECS(8)
     5.7 +#define VTDPREFIX "[VT-D]"
     5.8  
     5.9  #endif /* _IOMMU_H_ */