x86/hvm: actually release ioreq server pages
authorPaul Durrant <paul.durrant@citrix.com>
Fri, 24 Apr 2015 10:13:48 +0000 (12:13 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 24 Apr 2015 10:13:48 +0000 (12:13 +0200)
hvm_free_ioreq_gmfn has the sense of the ioreq_gmfn mask inverted; it
needs to set a bit to release the gmfn, not clear it.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/hvm.c

index db7bac3e8688b87f4b32675d1ce29a4142a1fe03..497bc734352bd22fa061e2bfbc586dbf47ab091a 100644 (file)
@@ -495,8 +495,8 @@ static void hvm_free_ioreq_gmfn(struct domain *d, unsigned long gmfn)
 {
     unsigned int i = gmfn - d->arch.hvm_domain.ioreq_gmfn.base;
 
-    if (gmfn != INVALID_GFN)
-        clear_bit(i, &d->arch.hvm_domain.ioreq_gmfn.mask);
+    if ( gmfn != INVALID_GFN )
+        set_bit(i, &d->arch.hvm_domain.ioreq_gmfn.mask);
 }
 
 static void hvm_unmap_ioreq_page(struct hvm_ioreq_server *s, bool_t buf)