WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [IA64] When a domU is destroyed, it will

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] When a domU is destroyed, it will fall into NVRAM saving
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 14 Jun 2007 12:55:22 -0700
Delivery-date: Thu, 14 Jun 2007 15:24:45 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1181644323 -3600
# Node ID 634b7f7f8584f478c9e45a98998c7e7c1b8e3b3d
# Parent  e1c54c14220a4d4ab38d8a3d409ab678275a5426
[IA64] When a domU is destroyed, it will fall into NVRAM saving
path. But if there is no NVRAM file for the domU, the save operation
would fail. Then domU blocked by Xend's exception. This patch fixs
that issue.

Signed-off-by: Zhang Xin <xing.z.zhang@xxxxxxxxx>
---
 tools/libxc/ia64/xc_ia64_hvm_build.c |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff -r e1c54c14220a -r 634b7f7f8584 tools/libxc/ia64/xc_ia64_hvm_build.c
--- a/tools/libxc/ia64/xc_ia64_hvm_build.c      Tue Jun 12 11:29:27 2007 +0100
+++ b/tools/libxc/ia64/xc_ia64_hvm_build.c      Tue Jun 12 11:32:03 2007 +0100
@@ -712,11 +712,15 @@ int xc_ia64_save_to_nvram(int xc_handle,
        xc_get_hvm_param(xc_handle, dom, HVM_PARAM_NVRAM_FD, &nvram_fd);
 
        if ( !IS_VALID_NVRAM_FD(nvram_fd) )
-       {
                PERROR("Nvram not be initialized. Nvram save fail!\n");
-               return -1;
-       }
-       return copy_from_GFW_to_nvram(xc_handle, dom, (int)nvram_fd);   
+       else
+               copy_from_GFW_to_nvram(xc_handle, dom, (int)nvram_fd);  
+       
+       // although save to nvram maybe fail, we don't return any error number
+       // to Xend. This is quite logical because damage of NVRAM on native 
would 
+       // not block OS's executive path. Return error number will cause an 
exception 
+       // of Xend and block XenU when it destroy.
+       return 0;
 }
 
 #define NVRAM_FILE_PATH        "/usr/lib/xen/boot/nvram_"
@@ -862,7 +866,10 @@ setup_guest(int xc_handle, uint32_t dom,
                nvram_start = 0;
        else
                if ( copy_from_nvram_to_GFW(xc_handle, dom, (int)nvram_fd ) == 
-1 )
+               {
                        nvram_start = 0;
+                       close(nvram_fd);
+               }
 
     vcpus = domctl.u.getdomaininfo.max_vcpu_id + 1;
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [IA64] When a domU is destroyed, it will fall into NVRAM saving, Xen patchbot-unstable <=