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] I have previously posted a patch with changes to the xen

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] I have previously posted a patch with changes to the xenbus for being
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 03 Feb 2006 19:24:19 +0000
Delivery-date: Fri, 03 Feb 2006 19:37:05 +0000
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/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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 0bd023cf351eae5d41b86889d3febb4d41b6df69
# Parent  6d9b7a0ba238786008e0e96323180eff7a61c468
I have previously posted a patch with changes to the xenbus for being
able to detect the reason why a frontend is created, which can be either
due to domain creation or a restore. The attached patch now puts this
functionality into XenD and allows driver implementations in Xend to
read the state and see whether a domain is currently being resumed or
created and write this value into the xenstore for hotplug scripts to
read it. The state of a domain being resumed is set when a
XendDomainInfo object is created and reset at the end of the restore
function.

Signed-off-by: Stefan Berger <stefanb@xxxxxxxxxx>

diff -r 6d9b7a0ba238 -r 0bd023cf351e tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Fri Feb  3 10:51:39 2006
+++ b/tools/python/xen/xend/XendDomainInfo.py   Fri Feb  3 10:54:05 2006
@@ -251,13 +251,14 @@
 
     log.debug("XendDomainInfo.restore(%s)", config)
 
-    vm = XendDomainInfo(parseConfig(config))
+    vm = XendDomainInfo(parseConfig(config), None, None, False, False, True)
     try:
         vm.construct()
         vm.storeVmDetails()
         vm.createDevices()
         vm.createChannels()
         vm.storeDomDetails()
+        vm.endRestore()
         return vm
     except:
         vm.destroy()
@@ -410,7 +411,7 @@
 class XendDomainInfo:
 
     def __init__(self, info, domid = None, dompath = None, augment = False,
-                 priv = False):
+                 priv = False, resume = False):
 
         self.info = info
 
@@ -445,6 +446,7 @@
         self.state_updated = threading.Condition()
         self.refresh_shutdown_lock = threading.Condition()
 
+        self.setResume(resume)
 
     ## private:
 
@@ -758,6 +760,14 @@
         """Get this domain's target memory size, in KB."""
         return self.info['memory'] * 1024
 
+    def getResume(self):
+        return "%s" % self.info['resume']
+
+    def endRestore(self):
+        self.setResume(False)
+
+    def setResume(self, state):
+        self.info['resume'] = state
 
     def refreshShutdown(self, xeninfo = None):
         # If set at the end of this method, a restart is required, with the
diff -r 6d9b7a0ba238 -r 0bd023cf351e tools/python/xen/xend/server/tpmif.py
--- a/tools/python/xen/xend/server/tpmif.py     Fri Feb  3 10:51:39 2006
+++ b/tools/python/xen/xend/server/tpmif.py     Fri Feb  3 10:54:05 2006
@@ -45,7 +45,8 @@
 
         log.info("The domain has a TPM with instance %d and devid %d.",
                  inst, devid)
-        back  = { 'pref_instance' : "%i" % inst }
+        back  = { 'pref_instance' : "%i" % inst,
+                  'resume'        : "%s" % (self.vm.getResume()) }
         front = { 'handle' : "%i" % devid }
 
         return (devid, back, front)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] I have previously posted a patch with changes to the xenbus for being, Xen patchbot -unstable <=