ia64/xen-unstable

changeset 16933:233f40973e1d

xend: Fix building PV guests after introducing new HVM-HAP config option.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Jan 29 15:16:35 2008 +0000 (2008-01-29)
parents 04e24b9dcc16
children 1a357a1504b2
files tools/python/xen/xend/XendConfig.py tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendConfig.py	Tue Jan 29 15:15:51 2008 +0000
     1.2 +++ b/tools/python/xen/xend/XendConfig.py	Tue Jan 29 15:16:35 2008 +0000
     1.3 @@ -1595,4 +1595,4 @@ class XendConfig(dict):
     1.4          return stored_type or (self.is_hvm() and 'hvm' or 'linux')
     1.5  
     1.6      def is_hap(self):
     1.7 -        return self['platform']['hap']
     1.8 +        return self['platform'].get('hap', 0)
     2.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Tue Jan 29 15:15:51 2008 +0000
     2.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Tue Jan 29 15:16:35 2008 +0000
     2.3 @@ -1626,19 +1626,14 @@ class XendDomainInfo:
     2.4          @raise: VmError on error
     2.5          """
     2.6  
     2.7 -        hvm_bit_offset = 0
     2.8 -
     2.9 -        hap_bit_offset = 1
    2.10 -
    2.11          log.debug('XendDomainInfo.constructDomain')
    2.12  
    2.13          self.shutdownStartTime = None
    2.14  
    2.15 +        hap = 0
    2.16          hvm = self.info.is_hvm()
    2.17 -
    2.18 -        hap = self.info.is_hap()
    2.19 -
    2.20          if hvm:
    2.21 +            hap = self.info.is_hap()
    2.22              info = xc.xeninfo()
    2.23              if 'hvm' not in info['xen_caps']:
    2.24                  raise VmError("HVM guest support is unavailable: is VT/AMD-V "
    2.25 @@ -1663,7 +1658,7 @@ class XendDomainInfo:
    2.26                  domid = 0,
    2.27                  ssidref = ssidref,
    2.28                  handle = uuid.fromString(self.info['uuid']),
    2.29 -                flags = int((hvm << hvm_bit_offset) | (hap << hap_bit_offset)),
    2.30 +                flags = int((hvm << 0) | (hap << 1)),
    2.31                  target = self.info.target())
    2.32          except Exception, e:
    2.33              # may get here if due to ACM the operation is not permitted