From: Wei Wang Date: Mon, 22 Aug 2011 09:10:04 +0000 (+0100) Subject: AMD IOMMU: remove iommu tlb flush for non-present entries X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~9952 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a55d5341577b6da26f071a8db4758b7afa59c51c;p=xen.git AMD IOMMU: remove iommu tlb flush for non-present entries Fixes dom0 boot on some systems. Signed-off-by: Wei Wang --- diff --git a/xen/drivers/passthrough/amd/iommu_map.c b/xen/drivers/passthrough/amd/iommu_map.c index ea07aaed63..9effc61c8f 100644 --- a/xen/drivers/passthrough/amd/iommu_map.c +++ b/xen/drivers/passthrough/amd/iommu_map.c @@ -796,7 +796,10 @@ int amd_iommu_map_page(struct domain *d, unsigned long gfn, unsigned long mfn, if ( !need_flush ) goto out; - amd_iommu_flush_pages(d, gfn, 0); + /* 4K mapping for PV guests never changes, + * no need to flush if we trust non-present bits */ + if ( is_hvm_domain(d) ) + amd_iommu_flush_pages(d, gfn, 0); for ( merge_level = IOMMU_PAGING_MODE_LEVEL_2; merge_level <= hd->paging_mode; merge_level++ )