diff --git a/xen/common/memory.c b/xen/common/memory.c index 257f4b03de..c2dd31bd0d 100644 --- a/xen/common/memory.c +++ b/xen/common/memory.c @@ -204,6 +204,12 @@ int guest_remove_page(struct domain *d, unsigned long gmfn) p2m_mem_paging_drop_page(d, gmfn, p2mt); return 1; } + if ( p2mt == p2m_mmio_direct ) + { + clear_mmio_p2m_entry(d, gmfn); + put_gfn(d, gmfn); + return 1; + } #else mfn = gmfn_to_mfn(d, gmfn); #endif