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] libxc: Handle failed xc_get_hvm_param in

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxc: Handle failed xc_get_hvm_param in domain save
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Sat, 26 Feb 2011 07:40:10 +0000
Delivery-date: Fri, 25 Feb 2011 23:41:30 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 George Dunlap <george.dunlap@xxxxxxxxxxxxx>
# Date 1298654778 0
# Node ID 846c53ec8b58899cc84b57799407d5b174f795f4
# Parent  d9065311f76dc6d5188ab595262f76a9f9411358
libxc: Handle failed xc_get_hvm_param in domain save

The domain save code will read an HVM param, and if it's not zero,
make an entry for it.  However, if the hypercall fails for any reason,
the data may not be written, and the value for the previous parameter
may be written in the save file as the parameter that failed.

Initialize the value to zero before each hypercall, so that in case of
a failure, no value will be written.

Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---


diff -r d9065311f76d -r 846c53ec8b58 tools/libxc/xc_domain_save.c
--- a/tools/libxc/xc_domain_save.c      Fri Feb 25 17:23:58 2011 +0000
+++ b/tools/libxc/xc_domain_save.c      Fri Feb 25 17:26:18 2011 +0000
@@ -1597,6 +1597,7 @@
         } chunk = { 0, };
 
         chunk.id = XC_SAVE_ID_HVM_IDENT_PT;
+        chunk.data = 0;
         xc_get_hvm_param(xch, dom, HVM_PARAM_IDENT_PT,
                          (unsigned long *)&chunk.data);
 
@@ -1608,6 +1609,7 @@
         }
 
         chunk.id = XC_SAVE_ID_HVM_VM86_TSS;
+        chunk.data = 0;
         xc_get_hvm_param(xch, dom, HVM_PARAM_VM86_TSS,
                          (unsigned long *)&chunk.data);
 
@@ -1619,6 +1621,7 @@
         }
 
         chunk.id = XC_SAVE_ID_HVM_CONSOLE_PFN;
+        chunk.data = 0;
         xc_get_hvm_param(xch, dom, HVM_PARAM_CONSOLE_PFN,
                          (unsigned long *)&chunk.data);
 
@@ -1630,6 +1633,7 @@
         }
 
         chunk.id = XC_SAVE_ID_HVM_ACPI_IOPORTS_LOCATION;
+        chunk.data = 0;
         xc_get_hvm_param(xch, dom, HVM_PARAM_ACPI_IOPORTS_LOCATION,
                          (unsigned long *)&chunk.data);
 

_______________________________________________
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] libxc: Handle failed xc_get_hvm_param in domain save, Xen patchbot-unstable <=