ia64/xen-unstable

changeset 15342:1623f5f5094f

[IA64] Don't try to save nvram on PV domains

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author Alex Williamson <alex.williamson@hp.com>
date Thu Jun 14 15:32:22 2007 -0600 (2007-06-14)
parents a371cfbd62e8
children 33cc64dcaead
files tools/libxc/ia64/xc_ia64_hvm_build.c
line diff
     1.1 --- a/tools/libxc/ia64/xc_ia64_hvm_build.c	Thu Jun 14 15:29:52 2007 -0600
     1.2 +++ b/tools/libxc/ia64/xc_ia64_hvm_build.c	Thu Jun 14 15:32:22 2007 -0600
     1.3 @@ -709,11 +709,22 @@ copy_from_GFW_to_nvram(int xc_handle, ui
     1.4  
     1.5  int xc_ia64_save_to_nvram(int xc_handle, uint32_t dom) 
     1.6  {
     1.7 +    xc_dominfo_t info;
     1.8      uint64_t nvram_fd = 0;
     1.9 +
    1.10 +    if ( xc_domain_getinfo(xc_handle, dom, 1, &info) != 1 )
    1.11 +    {
    1.12 +        PERROR("Could not get info for domain");
    1.13 +        return -1;
    1.14 +    }
    1.15 +
    1.16 +    if ( !info.hvm )
    1.17 +        return 0;
    1.18 +
    1.19      xc_get_hvm_param(xc_handle, dom, HVM_PARAM_NVRAM_FD, &nvram_fd);
    1.20  
    1.21      if ( !IS_VALID_NVRAM_FD(nvram_fd) )
    1.22 -        PERROR("Nvram not be initialized. Nvram save fail!\n");
    1.23 +        PERROR("Nvram not initialized. Nvram save failed!\n");
    1.24      else
    1.25          copy_from_GFW_to_nvram(xc_handle, dom, (int)nvram_fd);	
    1.26