ia64/xen-unstable

changeset 15749:d8b5b02c52cf

[HVM] [TOOLS] Move device state save earlier in suspend path
Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
author Tim Deegan <Tim.Deegan@xensource.com>
date Mon Aug 13 16:47:11 2007 +0100 (2007-08-13)
parents 01c721fddb90
children 08e962b8597c
files tools/python/xen/xend/XendCheckpoint.py tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendCheckpoint.py	Mon Aug 13 16:41:04 2007 +0100
     1.2 +++ b/tools/python/xen/xend/XendCheckpoint.py	Mon Aug 13 16:47:11 2007 +0100
     1.3 @@ -98,6 +98,9 @@ def save(fd, dominfo, network, live, dst
     1.4                  log.info("Domain %d suspended.", dominfo.getDomid())
     1.5                  dominfo.migrateDevices(network, dst, DEV_MIGRATE_STEP3,
     1.6                                         domain_name)
     1.7 +                if hvm:
     1.8 +                    dominfo.image.saveDeviceModel()
     1.9 +
    1.10                  tochild.write("done\n")
    1.11                  tochild.flush()
    1.12                  log.debug('Written done')
     2.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Mon Aug 13 16:41:04 2007 +0100
     2.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Mon Aug 13 16:47:11 2007 +0100
     2.3 @@ -1184,8 +1184,6 @@ class XendDomainInfo:
     2.4                      self._clearRestart()
     2.5  
     2.6                      if reason == 'suspend':
     2.7 -                        if self._stateGet() != DOM_STATE_SUSPENDED:
     2.8 -                            self.image.saveDeviceModel()
     2.9                          self._stateSet(DOM_STATE_SUSPENDED)
    2.10                          # Don't destroy the domain.  XendCheckpoint will do
    2.11                          # this once it has finished.  However, stop watching