ia64/xen-unstable

changeset 14495:93e11f6d6791

[IA64] Improve error message when HVM domain creation failed

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
author awilliam@xenbuild2.aw
date Thu Mar 22 09:28:05 2007 -0600 (2007-03-22)
parents 2216a45bf058
children be1017157768
files xen/arch/ia64/vmx/vmmu.c xen/arch/ia64/vmx/vmx_init.c
line diff
     1.1 --- a/xen/arch/ia64/vmx/vmmu.c	Tue Mar 20 15:19:38 2007 -0600
     1.2 +++ b/xen/arch/ia64/vmx/vmmu.c	Thu Mar 22 09:28:05 2007 -0600
     1.3 @@ -136,8 +136,7 @@ static int init_domain_vhpt(struct vcpu 
     1.4      page = alloc_domheap_pages (NULL, VCPU_VHPT_ORDER, 0);
     1.5      if ( page == NULL ) {
     1.6          printk("No enough contiguous memory for init_domain_vhpt\n");
     1.7 -
     1.8 -        return -1;
     1.9 +        return -ENOMEM;
    1.10      }
    1.11      vbase = page_to_virt(page);
    1.12      memset(vbase, 0, VCPU_VHPT_SIZE);
    1.13 @@ -171,15 +170,17 @@ int init_domain_tlb(struct vcpu *v)
    1.14  {
    1.15      struct page_info *page;
    1.16      void * vbase;
    1.17 +    int rc;
    1.18  
    1.19 -    if (init_domain_vhpt(v) != 0)
    1.20 -        return -1;
    1.21 +    rc = init_domain_vhpt(v);
    1.22 +    if (rc)
    1.23 +        return rc;
    1.24  
    1.25      page = alloc_domheap_pages (NULL, VCPU_VTLB_ORDER, 0);
    1.26      if ( page == NULL ) {
    1.27          printk("No enough contiguous memory for init_domain_tlb\n");
    1.28          free_domain_vhpt(v);
    1.29 -        return -1;
    1.30 +        return -ENOMEM;
    1.31      }
    1.32      vbase = page_to_virt(page);
    1.33      memset(vbase, 0, VCPU_VTLB_SIZE);
     2.1 --- a/xen/arch/ia64/vmx/vmx_init.c	Tue Mar 20 15:19:38 2007 -0600
     2.2 +++ b/xen/arch/ia64/vmx/vmx_init.c	Thu Mar 22 09:28:05 2007 -0600
     2.3 @@ -295,6 +295,7 @@ int
     2.4  vmx_final_setup_guest(struct vcpu *v)
     2.5  {
     2.6  	vpd_t *vpd;
     2.7 +	int rc;
     2.8  
     2.9  	vpd = alloc_vpd();
    2.10  	ASSERT(vpd);
    2.11 @@ -306,8 +307,9 @@ vmx_final_setup_guest(struct vcpu *v)
    2.12  	 * to this solution. Maybe it can be deferred until we know created
    2.13  	 * one as vmx domain */
    2.14  #ifndef HASH_VHPT
    2.15 -	if (init_domain_tlb(v) != 0)
    2.16 -		return -1;
    2.17 +	rc = init_domain_tlb(v);
    2.18 +	if (rc)
    2.19 +		return rc;
    2.20  #endif
    2.21  	vmx_create_event_channels(v);
    2.22