[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] x86/HAP: drop pointless assertions



commit 1e50b51dc5e9594975ccc060dd58bc35873911bc
Author:     Jan Beulich <JBeulich@xxxxxxxx>
AuthorDate: Tue Apr 22 12:30:33 2014 +0100
Commit:     Tim Deegan <tim@xxxxxxx>
CommitDate: Thu Apr 24 12:46:16 2014 +0100

    x86/HAP: drop pointless assertions
    
    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@xxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Reviewed-by: Tim Deegan <tim@xxxxxxx>
---
 xen/arch/x86/mm/hap/hap.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/mm/hap/hap.c b/xen/arch/x86/mm/hap/hap.c
index 60806bb..7694e51 100644
--- a/xen/arch/x86/mm/hap/hap.c
+++ b/xen/arch/x86/mm/hap/hap.c
@@ -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],
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.