ia64/xen-unstable

changeset 17079:38b532eea3bf

vt-d: Fix dom0 boot issue with vtd=1 on Stoakley platform. Turn off
excessive messages.

Signed-off-by: Allen Kay <allen.m.kay@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Feb 15 09:54:28 2008 +0000 (2008-02-15)
parents 8210e430be2b
children 03d13b696027
files xen/arch/x86/hvm/vmx/vtd/dmar.c xen/arch/x86/hvm/vmx/vtd/intel-iommu.c
line diff
     1.1 --- a/xen/arch/x86/hvm/vmx/vtd/dmar.c	Fri Feb 15 09:51:34 2008 +0000
     1.2 +++ b/xen/arch/x86/hvm/vmx/vtd/dmar.c	Fri Feb 15 09:54:28 2008 +0000
     1.3 @@ -102,7 +102,7 @@ struct iommu * ioapic_to_iommu(unsigned 
     1.4              return drhd->iommu;
     1.5          }
     1.6      }
     1.7 -    dprintk(XENLOG_WARNING VTDPREFIX, "returning NULL\n");
     1.8 +    dprintk(XENLOG_INFO VTDPREFIX, "returning NULL\n");
     1.9      return NULL;
    1.10  }
    1.11  
     2.1 --- a/xen/arch/x86/hvm/vmx/vtd/intel-iommu.c	Fri Feb 15 09:51:34 2008 +0000
     2.2 +++ b/xen/arch/x86/hvm/vmx/vtd/intel-iommu.c	Fri Feb 15 09:54:28 2008 +0000
     2.3 @@ -1811,7 +1811,18 @@ static int init_vtd_hw(void)
     2.4          flush = iommu_get_flush(iommu);
     2.5          flush->context = flush_context_reg;
     2.6          flush->iotlb = flush_iotlb_reg;
     2.7 +    }
     2.8 +    return 0;
     2.9 +}
    2.10  
    2.11 +static int init_vtd2_hw(void)
    2.12 +{
    2.13 +    struct acpi_drhd_unit *drhd;
    2.14 +    struct iommu *iommu;
    2.15 +
    2.16 +    for_each_drhd_unit ( drhd )
    2.17 +    {
    2.18 +        iommu = drhd->iommu;
    2.19          if ( qinval_setup(iommu) != 0 )
    2.20              dprintk(XENLOG_ERR VTDPREFIX,
    2.21                      "Queued Invalidation hardware not found\n");
    2.22 @@ -1883,12 +1894,12 @@ int iommu_setup(void)
    2.23      for ( i = 0; i < max_page; i++ )
    2.24          iommu_map_page(dom0, i, i);
    2.25  
    2.26 -    enable_vtd_translation();
    2.27 -    if ( init_vtd_hw() )
    2.28 -        goto error;
    2.29 +    init_vtd_hw();
    2.30      setup_dom0_devices();
    2.31      setup_dom0_rmrr();
    2.32      iommu_flush_all();
    2.33 +    enable_vtd_translation();
    2.34 +    init_vtd2_hw();
    2.35  
    2.36      return 0;
    2.37