ia64/xen-unstable

changeset 14667:dc1654ada984

xend: Fix shutdown method after PV-on-HVM save/restore patch.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Thu Mar 29 23:31:58 2007 +0100 (2007-03-29)
parents 4434d1039a65
children 9981a42c8054
files tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Thu Mar 29 19:26:13 2007 +0100
     1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Thu Mar 29 23:31:58 2007 +0100
     1.3 @@ -448,14 +448,13 @@ class XendDomainInfo:
     1.4          self._removeVm('xend/previous_restart_time')
     1.5          self.storeDom("control/shutdown", reason)
     1.6  
     1.7 -        ## HVM domain shutdown itself if has PV driver,
     1.8 -        ## otherwise remote shutdown it
     1.9 -        hvm_pvdrv = xc.hvm_get_param(self.domid, HVM_PARAM_CALLBACK_IRQ)
    1.10 -        if self.info.is_hvm() and not hvm_pvdrv:
    1.11 -            code = REVERSE_DOMAIN_SHUTDOWN_REASONS[reason]
    1.12 -            log.info("HVM save:remote shutdown dom %d!", self.domid)
    1.13 -            xc.domain_shutdown(self.domid, code)
    1.14 -
    1.15 +        # HVM domain shuts itself down only if it has PV drivers
    1.16 +        if self.info.is_hvm():
    1.17 +            hvm_pvdrv = xc.hvm_get_param(self.domid, HVM_PARAM_CALLBACK_IRQ)
    1.18 +            if not hvm_pvdrv:
    1.19 +                code = REVERSE_DOMAIN_SHUTDOWN_REASONS[reason]
    1.20 +                log.info("HVM save:remote shutdown dom %d!", self.domid)
    1.21 +                xc.domain_shutdown(self.domid, code)
    1.22  
    1.23      def pause(self):
    1.24          """Pause domain