ia64/xen-unstable

changeset 14834:74321599b8e8

[HVM] Save/restore: catch more error cases in the tools
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
author Tim Deegan <Tim.Deegan@xensource.com>
date Thu Apr 12 15:54:59 2007 +0100 (2007-04-12)
parents 5a8cb6354df5
children d3ed330f8292
files tools/libxc/xc_domain_restore.c
line diff
     1.1 --- a/tools/libxc/xc_domain_restore.c	Thu Apr 12 15:07:20 2007 +0100
     1.2 +++ b/tools/libxc/xc_domain_restore.c	Thu Apr 12 15:54:59 2007 +0100
     1.3 @@ -688,12 +688,21 @@ int xc_domain_restore(int xc_handle, int
     1.4              ERROR("error zeroing magic pages");
     1.5              goto out;
     1.6          }
     1.7 -        
     1.8 -        xc_set_hvm_param(xc_handle, dom, HVM_PARAM_IOREQ_PFN, magic_pfns[0]);
     1.9 -        xc_set_hvm_param(xc_handle, dom, HVM_PARAM_BUFIOREQ_PFN, magic_pfns[1]);
    1.10 -        xc_set_hvm_param(xc_handle, dom, HVM_PARAM_STORE_PFN, magic_pfns[2]);
    1.11 -        xc_set_hvm_param(xc_handle, dom, HVM_PARAM_PAE_ENABLED, pae);
    1.12 -        xc_set_hvm_param(xc_handle, dom, HVM_PARAM_STORE_EVTCHN, store_evtchn);
    1.13 +                
    1.14 +        if ( (rc = xc_set_hvm_param(xc_handle, dom, 
    1.15 +                                    HVM_PARAM_IOREQ_PFN, magic_pfns[0]))
    1.16 +             || (rc = xc_set_hvm_param(xc_handle, dom, 
    1.17 +                                       HVM_PARAM_BUFIOREQ_PFN, magic_pfns[1]))
    1.18 +             || (rc = xc_set_hvm_param(xc_handle, dom, 
    1.19 +                                       HVM_PARAM_STORE_PFN, magic_pfns[2]))
    1.20 +             || (rc = xc_set_hvm_param(xc_handle, dom, 
    1.21 +                                       HVM_PARAM_PAE_ENABLED, pae))
    1.22 +             || (rc = xc_set_hvm_param(xc_handle, dom, 
    1.23 +                                       HVM_PARAM_STORE_EVTCHN, store_evtchn)) )
    1.24 +        {
    1.25 +            ERROR("error setting HVM params: %i", rc);
    1.26 +            goto out;
    1.27 +        }
    1.28          *store_mfn = magic_pfns[2];
    1.29  
    1.30          /* Read HVM context */