x86 / ioreq: use a MEMF_no_refcount allocation for server pages...
authorPaul Durrant <paul@xen.org>
Tue, 24 Mar 2020 16:40:09 +0000 (17:40 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 24 Mar 2020 16:40:09 +0000 (17:40 +0100)
... now that it is safe to assign them.

This avoids relying on libxl (or whatever toolstack is in use) setting
max_pages up with sufficient 'slop' to allow all necessary ioreq server
pages to be allocated.

Signed-off-by: Paul Durrant <paul@xen.org>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/ioreq.c

index 36fbbcf0ea84a50a069bfba709452f70382bd2c0..70e61788d788ec144565c3841328860fa2f3344a 100644 (file)
@@ -376,7 +376,7 @@ static int hvm_alloc_ioreq_mfn(struct hvm_ioreq_server *s, bool buf)
         return 0;
     }
 
-    page = alloc_domheap_page(s->target, 0);
+    page = alloc_domheap_page(s->target, MEMF_no_refcount);
 
     if ( !page )
         return -ENOMEM;