]> xenbits.xensource.com Git - xen.git/commitdiff
[IA64] Improve error message when HVM domain creation failed
authorawilliam@xenbuild2.aw <awilliam@xenbuild2.aw>
Thu, 22 Mar 2007 15:28:05 +0000 (09:28 -0600)
committerawilliam@xenbuild2.aw <awilliam@xenbuild2.aw>
Thu, 22 Mar 2007 15:28:05 +0000 (09:28 -0600)
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
xen/arch/ia64/vmx/vmmu.c
xen/arch/ia64/vmx/vmx_init.c

index 917f274bf9a127862dcf10d3f7c25ebc5fa02795..ee456c030e8cdf25e9369ec88f59aa0ac6eb9fa5 100644 (file)
@@ -136,8 +136,7 @@ static int init_domain_vhpt(struct vcpu *v)
     page = alloc_domheap_pages (NULL, VCPU_VHPT_ORDER, 0);
     if ( page == NULL ) {
         printk("No enough contiguous memory for init_domain_vhpt\n");
-
-        return -1;
+        return -ENOMEM;
     }
     vbase = page_to_virt(page);
     memset(vbase, 0, VCPU_VHPT_SIZE);
@@ -171,15 +170,17 @@ int init_domain_tlb(struct vcpu *v)
 {
     struct page_info *page;
     void * vbase;
+    int rc;
 
-    if (init_domain_vhpt(v) != 0)
-        return -1;
+    rc = init_domain_vhpt(v);
+    if (rc)
+        return rc;
 
     page = alloc_domheap_pages (NULL, VCPU_VTLB_ORDER, 0);
     if ( page == NULL ) {
         printk("No enough contiguous memory for init_domain_tlb\n");
         free_domain_vhpt(v);
-        return -1;
+        return -ENOMEM;
     }
     vbase = page_to_virt(page);
     memset(vbase, 0, VCPU_VTLB_SIZE);
index 10daa5c42466438da6f9faf45cc3bd1d9833711d..65c62f6454c316a9cab10ef08f6a03a6e3f2c615 100644 (file)
@@ -295,6 +295,7 @@ int
 vmx_final_setup_guest(struct vcpu *v)
 {
        vpd_t *vpd;
+       int rc;
 
        vpd = alloc_vpd();
        ASSERT(vpd);
@@ -306,8 +307,9 @@ vmx_final_setup_guest(struct vcpu *v)
         * to this solution. Maybe it can be deferred until we know created
         * one as vmx domain */
 #ifndef HASH_VHPT
-       if (init_domain_tlb(v) != 0)
-               return -1;
+       rc = init_domain_tlb(v);
+       if (rc)
+               return rc;
 #endif
        vmx_create_event_channels(v);