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-devel

[Xen-devel] [PATCH][VT] xm reboot for vmx domain

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH][VT] xm reboot for vmx domain
From: "Yu, Ke" <ke.yu@xxxxxxxxx>
Date: Fri, 28 Oct 2005 13:05:10 +0800
Delivery-date: Fri, 28 Oct 2005 05:02:24 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcXbfSv1TNm02MdPTsS74yeKjYUxYA==
Thread-topic: [PATCH][VT] xm reboot for vmx domain
This patch make "xm reboot <domid>" be able to reboot vmx domain. 

In xm reboot process, control panel will wait until DomU notified
hypervisor to set domain flag DOMFLAGS_SHUTDOWN. Unlike DomU, vmx domain
run unmodified OS, so guest OS can not notified hypervisor. This patch
adds the missing logic in control panel. 

Signed-off-by: Xu Dan <dan.d.xu@xxxxxxxxx >
             Yu Ke <ke.yu@xxxxxxxxx>

diff -r 0240a69e1f97 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Wed Oct 26 13:59:29 2005
+++ b/tools/python/xen/xend/XendDomainInfo.py   Thu Oct 27 17:03:08 2005
@@ -680,6 +680,14 @@
         """Get this domain's target memory size, in KiB."""
         return self.info['memory_KiB']
 
+    def vmx_get_xeninfo(self, xeninfo):
+        """Get vmx xeninfo"""
+        shutdown_reason = self.readDom('control/shutdown')
+        if shutdown_reason:
+            xeninfo['shutdown'] = 1
+            for x in shutdown_reasons.keys():
+                if shutdown_reasons[x] == shutdown_reason:
+                    xeninfo['shutdown_reason'] = x
 
     def refreshShutdown(self, xeninfo = None):
         # If set at the end of this method, a restart is required, with
the
@@ -701,6 +709,10 @@
                     # machine.
                     self.cleanupDomain()
                     return
+
+            if self.image:
+                if self.image.ostype == "vmx":
+                    self.vmx_get_xeninfo(xeninfo)
 
             if xeninfo['dying']:
                 # Dying means that a domain has been destroyed, but has
not

Attachment: reboot1.patch
Description: reboot1.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH][VT] xm reboot for vmx domain, Yu, Ke <=