From: Malcolm Crossley <malcolm.cross...@citrix.com> For Intel IGD passthrough, the guest driver programs the device to DMA to/from its RMRR.
c/s 619ecf8 "make {set,clear}_identity_p2m_mapping() work for PV guests" was incomplete for pre-Broadwell systems which did not support shared EPT. The correct check to use is iommu_use_hap_pt() not paging_mode_translate() as IOMMU mappings also need to be created for HVM guests with separate EPT and IOMMU tables. Signed-off-by: Malcolm Crossley <malcolm.cross...@citrix.com> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> CC: Jan Beulich <jbeul...@suse.com> CC: George Dunlap <george.dun...@eu.citrix.com> CC: Wei Liu <wei.l...@citrix.com> --- xen/arch/x86/mm/p2m.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c index c4329d2..c7f437c 100644 --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -957,7 +957,7 @@ int set_identity_p2m_entry(struct domain *d, unsigned long gfn, struct p2m_domain *p2m = p2m_get_hostp2m(d); int ret; - if ( !paging_mode_translate(p2m->domain) ) + if ( !iommu_use_hap_pt(d) ) { if ( !need_iommu(d) ) return 0; @@ -1032,7 +1032,7 @@ int clear_identity_p2m_entry(struct domain *d, unsigned long gfn) struct p2m_domain *p2m = p2m_get_hostp2m(d); int ret; - if ( !paging_mode_translate(d) ) + if ( !iommu_use_hap_pt(d) ) { if ( !need_iommu(d) ) return 0; -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel