diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-07-23 09:59:21 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-07-23 09:59:21 +0100 |
commit | 9cd4e059aee08dfa0d853a5a0e8471bf49b8b752 (patch) | |
tree | a5e3068283b2fc1c10507ec6f8195b1a0313835f | |
parent | 597683c799e9d53aba3d2af4758d35dd7bf437b4 (diff) | |
download | xen-9cd4e059aee08dfa0d853a5a0e8471bf49b8b752.tar.gz xen-9cd4e059aee08dfa0d853a5a0e8471bf49b8b752.tar.bz2 xen-9cd4e059aee08dfa0d853a5a0e8471bf49b8b752.zip |
vtd: no need to flush iotlb or write buffer in iommu_page_mapping().
Signed-off-by: Weidong Han <weidong.han@intel.com>
-rw-r--r-- | xen/drivers/passthrough/vtd/iommu.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c index 3a11f5f007..1090cee821 100644 --- a/xen/drivers/passthrough/vtd/iommu.c +++ b/xen/drivers/passthrough/vtd/iommu.c @@ -1523,9 +1523,6 @@ int intel_iommu_unmap_page(struct domain *d, unsigned long gfn) int iommu_page_mapping(struct domain *domain, paddr_t iova, paddr_t hpa, size_t size, int prot) { - struct hvm_iommu *hd = domain_hvm_iommu(domain); - struct acpi_drhd_unit *drhd; - struct iommu *iommu; u64 start_pfn, end_pfn; struct dma_pte *page = NULL, *pte = NULL; int index; @@ -1553,18 +1550,6 @@ int iommu_page_mapping(struct domain *domain, paddr_t iova, index++; } - for_each_drhd_unit ( drhd ) - { - iommu = drhd->iommu; - - if ( !test_bit(iommu->index, &hd->iommu_bitmap) ) - continue; - - if ( iommu_flush_iotlb_psi(iommu, domain_iommu_domid(domain), - iova, index, 1) ) - iommu_flush_write_buffer(iommu); - } - return 0; } @@ -1803,11 +1788,9 @@ int intel_iommu_assign_device(struct domain *d, u8 bus, u8 devfn) ret = iommu_prepare_rmrr_dev(d, rmrr, bus, devfn); if ( ret ) - { gdprintk(XENLOG_ERR VTDPREFIX, "IOMMU: mapping reserved region failed\n"); - return ret; - } + return ret; } } |