aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-03-29 23:31:58 +0100
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-03-29 23:31:58 +0100
commit76b2ca09df529940e080d8969a8a8d99b8300cd0 (patch)
treebeba3176de5a5275b92a453c6c194c7bb242624c
parent7f6d8fe5c9edca501420059a857116e42cd409ee (diff)
downloadxen-76b2ca09df529940e080d8969a8a8d99b8300cd0.tar.gz
xen-76b2ca09df529940e080d8969a8a8d99b8300cd0.tar.bz2
xen-76b2ca09df529940e080d8969a8a8d99b8300cd0.zip
xend: Fix shutdown method after PV-on-HVM save/restore patch.
Signed-off-by: Keir Fraser <keir@xensource.com>
-rw-r--r--tools/python/xen/xend/XendDomainInfo.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py
index 3fdba4d8f2..7ba20fb566 100644
--- a/tools/python/xen/xend/XendDomainInfo.py
+++ b/tools/python/xen/xend/XendDomainInfo.py
@@ -448,14 +448,13 @@ class XendDomainInfo:
self._removeVm('xend/previous_restart_time')
self.storeDom("control/shutdown", reason)
- ## HVM domain shutdown itself if has PV driver,
- ## otherwise remote shutdown it
- hvm_pvdrv = xc.hvm_get_param(self.domid, HVM_PARAM_CALLBACK_IRQ)
- if self.info.is_hvm() and not hvm_pvdrv:
- code = REVERSE_DOMAIN_SHUTDOWN_REASONS[reason]
- log.info("HVM save:remote shutdown dom %d!", self.domid)
- xc.domain_shutdown(self.domid, code)
-
+ # HVM domain shuts itself down only if it has PV drivers
+ if self.info.is_hvm():
+ hvm_pvdrv = xc.hvm_get_param(self.domid, HVM_PARAM_CALLBACK_IRQ)
+ if not hvm_pvdrv:
+ code = REVERSE_DOMAIN_SHUTDOWN_REASONS[reason]
+ log.info("HVM save:remote shutdown dom %d!", self.domid)
+ xc.domain_shutdown(self.domid, code)
def pause(self):
"""Pause domain