ia64/xen-unstable

changeset 18141:2ba91f7495ae

vtd: no need to flush iotlb or write buffer in iommu_page_mapping().

Signed-off-by: Weidong Han <weidong.han@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Jul 23 09:59:21 2008 +0100 (2008-07-23)
parents ba6be1571cc6
children 351ce3b94e2d
files xen/drivers/passthrough/vtd/iommu.c
line diff
     1.1 --- a/xen/drivers/passthrough/vtd/iommu.c	Wed Jul 23 09:58:48 2008 +0100
     1.2 +++ b/xen/drivers/passthrough/vtd/iommu.c	Wed Jul 23 09:59:21 2008 +0100
     1.3 @@ -1523,9 +1523,6 @@ int intel_iommu_unmap_page(struct domain
     1.4  int iommu_page_mapping(struct domain *domain, paddr_t iova,
     1.5                         paddr_t hpa, size_t size, int prot)
     1.6  {
     1.7 -    struct hvm_iommu *hd = domain_hvm_iommu(domain);
     1.8 -    struct acpi_drhd_unit *drhd;
     1.9 -    struct iommu *iommu;
    1.10      u64 start_pfn, end_pfn;
    1.11      struct dma_pte *page = NULL, *pte = NULL;
    1.12      int index;
    1.13 @@ -1553,18 +1550,6 @@ int iommu_page_mapping(struct domain *do
    1.14          index++;
    1.15      }
    1.16  
    1.17 -    for_each_drhd_unit ( drhd )
    1.18 -    {
    1.19 -        iommu = drhd->iommu;
    1.20 -
    1.21 -        if ( !test_bit(iommu->index, &hd->iommu_bitmap) )
    1.22 -            continue;
    1.23 -
    1.24 -        if ( iommu_flush_iotlb_psi(iommu, domain_iommu_domid(domain),
    1.25 -                                   iova, index, 1) )
    1.26 -            iommu_flush_write_buffer(iommu);
    1.27 -    }
    1.28 -
    1.29      return 0;
    1.30  }
    1.31  
    1.32 @@ -1803,11 +1788,9 @@ int intel_iommu_assign_device(struct dom
    1.33  
    1.34              ret = iommu_prepare_rmrr_dev(d, rmrr, bus, devfn);
    1.35              if ( ret )
    1.36 -            {
    1.37                  gdprintk(XENLOG_ERR VTDPREFIX,
    1.38                           "IOMMU: mapping reserved region failed\n");
    1.39 -                return ret;
    1.40 -            }
    1.41 +            return ret;
    1.42          }
    1.43      }
    1.44