]> xenbits.xensource.com Git - xen.git/commitdiff
x86/HAP: drop pointless assertions
authorJan Beulich <JBeulich@suse.com>
Tue, 22 Apr 2014 11:30:33 +0000 (12:30 +0100)
committerTim Deegan <tim@xen.org>
Thu, 24 Apr 2014 11:46:16 +0000 (12:46 +0100)
Just like for shadow code, hap_map_domain_page() is just a thin
wrapper around map_domain_page(), which cannot fail. Asserting its
success is redundant.

hap_unmap_domain_page() should also not be used for something not
mapped through hap_map_domain_page().

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Tim Deegan <tim@xen.org>
xen/arch/x86/mm/hap/hap.c

index 60806bbbe7ba18346bbd432256e1379dcc601561..7694e517d1256d44168b01e18bf4711c92483fa6 100644 (file)
@@ -233,9 +233,8 @@ static struct page_info *hap_alloc(struct domain *d)
     d->arch.paging.hap.free_pages--;
 
     p = __map_domain_page(pg);
-    ASSERT(p != NULL);
     clear_page(p);
-    hap_unmap_domain_page(p);
+    unmap_domain_page(p);
 
     return pg;
 }
@@ -375,7 +374,6 @@ static void hap_install_xen_entries_in_l4(struct vcpu *v, mfn_t l4mfn)
     l4_pgentry_t *l4e;
 
     l4e = hap_map_domain_page(l4mfn);
-    ASSERT(l4e != NULL);
 
     /* Copy the common Xen mappings from the idle domain */
     memcpy(&l4e[ROOT_PAGETABLE_FIRST_XEN_SLOT],