diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c index a28c6eb0b6..a8737bed41 100644 --- a/xen/arch/x86/mm/p2m-ept.c +++ b/xen/arch/x86/mm/p2m-ept.c @@ -801,8 +801,6 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn, p2m->max_mapped_pfn = gfn + (1UL << order) - 1; out: - unmap_domain_page(table); - if ( needs_sync != sync_off ) ept_sync_domain(p2m); @@ -825,6 +823,8 @@ out: } } + unmap_domain_page(table); + /* Release the old intermediate tables, if any. This has to be the last thing we do, after the ept_sync_domain() and removal from the iommu tables, so as to avoid a potential