diff --git a/xen/arch/x86/hvm/ioreq.c b/xen/arch/x86/hvm/ioreq.c index da36ef727e..a56d634f31 100644 --- a/xen/arch/x86/hvm/ioreq.c +++ b/xen/arch/x86/hvm/ioreq.c @@ -371,20 +371,12 @@ static int hvm_alloc_ioreq_mfn(struct hvm_ioreq_server *s, bool buf) return 0; } - /* - * Allocated IOREQ server pages are assigned to the emulating - * domain, not the target domain. This is safe because the emulating - * domain cannot be destroyed until the ioreq server is destroyed. - * Also we must use MEMF_no_refcount otherwise page allocation - * could fail if the emulating domain has already reached its - * maximum allocation. - */ - page = alloc_domheap_page(s->emulator, MEMF_no_refcount); + page = alloc_domheap_page(s->target, 0); if ( !page ) return -ENOMEM; - if ( !get_page_and_type(page, s->emulator, PGT_writable_page) ) + if ( !get_page_and_type(page, s->target, PGT_writable_page) ) { /* * The domain can't possibly know about this page yet, so failure diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 16c7d88a8e..55f1cb182e 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -4464,12 +4464,6 @@ int arch_acquire_resource(struct domain *d, unsigned int type, mfn_list[i] = mfn_x(mfn); } - - /* - * The frames will have been assigned to the domain that created - * the ioreq server. - */ - *flags |= XENMEM_rsrc_acq_caller_owned; break; } #endif