[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] amd iommu: Remove a useless flag and fix I/O page fault for hvm
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1252309394 -3600 # Node ID fdb0228d6689cf6d38cef76ff74326cbed80f249 # Parent 6a2a099c8ef420ae8aa24bcc52788008eb97a898 amd iommu: Remove a useless flag and fix I/O page fault for hvm passthru devices. Signed-off-by: Wei Wang <wei.wang2@xxxxxxx> --- xen/drivers/passthrough/amd/iommu_map.c | 10 ---------- xen/drivers/passthrough/iommu.c | 3 ++- xen/include/xen/hvm/iommu.h | 1 - 3 files changed, 2 insertions(+), 12 deletions(-) diff -r 6a2a099c8ef4 -r fdb0228d6689 xen/drivers/passthrough/amd/iommu_map.c --- a/xen/drivers/passthrough/amd/iommu_map.c Mon Sep 07 08:42:50 2009 +0100 +++ b/xen/drivers/passthrough/amd/iommu_map.c Mon Sep 07 08:43:14 2009 +0100 @@ -459,9 +459,6 @@ int amd_iommu_map_page(struct domain *d, spin_lock(&hd->mapping_lock); - if ( is_hvm_domain(d) && !hd->p2m_synchronized ) - goto out; - iommu_l2e = iommu_l2e_from_pfn(hd->root_table, hd->paging_mode, gfn); if ( iommu_l2e == 0 ) { @@ -472,7 +469,6 @@ int amd_iommu_map_page(struct domain *d, } set_iommu_l1e_present(iommu_l2e, gfn, (u64)mfn << PAGE_SHIFT, iw, ir); -out: spin_unlock(&hd->mapping_lock); return 0; } @@ -487,12 +483,6 @@ int amd_iommu_unmap_page(struct domain * BUG_ON( !hd->root_table ); spin_lock(&hd->mapping_lock); - - if ( is_hvm_domain(d) && !hd->p2m_synchronized ) - { - spin_unlock(&hd->mapping_lock); - return 0; - } iommu_l2e = iommu_l2e_from_pfn(hd->root_table, hd->paging_mode, gfn); diff -r 6a2a099c8ef4 -r fdb0228d6689 xen/drivers/passthrough/iommu.c --- a/xen/drivers/passthrough/iommu.c Mon Sep 07 08:42:50 2009 +0100 +++ b/xen/drivers/passthrough/iommu.c Mon Sep 07 08:43:14 2009 +0100 @@ -158,7 +158,8 @@ static int iommu_populate_page_table(str page_list_for_each ( page, &d->page_list ) { - if ( (page->u.inuse.type_info & PGT_type_mask) == PGT_writable_page ) + if ( is_hvm_domain(d) || + (page->u.inuse.type_info & PGT_type_mask) == PGT_writable_page ) { rc = hd->platform_ops->map_page( d, mfn_to_gmfn(d, page_to_mfn(page)), page_to_mfn(page)); diff -r 6a2a099c8ef4 -r fdb0228d6689 xen/include/xen/hvm/iommu.h --- a/xen/include/xen/hvm/iommu.h Mon Sep 07 08:42:50 2009 +0100 +++ b/xen/include/xen/hvm/iommu.h Mon Sep 07 08:43:14 2009 +0100 @@ -41,7 +41,6 @@ struct hvm_iommu { int domain_id; int paging_mode; struct page_info *root_table; - bool_t p2m_synchronized; /* iommu_ops */ struct iommu_ops *platform_ops; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |